[GeoSciML] schematron
Boisvert, Eric
Eric.Boisvert at RNCan-NRCan.gc.ca
Thu Aug 23 07:25:48 EDT 2012
Turns out that schematron validator implementation (http://www.schematron.com/implementation.html ) turns out to be just a bunch of XSLT, and you know me, when I hear "XSLT", what I really understand is "Cocoon pipeline".
So I did just that, a dead simple implementation that pick a .sch file from this location : https://www.seegrid.csiro.au/subversion/GeoSciML/branches/3.0.0/schematron/
And an instance document in this one https://www.seegrid.csiro.au/subversion/GeoSciML/branches/3.0.0/instances/
And pipe them together, and lo and behold... it seems to work...
The pipeline invokation is
http://ngwd-bdnes.cits.nrcan.gc.ca/service/schematron/validate/ <schematron file>/ <instance to check>
Example
http://ngwd-bdnes.cits.nrcan.gc.ca/service/schematron/validate/GeoSciML_v3_Testbed_4/TB4_CSIRO_GeologicStructure_fold_with_GeologicEvent
Question - just to be sure, Am I getting the .sch from the right repo location ?
For the curious mind: cocoon pipeline snippet:
<map:pipeline>
<!-- pattern = validate/(sch file)/(file to check) -->
<map:match pattern="validate/*/*">
<map:generate src="https://www.seegrid.csiro.au/subversion/GeoSciML/branches/3.0.0/instances/{2}.xml"/>
<map:transform type="saxon" src="cocoon:/gen_xslt/{1}"/> <!- get the XSLT from the gen_xslt pipeline below -->
<map:serialize type="xml"/>
</map:match>
<!-- this pipeline generates, from the .sch, a XSLT that will perform the validation (so this pipeline generates a XSLT file)-->
<map:match pattern="gen_xslt/*">
<map:generate src="https://www.seegrid.csiro.au/subversion/GeoSciML/branches/3.0.0/schematron/{1}.sch"/>
<map:transform type="saxon" src="styles/iso_dsdl_include.xsl"/>
<map:transform type="saxon" src="styles/iso_abstract_expand.xsl"/>
<map:transform type="saxon" src="styles/iso_svrl_for_xslt2.xsl"/>
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
================================================================
Eric Boisvert
Expert TI-GI / IT-IM Expert
Eric.Boisvert at rncan.gc.ca, 418-654-3705, facsimile/télécopieur
418-654-2615
490, rue de la Couronne, Québec (Québec), G1K 9A9
490, rue de la Couronne, Quebec, Quebec, G1K 9A9
Laboratoire de cartographie numérique et de photogrammétrie (LCNP)
Digital Cartography and Photogrammetry Laboratory (DCPL)
Commission géologique du Canada (Québec) / Geological Survey of Canada (Quebec)
Ressources naturelles Canada / Natural Resources Canada
Gouvernement du Canada / Government of Canada
http://gsc.nrcan.gc.ca/dir/index_f.php?id=4186 / http://gsc.nrcan.gc.ca/dir/index_e.php?id=4186
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengeospatial.org/pipermail/geosciml/attachments/20120823/a3fd4616/attachment.htm>
More information about the GeoSciML
mailing list