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

Re: PROPOSAL: Errata text to deal with the issue of predeclared 'xml' and 'xmlns' prefixes

From: Jeni Tennison <jeni@jenitennison.com>
Date: Fri, 25 Sep 2009 09:31:37 +0100
Cc: "public-rdf-in-xhtml-tf.w3.org list" <public-rdf-in-xhtml-tf@w3.org>, Philip Taylor <pjt47@cam.ac.uk>
Message-Id: <3A49AA2E-2268-41C2-89A1-C63E40E4E07B@jenitennison.com>
To: Shane McCarron <shane@aptest.com>

On 24 Sep 2009, at 22:27, Philip Taylor wrote:
> Shane McCarron wrote:
>> [...] I was just trying to reflect in errata the discussion that  
>> went on today on the RDFa Task Force call.
>> Would you prefer that we turn this around, explicitly indicating  
>> that 'xmlns' is not permitted at all, and that 'xml' is only  
>> permitted to be used in CURIEs if it is declared?
>
> Mostly I want there to be a single unambiguous mapping from any  
> given source document to a set of triples, so I really don't want  
> the spec to say "a conforming RDFa Processor MAY provide these  
> mappings" and introduce uncertainty - it should be a strict  
> requirement one way or the other.

I agree with Philip. I'd prefer there to be strict rules wherever  
possible rather than leaving things implementation-dependent.

> In this case I believe the current spec text is requiring that the  
> mappings must not be provided, and so an errata that says they must  
> be provided would be changing the normative behaviour defined by the  
> spec, which seems undesirable. If it's unclear to implementors, it  
> would be good to have test cases for this; I'd be happy to leave the  
> spec as it is, though I'd also be happy for the spec to have  
> explicit text to guide implementors safely around the confusion  
> caused by XML Namespaces.

I agree that this is what the spec says.

The problem from my perspective is that it is impossible for an XSLT  
implementation (such as a GRDDL stylesheet) to know whether or not the  
'xml' prefix has been declared through a namespace declaration. In the  
XDM on which XSLT and XQuery are based, all elements have an 'xml'  
namespace node whether or not one is declared, so documents that  
contain xmlns:xml="..." namespace declarations and those that don't  
produce equivalent XDMs.

There seem to be the following options:

1. Leave the text as it is now, with the consequence that it's  
impossible for an XSLT implementation to be fully conformant.

2. State that the 'xml' prefix is implicitly bound to the XML  
namespace such that xml:*  will always work.

3. State that the 'xml' prefix is reserved and must not be used for a  
CURIE (such CURIEs are then invalid, and ignored).

I would prefer 2 or 3 than 1, because I think it's important for XSLT  
and XQuery implementations to be feasible. I don't have a particular  
feeling either way about which of 2 or 3 is best.

The situation is different for the 'xmlns' prefix. It's illegal for  
people to declare the 'xmlns' prefix in a document anyway, so a  
clarification that stated that the use of xmlns:* CURIEs is always  
invalid would work just fine.

Cheers,

Jeni
-- 
Jeni Tennison
http://www.jenitennison.com
Received on Friday, 25 September 2009 08:32:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 25 September 2009 08:32:20 GMT