Dap:Attribute Extension Example 1: Difference between revisions

From OPeNDAP Documentation
⧼opendap2-jumptonavigation⧽
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
=== [[dap:Attribute Extension Example 1|Example 1]] ===
== Example 1 ==


Here we use a transform that maps arbitary XML into a specialsubset of the DAP Attribute space.
Here we use a transform that maps arbitary XML into a specialsubset of the DAP Attribute space.
Xml elements map to dap:Attribute elements of type xmlElementNode with namespace or prefix attributes.
* Xml elements map to dap:Attribute elements of type xmlElementNode with namespace or prefix attributes.
Xml attributes map to dap:Attribute elements of type xmlAttributeNode with namespace or prefix attributes.
* Xml attributes map to dap:Attribute elements of type xmlAttributeNode with namespace or prefix attributes.
Xml text content maps to dap:Attribute of type xmlTexNode
* Xml text content maps to dap:Attribute of type xmlTexNode


The mapping requires extending the dap:Attribute model to include:
The mapping requires extending the dap:Attribute model to include:
A "namespace" attribute.
# A "namespace" attribute.
A "prefix" attribute.
# A "prefix" attribute.
A new type called xmlElementNode
# A new type called xmlElementNode
A new type called xmlAttributeNode
# A new type called xmlAttributeNode
A new type called xmlTextNode
# A new type called xmlTextNode




Line 893: Line 893:
</CoverageDescriptions>
</CoverageDescriptions>
</pre>
</pre>
[[Category:Development|DAP3/4]] [[Category:DAP4|DAP3/4]]

Latest revision as of 03:08, 17 January 2009

Example 1

Here we use a transform that maps arbitary XML into a specialsubset of the DAP Attribute space.

  • Xml elements map to dap:Attribute elements of type xmlElementNode with namespace or prefix attributes.
  • Xml attributes map to dap:Attribute elements of type xmlAttributeNode with namespace or prefix attributes.
  • Xml text content maps to dap:Attribute of type xmlTexNode

The mapping requires extending the dap:Attribute model to include:

  1. A "namespace" attribute.
  2. A "prefix" attribute.
  3. A new type called xmlElementNode
  4. A new type called xmlAttributeNode
  5. A new type called xmlTextNode


The explicit syntax of the source XML document is easily preserved in the resulting dap:Attributes, but it's ugly. And it's a lot of cahnges ot the DAP. And I think it looks a lot like RDF. And all of the changes mean that no DAP client that exists can use the information. So why not just include the raw XML?


Source XML

