From: <pva...@us...> - 2009-01-16 14:28:47
|
Revision: 1987 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=1987&view=rev Author: pvalsecc Date: 2009-01-16 14:28:36 +0000 (Fri, 16 Jan 2009) Log Message: ----------- Doing some progress in the ISO -> GM03 export Modified Paths: -------------- sandbox/geocat.ch/trunk/src/org/fao/geonet/util/ISO19139CHEtoGM03.java sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/19139CHE-to-GM03.xsl sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/distribution.xsl sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/identification.xsl sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/metadata.xsl sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/ref-system.xsl sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/resp-party.xsl sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/spatial_repr.xsl sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/GM03to19139CHE/maintenance-info.xsl Added Paths: ----------- sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/content.xsl sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/maintenance-info.xsl Modified: sandbox/geocat.ch/trunk/src/org/fao/geonet/util/ISO19139CHEtoGM03.java =================================================================== --- sandbox/geocat.ch/trunk/src/org/fao/geonet/util/ISO19139CHEtoGM03.java 2009-01-16 14:25:50 UTC (rev 1986) +++ sandbox/geocat.ch/trunk/src/org/fao/geonet/util/ISO19139CHEtoGM03.java 2009-01-16 14:28:36 UTC (rev 1987) @@ -102,8 +102,8 @@ private void replaceByReference(Node root, Node parent, Node cur) throws FlattenerException { final NodeList childs = cur.getChildNodes(); - if (childs.getLength() != 1) { - throw new FlattenerException("A node that is replaced by a reference must have only one child!"); + if (childs.getLength() < 1) { + throw new FlattenerException("A node that is replaced by a reference must have at least one child!"); } Node dest = childs.item(0); if (dest.getNodeName().equals("ERROR")) return; Modified: sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/19139CHE-to-GM03.xsl =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/19139CHE-to-GM03.xsl 2009-01-16 14:25:50 UTC (rev 1986) +++ sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/19139CHE-to-GM03.xsl 2009-01-16 14:28:36 UTC (rev 1987) @@ -16,6 +16,8 @@ <xsl:include href="extent.xsl"/> <xsl:include href="data-quality.xsl"/> <xsl:include href="spatial_repr.xsl"/> + <xsl:include href="content.xsl"/> + <xsl:include href="maintenance-info.xsl"/> <xsl:template match="/"> <TRANSFER> @@ -45,7 +47,7 @@ </xsl:template> <xsl:variable name="defaultLanguage"> - <xsl:for-each select="/che:CHE_MD_Metadata/gmd:language/gco:CharacterString"> + <xsl:for-each select="/che:CHE_MD_Metadata/gmd:language/gco:CharacterString|/gmd:MD_Metadata/gmd:language/gco:CharacterString"> <xsl:call-template name="lang3_to_lang2"> <xsl:with-param name="lang3" select="."/> </xsl:call-template> @@ -54,26 +56,28 @@ <xsl:template mode="groupText" match="*"> <xsl:param name="element"/> - <xsl:element name="{$element}"> - <xsl:for-each select="*[local-name()=$element]"> - <GM03_2Core.Core.PT_FreeText> - <textGroup> - <xsl:for-each select="gco:CharacterString"> - <GM03_2Core.Core.PT_Group> - <language><xsl:value-of select="$defaultLanguage"/></language> - <plainText><xsl:value-of select="."/></plainText> - </GM03_2Core.Core.PT_Group> - </xsl:for-each> - <xsl:for-each select="gmd:PT_FreeText/gmd:textGroup/gmd:LocalisedCharacterString"> - <GM03_2Core.Core.PT_Group> - <xsl:apply-templates mode="text" select="@locale"/> - <plainText><xsl:value-of select="."/></plainText> - </GM03_2Core.Core.PT_Group> - </xsl:for-each> - </textGroup> - </GM03_2Core.Core.PT_FreeText> - </xsl:for-each> - </xsl:element> + <xsl:if test="*[local-name()=$element]"> + <xsl:element name="{$element}"> + <xsl:for-each select="*[local-name()=$element]"> + <GM03_2Core.Core.PT_FreeText> + <textGroup> + <xsl:for-each select="gco:CharacterString"> + <GM03_2Core.Core.PT_Group> + <language><xsl:value-of select="$defaultLanguage"/></language> + <plainText><xsl:value-of select="."/></plainText> + </GM03_2Core.Core.PT_Group> + </xsl:for-each> + <xsl:for-each select="gmd:PT_FreeText/gmd:textGroup/gmd:LocalisedCharacterString"> + <GM03_2Core.Core.PT_Group> + <xsl:apply-templates mode="text" select="@locale"/> + <plainText><xsl:value-of select="."/></plainText> + </GM03_2Core.Core.PT_Group> + </xsl:for-each> + </textGroup> + </GM03_2Core.Core.PT_FreeText> + </xsl:for-each> + </xsl:element> + </xsl:if> </xsl:template> <xsl:template mode="text" match="*[@xsi:type='gmd:PT_FreeText_PropertyType']" priority="2"> @@ -167,12 +171,26 @@ </xsl:element> </xsl:template> - <xsl:template mode="text" match="gmd:MD_ScopeCode"> - <GM03_2Core.Core.MD_ScopeCode_> - <value><xsl:value-of select="@codeListValue"/></value> - </GM03_2Core.Core.MD_ScopeCode_> + <xsl:template mode="enum" match="*"> + <xsl:element name="{local-name(.)}"> + <xsl:for-each select="*"> + <xsl:element name="GM03_2Core.Core.{local-name(.)}_"> + <value><xsl:value-of select="@codeListValue"/></value> + </xsl:element> + </xsl:for-each> + </xsl:element> </xsl:template> + <xsl:template mode="enumC" match="*"> + <xsl:element name="{local-name(.)}"> + <xsl:for-each select="*"> + <xsl:element name="GM03_2Comprehensive.Comprehensive.{local-name(.)}_"> + <value><xsl:value-of select="@codeListValue"/></value> + </xsl:element> + </xsl:for-each> + </xsl:element> + </xsl:template> + <xsl:template mode="text" match="*" priority="-100"> <ERROR>Unknown text element <xsl:value-of select="local-name(.)"/></ERROR> </xsl:template> Added: sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/content.xsl =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/content.xsl (rev 0) +++ sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/content.xsl 2009-01-16 14:28:36 UTC (rev 1987) @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet version="1.0" + xmlns="http://www.interlis.ch/INTERLIS2.3" + xmlns:che="http://www.geocat.ch/2008/che" + xmlns:gco="http://www.isotc211.org/2005/gco" + xmlns:gmd="http://www.isotc211.org/2005/gmd" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + exclude-result-prefixes="che gco gmd"> + + <xsl:template mode="Content" match="gmd:MD_CoverageDescription"> + <GM03_2Comprehensive.Comprehensive.MD_CoverageDescription TID="x{generate-id(.)}"> + <BACK_REF name="MD_Metadata"/> + <xsl:apply-templates mode="Content" select="gmd:attributeDescription"/> + <xsl:apply-templates mode="text" select="gmd:contentType"/> + <xsl:apply-templates mode="Content" select="gmd:dimension"/> + </GM03_2Comprehensive.Comprehensive.MD_CoverageDescription> + </xsl:template> + + <xsl:template mode="Content" match="che:CHE_MD_FeatureCatalogueDescription|gmd:MD_FeatureCatalogueDescription"> + <GM03_2Comprehensive.Comprehensive.MD_FeatureCatalogueDescription TID="x{generate-id(.)}"> + <BACK_REF name="MD_Metadata"/> + <xsl:if test="gmd:language"> + <language> + <xsl:for-each select="gmd:language/gco:CharacterString"> + <CodeISO.LanguageCodeISO_> + <value> + <xsl:call-template name="lang3_to_lang2"> + <xsl:with-param name="lang3" select="."/> + </xsl:call-template> + </value> + </CodeISO.LanguageCodeISO_> + </xsl:for-each> + </language> + </xsl:if> + <xsl:apply-templates mode="text" select="gmd:includedWithDataset"/> + <xsl:apply-templates mode="text" select="gmd:complianceCode"/> + <xsl:apply-templates mode="Content" select="gmd:featureTypes"/> + <xsl:apply-templates mode="Content" select="che:modelType"/> + <xsl:if test="not(che:modelType)"> + <modelType>other</modelType> + </xsl:if> + <xsl:apply-templates mode="text" select="che:dataModel"/> + <xsl:apply-templates mode="Content" select="che:class"/> + <xsl:apply-templates mode="Content" select="che:domain"/> + <xsl:apply-templates mode="text" select="che:portrayalCatalogueURL"/> + <xsl:apply-templates mode="Content" select="gmd:featureCatalogueCitation"/> + </GM03_2Comprehensive.Comprehensive.MD_FeatureCatalogueDescription> + </xsl:template> + + <xsl:template mode="Content" match="gmd:featureCatalogueCitation"> + <xsl:apply-templates mode="Content"/> + </xsl:template> + + <xsl:template mode="Content" match="gmd:CI_Citation"> + <GM03_2Comprehensive.Comprehensive.CI_Citation TID="x{generate-id(.)}"> + <xsl:apply-templates mode="RefSystem" select="."/> + <BACK_REF name="MD_FeatureCatalogueDescription"/> + </GM03_2Comprehensive.Comprehensive.CI_Citation> + </xsl:template> + + <xsl:template mode="Content" match="gmd:attributeDescription"> + <attributeDescription><xsl:value-of select="gco:RecordType"/></attributeDescription> + </xsl:template> + + <xsl:template mode="Content" match="*" priority="-100"> + <ERROR>Unknown Content element <xsl:value-of select="local-name(.)"/></ERROR> + </xsl:template> +</xsl:stylesheet> \ No newline at end of file Modified: sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/distribution.xsl =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/distribution.xsl 2009-01-16 14:25:50 UTC (rev 1986) +++ sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/distribution.xsl 2009-01-16 14:28:36 UTC (rev 1987) @@ -65,9 +65,32 @@ </xsl:template> <xsl:template mode="distribution" match="gmd:formatDistributor"> - <ERROR>distribution gmd:formatDistributor TODO</ERROR> + <GM03_2Comprehensive.Comprehensive.formatDistributordistributorFormat TID="x{generate-id(.)}"> + <formatDistributor REF="?"> + <xsl:apply-templates mode="distribution"/> + </formatDistributor> + <BACK_REF name="distributorFormat"/> + </GM03_2Comprehensive.Comprehensive.formatDistributordistributorFormat> </xsl:template> + <xsl:template mode="distribution" match="gmd:MD_Distributor"> + <GM03_2Comprehensive.Comprehensive.MD_Distributor TID="x{generate-id(.)}"> + <xsl:apply-templates mode="distribution" select="gmd:distributorContact"/> + <xsl:apply-templates mode="distribution" select="gmd:distributionOrderProcess"/> + <xsl:apply-templates mode="distribution" select="gmd:distributorFormat"/> + <xsl:apply-templates mode="distribution" select="gmd:distributorTransferOptions"/> + </GM03_2Comprehensive.Comprehensive.MD_Distributor> + </xsl:template> + + <xsl:template mode="distribution" match="gmd:distributorContact"> + <distributorContact REF="?"> + <xsl:apply-templates mode="RespParty"/> <!-- the node taken by the REF, what follows will stay in place --> + <GM03_2Comprehensive.Comprehensive.MD_DistributordistributorContact> + <xsl:apply-templates mode="RespPartyRole"/> + </GM03_2Comprehensive.Comprehensive.MD_DistributordistributorContact> + </distributorContact> + </xsl:template> + <xsl:template mode="distribution" match="*"> <ERROR>Unknown distribution element <xsl:value-of select="local-name(.)"/></ERROR> </xsl:template> Modified: sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/identification.xsl =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/identification.xsl 2009-01-16 14:25:50 UTC (rev 1986) +++ sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/identification.xsl 2009-01-16 14:28:36 UTC (rev 1987) @@ -11,20 +11,20 @@ <xsl:apply-templates mode="DataIdentification"/> </xsl:template> - <xsl:template mode="DataIdentification" match="che:CHE_MD_DataIdentification"> + <xsl:template mode="DataIdentification" match="che:CHE_MD_DataIdentification|gmd:MD_DataIdentification"> <GM03_2Comprehensive.Comprehensive.MD_DataIdentification TID="x{generate-id(.)}"> - <xsl:apply-templates mode="DataIdentification" select="gmd:status"/> + <xsl:apply-templates mode="enum" select="gmd:status"/> <xsl:apply-templates mode="text" select="gmd:abstract"/> <xsl:apply-templates mode="text" select="gmd:purpose"/> <BACK_REF name="MD_Metadata"/> <xsl:apply-templates mode="DataIdentification" select="gmd:citation"/> - <xsl:apply-templates mode="DataIdentification" select="gmd:spatialRepresentationType"/> + <xsl:apply-templates mode="enum" select="gmd:spatialRepresentationType"/> <xsl:if test="gmd:language"> <language> <xsl:apply-templates mode="DataIdentification" select="gmd:language"/> </language> </xsl:if> - <xsl:apply-templates mode="DataIdentification" select="gmd:characterSet"/> + <xsl:apply-templates mode="enum" select="gmd:characterSet"/> <xsl:if test="gmd:topicCategory"> <topicCategory> <xsl:apply-templates mode="DataIdentification" select="gmd:topicCategory"/> @@ -34,8 +34,8 @@ <xsl:apply-templates mode="DataIdentification" select="gmd:credit"/> <xsl:apply-templates mode="DataIdentification" select="che:federalBasicGeodataID"/> <xsl:apply-templates mode="DataIdentification" select="che:noFederalBasicGeodataID"/> - <xsl:apply-templates mode="DataIdentification" select="gmd:environmentDescription"/> - <xsl:apply-templates mode="DataIdentification" select="gmd:supplementalInformation"/> + <xsl:apply-templates mode="text" select="gmd:environmentDescription"/> + <xsl:apply-templates mode="text" select="gmd:supplementalInformation"/> <xsl:apply-templates mode="DataIdentification" select="gmd:pointOfContact"/> <xsl:apply-templates mode="DataIdentification" select="gmd:resourceMaintenance"/> @@ -51,6 +51,51 @@ </GM03_2Comprehensive.Comprehensive.MD_DataIdentification> </xsl:template> + <xsl:template mode="DataIdentification" match="che:revision"> + <GM03_2Comprehensive.Comprehensive.revisionMD_Identification TID="x{generate-id(.)}"> + <revision REF="?"> + <xsl:apply-templates mode="DataIdentification"/> + </revision> + <BACK_REF name="MD_Identification"/> + </GM03_2Comprehensive.Comprehensive.revisionMD_Identification> + </xsl:template> + + <xsl:template mode="DataIdentification" match="che:CHE_MD_Revision"> + <GM03_2Comprehensive.Comprehensive.MD_Revision TID="x{generate-id(.)}"> + <xsl:apply-templates mode="enum" select="che:revisionScope"/> + <xsl:apply-templates mode="text" select="che:dateOfLastUpdate"/> + <xsl:apply-templates mode="text" select="che:revisionNote"/> + <xsl:apply-templates mode="DataIdentification" select="che:revisionExtent"/> + + <xsl:apply-templates mode="DataIdentification" select="che:revisionScopeDescription"/> + <xsl:apply-templates mode="DataIdentification" select="che:revisionContact"/> + </GM03_2Comprehensive.Comprehensive.MD_Revision> + </xsl:template> + + <xsl:template mode="DataIdentification" match="gmd:resourceConstraints"> + <GM03_2Comprehensive.Comprehensive.resourceConstraintsMD_Identification TID="x{generate-id(.)}"> + <resourceConstraints REF="?"> + <xsl:apply-templates mode="DataIdentification"/> + </resourceConstraints> + <BACK_REF name="MD_Identification"/> + </GM03_2Comprehensive.Comprehensive.resourceConstraintsMD_Identification> + </xsl:template> + + <xsl:template mode="DataIdentification" match="che:CHE_MD_LegalConstraints|gmd:MD_LegalConstraints"> + <GM03_2Comprehensive.Comprehensive.MD_LegalConstraints TID="x{generate-id(.)}"> + <xsl:apply-templates mode="text" select="gmd:accessConstraints"/> + <xsl:apply-templates mode="enumC" select="gmd:useConstraints"/> + <xsl:apply-templates mode="text" select="gmd:otherConstraints"/> + <xsl:apply-templates mode="DataIdentification" select="che:legislationConstraints"/> + </GM03_2Comprehensive.Comprehensive.MD_LegalConstraints> + </xsl:template> + + <xsl:template mode="DataIdentification" match="gmd:resourceMaintenance"> + <xsl:apply-templates mode="MaintenanceInfo"> + <xsl:with-param name="backRef">MD_Identification</xsl:with-param> + </xsl:apply-templates> + </xsl:template> + <xsl:template mode="DataIdentification" match="gmd:MD_Resolution"> <GM03_2Core.Core.MD_Resolution TID="x{generate-id(.)}"> <xsl:apply-templates mode="DataIdentification" select="gmd:distance"/> @@ -117,7 +162,7 @@ <xsl:apply-templates mode="RespParty"/> </pointOfContact> <BACK_REF name="MD_Identification"/> - <xsl:apply-templates mode="RespPartyRole" select="che:CHE_CI_ResponsibleParty"/> + <xsl:apply-templates mode="RespPartyRole" select="che:CHE_CI_ResponsibleParty|gmd:CI_ResponsibleParty"/> </GM03_2Core.Core.MD_IdentificationpointOfContact> </xsl:template> @@ -127,18 +172,6 @@ </GM03_2Core.Core.MD_TopicCategoryCode_> </xsl:template> - <xsl:template mode="DataIdentification" match="gmd:characterSet"> - <characterSet> - <xsl:apply-templates mode="DataIdentification"/> - </characterSet> - </xsl:template> - - <xsl:template mode="DataIdentification" match="gmd:MD_CharacterSetCode"> - <GM03_2Core.Core.MD_CharacterSetCode_> - <value><xsl:value-of select="@codeListValue"/></value> - </GM03_2Core.Core.MD_CharacterSetCode_> - </xsl:template> - <xsl:template mode="DataIdentification" match="gmd:language"> <CodeISO.LanguageCodeISO_> <value> @@ -149,18 +182,6 @@ </CodeISO.LanguageCodeISO_> </xsl:template> - <xsl:template mode="DataIdentification" match="gmd:spatialRepresentationType"> - <spatialRepresentationType> - <xsl:apply-templates mode="DataIdentification"/> - </spatialRepresentationType> - </xsl:template> - - <xsl:template mode="DataIdentification" match="gmd:MD_SpatialRepresentationTypeCode"> - <GM03_2Core.Core.MD_SpatialRepresentationTypeCode_> - <value><xsl:value-of select="@codeListValue"/></value> - </GM03_2Core.Core.MD_SpatialRepresentationTypeCode_> - </xsl:template> - <xsl:template mode="DataIdentification" match="gmd:citation"> <citation REF="?"> <GM03_2Comprehensive.Comprehensive.CI_Citation TID="x{generate-id(.)}"> @@ -169,18 +190,6 @@ </citation> </xsl:template> - <xsl:template mode="DataIdentification" match="gmd:status"> - <status> - <xsl:apply-templates mode="DataIdentification"/> - </status> - </xsl:template> - - <xsl:template mode="DataIdentification" match="gmd:MD_ProgressCode"> - <GM03_2Core.Core.MD_ProgressCode_> - <value><xsl:value-of select="@codeListValue"/></value> - </GM03_2Core.Core.MD_ProgressCode_> - </xsl:template> - <xsl:template mode="DataIdentification" match="*" priority="-100"> <ERROR>Unknown DataIdentification element <xsl:value-of select="local-name(.)"/></ERROR> </xsl:template> Added: sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/maintenance-info.xsl =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/maintenance-info.xsl (rev 0) +++ sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/maintenance-info.xsl 2009-01-16 14:28:36 UTC (rev 1987) @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet version="1.0" + xmlns="http://www.interlis.ch/INTERLIS2.3" + xmlns:che="http://www.geocat.ch/2008/che" + xmlns:gco="http://www.isotc211.org/2005/gco" + xmlns:gmd="http://www.isotc211.org/2005/gmd" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + exclude-result-prefixes="che gco gmd"> + + <xsl:template mode="MaintenanceInfo" match="che:CHE_MD_MaintenanceInformation|gmd:MD_MaintenanceInformation"> + <xsl:param name="backRef"/> + <GM03_2Comprehensive.Comprehensive.MD_MaintenanceInformation TID="x{generate-id(.)}"> + <xsl:apply-templates mode="text" select="gmd:maintenanceAndUpdateFrequency"/> + <xsl:apply-templates mode="text" select="gmd:dateOfNextUpdate"/> + <xsl:apply-templates mode="MaintenanceInfo" select="gmd:userDefinedMaintenanceFrequency"/> + <xsl:apply-templates mode="enum" select="gmd:updateScope"/> + <xsl:apply-templates mode="MaintenanceInfo" select="che:dateOfMonitoringState"/> + <xsl:apply-templates mode="groupText" select="."> + <xsl:with-param name="element">maintenanceNote</xsl:with-param> + </xsl:apply-templates> + <!-- MD_Identification? --> + <BACK_REF name="{$backRef}"/> + + <xsl:apply-templates mode="MaintenanceInfo" select="gmd:updateScopeDescription"/> + <xsl:apply-templates mode="MaintenanceInfo" select="gmd:contact"/> + <xsl:apply-templates mode="MaintenanceInfo" select="che:historyConcept"/> + <xsl:apply-templates mode="MaintenanceInfo" select="che:archiveConcept"/> + </GM03_2Comprehensive.Comprehensive.MD_MaintenanceInformation> + </xsl:template> + + <xsl:template mode="MaintenanceInfo" match="*" priority="-100"> + <ERROR>Unknown MaintenanceInfo element <xsl:value-of select="local-name(.)"/></ERROR> + </xsl:template> +</xsl:stylesheet> \ No newline at end of file Modified: sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/metadata.xsl =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/metadata.xsl 2009-01-16 14:25:50 UTC (rev 1986) +++ sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/metadata.xsl 2009-01-16 14:28:36 UTC (rev 1987) @@ -6,7 +6,8 @@ xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="che gco gmd"> - <xsl:template mode="metadata" match="che:CHE_MD_Metadata"> + + <xsl:template mode="metadata" match="che:CHE_MD_Metadata|gmd:MD_Metadata"> <GM03_2Core.Core.MD_Metadata TID="x{generate-id(.)}"> <xsl:apply-templates mode="text" select="gmd:fileIdentifier"/> <xsl:apply-templates mode="metadata" select="gmd:language"/> @@ -14,7 +15,7 @@ <xsl:apply-templates mode="text" select="gmd:dateStamp"/> <xsl:apply-templates mode="text" select="gmd:metadataStandardName"/> <xsl:apply-templates mode="text" select="gmd:metadataStandardVersion"/> - <xsl:apply-templates mode="metadata" select="gmd:hierarchyLevel"/> + <xsl:apply-templates mode="enum" select="gmd:hierarchyLevel"/> <xsl:apply-templates mode="metadata" select="gmd:hierarchyLevelName"/> <xsl:apply-templates mode="text" select="gmd:dataSetURI"/> <xsl:apply-templates mode="distribution" select="gmd:distributionInfo"/> @@ -40,16 +41,16 @@ </GM03_2Core.Core.MD_Metadata> </xsl:template> - <xsl:template mode="metadata" match="gmd:hierarchyLevel"> - <hierarchyLevel> - <xsl:for-each select="gmd:MD_ScopeCode"> - <GM03_2Core.Core.MD_ScopeCode_> - <value><xsl:value-of select="@codeListValue"/></value> - </GM03_2Core.Core.MD_ScopeCode_> - </xsl:for-each> - </hierarchyLevel> + <xsl:template mode="metadata" match="gmd:metadataMaintenance"> + <xsl:apply-templates mode="MaintenanceInfo"> + <xsl:with-param name="backRef">MD_Metadata</xsl:with-param> + </xsl:apply-templates> </xsl:template> + <xsl:template mode="metadata" match="gmd:contentInfo"> + <xsl:apply-templates mode="Content"/> + </xsl:template> + <xsl:template mode="metadata" match="gmd:spatialRepresentationInfo"> <xsl:apply-templates mode="SpatialRepr"/> </xsl:template> @@ -91,7 +92,7 @@ <xsl:apply-templates mode="RespParty"/> </contact> <BACK_REF name="MD_Metadata"/> - <xsl:apply-templates mode="RespPartyRole" select="che:CHE_CI_ResponsibleParty"/> + <xsl:apply-templates mode="RespPartyRole" select="che:CHE_CI_ResponsibleParty|gmd:CI_ResponsibleParty"/> </GM03_2Core.Core.MD_Metadatacontact> </xsl:template> Modified: sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/ref-system.xsl =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/ref-system.xsl 2009-01-16 14:25:50 UTC (rev 1986) +++ sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/ref-system.xsl 2009-01-16 14:28:36 UTC (rev 1987) @@ -49,7 +49,7 @@ <xsl:apply-templates mode="text" select="gmd:title"/> <xsl:apply-templates mode="text" select="gmd:edition"/> <xsl:apply-templates mode="text" select="gmd:editionDate"/> - <xsl:apply-templates mode="RefSystem" select="gmd:presentationForm"/> + <xsl:apply-templates mode="enumC" select="gmd:presentationForm"/> <xsl:apply-templates mode="text" select="gmd:ISBN"/> <xsl:apply-templates mode="text" select="gmd:ISSN"/> <xsl:apply-templates mode="text" select="gmd:alternateTitle"/> Modified: sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/resp-party.xsl =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/resp-party.xsl 2009-01-16 14:25:50 UTC (rev 1986) +++ sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/resp-party.xsl 2009-01-16 14:28:36 UTC (rev 1987) @@ -8,11 +8,11 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" exclude-result-prefixes="che gco gmd"> - <xsl:template mode="RespParty" match="che:CHE_CI_ResponsibleParty"> + <xsl:template mode="RespParty" match="che:CHE_CI_ResponsibleParty|gmd:CI_ResponsibleParty"> <GM03_2Core.Core.CI_ResponsibleParty TID="x{generate-id(.)}"> <xsl:apply-templates mode="text" select="che:individualFirstName"/> <xsl:apply-templates mode="text" select="che:individualLastName"/> - <xsl:apply-templates mode="text" select="gmd:address/che:CHE_CI_Address/gmd:electronicMailAddress"/> + <xsl:apply-templates mode="text" select="gmd:address/che:CHE_CI_Address/gmd:electronicMailAddress|gmd:address/gmd:CI_Address/gmd:electronicMailAddress"/> <xsl:apply-templates mode="text" select="gmd:organisationName"/> <xsl:apply-templates mode="text" select="gmd:positionName"/> <xsl:apply-templates mode="text" select="che:organisationAcronym"/> @@ -98,12 +98,6 @@ </xsl:template> <xsl:template mode="RespPartyRole" match="che:CHE_CI_ResponsibleParty"> - <role> - <xsl:for-each select="gmd:role/gmd:CI_RoleCode"> - <GM03_2Core.Core.CI_RoleCode_> - <value><xsl:value-of select="@codeListValue"/></value> - </GM03_2Core.Core.CI_RoleCode_> - </xsl:for-each> - </role> + <xsl:apply-templates mode="enum" select="gmd:role"/> </xsl:template> </xsl:stylesheet> \ No newline at end of file Modified: sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/spatial_repr.xsl =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/spatial_repr.xsl 2009-01-16 14:25:50 UTC (rev 1986) +++ sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/spatial_repr.xsl 2009-01-16 14:28:36 UTC (rev 1987) @@ -7,6 +7,26 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="che gco gmd"> + <xsl:template mode="SpatialRepr" match="gmd:MD_VectorSpatialRepresentation"> + <GM03_2Comprehensive.Comprehensive.MD_VectorSpatialRepresentation TID="x{generate-id(.)}"> + <BACK_REF name="MD_Metadata"/> + <xsl:apply-templates mode="text" select="gmd:topologyLevel"/> + <xsl:apply-templates mode="SpatialRepr" select="gmd:geometricObjects"/> + </GM03_2Comprehensive.Comprehensive.MD_VectorSpatialRepresentation> + </xsl:template> + + <xsl:template mode="SpatialRepr" match="gmd:geometricObjects"> + <xsl:apply-templates mode="SpatialRepr"/> + </xsl:template> + + <xsl:template mode="SpatialRepr" match="gmd:MD_GeometricObjects"> + <GM03_2Comprehensive.Comprehensive.MD_GeometricObjects TID="x{generate-id(.)}"> + <xsl:apply-templates mode="text" select="gmd:geometricObjectType"/> + <xsl:apply-templates mode="text" select="gmd:geometricObjectCount"/> + <BACK_REF name="MD_VectorSpatialRepresentation"/> + </GM03_2Comprehensive.Comprehensive.MD_GeometricObjects> + </xsl:template> + <xsl:template mode="SpatialRepr" match="gmd:MD_GridSpatialRepresentation"> <GM03_2Comprehensive.Comprehensive.MD_GridSpatialRepresentation TID="x{generate-id(.)}"> <BACK_REF name="MD_Metadata"/> Modified: sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/GM03to19139CHE/maintenance-info.xsl =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/GM03to19139CHE/maintenance-info.xsl 2009-01-16 14:25:50 UTC (rev 1986) +++ sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/GM03to19139CHE/maintenance-info.xsl 2009-01-16 14:28:36 UTC (rev 1987) @@ -6,9 +6,9 @@ xmlns:gts="http://www.isotc211.org/2005/gts" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template mode="MaintenanceInfo" match="metadataMaintenance|GM03Comprehensive.Comprehensive.MD_MaintenanceInformation"> - <MD_MaintenanceInformation> + <che:CHE_MD_MaintenanceInformation gco:isoType="gmd:MD_MaintenanceInformation"> <xsl:apply-templates mode="MaintenanceInfo"/> - </MD_MaintenanceInformation> + </che:CHE_MD_MaintenanceInformation> </xsl:template> <xsl:template mode="MaintenanceInfo" match="maintenanceAndUpdateFrequency"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |