ISO-TC211 / XML

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

gts namespace translation #110

Closed tedhabermann closed 9 years ago

tedhabermann commented 9 years ago
<mmi:userDefinedMaintenanceFrequency>
   <gts:TM_PeriodDuration
      xmlns:gts="http://www.isotc211.org/2005/gts">P0Y0M0DT6H0M0S</gts:TM_PeriodDuration>
</mmi:userDefinedMaintenanceFrequency>

ends up in the wrong namespace (should be gco:)

fxprunayre commented 9 years ago

See https://github.com/ISO-TC211/XML/pull/134

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="fromISO19139.xsl"?>
<MD_Metadata xmlns="http://www.isotc211.org/2005/gmd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml"
    xmlns:gts="http://www.isotc211.org/2005/gts" xmlns:gco="http://www.isotc211.org/2005/gco"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:gmd="http://www.isotc211.org/2005/gmd">
    <fileIdentifier>
        <gco:CharacterString/>
    </fileIdentifier>
    <identificationInfo>
        <MD_DataIdentification>
            <citation>
                <CI_Citation>
                    <title>
                        <gco:CharacterString>gts TO gco mapping</gco:CharacterString>
                    </title>
                </CI_Citation>
            </citation>
            <resourceMaintenance>

                <MD_MaintenanceInformation>
                    <maintenanceAndUpdateFrequency>
                        <MD_MaintenanceFrequencyCode codeListValue="asNeeded"
                            codeList="./resources/codeList.xml#MD_MaintenanceFrequencyCode"/>
                    </maintenanceAndUpdateFrequency>
                    <userDefinedMaintenanceFrequency>
                        <gts:TM_PeriodDuration>P6Y</gts:TM_PeriodDuration>
                    </userDefinedMaintenanceFrequency>
                </MD_MaintenanceInformation>
            </resourceMaintenance>
        </MD_DataIdentification>
    </identificationInfo>
</MD_Metadata>

is transformed to

<?xml version="1.0" encoding="UTF-8"?>
<mdb:MD_Metadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xmlns:cat="http://standards.iso.org/iso/19115/-3/cat/1.0"
                 xmlns:cit="http://standards.iso.org/iso/19115/-3/cit/1.0"
                 xmlns:gcx="http://standards.iso.org/iso/19115/-3/gcx/1.0"
                 xmlns:gex="http://standards.iso.org/iso/19115/-3/gex/1.0"
                 xmlns:lan="http://standards.iso.org/iso/19115/-3/lan/1.0"
                 xmlns:srv="http://standards.iso.org/iso/19115/-3/srv/2.0"
                 xmlns:mas="http://standards.iso.org/iso/19115/-3/mas/1.0"
                 xmlns:mcc="http://standards.iso.org/iso/19115/-3/mcc/1.0"
                 xmlns:mco="http://standards.iso.org/iso/19115/-3/mco/1.0"
                 xmlns:mda="http://standards.iso.org/iso/19115/-3/mda/1.0"
                 xmlns:mdb="http://standards.iso.org/iso/19115/-3/mdb/1.0"
                 xmlns:mds="http://standards.iso.org/iso/19115/-3/mds/1.0"
                 xmlns:mdt="http://standards.iso.org/iso/19115/-3/mdt/1.0"
                 xmlns:mex="http://standards.iso.org/iso/19115/-3/mex/1.0"
                 xmlns:mmi="http://standards.iso.org/iso/19115/-3/mmi/1.0"
                 xmlns:mpc="http://standards.iso.org/iso/19115/-3/mpc/1.0"
                 xmlns:mrc="http://standards.iso.org/iso/19115/-3/mrc/1.0"
                 xmlns:mrd="http://standards.iso.org/iso/19115/-3/mrd/1.0"
                 xmlns:mri="http://standards.iso.org/iso/19115/-3/mri/1.0"
                 xmlns:mrl="http://standards.iso.org/iso/19115/-3/mrl/1.0"
                 xmlns:mrs="http://standards.iso.org/iso/19115/-3/mrs/1.0"
                 xmlns:msr="http://standards.iso.org/iso/19115/-3/msr/1.0"
                 xmlns:mdq="http://standards.iso.org/iso/19157/-2/mdq/1.0"
                 xmlns:mac="http://standards.iso.org/iso/19115/-3/mac/1.0"
                 xmlns:gco="http://standards.iso.org/iso/19115/-3/gco/1.0"
                 xmlns:gml="http://www.opengis.net/gml/3.2"
                 xmlns:xlink="http://www.w3.org/1999/xlink">
   <mdb:metadataIdentifier>
      <mcc:MD_Identifier>
         <mcc:code>
            <gco:CharacterString/>
         </mcc:code>
      </mcc:MD_Identifier>
   </mdb:metadataIdentifier>
   <mdb:identificationInfo>
      <mri:MD_DataIdentification>
         <mri:citation>
            <cit:CI_Citation>
               <cit:title>
                  <gco:CharacterString>gts TO gco mapping</gco:CharacterString>
               </cit:title>
            </cit:CI_Citation>
         </mri:citation>
         <mri:resourceMaintenance>
            <mmi:MD_MaintenanceInformation>
               <mmi:maintenanceAndUpdateFrequency>
                  <mmi:MD_MaintenanceFrequencyCode codeListValue="asNeeded"
                                                   codeList="./resources/codeList.xml#MD_MaintenanceFrequencyCode"/>
               </mmi:maintenanceAndUpdateFrequency>
               <mmi:userDefinedMaintenanceFrequency>
                  <gco:TM_PeriodDuration>P6Y</gco:TM_PeriodDuration>
               </mmi:userDefinedMaintenanceFrequency>
            </mmi:MD_MaintenanceInformation>
         </mri:resourceMaintenance>
      </mri:MD_DataIdentification>
   </mdb:identificationInfo>
</mdb:MD_Metadata>
smrgeoinfo commented 9 years ago

+1 fix is merged, close issue