Relation mapping XML-RDF (subPropertyOf)

Hi all, The XML syntax currently uses a "Relation" element to describe relations between different elements in a description. The type of the relation is then given using the "type" attribute of that element. In RDF relations are a much more natural element of the model. Using the same kind of "type" attribute to NML "Relations" would make for an awkward description where complete RDF triples would have to be annotated to describe the type of a relation. I would propose that we define a "Relation" element as the top relation in the NML RDF schema, and then make the typed NML relations sub-properties of that. For example: <nml:Node id="urn:ogf:network:internet2.edu:2011:rtr.atla.net"> <nml:Relation type="hasPort"> <nml:Port idRef="urn:ogf:network:internet2.edu:2011:rtr.atla.net:ge-6-0-0_in" /> </nml:Relation> </nml:Node> Would be translated to: nml:hasPort rdfs:subPropertyOf nml:Relation . <urn:ogf:network:internet2.edu:2011:rtr.atal.net> a nml:Node; nml:hasPort <urn:ogf:network:internet2.edu:2011:rtr.atla.net:ge-6-0-0_in> . <urn:ogf:network:internet2.edu:2011:rtr.atla.net:ge-6-0-0_in> a nml:Port . This does mean that we have to explicitly define the relation types in the schemas though. Jeroen.

Jeroen van der Ham wrote:
For example:
<nml:Node id="urn:ogf:network:internet2.edu:2011:rtr.atla.net"> <nml:Relation type="hasPort"> <nml:Port idRef="urn:ogf:network:internet2.edu:2011:rtr.atla.net:ge-6-0-0_in" /> </nml:Relation> </nml:Node>
Would be translated to:
nml:hasPort rdfs:subPropertyOf nml:Relation .
<urn:ogf:network:internet2.edu:2011:rtr.atal.net> a nml:Node; nml:hasPort <urn:ogf:network:internet2.edu:2011:rtr.atla.net:ge-6-0-0_in> .
<urn:ogf:network:internet2.edu:2011:rtr.atla.net:ge-6-0-0_in> a nml:Port .
This seems easy to read, and easy to translate between XML and OWL, so I'm in favour. It brings up a question I like workgroup consensus on. The XML uses a string ("hasPort") to defined the type of relation, while OWL uses a URI (nml:hasPort) to define the same relation type. There seem three options here: 1. Use strings in both XML and RDF/OWL. Con: this does not work with Jeroen's proposal 2. Use a URI in both XML and RDF/OWL. Con: this makes the XML verbose (even if Pro: easier to define new relation types (users can define their own relation URI, even without involvement of the OGF) 3. Use string in XML and a URI in RDF/OWL, where the URI MUST reside in a specific namespace, so it is easy to translate between the string and URI. Pro: feel more natural in both RDF/OWL and XML. Con: requires OGF standards action to define new relation types. I don't have strong opinion on it, as long as we choose something. Jeroen's proposal above is option #3, so if there are no objects, I propose that we pick that. I'm slightly inclined to use a different namespace for the relation types than the NML-base namespace, for no reason other than that is is slightly easier to document the translation between string-form and URI-form of the type ("for XML, always remove the URI, for RDF/OWL, always use the URI xyz"). But this is a minor decision that I gladly leave to Jeroen to decide. Regards, Freek

On 16 Jan 2012, at 12:45, Freek Dijkstra wrote:
2. Use a URI in both XML and RDF/OWL. Con: this makes the XML verbose (even if Pro: easier to define new relation types (users can define their own relation URI, even without involvement of the OGF)
This is not necessarily more verbose. I've often seen the use of entities (e.g. &nml; ) in XML attributes to do just that. Only problem is that often XML producers don't automatically include such a conversion. I would prefer indeed option 3 or 2. Using a separate namespace for defining those relations does make sense. I have no problem in defining it that way. Jeroen.

Hi All; I dont really have a strong opinion either way, I suppose that 3 works best but does place extra work on someone's plate to fully define all relation types. -jason On 1/16/12 8:08 AM, thus spake Jeroen van der Ham:
On 16 Jan 2012, at 12:45, Freek Dijkstra wrote:
2. Use a URI in both XML and RDF/OWL. Con: this makes the XML verbose (even if Pro: easier to define new relation types (users can define their own relation URI, even without involvement of the OGF)
This is not necessarily more verbose. I've often seen the use of entities (e.g.&nml; ) in XML attributes to do just that. Only problem is that often XML producers don't automatically include such a conversion.
I would prefer indeed option 3 or 2.
Using a separate namespace for defining those relations does make sense. I have no problem in defining it that way.
Jeroen.
_______________________________________________ nml-wg mailing list nml-wg@ogf.org https://www.ogf.org/mailman/listinfo/nml-wg
participants (3)
-
Freek Dijkstra
-
Jason Zurawski
-
Jeroen van der Ham