Ordering Properties in RDF Files

Is the order that has properties in the RDF / XML file significant? In other words, are the following two the same?

<rdf:Description rdf:about="http://example.org/1"> <ex:prop>1</ex:prop> </rdf:Description> <rdf:Description rdf:about="http://example.org/2"> <ex:prop>2</ex:prop> </rdf:Description> 
 <rdf:Description rdf:about="http://example.org/2"> <ex:prop>2</ex:prop> </rdf:Description> <rdf:Description rdf:about="http://example.org/1"> <ex:prop>1</ex:prop> </rdf:Description> 
+4
source share
1 answer

Yes, RDF is mathematically defined as a set of triples, so the order in which these triples appear depending on which RDF serialization you use is completely irrelevant.

It is said that there are some serializations in which ordering will affect the created triples, for example, a fragment of a turtle using the collection syntax:

 <http://example.org/subject> <http://example.org/hasItems> ( "one" "two" "three" ) . 

Produces a variety of triples from:

 <http://example.org/subject> <http://example.org/hasItems> ( "two" "one" "three" ) . 
+6
source

Source: https://habr.com/ru/post/1392212/


All Articles