![]() |
|
Behind the Scenes. XML/RDF SyntaxThe Contorsion XPath processor works over an RDF-OWL inference engine (borrowed from the Jena API). We translate XML and XSD files to RDF and OWL files respectively, but not under a structure-mapping approach (e.g. translating each 'movie' element into a 'movie' RDF resource) but under a model-mapping approach. We have designed an ontology to represent the XML document model (the XQuery 1.0 and XPath 2.0 Data Model). Instances of this ontology are RDF representations of XML document trees, so the ontology defines some kind of XML/RDF Syntax (reversing the W3C terminology for RDF/XML Syntax). The first step of the processor is to translate the XML instance to RDF. We use an XSLT stylesheet to perform this task. To allow the processor to take care of schema constructs we must translate the XSD instance to OWL. Finally is time to translate the XPath query into some RDF query language. We have choosed RDQL, and we have designed an algorithm to map the different axis, nodetests and predicates of XPath 2.0 to this language. Fortunately, the most part of of the XPath constructs have equivalent properties in our XML/RDF ontology, so the translation algorithm results very simple, and the hard part of the computation is performed by the inference engine. |
|
| DMAG 2005 Distributed Multimedia Applications Group Universitat Pompeu Fabra (UPF) |