|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: possible to use copy-of without namespace
Hi Ken, your solution with the template mode=".." is exactly what I was looking for, thanks indeed!! At 03:33 08.01.2003 -0500, you wrote: At 2003-01-08 05:03 +0100, Thomas Brand wrote:i try to get a 1:1 copy of a tree (using xsl:copy-of) without having the xmlns attribute set in the root node of the result tree. well, the guidelines for the output format are very strict. i guess one could also let them hang around maybe.. :) there is a little chance that the delivered customer gets confused about it. Your test file is very confusing, though, because your <somechildnode> construct isn't an element ... it is inside of PCDATA. The element before is in the ans namespace and the one following isn't ... since you are using the ans namespace in the result, you will need it. absolutely. the use of CDATA was a bloody workaround, which now has been corrected thanks to better knowledge! i'll have to read about templates with mode attributes, never saw them. <xsl:template mode="copy-no-ns" match="*">
<xsl:element name="{name(.)}" namespace="{namespace-uri(.)}">
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="copy-no-ns"/>
</xsl:element>
</xsl:template>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








