[xslt] bug or feature



I'm experiencing a problem (or so I think) using libxml2-2.3.4 and
libxslt-1.0.3.

I use the following XML:

	<?xml version="1.0"?>
	<foo test="b&#38;b"/>

And the following XSLT:

	<?xml version="1.0" encoding="iso-8859-1"?>
	<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:template match="foo">
		<xsl:element name="bar">
			<xsl:attribute name="xxx">
				<xsl:value-of select="@test" disable-output-escaping="yes" />
			</xsl:attribute>
		</xsl:element>
	</xsl:template>
	</xsl:stylesheet>

The output seems to be wrong:

	<?xml version="1.0"?>
	<bar xxx="b&amp;#38;b"/>


If I use this XML:

	<?xml version="1.0"?>
	<foo test="b&amp;b"/>

The output is (IMO) correct:

	<?xml version="1.0"?>
	<bar xxx="b&amp;b"/>

What gives?

TIA,
Robert




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]