Hi all,
I'm currently encountered some problems whenever there is a '0x0a' character in the xml text... Seems like xalan (xslt) always generated an extra carriage-return on windows?... (this work fine on unix though)...
Here is the testcase:
<?xml version="1.0" encoding="UTF-8"?>
<root><env><param name="f1">aaa bbb</param></env></root>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
<xsl:template match="/root">
<x name="f1">
<xsl:attribute name="value"><xsl:value-of select="env/[EMAIL PROTECTED]'f1']"/></xsl:attribute>
</x>
</xsl:template>
</xsl:stylesheet>
My investigation shown that, in ElemAttribute.constructNode(), we use:
String val = transformer.transformToString(this);
Which will use the SerializerToText to contruct the attribute value (and within this text serializer, 0x0a will be convert to the pair (0x0d,0x0a) on windows), and then in the "output" phase, the SerializerToHTML will again convert it to (0x0d,0x0d,0x0a).
Is there any possible workaround for this issue? Or should I log a bug about this?
Thanks in advance for all your help.
William.
This message may contain privileged and/or confidential information. If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you.
