RE: [xsl] Carrying Namespaces through a XSL to XSL Transformation

Subject: RE: [xsl] Carrying Namespaces through a XSL to XSL Transformation
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Tue, 2 Jan 2001 11:02:30 -0000
> If I understand correctly, this is basically caused by the 
> fact that, in the
> desired generated XSLT, the namespace declaration is only 
> required because
> the prefix appears in XPath expressions, but not in a literal result
> element.
> 
> Seems to me that this is a hole that should be closed in XSLT 
> 1.1... (or is it?).
> 
The draft XSLT 1.1 (and indeed the draft XSLT 1.0 errata) defines semantics
for xsl:copy and xsl:copy-of when applied to a namespace node; this was
previously undefined. Essentially the namespace node is copied provided
there is no conflict with existing namespace nodes. This allows you to put a
namespace node on a result element that was not present on the element that
the result element was created from. The only constraint is that the
namespace declaration must be present somewhere in the source document, but
you can get round this if you're determined by using a result tree fragment
as an additional source document.

Mike Kay

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread