- From: Dave Beckett <dave.beckett@bristol.ac.uk>
- Date: Tue, 07 Jan 2003 10:55:47 +0000
- To: Art.Barstow@nokia.com
- cc: www-rdf-comments <www-rdf-comments@w3.org>, Brian McBride <bwm@hplb.hpl.hp.com>
>>>Art.Barstow@nokia.com said:
>
> Regarding the new docs, to address a FAQ I see, please
> normatively state:
>
> 1) The following are equivalent:
>
> <rdf:Property rdf:about="xxx"/>
>
> and:
>
> <rdf:Description rdf:about="xxx">
> <rdf:type rdf:resource="&ns-rdf;Property"/>
> </rdf:Description>
Equivalence in RDF is only done in terms of triples of the RDF graph,
so the XML syntax doc describes this in terms of rdf/xml->triples and
so you need to look up the corresponding rules.
Both of the above cases are handled normatively by the same grammar
production:
7.2.11 production nodeElement:
http://www.w3.org/TR/2002/WD-rdf-syntax-grammar-20021108/#nodeElement
For the former, S2 describes the single triple that is generated:
xxx <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
For the latter, S4 handles the single child element of
rdf:Description as a property element of the node element with URI
'xxx' by following productions:
7.2.13 Production propertyEltList
http://www.w3.org/TR/2002/WD-rdf-syntax-grammar-20021108/#propertyEltList
7.2.14 Production propertyElt
http://www.w3.org/TR/2002/WD-rdf-syntax-grammar-20021108/#propertyElt
7.2.21 emptyPropertyElt
http://www.w3.org/TR/2002/WD-rdf-syntax-grammar-20021108/#emptyPropertyElt
and then the single triple generated is handled by the 'Otherwise'
clause of 7.2.1, setting the triple object r to the URI in the
rdf:resource attribute.
> 2) The following are equivalent:
>
> <rdfs:Class rdf:about="xxx"/>
>
> and:
>
> <rdf:Description rdf:about="xxx">
> <rdf:type rdf:resource="&ns-rdfs:Class"/>
> </rdf:Description>
>
> The Syntax doc kind'a skirts around this informatively [1] but
> it seems to be limited to RDF (and not include RDFS/RDFV).
The same productions apply here.
> Perhaps a generic, normative rule like the following would
> also be useful:
>
> <NS:XXX rdf:about="#NNN"/>
>
> expands/equates to
>
> <rdf:Description rdf:about="#NNN">
> <rdf:type rdf:resource="&NS;XXX"/>
> </rdf:Description>
>
> where of course '&NS;' expands to the full namespace URI
> bound to the prefix 'NS:'.
>
> Regards,
>
> Art Barstow
> ---
>
> [1] http://www.w3.org/TR/2002/WD-rdf-syntax-grammar-20021108/#section-Syntax-typed-nodes
Section 2 is full of examples but doesn't actually show one with an
entirely empty node element (without child property elements or
property attributes) since it can only make a single rdf:type triple.
The running example didn't have such an arc and that is mostly why
that form isn't given.
I could add something in
http://www.w3.org/TR/2002/WD-rdf-syntax-grammar-20021108/#section-Syntax-typed-nodes
showing Example 15 rewritten as two triples like:
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:ex="http://example.org/stuff/1.0/" >
<rdf:Description rdf:about="http://example.org/thing">
<dc:title>A marvelous thing</dc:title>
</rdf:Description>
<rdf:Description rdf:about="http://example.org/thing">
<rdf:type rdf:resource="http://example.org/stuff/1.0/Document"/>
</rdf:Description>
</rdf:RDF>
and then in the further compacted form:
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:ex="http://example.org/stuff/1.0/" >
<rdf:Description rdf:about="http://example.org/thing">
<dc:title>A marvelous thing</dc:title>
</rdf:Description>
<ex:Document rdf:about="http://example.org/thing" />
</rdf:RDF>
if you think that would help explain it?
Would it be better to have this as a new section such as
"Empty Typed Node Elements"?
Dave
Received on Tuesday, 7 January 2003 05:57:58 UTC