W3C home > Mailing lists > Public > www-html-editor@w3.org > January to March 2006

Re: [XHTML 2] 25.2 role and QNames in attribute context (PR#7757)

From: Jim Ley <jim@jibbering.com>
Date: Thu, 26 Jan 2006 19:32:45 -0000
Message-ID: <024f01c622af$489b3430$0700a8c0@Snufkin>
To: "Laurens Holst" <lholst@students.cs.uu.nl>
Cc: "Steven Pemberton" <steven.pemberton@cwi.nl>, "Anne van Kesteren" <annevk@opera.com>, "Shane McCarron" <xhtml2-issues@hades.mn.aptest.com>, <www-html-editor@w3.org>

"Laurens Holst" <lholst@students.cs.uu.nl>
Jim Ley schreef:
>> Browsers currently support XSLT, to use XSLT with QNames in Attribute 
>> context the browsers either need specialist knowledge of the doctype, or 
>> they need support for XML Schema.
>
>I don’t see how they wouldn’t need knowledge of the doctype anyway in order 
>to sensibly process the XHTML anyway. This is the case for rel + relNS as 
>well, XSLT can do nothing with the attribute if it doesn’t know that NS 
>contains a namespace, etc.

Consider this fragment:

<ns0:html xmlns:ns0="http://www.w3.org/2002/06/xhtml2/">
<ns0:link rel="ns0:chicken"  />
</ns0:html>

Now put it through an XSLT engine that optimises namespaces, it's likely to 
remove ns0 and have xhtml as the default namespace,

<html xmlns="http://www.w3.org/2002/06/xhtml2/">
<link rel="ns0:chicken" role="ns1:chicken" />
</html>

Which in XML is an equivalent document to the previous ones, however it is 
not an equivalent XHTML 2.0 document, because of the QName in attribute 
context.

>XSLT 2.0 has functionality to resolve QNames, see section 11 of the current 
>Functions and Operators specification [1]. I have used this functionality 
>already for an odd case, and although it’s not really compact, it works 
>just fine.

This provides the ability to resolve QNames, it does not provide the ability 
to force XSLT to not change the namespace prefix in a document, it only 
provides the ability to match, matching is not my objection.

>With regard to rel and relNS, if you want to explicitly have to specify the 
>entire namespace URI, instead of introducing something new wouldn’t it be 
>better to follow RDF then, and have 
>rel="http://example.org/namespace#something ?

Because it's simply incompatible with XML namespaces? ie it cannot 
distinguish between the following 2 cases:

relNS="http://example.org/" rel="namespace#something"
relNS="http://example.org/namespace" rel="#something"

Cheers,

Jim. 
Received on Thursday, 26 January 2006 19:33:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:17:55 GMT