[Expat-discuss] entities in parameters
Lee Brown
lee at puddledock.net
Thu Oct 28 02:58:14 CEST 2004
I see a different behavior after upgrading from expat 1.95.2 to 1.95.8 and using the library with Sablotron's sabcmd XSL translator. A picture is clearer....
XSL:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text"/>
<xsl:param name="LF"><xsl:text>
</xsl:text></xsl:param>
<xsl:param name="AA">LINE: </xsl:param>
<xsl:template match="/test">
<xsl:for-each select="line">
<xsl:value-of select="$AA"/>
<xsl:value-of select="."/>
<xsl:value-of select="$LF"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
XML:
<?xml version="1.0"?>
<test>
<line>line one</line>
<line>line two</line>
<line>line three</line>
</test>
With the 1.95.2 library I get line-breaks between each line in the XSL translation output, but with the 1.95.8 library there are no line-breaks. The AA parameter does get expanded, so I'm certain this has to do with entities. If I replace the "$LF" in the xsl:value-of element with "'
'" then I do get a line-break. The behavior is the same if I use xsl:variable instead of xsl:param. I've also tried the example with saxon instead of sabcmd (saxon does not use the expat library) and I do get line-breaks.
Can anyone shed any light on this?
P.S. I'm running on UnixWare 2.1.3. I built from source, no modifications necessary.
Thanks,
Lee
More information about the Expat-discuss
mailing list