xml-xalan-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Marston/Cambridge/IBM <david_mars...@us.ibm.com>
Subject Re: namespace dynamic creation
Date Fri, 11 Oct 2002 14:21:38 GMT

Tevoi Andrea writes:
>...i would create a namespace dynamically using an XPath expression...
>I've tried a solution creating a dummy attribute:
><xsl:attribute name="myprefix:dummy" namespace="{$myDynamicNamespace}"/>
>This solution works fine with Microsoft Xsl Parser, but doesn't with
>Xalan (i use version 2.4).

It works for me with 2.4, and it's in our test suite (namespace117), so
it should continue to work in every future version. Note that in this
solution, as I originally proposed it, neither "myprefix" nor
"myDynamicNamespace" has been placed on the result tree previous to the
above instruction. You have to place the dummy attribute as high up as
you need it in the result tree.

XSLT 2.0 *may* have an xsl:namespace instruction that will allow you to
create a namespace node without needing to create the dummy. However, I
hear that the XSL WG isn't sure there's a need for it. I'd suggest that
you (and anyone else who wants this capability) send your reasons in to
the Working Group ASAP.
.................David Marston

View raw message