Given an RDF data graph, and the OWL ontology describing the classes and properties used in this data graph, is there an algorithm, tool, or mapping language that can serialize this data in an XML document corresponding to a target XML schema?
I am thinking about JAXB-like annotations on the ontology classes and properties to drive the XML serialisation.
Typically, given this graph
@prefix data: <http://exemple.fr/data/>
@prefix onto: <http://exemple.fr/ontology.owl#>
data:1 a onto:Work .
data:1 onto:type "book" .
data:1 onto:date "2017-01-01"^^xsd:date .
data:1 onto:has_expression data:2 .
data:2 a onto:Expression .
data:2 onto:language "fr" .
I would like to produce XML similar to the following :
<Work URI="http://exemple.fr/data/1" date="2017-01-01">
<type>book</type>
<Expression URI="http://exemple.fr/data/2">
<lang>fr</lang>
</Expression>
</Work>
Note how this is different from an expected RDF/XML serialisation: a custom attribute holds the URI instead of rdf:about
; some properties are serialized as XML attributes, other as XML elements; onto:has_expression
is not serialized; the element "lang
" is used instead of "language
".
Note that I am looking for "RDF2XML" mapping, and not for an XML2RDF mapping/conversion or an "Object2RDF" mapping.
I could not find anything. I would accept the answer "No, there is no such thing" if others have already searched for this in vain.