xml-xalan-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tevoi Andrea" <te...@cad.it>
Subject RE: namespace dynamic creation
Date Fri, 11 Oct 2002 15:48:46 GMT
Thanks David, but I've tried again 2.4 version and it doesn't work. It creates dummy attribute
with myprefix, but it doesn't create namespace declaration.

Could you tell me where i can find this test suite (namespace117)?

thanks again,

Andrea

-----Original Message-----
From: David Marston/Cambridge/IBM [mailto:david_marston@us.ibm.com]
Sent: venerdì 11 ottobre 2002 16.22
To: xalan-j-users@xml.apache.org
Subject: Re: namespace dynamic creation







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


Mime
View raw message