<?xml version="1.0" encoding="UTF-8"?>
<CoverageDescriptions xmlns="http://www.opengis.net/wcs/1.1" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:owcs="http://www.opengis.net/wcs/1.1/ows" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:schemaLocation="http://www.opengis.net/wcs/1.1  http://schemas.opengis.net/wcs/1.1.0/wcsDescribeCoverage.xsd  http://www.opengis.net/ows/1.1  http://schemas.opengis.net/ows/1.1.0/owsAll.xsd  http://www.opengis.net/wcs/1.1/ows http://schemas.opengis.net/wcs/1.1.0/owsDataIdentification.xsd http://www.opengis.net/gml/3.2  http://schemas.opengis.net/gml/3.2.1/gml.xsd">
    <CoverageDescription>
        <ows:Title>Near-Real Time Surface Ocean Velocity</ows:Title>
        <ows:Abstract>CoverageDescription generated by OPeNDAP WCS UseCase 2.0</ows:Abstract>
        <Identifier>coverage/200803061600_HFRadar_USEGC_6km_rtv_SIO.nc</Identifier>
        <Domain>
            <SpatialDomain>
                <ows:BoundingBox crs="urn:ogc:def:crs:EPSG::4326">
                    <ows:LowerCorner>-97.8839 21.736</ows:LowerCorner>
                    <ows:UpperCorner>-57.2312 46.4944</ows:UpperCorner>
                </ows:BoundingBox>
            </SpatialDomain>
            <TemporalDomain>
                <gml:timePosition>2008-03-27T16:00:00.000Z</gml:timePosition>
            </TemporalDomain>
        </Domain>
        <Range>
            <Field>
                <ows:Title>surface_eastward_sea_water_velocity</ows:Title>
                <ows:Abstract>Eastward component of a 2D sea surface velocity vector.</ows:Abstract>
                <Identifier>u</Identifier>
                <Definition>
                    <ows:AnyValue/>
                </Definition>
                <NullValue>-32768</NullValue>
                <owcs:InterpolationMethods>
                    <owcs:DefaultMethod>nearest</owcs:DefaultMethod>
                </owcs:InterpolationMethods>
            </Field>
            <Field>
                <ows:Title>surface_northward_sea_water_velocity</ows:Title>
                <ows:Abstract>Northward component of a 2D sea surface velocity vector.</ows:Abstract>
                <Identifier>v</Identifier>
                <Definition>
                    <ows:AnyValue/>
                </Definition>
                <NullValue>-32768</NullValue>
                <owcs:InterpolationMethods>
                    <owcs:DefaultMethod>nearest</owcs:DefaultMethod>
                </owcs:InterpolationMethods>
            </Field>
            <Field>
                <ows:Title>longitudinal dilution of precision</ows:Title>
                <ows:Abstract>The longitudinal dilution of precision (DOPx) represents the\\012contribution of the radars' configuration geometry to\\012uncertainty in the eastward velocity estimate (u). DOPx is a\\012direct multiplier of the standard error in obtaining the\\012standard deviation for the eastward velocity estimate from the\\012least squares best fit. DOPx and DOPy are commonly used to\\012obtain the geometric dilution of precision\\012(GDOP = sqrt(DOPx^2 + DOPy^2)), a useful metric for filtering\\012errant velocities due to poor geometry.</ows:Abstract>
                <Identifier>DOPx</Identifier>
                <Definition>
                    <ows:AnyValue/>
                </Definition>
                <NullValue>-32768</NullValue>
                <owcs:InterpolationMethods>
                    <owcs:DefaultMethod>nearest</owcs:DefaultMethod>
                </owcs:InterpolationMethods>
            </Field>
            <Field>
                <ows:Title>latitudinal dilution of precision</ows:Title>
                <ows:Abstract>The latitudinal dilution of precision (DOPy) represents the\\012contribution of the radars' configuration geometry to\\012uncertainty in the northward velocity estimate (v). DOPy is a\\012direct multiplier of the standard error in obtaining the\\012standard deviation for the northward velocity estimate from the\\012least squares best fit. DOPx and DOPy are commonly used to\\012obtain the geometric dilution of precision\\012(GDOP = sqrt(DOPx^2 + DOPy^2)), a useful metric for filtering\\012errant velocities due to poor geometry.</ows:Abstract>
                <Identifier>DOPy</Identifier>
                <Definition>
                    <ows:AnyValue/>
                </Definition>
                <NullValue>-32768</NullValue>
                <owcs:InterpolationMethods>
                    <owcs:DefaultMethod>nearest</owcs:DefaultMethod>
                </owcs:InterpolationMethods>
            </Field>
            <Field>
                <ows:Title>Contributing radar site latitudes</ows:Title>
                <ows:Abstract>Contributing radar site latitudes</ows:Abstract>
                <Identifier>site_lat</Identifier>
                <Definition>
                    <ows:AnyValue/>
                </Definition>
                <NullValue>-32768</NullValue>
                <owcs:InterpolationMethods>
                    <owcs:DefaultMethod>nearest</owcs:DefaultMethod>
                </owcs:InterpolationMethods>
            </Field>
            <Field>
                <ows:Title>Contributing radar site longitudes</ows:Title>
                <ows:Abstract>Contributing radar site longitudes.</ows:Abstract>
                <Identifier>site_lon</Identifier>
                <Definition>
                    <ows:AnyValue/>
                </Definition>
                <NullValue>-32768</NullValue>
                <owcs:InterpolationMethods>
                    <owcs:DefaultMethod>nearest</owcs:DefaultMethod>
                </owcs:InterpolationMethods>
            </Field>
            <Field>
                <ows:Title>Contributing radar site code.</ows:Title>
                <ows:Abstract>Contributing radar site code.</ows:Abstract>
                <Identifier>site_code</Identifier>
                <Definition>
                    <ows:AnyValue/>
                </Definition>
                <NullValue>-32768</NullValue>
                <owcs:InterpolationMethods>
                    <owcs:DefaultMethod>nearest</owcs:DefaultMethod>
                </owcs:InterpolationMethods>
            </Field>
            <Field>
                <ows:Title>Contributing radar site network affiliation code.</ows:Title>
                <ows:Abstract>Contributing radar site network affiliation code.</ows:Abstract>
                <Identifier>site_netCode</Identifier>
                <Definition>
                    <ows:AnyValue/>
                </Definition>
                <NullValue>-32768</NullValue>
                <owcs:InterpolationMethods>
                    <owcs:DefaultMethod>nearest</owcs:DefaultMethod>
                </owcs:InterpolationMethods>
            </Field>
            <Field>
                <ows:Title>RTV processing parameters</ows:Title>
                <ows:Abstract>Contributing radar site network affiliation code.</ows:Abstract>
                <Identifier>procParams</Identifier>
                <Definition>
                    <ows:AnyValue/>
                </Definition>
                <NullValue>-32768</NullValue>
                <owcs:InterpolationMethods>
                    <owcs:DefaultMethod>nearest</owcs:DefaultMethod>
                </owcs:InterpolationMethods>
            </Field>
        </Range>
        <SupportedCRS>urn:ogc:def:crs:EPSG::4326</SupportedCRS>
        <SupportedFormat>netcdf-cf1.0</SupportedFormat>
        <SupportedFormat>dap2.0</SupportedFormat>
    </CoverageDescription>
