Re: Canonical XML and xmlns:xml

On Monday 26 November 2001 13:16, Christian Geuer-Pollmann wrote:
> This means that xmlns:xml="http://www.w3.org/XML/1998/namespace" does not
> have to be declared to be used. But this causes a problem for some XSLT
> folks so the Xalan developers decided to add the above xmlns:xml decl to
> the DOM tree and XPath results.

Hrmm... tricky. In the Python implementation [1] we don't even bother with 
*real* namespace nodes since they aren't in DOM Levels 1/2. They are only 
available as attributes and we then separate them for processing based on 
what they look like; implicit xmlns:xml declarations are not returned in 
the attribute list regardless.

In Xalan, do they have an implementation of a DOM  *and* XPath nodeset? Or, 
like in PyXML, is XPath filtered through a DOM nodeset? (I'm not sure if 
there is a python parser that provides a genuine XPath nodelist.) If so, 
when the xmlns:xml is added, is it added to an attribute list? (I would 
think this might "break" DOM in order to comply with XPath...).

[1] http://dev.w3.org/cvsweb/2001/xmlsec-python/

> At the moment, I don't know whether this makes sense or causes problems.
> Do you have some thoughts about that?

Regardless of what is happening in XPath/DOM, I believe Canonicalization 
allows us to ignore it [2] regardless, right?

[2] http://www.w3.org/TR/2001/REC-xml-c14n-20010315#ProcessingModel
  Element Nodes- ... Namespace Axis-...To finish processing L, simply
  process every namespace node in L, except omit namespace node with local
  name xml, which defines the xml prefix, if its string value is
  http://www.w3.org/XML/1998/namespace.

-- 

Joseph Reagle Jr.                 http://www.w3.org/People/Reagle/
W3C Policy Analyst                mailto:reagle@w3.org
IETF/W3C XML-Signature Co-Chair   http://www.w3.org/Signature/
W3C XML Encryption Chair          http://www.w3.org/Encryption/2001/

Received on Tuesday, 27 November 2001 14:38:20 UTC