- From: Dave Beckett <dave.beckett@bristol.ac.uk>
- Date: Mon, 05 May 2003 22:23:11 +0100
- To: "Peter F. Patel-Schneider" <pfps@research.bell-labs.com>
- cc: www-rdf-comments@w3.org
>>>"Peter F. Patel-Schneider" said:
>
> Is the following legal RDF/XML? If so, is it a good idea to allow
> arbitrary attributes in the top-level element?
Hmm. It isn't legal XML :)
> <?xml version="1.0"?>
>
> <http://www.w3.org/1999/02/22-rdf-syntax-ns#RDF foo="bar">
>
> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Description
> http://www.w3.org/1999/02/22-rdf-syntax-ns#about="http://foo.ex#baa">
> <http://foo.ex#bar>
> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Description
> http://www.w3.org/1999/02/22-rdf-syntax-ns#about="http://foo.ex#baz" /
>
> </http://foo.ex#bar>
> </http://www.w3.org/1999/02/22-rdf-syntax-ns#Description>
>
> </http://www.w3.org/1999/02/22-rdf-syntax-ns#RDF>
As to whether (simplifying)
<?xml version="1.0"?>
<rdf:RDF foo="bar" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="http://example.org/" rdf:value="blah" />
</rdf:RDF>
is legal: no.
In RDF/XML, rdf:RDF can have no attributes apart from the xml ones
(xml* which include xmlns, xml:lang and xml:base)
The grammar for this bit of syntax is:
[[ start-element(URI == rdf:RDF, attributes == set())
nodeElementList
end-element()
]] -- http://www.w3.org/TR/rdf-syntax-grammar/#RDF
(the xml* attributes are removed in the syntax data model stage)
I note the W3C's RDF validator gives a warning on this point but I
feel it should be an error. Since no attributes are allowed and will
not be interoperable, warning is probably acceptable.
As I recall it, RDFCore has not seriously considered allowing adding
anything to rdf:RDF. I think we would need a good reason to make
such an addition, plus we would need a very good reason to allow
adding arbitrary attributes. This syntax doesn't need more, period :)
Dave
Received on Monday, 5 May 2003 17:29:34 UTC