W3C home > Mailing lists > Public > www-ql@w3.org > October to December 2003

RE: namespace node implementation

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Wed, 22 Oct 2003 11:22:01 +0200
Message-ID: <DFF2AC9E3583D511A21F0008C7E62106073DD1EF@daemsg02.software-ag.de>
To: Per Bothner <per@bothner.com>
Cc: www-ql@w3.org
> I've been asked to provide a legal disclaimer before I "start posting 
> code and algorithm."
> 
> I have not looked at how other implementations handle 
> namespace nodes. 


There are sufficiently many open source XSLT processors that I think you can
be reasonably confident that any sensible ideas you come up with have
already been tried in one or more of them, and that they are therefore
covered by prior art.

Saxon's approach is essentially to store non-redundant namespace
declarations (and undeclarations) with the element nodes, and to compute the
set of namespace nodes when required by walking up the ancestors. You can
regard the set of namespace [un]declarations as being a delta on the set of
namespace nodes. I see no particular reason to change that approach for 2.0,
except that I'm slightly concerned that the new rules for element
construction (in both XQuery 1.0 and XSLT 2.0) will lead to result trees
that contain large numbers of namespace undeclarations, in which case it
might become more efficient to store something that's rather closer to the
actual data model. 

I haven't yet implemented the new construction rules: when you add an
element to a new parent in Saxon today, it will inherit the namespaces of
its new parent, which is incorrect according to the spec.

Michael Kay
Received on Wednesday, 22 October 2003 05:22:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:17:16 UTC