RE: [xsl] Namespace-aliasing and excluded namespaces

Subject: RE: [xsl] Namespace-aliasing and excluded namespaces
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 10 May 2006 20:41:33 +0100
> The problem with Libxslt is that, wrt to namespace exclusion, 
> it somehow processes the literal result elements, which are 
> the children of an xsl:template, differently than literal 
> result elements deeper in the subtree of an xsl:template. The 
> latter do work fine - or at least better.

That startled me on first reading but then I remembered that Saxon has
similar differences - if a literal result element is textually included
within another in the stylesheet then you don't need to bother outputting
the in-scope namespaces that were also in-scope for the outer element
because they will be inherited anyway (unless inherit-namespaces is off).
There were a few Saxon bugs in this area in the past, for example where the
namespace is excluded and is therefore omitted from the outer element, but
where it's then used on an attribute of the inner element and therefore
needs to be output there.

Michael Kay

Current Thread