W3C home > Mailing lists > Public > www-rdf-interest@w3.org > May 2000

Re: Parsing of qualified 'about' attribute

From: Perry A. Caro <caro@Adobe.COM>
Date: Mon, 01 May 2000 13:30:42 -0700
Message-ID: <390DE972.91B88491@corp.adobe.com>
To: www-rdf-interest@w3.org
Tim Bray:
> The spec *allows* but does not *require* <foo:bar id=""> and 
> <foo:bar foo:id=""> to be considered identical by namespace-sensitive
> applications.  This was a careful decision

Sigh.  I'm sure it was a careful decision, but it is still a problematic
one.  It is exactly this sort of wishy-washiness in specs that undermines
the interchange story, and which drives implementors mad.

My RDF processor applies the XML Namespace [1] rules strictly.  I offer the
following interpretation as a strawman for recommended best practice.

If an attribute appears in this form:

<foo:bar id="1"/>

"id" is treated as an attribute named in the "Per-Element-Type Partition"
and takes on the namespace of the element, whatever it may be.

If an attribute appears in this form:

<foo:bar foo:id="1"/>

"id" is treated as an attribute named in the "Global Attribute Partition"
which theoretically can appear in any element context (XML Schema, RDF
Schema, or other controlling specifications notwithstanding), and has the
namespace associated with "foo".  Thus one could also have:

<x:jjj foo:id="2"/>

Thereofore, this form:

<foo:bar resource=.../>

is treated by my RDF processor as the property "resource" in the namespace
identified by "foo" of the implied anonymous description which is the value
of foo:bar.  In other words, it is an abbreviation of:

	<foo:bar>
		<rdf:Description>
			<foo:resource>...</foo:resource>
		</rdf:Description>
	</foo:bar>

This form:

<foo:bar rdf:resource=.../>

is treated by my RDF processor as the "global" rdf:resource attribute which
matches production [6.18] (via the last alternative of [6.12]).

My serializer issues the following attributes without qualification (always
clear from element-type context):

	about
	aboutEach
	aboutEachPrefix

[EXCEPT for typed nodes which declare an "about" attribute, etc., in which
case the attribute is qualified for the RDF namespace.]

and these with qualification always:

	rdf:bagID
	rdf:ID
	rdf:type
	rdf:resource
	rdf:parseType

[1]
<http://www.w3.org/TR/REC-xml-names/>

Perry
Received on Monday, 1 May 2000 16:31:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:43 GMT