|
GuideOfXsltModule
A short guide on the opmv xslt module
IntroductionXML data is one of the most common format of data being transformed into Linked Data. Therefore, the XSLT module is created to provide very fine-grained classes and properties to describe how data was created by applying XSLT transformation. Some of the OPMV Core Ontology classes and corresponding XSLT Module sub-classes include:
The module also created its own class QName and reused concepts from existing vocabularies, including foaf:Agent and doap:Version. It defines 8 object properties that extend the OPMV core and the OPMV Common Module:
Additional object properties and data properties from the XSLT module can be found documented in details in its schema, made available at its namespace: http://purl.org/net/opmv/types/xslt#. ExampleExample: Data creation by data transformation with XSLTIn this use case an RDF graph is created to describe each region based on the NaPTAN/NPTG data. Because the whole NaPTAN/NPTG data is available as one big XML file, the developer uses a stylesheet to split it up into lots of little XML files. Each of these XML files contains information about one region and a number of administrative areas and a number of districts. Then the developer processed this bunch of XML files with an XSLT stylesheet. The XSLT creates a number of RDF documents, one per region, administrative area and district. The first example triples below use terms from the OPMV core to describe how each RDF graph about a region is created by data transformations with XSLT. The second example shows how the same information can be more precisely expressed using the XSLT module.
### the rdf graph is generated by a transformation process that uses the processor _:saxon
</data/transport/nptg/2010-03-31/region/EA>
a opmv:Artifact ;
opmv:wasEncodedBy <nptg/2010-03-31/region/EA.rdf> ;
opmv:wasGeneratedBy [
a opmv:Process ;
opmv:used _:regionData ;
opmv:used _:transformation ;
opmv:wasControlledBy _:saxon ;
opmv:wasControlledBy <http://www.jenitennison.com/#me> ;
]
.
</data/transport/nptg/2010-03-31/region/EA.rdf>
a foaf:Document , opmv:Artifact ;
opmv:wasGeneratedBy [
a opmv:Process ;
opmv:used </source/transport/nptg/2010-03-31/region/region-1.xml> ;
opmv:used </code/transport/nptg/2010-03-31/xsl/region.xsl> ;
opmv:wasPerformedBy _:saxon ; ### _:saxon is a software
opmv:wasPerformedBy <http://www.jenitennison.com/#me> ;
]
.The example below shows how we can use the XSLT module to:
</data/transport/nptg/2010-03-31/region/EA.rdf>
a foaf:Document , opmv:Artifact ;
xslt:wasResultOf [
a xslt:Transformation ;
xslt:source </source/transport/nptg/2010-03-31/region/region-1.xml> ;
xslt:stylesheet </code/transport/nptg/2010-03-31/xsl/region.xsl> ;
xslt:processor _:saxon ; ### _:saxon is a software
opmv:wasPerformedBy <http://www.jenitennison.com/#me> ;
]
.
|