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

Re: namespace node implementation

From: Per Bothner <per@bothner.com>
Date: Tue, 21 Oct 2003 20:46:30 -0700
Message-ID: <3F95FD96.6050800@bothner.com>
To: Michael Brundage <xquery@comcast.net>
Cc: www-ql@w3.org

Michael Brundage wrote:

> Why not just emulate the behavior of existing XSLT implementations?  As a
> user, that's the behavior I would expect.

But as an implementor it's more complicated for me ...

To repeat:  I'm hoping for feedback on the proposed *implementation*.
Part of that is I'm hoping more experienced users *and* implementors can 
advice me whether my proposed implementation would produce results close 
to users' expectations.  Of course that is hard to judge without an 
actual implementation, but I posted the algorithm in case somebody says 
"that's dumb because ..." or "it will produce output that is incorrect 
or different from user expectations."  Noone has done that so far, but 
no-one has commented very favorably either.

The "behavior of existing XSLT implementations" is of course 
implementation-defined.  I don't have much experience with 
implementations.  (I've mostly used them with documents that don't use 
namespaces.)  Do most of them behave more-or-less the same wrt to 
namespace serialization?

Also note that existing XSLT implementations must implement the 
XSLT/XPath 1.0 semantics of namespaced nodes.  This is very expensive. 
On the other hand, once you have all the namespaces of an element 
directly accessible as namespace nodes, basic serialization is trivial: 
  For each element emit all of its namespace modes as namespace 
attributes, unless it is redundant because it has been emitted by an 
ancestor.  (Yes, I realize it's not quite that simple!)

My hope is that my algorithm will come produce output similar to (or no 
worse) than existing implementations but do so much more cheaply.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/
Received on Tuesday, 21 October 2003 23:48:36 UTC

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