W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > June 2009

Issues from the wiki: prefix declaration questions

From: Shane McCarron <shane@aptest.com>
Date: Thu, 11 Jun 2009 17:35:26 -0500
Message-ID: <4A3186AE.2010202@aptest.com>
To: "public-rdf-in-xhtml-tf.w3.org" <public-rdf-in-xhtml-tf@w3.org>
I thought it might be good to pick some of the low hanging fruit from 
the issues page and see if we couldn't deal with them.  The following 
are all related to xmlns declarations:

Empty xmlns prefix - 

The Namespaces in XML Recommendation defines the syntax for the xmlns 
attribute.  That syntax does not permit an empty prefix name (e.g. 
xmlns:="lala").  Therefore, such a declaration is invalid and would 
never result in a prefix mapping being created in a conforming parser.

Underscore xmlns prefix

It is certainly legal xmlns syntax to declare a prefix mapping such as 
xmlns:_="foo".  However, such a mapping would collide with the internal 
use of the reserved prefix name '_'.  The RDFa Syntax Recommendation 
does not specifically prohibit the explicit declaration of such a 
prefix, but I think it probably should have.  If the group is in 
agreement, then I believe we can address this omission via the 
specifications errata page.  Specifically, the specification should say 
something like "The CURIE prefix '_' is reserved for use by languages 
that support RDF. Therefore, a prefix mapping for '_' MUST NOT be 
declared in a source document, and conforming parsers MUST ignore any 
such explicit prefix mapping." 

I can't see any other way to address this issue in a way that would not 
result in ambiguous interpretation of CURIE references that are prefixed 
with '_'.

Colon in xmlns prefix

Again, as per the Namespaces in XML Recommendation, a colon is not 
permitted in an xmlns prefix.  It is therefore not permitted in a CURIE 
prefix.  Such a declaration is invalid and would never result in a 
prefix mapping being created in a conforming parser.

Empty xmlns value

As per section 2.2 of the Namespaces in XML Recommendation, the empty 
string cannot be used as a namespace name.  This also means it cannot be 
used in a prefix mapping in a CURIE.  It is invalid, and the prefix 
declaration should be ignored by a conforming parser. 

And just to be clear, in the situation where there is no defined prefix 
mapping for a prefix name used in a CURIE, that CURIE is ignored.  So, 
if I have a situation like <span xmlns:mine="" 
property="mine:foo">test</span> no triple will arise out of this.

I do believe that it would make sense to ensure the test suite exercises 
these edge cases.  I have proposed some test cases (0127 , 0128) and 
will propose more once we have reached consensus.


Shane P. McCarron                          Phone: +1 763 786-8160 x120
Managing Director                            Fax: +1 763 786-8180
ApTest Minnesota                            Inet: shane@aptest.com
Received on Thursday, 11 June 2009 22:36:02 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:32 UTC