- From: Jonathan Borden <jonathan@openhealth.org>
- Date: Sun, 17 Nov 2002 14:29:15 -0500
- To: "Tim Bray" <tbray@textuality.com>
- Cc: "Simon St.Laurent" <simonstl@simonstl.com>, <www-tag@w3.org>
Tim Bray wrote:
> Jonathan Borden wrote:
>
> > whoops, we forgot the related resource, let's call this "rddl:related":
>
> Er JB, for the noobs, how is this RDF? I see no RDF namespace anywhere?
Short answer: It's RDF in the same way that "<p>this is a paragraph</p>" is
HTML :-)
Longer answer:
The above is, in RDF syntax terms, a "typed node element". RDF allows alot
(in many cases too much) flexibility in how the XML determines the graph
(set of triples). In particular the pattern:
<rddl:resource ID="foo">
<rddl:nature resource="http://example.org/nature"/>
<rddl:purpose resource="http://example.org/purpose"/>
<rddl:related resource="http://example.org/L.dtd"/>
<rddl:prose>
<p>A description of the "L" language</p>
</rddl:prose>
</rddl:resource>
uses unqualified attributes: ID and resource, but any namespace qualified
element may be interpreted as a "Typed Node" in which case the URI
equivalent of the element name is the rdf:type of the described RDF
resource.
see: http://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax-typed-nodes
also I forgot that the <rddl:prose> property needs an
rdf:parseType="Literal" directive to indicate that the contents are literal
XML.
<rddl:resource rdf:ID="foo">
<rddl:nature rdf:resource="http://example.org/nature"/>
<rddl:purpose rdf:resource="http://example.org/purpose"/>
<rddl:related rdf:resource="http://example.org/L.dtd"/>
<rddl:prose rdf:parseType="Literal">
<p>A description of the "L" language</p>
</rddl:prose>
</rddl:resource>
is interpreted in an identical fashion to:
<rdf:Description rdf:ID="foo">
<rdf:type rdf:resource="http://www.rddl.org/RDDL2#resource"/>
<rddl:nature rdf:resource="http://example.org/nature"/>
<rddl:purpose rdf:resource="http://example.org/purpose"/>
<rddl:related rdf:resource="http://example.org/L.dtd"/>
<rddl:prose rdf:parseType="Literal">
<p>A description of the 'L' language</p>
</rddl:prose>
</rddl:resource>
and generates the following triples:
<#foo> rdf:type rddl:resource .
<#foo> rddl:nature <http://example.org/nature> .
<#foo> rddl:nature <http://example.org/purpose> .
<#foo> rddl:nature <http://example.org/L.dtd> .
<#foo> rddl:prose "<p>A description of the 'L' language>"^^rdf:XMLLiteral .
So, the bottom line is that carefully crafted XML *can be* interpreted as
RDF. If we follow the RDF Syntax WD's "SHOULD NOT" admonishment about using
the unqualified attributes "ID, about and resource" then we SHOULD use
rdf:ID, rdf:about and rdf:resource.
This leaves out the issue for RDDL that we have either an implied or
explicit <rdf:RDF> around all the <rddl:resource>s which would tell an RDF
parser that the document is a bunch of typed nodes.
Jonathan
Received on Sunday, 17 November 2002 14:49:22 UTC