Error in the RDF/XML Syntax Specification

 Date: Wed, 9 Jan 2002 13:22:16 -0500 (EST)
 Message-ID: <D381B095F62B854F951B7B0B7A1C646F026211@bozwin.q42.net>
 Thread-Topic: Error in the RDF/XML Syntax Specification
 Thread-Index: AcGZOy3sRuaYI91FSh6Lp3lIZoullw==
 From: "Sjoerd Visscher" <sjoerd@q42.nl>
 To: <www-rdf-comments@w3.org>

As I wrote in my post last month
http://lists.w3.org/Archives/Public/www-rdf-comments/2001OctDec/0391.htm
l
I found out that PI's and comments weren't allowed in RDF/XML syntax. I
thought that might be a problem with my translation, but I'm now quite
confident that it's not allowed either with the current working draft.

To take some parts from de draft that leads to this conclusion:

	"This specification requires an information set as defined in
[INFOSET] 
	which supports at least the following information items and
properties:"

	"Element Information Item 
	[local name], [namespace name], [children], [attributes],
[parent]"

	"This specification does not require any destructive alterations
to the 
	input information set; no items are added, removed or
modified.."

So this means that an information set that supports all information
items will also report PI's and comments. So the value of the [children]
property can and may contain PI's and comments. Continuing:

	"3.2 Element Node 
	Created from an Element Information Item and takes the following

	properties and their values from the element information item:
local-name,
	namespace-name, children, attributes and parent."

So the chilren property of an Element Node can and may also contain PI's
and comments.

	"3.7 Information Set Mapping 
	To transform the Infoset into the sequence of nodes, each
information item
	is transformed as described above to generate a tree of nodes
with 
	properties and values. Each element node is then replaced as
described 
	below to turn the tree of nodes into a sequence in document
order.

	The original element node 
	The value of the children property, a possibly empty ordered
list of 
	nodes. 
	An end element node"

Again, the children property is copied directly.

	"5.3 Production RDF
	start_element(URI = rdf:RDF,
	    attributes=set())
	nodeElementList
	end_element() 
	
	5.4 Production nodeElementList
	ws* (nodeElement ws* )* "

Now the nodeElementList is matched against the value of the children
property, and any RDF element that contains PI's or comments is not
considered valid. The same goes for the propertyEltList.

It is possible to fix the spec to make it clear that PI's and comments
are allowed in RDF. But I think it would be a better idea to put the XML
Core Working Group to work. They should specify how to 'filter out'
information items and properties that you are not interested in, f.e.
how this affects properties like [children]. This can then be used for
all kinds of specs, not just RDF, that use a 'subset' of the Infoset,
while the right procedure for 'subsetting' is never defined. (SGML's
groves had this through grove-plans)

Then you can define how RDF filters out PI's and comments, and even
whitespace. Then "ws* (nodeElement ws* )*" can become simply
"nodeElement*"; whitespace is filtered out.

Kind regards,

Sjoerd Visscher
  w3future.com

Received on Wednesday, 9 January 2002 22:40:03 UTC