About Refactoring RDF/XML Syntax Rivision 1.43

I'm now writing a small sample code which parses RDF/XML based on
'Refactoring RDF/XML Syntax Rivision 1.43.', and have some comments on it.

1. Qname production

In section 3.1, it says that Qname must have NSprefix, but propName and
typeName might have no NSprefix when it uses default namespace.

<rdf:Description xmlns:rdf="..." xmlns="...">
  <foo>bar</foo>
</rdf:Description>

It's a legal RDF/XML, isn't it?


2. 'null' namespace-uri

I think it had better to assert that 'any' namespace-uri must not be
'null' namespace-uri in section 4.


3. Whitespace handling

It seems that there is no description about whitespace handling. I suggest
that spec sites that whitespaces contained in elements that never have
character contents must be ignored.


4. rdf-ns for 'any' namespace uri.

Is that legal that rdf-ns is used for propertyElt or typedNode?

<?xml version="1.0"?>
<x:foo xmlns:x="http://example.com/">
  <rdf:foo xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
</x:foo>

Does this RDF/XML generate no triples or generate triples below ?

<_:genid1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://example.com/foo> .
<_:genid1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#foo> <_:genid2> .

How about using rdf:Description instead of rdf:foo?


5. Is rdf:RDF optional?

# Aaron has already mentioned about this

Different parsers might generate different models without rdf:RDF,
especially in case where rdf-ns can be used as a namepsace uri of
propertyElt. So I suggest that WG recommend to use rdf:RDF for any RDF/XML
document.


6. More than one rdf:RDF

Is it legal to have more than one rdf:RDF elements in one XML document?
Is it different from having all rdf:Description in one rdf:RDF?


7. Attribute value normalization

Should parsers perform another attribute value normalization for ID or
bagID, or must not ?

For example:

--- foo.dtd ---
<!ATTLIST rdf:Description rdf:ID NMTOKEN #IMPLIED>
---------------

--- foo.rdf ---
<!DOCTYPE rdf:Description SYSTEM 'foo.dtd'>
<rdf:Description rdf:ID=" id "/>
---------------

If a parser doesn't perform normalization, this RDF/XML is legal when a
parser read the DTD, and illegal when it doesn't. Is this behavior
intended?


---
Satoshi Nakamura <snakamura@infoteria.co.jp>
Infoteria Corporation

Received on Wednesday, 5 September 2001 08:27:40 UTC