[xsl] converting XML to XML problem

Subject: [xsl] converting XML to XML problem
From: Abhijit Junnare <mavlaabhi@xxxxxxxxx>
Date: Mon, 10 Nov 2003 15:13:15 -0800 (PST)
Hi,
I am using xsl for xml to xml tranformation. I want to
pring & character in my output xml. But when I run the
transformation I get &amp; since I am using &amp; as
generated text in the stylesheet. 
My source xml is something like this

<node1>
<node2 attr="Something"/>
</node1>

I want the output to be

<node1>&Something;</node1>

What I get currently is
<node1>&amp;Something;</node1>

The snippet of my XSL whihc processes the above
element is

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
>
<xsl:output method="xml" version="1.0"
encoding="UTF-8" indent="no"/>
	<xsl:template match="/">	
	<xsl:apply-templates/>
</xsl:template>


<xsl:template match="node1">
<xsl:element name="name()">
<xsl:apply-templates/>
</xsl:element>
</xsl:template>

<xsl:template match="node2">
&amp;<xsl:value-of select="@attr/>;
</xsl:template>

<xsl:stylesheet>

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

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


Current Thread