</CoverageDescriptions>

Transform

    <xsl:stylesheet version="1.0"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:dap="http://xml.opendap.org/ns/DAP2"
            >
        <xsl:output method='xml' version='1.0' encoding='UTF-8' indent='yes'/>

        <xsl:strip-space elements="*" />


        <xsl:template match="/">
            <dap:Dataset>
                <xsl:apply-templates/>
            </dap:Dataset>

        </xsl:template>
        <xsl:template match="*">
            <!-- Create a dap:Attribute element to wrap this XML element -->
            <xsl:element name="dap:Attribute">

                <!-- The name of the dap:Attribute is the non-prefixed QName of the source XML element -->
                <xsl:attribute name="name">
                    <xsl:value-of select="local-name()"/>
                </xsl:attribute>

                <!-- Add the namespace of the source XML element as an attribute -->
                <xsl:attribute name="namespace">
                    <xsl:value-of select="namespace-uri()"/>
                </xsl:attribute>

                <!--  Make it type xmlElementNode -->
                <xsl:attribute name="type">xmlElementNode</xsl:attribute>

                <!-- Make special Attributes for each of the xml elements attributes. -->
                <xsl:for-each select="@*">
                    <xsl:element name="dap:Attribute">
                        <xsl:attribute name="name">
                            <xsl:value-of select="local-name()"/>
                        </xsl:attribute>
                        <xsl:attribute name="type">xmlAttributeNode</xsl:attribute>
                        <xsl:attribute name="namespace">
                            <xsl:value-of select="namespace-uri()"/>
                        </xsl:attribute>
                        <xsl:element name="dap:value">
                            <xsl:value-of select="."/>
                        </xsl:element>                        
                    </xsl:element>
                </xsl:for-each>

                <!-- A 1:1 mapping would fail here because the DAP does not allow a
                 - a dap:Attributes@type to be 'Container' AND have XML text content.
                 - We need another value for dap:Attribute@type, say 'xmlText'?
                -->
                <!-- Make special Attributes for source xml elements text node. -->
                <xsl:if test="text()">
                    <xsl:element name="dap:Attribute">
                        <xsl:attribute name="name">textNode</xsl:attribute>
                        <xsl:attribute name="type">xmlTextNode</xsl:attribute>
                        <xsl:element name="dap:value">
                            <xsl:copy-of select="text()"/>
                        </xsl:element>
                    </xsl:element>
                </xsl:if>

                <xsl:apply-templates/>


            </xsl:element>
        </xsl:template>

        <xsl:template name="text">
            <xsl:copy-of select="text()"/>
        </xsl:template>

        <xsl:template  match="@*|text()" />


    </xsl:stylesheet>

Result

