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

Re: Parsing of qualified 'about' attribute

From: Dan Connolly <connolly@w3.org>
Date: Tue, 02 May 2000 00:17:13 -0500
Message-ID: <390E64D9.3914F94C@w3.org>
To: www-rdf-interest@w3.org
Chris Waterson wrote:
> Edd Dumbill raises an interesting question in:
> news://news.mozilla.org/8eeee1%24pgg2%40secnews.netscape.com
> Specifically related to:
> http://lists.w3.org/Archives/Public/www-rdf-comments/2000AprJun/0019.html
> The Schema and Syntax specification has some inconsistencies between the
> "Formal Grammar". Specifically, rules [6.6] through [6.9], [6.11], and
> [6.18] are not consistent with the examples used throughout the document
> to illustrate RDF/XML. The differences seems to stem from a
> misunderstanding of how XML namespaces apply to attributes.

I just ran across this bug when implementing my XSLT-based parser.

I reported it as a bug in the spec:

rdf:resource="..." vs. resource="..." Dan Connolly (Wed, Apr 26 2000) 

> What approaches have people taken with their RDF/XML parsers?

I took the approach that:
	rdf:resource="..." works everywhere, and
	resource="..." is taken to mean rdf:resource="..." when the
		namespace name of the element is the RDF M&S namespace.

the source code looks like:

        <xsl:when test='@rdf:ID'>
          <xsl:call-template name='rdfp:propertyElt_s'>
            <xsl:with-param name='subject' select='concat("#",


        <xsl:when test='(namespace-uri() = $rdfNS) and @ID'>
          <xsl:call-template name='rdfp:propertyElt_s'>
            <xsl:with-param name='subject' select='concat("#", @ID)'/>

In my bug report, I suggested that the BNF is just wrong, and the
intent of the spec was clear from the examples:

"I suggest you define the general case to be the rdf:resource case,
and specify that for rdf:Description, an unprefixed attribute
called resource should be treated as rdf:resource."

> Although
> Mozilla is currently "strict" in this regard, I'm leaning towards the
> addage of being liberal with the input that we accept, and treating
> (e.g.)
>   <foo:bar rdf:resource="baz" />
> as really meaning:
>   <foo:bar resource="baz" />.
> Comments?

I suggest you do it the other way around, so that
	<rdf:Description resource="bar"/>
is taken as a short-cut for
	<rdf:Description rdf:resource="bar"/>

I don't see any reason to "steal" the local attribute
names "resource", "ID", "about", etc. from all RDF property elements.

Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Tuesday, 2 May 2000 01:17:18 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:07:29 UTC