ISO-TC211 / XML

XML schema, transforms, schematron rules, and examples for ISO TC211 Metadata Standards
46 stars 26 forks source link

gco:RecordType #52

Closed tedhabermann closed 9 years ago

tedhabermann commented 9 years ago
      <gmd:attributeDescription>
        <gco:RecordType xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.ngdc.noaa.gov/getRecordDescription/gov.noaa.class:AERO100"/>
      </gmd:attributeDescription>

becomes

         <mrc:attributeDescription>
            <gco:RecordType xmlns:gmd="http://www.isotc211.org/2005/gmd"
                            xmlns:gco="http://www.isotc211.org/2005/gco"
                            xmlns:srv="http://www.isotc211.org/2005/srv"
                            xmlns:gmx="http://www.isotc211.org/2005/gmx"
                            xlink:href="http://www.ngdc.noaa.gov/getRecordDescription/gov.noaa.class:AERO100"/>
         </mrc:attributeDescription>
tedhabermann commented 9 years ago

Fixed with

<!-- Loop the RecordType to copy element and attributes into new gco namespace -->
            <xsl:element name="mrc:attributeDescription">
              <xsl:for-each select="./gmd:attributeDescription/gco1:RecordType">
                <xsl:element name="gco:RecordType">
                  <xsl:call-template name="copyAllAttributes"/>
                  <xsl:value-of select="."/>
                </xsl:element>
              </xsl:for-each>
            </xsl:element>