<?xml version="1.0" encoding="UTF-8"?>
<dap:Dataset xmlns:dap="http://xml.opendap.org/ns/DAP2">
   <dap:Attribute name="CoverageDescriptions" namespace="http://www.opengis.net/wcs/1.1"
                  type="xmlElementNode">
      <dap:Attribute name="CoverageDescription" namespace="http://www.opengis.net/wcs/1.1"
                     type="xmlElementNode">
         <dap:Attribute name="Title" namespace="http://www.opengis.net/ows/1.1" type="xmlElementNode">
            <dap:Attribute name="textNode" type="xmlTextNode">
               <dap:value>Near-Real Time Surface Ocean Velocity</dap:value>
            </dap:Attribute>
         </dap:Attribute>
         <dap:Attribute name="Abstract" namespace="http://www.opengis.net/ows/1.1"
                        type="xmlElementNode">
            <dap:Attribute name="textNode" type="xmlTextNode">
               <dap:value>CoverageDescription generated by OPeNDAP WCS UseCase 2.0</dap:value>
            </dap:Attribute>
         </dap:Attribute>
         <dap:Attribute name="Identifier" namespace="http://www.opengis.net/wcs/1.1"
                        type="xmlElementNode">
            <dap:Attribute name="textNode" type="xmlTextNode">
               <dap:value>coverage/200803061600_HFRadar_USEGC_6km_rtv_SIO.nc</dap:value>
            </dap:Attribute>
         </dap:Attribute>
         <dap:Attribute name="Domain" namespace="http://www.opengis.net/wcs/1.1" type="xmlElementNode">
            <dap:Attribute name="SpatialDomain" namespace="http://www.opengis.net/wcs/1.1"
                           type="xmlElementNode">
               <dap:Attribute name="BoundingBox" namespace="http://www.opengis.net/ows/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="crs" type="xmlAttributeNode" namespace="http://www.opengis.net/gml/3.2">
                     <dap:value>urn:ogc:def:crs:EPSG::4326</dap:value>
                  </dap:Attribute>
                  <dap:Attribute name="LowerCorner" namespace="http://www.opengis.net/ows/1.1"
                                 type="xmlElementNode">
                     <dap:Attribute name="textNode" type="xmlTextNode">
                        <dap:value>-97.8839 21.736</dap:value>
                     </dap:Attribute>
                  </dap:Attribute>
                  <dap:Attribute name="UpperCorner" namespace="http://www.opengis.net/ows/1.1"
                                 type="xmlElementNode">
                     <dap:Attribute name="textNode" type="xmlTextNode">
                        <dap:value>-57.2312 46.4944</dap:value>
                     </dap:Attribute>
                  </dap:Attribute>
               </dap:Attribute>
            </dap:Attribute>
            <dap:Attribute name="TemporalDomain" namespace="http://www.opengis.net/wcs/1.1"
                           type="xmlElementNode">
               <dap:Attribute name="timePosition" namespace="http://www.opengis.net/gml/3.2"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>2008-03-27T16:00:00.000Z</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
            </dap:Attribute>
         </dap:Attribute>
         <dap:Attribute name="Range" namespace="http://www.opengis.net/wcs/1.1" type="xmlElementNode">
            <dap:Attribute name="Field" namespace="http://www.opengis.net/wcs/1.1" type="xmlElementNode">
               <dap:Attribute name="Title" namespace="http://www.opengis.net/ows/1.1" type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>surface_eastward_sea_water_velocity</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Abstract" namespace="http://www.opengis.net/ows/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>Eastward component of a 2D sea surface velocity vector.</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Identifier" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>u</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Definition" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="AnyValue" namespace="http://www.opengis.net/ows/1.1"
                                 type="xmlElementNode"/>
               </dap:Attribute>
               <dap:Attribute name="NullValue" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>-32768</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="InterpolationMethods" namespace="http://www.opengis.net/wcs/1.1/ows"
                              type="xmlElementNode">
                  <dap:Attribute name="DefaultMethod" namespace="http://www.opengis.net/wcs/1.1/ows"
                                 type="xmlElementNode">
                     <dap:Attribute name="textNode" type="xmlTextNode">
                        <dap:value>nearest</dap:value>
                     </dap:Attribute>
                  </dap:Attribute>
               </dap:Attribute>
            </dap:Attribute>
            <dap:Attribute name="Field" namespace="http://www.opengis.net/wcs/1.1" type="xmlElementNode">
               <dap:Attribute name="Title" namespace="http://www.opengis.net/ows/1.1" type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>surface_northward_sea_water_velocity</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Abstract" namespace="http://www.opengis.net/ows/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>Northward component of a 2D sea surface velocity vector.</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Identifier" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>v</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Definition" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="AnyValue" namespace="http://www.opengis.net/ows/1.1"
                                 type="xmlElementNode"/>
               </dap:Attribute>
               <dap:Attribute name="NullValue" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>-32768</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="InterpolationMethods" namespace="http://www.opengis.net/wcs/1.1/ows"
                              type="xmlElementNode">
                  <dap:Attribute name="DefaultMethod" namespace="http://www.opengis.net/wcs/1.1/ows"
                                 type="xmlElementNode">
                     <dap:Attribute name="textNode" type="xmlTextNode">
                        <dap:value>nearest</dap:value>
                     </dap:Attribute>
                  </dap:Attribute>
               </dap:Attribute>
            </dap:Attribute>
            <dap:Attribute name="Field" namespace="http://www.opengis.net/wcs/1.1" type="xmlElementNode">
               <dap:Attribute name="Title" namespace="http://www.opengis.net/ows/1.1" type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>longitudinal dilution of precision</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Abstract" namespace="http://www.opengis.net/ows/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>The longitudinal dilution of precision (DOPx) represents the\\012contribution of the radars' configuration geometry to\\012uncertainty in the eastward velocity estimate (u). DOPx is a\\012direct multiplier of the standard error in obtaining the\\012standard deviation for the eastward velocity estimate from the\\012least squares best fit. DOPx and DOPy are commonly used to\\012obtain the geometric dilution of precision\\012(GDOP = sqrt(DOPx^2 + DOPy^2)), a useful metric for filtering\\012errant velocities due to poor geometry.</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Identifier" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>DOPx</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Definition" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="AnyValue" namespace="http://www.opengis.net/ows/1.1"
                                 type="xmlElementNode"/>
               </dap:Attribute>
               <dap:Attribute name="NullValue" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>-32768</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="InterpolationMethods" namespace="http://www.opengis.net/wcs/1.1/ows"
                              type="xmlElementNode">
                  <dap:Attribute name="DefaultMethod" namespace="http://www.opengis.net/wcs/1.1/ows"
                                 type="xmlElementNode">
                     <dap:Attribute name="textNode" type="xmlTextNode">
                        <dap:value>nearest</dap:value>
                     </dap:Attribute>
                  </dap:Attribute>
               </dap:Attribute>
            </dap:Attribute>
            <dap:Attribute name="Field" namespace="http://www.opengis.net/wcs/1.1" type="xmlElementNode">
               <dap:Attribute name="Title" namespace="http://www.opengis.net/ows/1.1" type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>latitudinal dilution of precision</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Abstract" namespace="http://www.opengis.net/ows/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>The latitudinal dilution of precision (DOPy) represents the\\012contribution of the radars' configuration geometry to\\012uncertainty in the northward velocity estimate (v). DOPy is a\\012direct multiplier of the standard error in obtaining the\\012standard deviation for the northward velocity estimate from the\\012least squares best fit. DOPx and DOPy are commonly used to\\012obtain the geometric dilution of precision\\012(GDOP = sqrt(DOPx^2 + DOPy^2)), a useful metric for filtering\\012errant velocities due to poor geometry.</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Identifier" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>DOPy</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Definition" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="AnyValue" namespace="http://www.opengis.net/ows/1.1"
                                 type="xmlElementNode"/>
               </dap:Attribute>
               <dap:Attribute name="NullValue" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>-32768</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="InterpolationMethods" namespace="http://www.opengis.net/wcs/1.1/ows"
                              type="xmlElementNode">
                  <dap:Attribute name="DefaultMethod" namespace="http://www.opengis.net/wcs/1.1/ows"
                                 type="xmlElementNode">
                     <dap:Attribute name="textNode" type="xmlTextNode">
                        <dap:value>nearest</dap:value>
                     </dap:Attribute>
                  </dap:Attribute>
               </dap:Attribute>
            </dap:Attribute>
            <dap:Attribute name="Field" namespace="http://www.opengis.net/wcs/1.1" type="xmlElementNode">
               <dap:Attribute name="Title" namespace="http://www.opengis.net/ows/1.1" type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>Contributing radar site latitudes</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Abstract" namespace="http://www.opengis.net/ows/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>Contributing radar site latitudes</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Identifier" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>site_lat</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Definition" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="AnyValue" namespace="http://www.opengis.net/ows/1.1"
                                 type="xmlElementNode"/>
               </dap:Attribute>
               <dap:Attribute name="NullValue" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>-32768</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="InterpolationMethods" namespace="http://www.opengis.net/wcs/1.1/ows"
                              type="xmlElementNode">
                  <dap:Attribute name="DefaultMethod" namespace="http://www.opengis.net/wcs/1.1/ows"
                                 type="xmlElementNode">
                     <dap:Attribute name="textNode" type="xmlTextNode">
                        <dap:value>nearest</dap:value>
                     </dap:Attribute>
                  </dap:Attribute>
               </dap:Attribute>
            </dap:Attribute>
            <dap:Attribute name="Field" namespace="http://www.opengis.net/wcs/1.1" type="xmlElementNode">
               <dap:Attribute name="Title" namespace="http://www.opengis.net/ows/1.1" type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>Contributing radar site longitudes</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Abstract" namespace="http://www.opengis.net/ows/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>Contributing radar site longitudes.</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Identifier" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>site_lon</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Definition" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="AnyValue" namespace="http://www.opengis.net/ows/1.1"
                                 type="xmlElementNode"/>
               </dap:Attribute>
               <dap:Attribute name="NullValue" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>-32768</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="InterpolationMethods" namespace="http://www.opengis.net/wcs/1.1/ows"
                              type="xmlElementNode">
                  <dap:Attribute name="DefaultMethod" namespace="http://www.opengis.net/wcs/1.1/ows"
                                 type="xmlElementNode">
                     <dap:Attribute name="textNode" type="xmlTextNode">
                        <dap:value>nearest</dap:value>
                     </dap:Attribute>
                  </dap:Attribute>
               </dap:Attribute>
            </dap:Attribute>
            <dap:Attribute name="Field" namespace="http://www.opengis.net/wcs/1.1" type="xmlElementNode">
               <dap:Attribute name="Title" namespace="http://www.opengis.net/ows/1.1" type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>Contributing radar site code.</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Abstract" namespace="http://www.opengis.net/ows/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>Contributing radar site code.</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Identifier" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>site_code</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Definition" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="AnyValue" namespace="http://www.opengis.net/ows/1.1"
                                 type="xmlElementNode"/>
               </dap:Attribute>
               <dap:Attribute name="NullValue" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>-32768</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="InterpolationMethods" namespace="http://www.opengis.net/wcs/1.1/ows"
                              type="xmlElementNode">
                  <dap:Attribute name="DefaultMethod" namespace="http://www.opengis.net/wcs/1.1/ows"
                                 type="xmlElementNode">
                     <dap:Attribute name="textNode" type="xmlTextNode">
                        <dap:value>nearest</dap:value>
                     </dap:Attribute>
                  </dap:Attribute>
               </dap:Attribute>
            </dap:Attribute>
            <dap:Attribute name="Field" namespace="http://www.opengis.net/wcs/1.1" type="xmlElementNode">
               <dap:Attribute name="Title" namespace="http://www.opengis.net/ows/1.1" type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>Contributing radar site network affiliation code.</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Abstract" namespace="http://www.opengis.net/ows/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>Contributing radar site network affiliation code.</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Identifier" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>site_netCode</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Definition" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="AnyValue" namespace="http://www.opengis.net/ows/1.1"
                                 type="xmlElementNode"/>
               </dap:Attribute>
               <dap:Attribute name="NullValue" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>-32768</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="InterpolationMethods" namespace="http://www.opengis.net/wcs/1.1/ows"
                              type="xmlElementNode">
                  <dap:Attribute name="DefaultMethod" namespace="http://www.opengis.net/wcs/1.1/ows"
                                 type="xmlElementNode">
                     <dap:Attribute name="textNode" type="xmlTextNode">
                        <dap:value>nearest</dap:value>
                     </dap:Attribute>
                  </dap:Attribute>
               </dap:Attribute>
            </dap:Attribute>
            <dap:Attribute name="Field" namespace="http://www.opengis.net/wcs/1.1" type="xmlElementNode">
               <dap:Attribute name="Title" namespace="http://www.opengis.net/ows/1.1" type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>RTV processing parameters</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Abstract" namespace="http://www.opengis.net/ows/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>Contributing radar site network affiliation code.</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Identifier" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>procParams</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="Definition" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="AnyValue" namespace="http://www.opengis.net/ows/1.1"
                                 type="xmlElementNode"/>
               </dap:Attribute>
               <dap:Attribute name="NullValue" namespace="http://www.opengis.net/wcs/1.1"
                              type="xmlElementNode">
                  <dap:Attribute name="textNode" type="xmlTextNode">
                     <dap:value>-32768</dap:value>
                  </dap:Attribute>
               </dap:Attribute>
               <dap:Attribute name="InterpolationMethods" namespace="http://www.opengis.net/wcs/1.1/ows"
                              type="xmlElementNode">
                  <dap:Attribute name="DefaultMethod" namespace="http://www.opengis.net/wcs/1.1/ows"
                                 type="xmlElementNode">
                     <dap:Attribute name="textNode" type="xmlTextNode">
                        <dap:value>nearest</dap:value>
                     </dap:Attribute>
                  </dap:Attribute>
               </dap:Attribute>
            </dap:Attribute>
         </dap:Attribute>
         <dap:Attribute name="SupportedCRS" namespace="http://www.opengis.net/wcs/1.1"
                        type="xmlElementNode">
            <dap:Attribute name="textNode" type="xmlTextNode">
               <dap:value>urn:ogc:def:crs:EPSG::4326</dap:value>
            </dap:Attribute>
         </dap:Attribute>
         <dap:Attribute name="SupportedFormat" namespace="http://www.opengis.net/wcs/1.1"
                        type="xmlElementNode">
            <dap:Attribute name="textNode" type="xmlTextNode">
               <dap:value>netcdf-cf1.0</dap:value>
            </dap:Attribute>
         </dap:Attribute>
         <dap:Attribute name="SupportedFormat" namespace="http://www.opengis.net/wcs/1.1"
                        type="xmlElementNode">
            <dap:Attribute name="textNode" type="xmlTextNode">
               <dap:value>dap2.0</dap:value>
            </dap:Attribute>
         </dap:Attribute>
      </dap:Attribute>
   </dap:Attribute>
