Let us say that we input the following RDF code to the W3C RDF validator at http://www.w3.org/RDF/Validator/.
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:uni="http://www.example.org/uni-ns#">
<rdf:Description rdf:about="949352">
<uni:name>Grigoris Antoniou</uni:name>
<uni:title>Professor</uni:title>
</rdf:Description>
</rdf:RDF>
Once I ask to parse the RDF code, I find that in the triples, the RDF URI has been replaced with the own URI of the validator.
Should not the subject of the triples be http://www.w3.org/1999/02/22-rdf-syntax-ns#949352
?
Why does the validator do this?
RDF uses an RDF URI Reference, which may include a fragment identifier, as a context free identifier for a resource. RFC 2396 [URI] states that the meaning of a fragment identifier depends on the MIME content-type of a document, i.e. is context dependent.
The Resource Description Framework (RDF) is a World Wide Web Consortium (W3C) standard originally designed as a data model for metadata. It has come to be used as a general method for description and exchange of graph data.
The main difference: XML is a syntax while RDF is a data model. RDF has several syntaxes (Turtle, N3, etc) and XML is one of those (known as RDF/XML). Actually, RDF/XML is the only W3C standard syntax for RDF (Currently, there is Last Call on Turtle, a new W3C standard syntax for RDF).
Resource Description Framework (RDF) RDF is a standard model for data interchange on the Web. RDF has features that facilitate data merging even if the underlying schemas differ, and it specifically supports the evolution of schemas over time without requiring all the data consumers to be changed.
The rdf:about
attribute takes an IRI as value.
You have 949352
as value, which is a relative IRI. It gets resolved to the IRI of the base document (which is the validator in your case).
You could, for example, provide an absolute IRI (example 1), or specify the xml:base
(example 2).
Example 1:
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:uni="http://www.example.org/uni-ns#">
<rdf:Description rdf:about="http://my-site.example.com/my-page/949352">
<uni:name>Grigoris Antoniou</uni:name>
<uni:title>Professor</uni:title>
</rdf:Description>
</rdf:RDF>
Example 2:
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:uni="http://www.example.org/uni-ns#"
xml:base="http://my-site.example.com/my-page/">
<rdf:Description rdf:about="949352">
<uni:name>Grigoris Antoniou</uni:name>
<uni:title>Professor</uni:title>
</rdf:Description>
</rdf:RDF>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With