Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] [saxon] Bug (?) in Saxon/DOM/XOM interaction: Attributes instead ofnamespaces; strange element tree structure

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <erharold AT gmail.com>
  • To: Michael Kay <mike AT saxonica.com>
  • Cc: 'XOM' <xom-interest AT lists.ibiblio.org>, 'Mailing list for the SAXON XSLT and XQuery processor' <saxon-help AT lists.sourceforge.net>
  • Subject: Re: [XOM-interest] [saxon] Bug (?) in Saxon/DOM/XOM interaction: Attributes instead ofnamespaces; strange element tree structure
  • Date: Sat, 23 Feb 2008 07:18:51 -0800

Michael Kay wrote:
I think you're correct that when Saxon creates a DOM view of an underlying
Saxon tree, the attribute node that represents the xmlns="xyz" declaration
has a null namespace URI, whereas the DOM specifications strongly suggest
that it should have a namespace URI of "http://www.w3.org/2000/xmlns/";. The
reason for this rule escapes me completely, but it's what DOM says.

It escapes me too. To make matters worse, this rule is inconsistent with the clear language of Namespaces in XML 1.0, 1st edition, and with SAX 2.0.

The second edition of Namespaces in XML rewrote history to align with the DOM model but SAX (and XOM) still adhere to the original, no-namespace approach.

--
Elliotte Rusty Harold elharo AT metalab.unc.edu
Java I/O 2nd Edition Just Published!
http://www.cafeaulait.org/books/javaio2/
http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/




Archive powered by MHonArc 2.6.24.

Top of Page