</dap:Dataset>

Transform Back

<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:dap="http://xml.opendap.org/ns/DAP2"
                xmlns:wcs="http://www.opengis.net/wcs/1.1"
                xmlns:ows="http://www.opengis.net/ows/1.1"
                xmlns:owcs="http://www.opengis.net/wcs/1.1/ows"
                xmlns:gml="http://www.opengis.net/gml/3.2"
                xmlns:xlink="http://www.w3.org/1999/xlink"
        >
    <xsl:output method='xml' version='1.0' encoding='UTF-8' indent='yes'/>


    <!--
       - xmlElementNode
      -->
    <xsl:template match="dap:Attribute[@type='xmlElementNode']" name="xmlEleementNode">
        <xsl:choose>
            <xsl:when test="@prefix">
                <xsl:choose>
                    <xsl:when test="@namespace">
                        <xsl:element name="{@prefix}:{@name}" namespace="{@namespace}">
                            <xsl:apply-templates/>
                        </xsl:element>
                    </xsl:when>
                    <xsl:otherwise >
                        <xsl:element name="{@prefix}:{@name}">
                            <xsl:apply-templates/>
                        </xsl:element>
                    </xsl:otherwise>
                </xsl:choose>
            </xsl:when>
            <xsl:otherwise >
                <xsl:choose>
                    <xsl:when test="@namespace">
                        <xsl:element name="{@name}" namespace="{@namespace}">
                            <xsl:apply-templates/>
                        </xsl:element>
                    </xsl:when>
                    <xsl:otherwise>
                        <xsl:element name="{@name}">
                            <xsl:apply-templates/>
                        </xsl:element>
                    </xsl:otherwise>
                </xsl:choose>
            </xsl:otherwise>
        </xsl:choose>

    </xsl:template>



    <!--
       - xmlAttributeNode
      -->
    <xsl:template match="dap:Attribute[@type='xmlAttributeNode']" name="xmlAttributeNode">
            <xsl:choose>
                <xsl:when test="@prefix">
                    <xsl:attribute name="{@prefix}:{@name}">
                        <xsl:value-of select="normalize-space(dap:value)" />
                    </xsl:attribute>
                </xsl:when>
                <xsl:when test="@namespace">
                    <xsl:attribute name="{@name}" namespace="{@namespace}">
                        <xsl:value-of select="normalize-space(dap:value)" />
                    </xsl:attribute>
                </xsl:when>
                <xsl:otherwise><xsl:value-of select="normalize-space(dap:value)" /></xsl:otherwise>
            </xsl:choose>

    </xsl:template>

    <!--
       - xmlTextNode
      -->
    <xsl:template match="dap:Attribute[@type='xmlTextNode']" name="xmlTextNode">
        <xsl:value-of select="dap:value" />
    </xsl:template>


    <!--
       - supress regular text and attributes.
      -->

    <xsl:template  match="@*|text()" />


</xsl:stylesheet>

Result

<CoverageDescriptions xmlns="http://www.opengis.net/wcs/1.1">
   <CoverageDescription>
      <Title xmlns="http://www.opengis.net/ows/1.1">Near-Real Time Surface Ocean Velocity</Title>
      <Abstract xmlns="http://www.opengis.net/ows/1.1">CoverageDescription generated by OPeNDAP WCS UseCase 2.0</Abstract>
      <Identifier>coverage/200803061600_HFRadar_USEGC_6km_rtv_SIO.nc</Identifier>
      <Domain>
         <SpatialDomain>
            <BoundingBox xmlns="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml/3.2"
                         gml:crs="urn:ogc:def:crs:EPSG::4326">
               <LowerCorner>-97.8839 21.736</LowerCorner>
               <UpperCorner>-57.2312 46.4944</UpperCorner>
            </BoundingBox>
         </SpatialDomain>
         <TemporalDomain>
            <timePosition xmlns="http://www.opengis.net/gml/3.2">2008-03-27T16:00:00.000Z</timePosition>
         </TemporalDomain>
      </Domain>
      <Range>
         <Field>
            <Title xmlns="http://www.opengis.net/ows/1.1">surface_eastward_sea_water_velocity</Title>
            <Abstract xmlns="http://www.opengis.net/ows/1.1">Eastward component of a 2D sea surface velocity vector.</Abstract>
            <Identifier>u</Identifier>
            <Definition>
               <AnyValue xmlns="http://www.opengis.net/ows/1.1"/>
            </Definition>
            <NullValue>-32768</NullValue>
            <InterpolationMethods xmlns="http://www.opengis.net/wcs/1.1/ows">
               <DefaultMethod>nearest</DefaultMethod>
            </InterpolationMethods>
         </Field>
         <Field>
            <Title xmlns="http://www.opengis.net/ows/1.1">surface_northward_sea_water_velocity</Title>
            <Abstract xmlns="http://www.opengis.net/ows/1.1">Northward component of a 2D sea surface velocity vector.</Abstract>
            <Identifier>v</Identifier>
            <Definition>
               <AnyValue xmlns="http://www.opengis.net/ows/1.1"/>
            </Definition>
            <NullValue>-32768</NullValue>
            <InterpolationMethods xmlns="http://www.opengis.net/wcs/1.1/ows">
               <DefaultMethod>nearest</DefaultMethod>
            </InterpolationMethods>
         </Field>
         <Field>
            <Title xmlns="http://www.opengis.net/ows/1.1">longitudinal dilution of precision</Title>
            <Abstract xmlns="http://www.opengis.net/ows/1.1">The longitudinal dilution of precision (DOPx) represents the\\012contribution of the radars' configuration geometry to\\012uncertainty in the eastward velocity estimate (u). DOPx is a\\012direct multiplier of the standard error in obtaining the\\012standard deviation for the eastward velocity estimate from the\\012least squares best fit. DOPx and DOPy are commonly used to\\012obtain the geometric dilution of precision\\012(GDOP = sqrt(DOPx^2 + DOPy^2)), a useful metric for filtering\\012errant velocities due to poor geometry.</Abstract>
            <Identifier>DOPx</Identifier>
            <Definition>
               <AnyValue xmlns="http://www.opengis.net/ows/1.1"/>
            </Definition>
            <NullValue>-32768</NullValue>
            <InterpolationMethods xmlns="http://www.opengis.net/wcs/1.1/ows">
               <DefaultMethod>nearest</DefaultMethod>
            </InterpolationMethods>
         </Field>
         <Field>
            <Title xmlns="http://www.opengis.net/ows/1.1">latitudinal dilution of precision</Title>
            <Abstract xmlns="http://www.opengis.net/ows/1.1">The latitudinal dilution of precision (DOPy) represents the\\012contribution of the radars' configuration geometry to\\012uncertainty in the northward velocity estimate (v). DOPy is a\\012direct multiplier of the standard error in obtaining the\\012standard deviation for the northward velocity estimate from the\\012least squares best fit. DOPx and DOPy are commonly used to\\012obtain the geometric dilution of precision\\012(GDOP = sqrt(DOPx^2 + DOPy^2)), a useful metric for filtering\\012errant velocities due to poor geometry.</Abstract>
            <Identifier>DOPy</Identifier>
            <Definition>
               <AnyValue xmlns="http://www.opengis.net/ows/1.1"/>
            </Definition>
            <NullValue>-32768</NullValue>
            <InterpolationMethods xmlns="http://www.opengis.net/wcs/1.1/ows">
               <DefaultMethod>nearest</DefaultMethod>
            </InterpolationMethods>
         </Field>
         <Field>
            <Title xmlns="http://www.opengis.net/ows/1.1">Contributing radar site latitudes</Title>
            <Abstract xmlns="http://www.opengis.net/ows/1.1">Contributing radar site latitudes</Abstract>
            <Identifier>site_lat</Identifier>
            <Definition>
               <AnyValue xmlns="http://www.opengis.net/ows/1.1"/>
            </Definition>
            <NullValue>-32768</NullValue>
            <InterpolationMethods xmlns="http://www.opengis.net/wcs/1.1/ows">
               <DefaultMethod>nearest</DefaultMethod>
            </InterpolationMethods>
         </Field>
         <Field>
            <Title xmlns="http://www.opengis.net/ows/1.1">Contributing radar site longitudes</Title>
            <Abstract xmlns="http://www.opengis.net/ows/1.1">Contributing radar site longitudes.</Abstract>
            <Identifier>site_lon</Identifier>
            <Definition>
               <AnyValue xmlns="http://www.opengis.net/ows/1.1"/>
            </Definition>
            <NullValue>-32768</NullValue>
            <InterpolationMethods xmlns="http://www.opengis.net/wcs/1.1/ows">
               <DefaultMethod>nearest</DefaultMethod>
            </InterpolationMethods>
         </Field>
         <Field>
            <Title xmlns="http://www.opengis.net/ows/1.1">Contributing radar site code.</Title>
            <Abstract xmlns="http://www.opengis.net/ows/1.1">Contributing radar site code.</Abstract>
            <Identifier>site_code</Identifier>
            <Definition>
               <AnyValue xmlns="http://www.opengis.net/ows/1.1"/>
            </Definition>
            <NullValue>-32768</NullValue>
            <InterpolationMethods xmlns="http://www.opengis.net/wcs/1.1/ows">
               <DefaultMethod>nearest</DefaultMethod>
            </InterpolationMethods>
         </Field>
         <Field>
            <Title xmlns="http://www.opengis.net/ows/1.1">Contributing radar site network affiliation code.</Title>
            <Abstract xmlns="http://www.opengis.net/ows/1.1">Contributing radar site network affiliation code.</Abstract>
            <Identifier>site_netCode</Identifier>
            <Definition>
               <AnyValue xmlns="http://www.opengis.net/ows/1.1"/>
            </Definition>
            <NullValue>-32768</NullValue>
            <InterpolationMethods xmlns="http://www.opengis.net/wcs/1.1/ows">
               <DefaultMethod>nearest</DefaultMethod>
            </InterpolationMethods>
         </Field>
         <Field>
            <Title xmlns="http://www.opengis.net/ows/1.1">RTV processing parameters</Title>
            <Abstract xmlns="http://www.opengis.net/ows/1.1">Contributing radar site network affiliation code.</Abstract>
            <Identifier>procParams</Identifier>
            <Definition>
               <AnyValue xmlns="http://www.opengis.net/ows/1.1"/>
            </Definition>
            <NullValue>-32768</NullValue>
            <InterpolationMethods xmlns="http://www.opengis.net/wcs/1.1/ows">
               <DefaultMethod>nearest</DefaultMethod>
            </InterpolationMethods>
         </Field>
      </Range>
      <SupportedCRS>urn:ogc:def:crs:EPSG::4326</SupportedCRS>
      <SupportedFormat>netcdf-cf1.0</SupportedFormat>
      <SupportedFormat>dap2.0</SupportedFormat>
   </CoverageDescription>
</CoverageDescriptions>