[xslt] bug or feature

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

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" />

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?


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