|
|
|
jesseeichar
|
Revision: 5447
http://geonetwork.svn.sourceforge.net/geonetwork/?rev=5447&view=rev Author: jesseeichar Date: 2009-11-05 09:55:13 +0000 (Thu, 05 Nov 2009) Log Message: ----------- Fixed roundtrip for standard options Modified Paths: -------------- sandbox/geocat.ch/trunk/test/junit/src/org/fao/xsl/ValidateTransformationTest.java sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/distribution.xsl sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/GM03to19139CHE/version2/distribution.xsl Modified: sandbox/geocat.ch/trunk/test/junit/src/org/fao/xsl/ValidateTransformationTest.java =================================================================== --- sandbox/geocat.ch/trunk/test/junit/src/org/fao/xsl/ValidateTransformationTest.java 2009-11-05 09:07:29 UTC (rev 5446) +++ sandbox/geocat.ch/trunk/test/junit/src/org/fao/xsl/ValidateTransformationTest.java 2009-11-05 09:55:13 UTC (rev 5447) @@ -60,15 +60,15 @@ File file = new File(data, "gm03/AllComprehensiveAttributes.xml"); Multimap<String, Requirement> rules = new ArrayListMultimap<String, Requirement>(); rules.put("MD_Distribution/distributor", new Exists(new Finder("distributorContact"))); - rules.put("MD_Distribution/distributor", new Exists(new Finder("distributionOrderProcess"))); + rules.put("MD_Distribution/distributor", new Exists(new Finder("distributionOrderProcess", new Exists(new Finder("fees"))))); rules.put("CHE_MD_FeatureCatalogueDescription", new Exists(new Finder("dataModel"))); rules.put("CHE_MD_FeatureCatalogueDescription", new Exists(new Finder("domain"))); rules.put("CHE_MD_FeatureCatalogueDescription", new Exists(new Finder("class")));; rules.put("CHE_MD_FeatureCatalogueDescription", new Exists(new Finder("modelType"))); file = testFile(file, Control.GM03_1_ISO, rules); -// file = testFile(file, Control.ISO_GM03, new ArrayListMultimap<String, Requirement>() ); -// testFile(file, Control.GM03_2_ISO, rules); + file = testFile(file, Control.ISO_GM03, new ArrayListMultimap<String, Requirement>() ); + testFile(file, Control.GM03_2_ISO, rules); } @Test @@ -79,21 +79,10 @@ rules.put("MD_Distribution/distributor", new Exists(new Finder("distributorFormat"))); file = testFile(file, Control.GM03_1_ISO, rules); -// file = testFile(file, Control.ISO_GM03, new ArrayListMultimap<String, Requirement>() ); -// testFile(file, Control.GM03_2_ISO, rules); + file = testFile(file, Control.ISO_GM03, new ArrayListMultimap<String, Requirement>() ); + testFile(file, Control.GM03_2_ISO, rules); } - @Test - public void importMD_Usage_Bug16374() throws Throwable - { - File file = new File(data, "gm03/import_md_usage_Bug16374.xml"); - Multimap<String, Requirement> rules = new ArrayListMultimap<String, Requirement>(); - rules.put("CHE_MD_Metadata", new Exists(new Finder("MD_Usage"))); - file = testFile(file, Control.GM03_1_ISO, rules); -// file = testFile(file, Control.ISO_GM03, new ArrayListMultimap<String, Requirement>() ); -// testFile(file, Control.GM03_2_ISO, rules); - } - @Test public void importRole() throws Throwable { Modified: sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/distribution.xsl =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/distribution.xsl 2009-11-05 09:07:29 UTC (rev 5446) +++ sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/19139CHEtoGM03/distribution.xsl 2009-11-05 09:55:13 UTC (rev 5447) @@ -32,10 +32,10 @@ <GM03_2Comprehensive.Comprehensive.distributionOrderProcessMD_Distributor TID="x{generate-id(.)}"> <distributionOrderProcess REF="?"> <GM03_2Comprehensive.Comprehensive.MD_StandardOrderProcess TID="x2{generate-id(.)}"> - <xsl:apply-templates mode="text" select="gmd:fees"/> - <xsl:apply-templates mode="text" select="gmd:plannedAvailableDateTime"/> - <xsl:apply-templates mode="text" select="gmd:turnaround"/> - <xsl:apply-templates mode="text" select="gmd:orderingInstructions"/> + <xsl:apply-templates mode="text" select="gmd:MD_StandardOrderProcess/gmd:fees"/> + <xsl:apply-templates mode="text" select="gmd:MD_StandardOrderProcess/gmd:plannedAvailableDateTime"/> + <xsl:apply-templates mode="text" select="gmd:MD_StandardOrderProcess/gmd:turnaround"/> + <xsl:apply-templates mode="text" select="gmd:MD_StandardOrderProcess/gmd:orderingInstructions"/> </GM03_2Comprehensive.Comprehensive.MD_StandardOrderProcess> </distributionOrderProcess> <BACK_REF name="MD_Distributor"/> Modified: sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/GM03to19139CHE/version2/distribution.xsl =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/GM03to19139CHE/version2/distribution.xsl 2009-11-05 09:07:29 UTC (rev 5446) +++ sandbox/geocat.ch/trunk/web/geonetwork/xsl/conversion/GM03to19139CHE/version2/distribution.xsl 2009-11-05 09:55:13 UTC (rev 5447) @@ -148,17 +148,37 @@ </distributorContact> </xsl:for-each> - <xsl:for-each select="int:distributionOrderProcess"> - <TODO>distributionOrderProcess</TODO> - </xsl:for-each> - - <xsl:for-each select="int:distributorFormat"> - <TODO>distributorFormat</TODO> - </xsl:for-each> - - <xsl:for-each select="int:distributorTransferOptions"> - <TODO>distributorTransferOptions</TODO> - </xsl:for-each> + <xsl:apply-templates mode="Distributor" select="int:GM03_2Comprehensive.Comprehensive.distributionOrderProcessMD_Distributor"/> + <xsl:apply-templates mode="Distributor" select="int:GM03_2Comprehensive.Comprehensive.formatDistributordistributorFormat"/> + <xsl:apply-templates mode="Distributor" select="int:GM03_2Comprehensive.Comprehensive.distributorTransferOptionsMD_Distributor"/> </MD_Distributor> </xsl:template> + + <xsl:template mode="Distributor" match="int:GM03_2Comprehensive.Comprehensive.distributionOrderProcessMD_Distributor"> + <distributionOrderProcess> + <xsl:apply-templates mode="Distributor" select="int:distributionOrderProcess/int:GM03_2Comprehensive.Comprehensive.MD_StandardOrderProcess"/> + </distributionOrderProcess> + </xsl:template> + <xsl:template mode="Distributor" match="int:GM03_2Comprehensive.Comprehensive.MD_StandardOrderProcess"> + <MD_StandardOrderProcess> + <xsl:apply-templates mode="text" select="int:fees"/> + <xsl:for-each select="int:plannedAvailableDateTime"> + <plannedAvailableDateTime> + <xsl:apply-templates mode="dateTime" select="."/> + </plannedAvailableDateTime> + </xsl:for-each> + <xsl:apply-templates mode="text" select="int:orderingInstructions"/> + <xsl:apply-templates mode="text" select="int:turnaround"/> + </MD_StandardOrderProcess> + </xsl:template> + <xsl:template mode="Distributor" match="int:GM03_2Comprehensive.Comprehensive.formatDistributordistributorFormat"> + <distributorFormat> + <TODO>distributorFormat</TODO> + </distributorFormat> + </xsl:template> + <xsl:template mode="Distributor" match="int:GM03_2Comprehensive.Comprehensive.distributorTransferOptionsMD_Distributor"> + <distributorTransferOptions> + <TODO>distributorTransferOptions</TODO> + </distributorTransferOptions> + </xsl:template> </xsl:stylesheet> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ GeoNetwork-commit mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/geonetwork-commit |
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |