[ http://issues.apache.org/jira/browse/XALANJ-1572?page=comments#action_12312573 ]
Brian Minchau commented on XALANJ-1572: --------------------------------------- Although this bug was fixed, it may be of interest to know that XALANJ-2093, which will be in the Xalan-J 2.7 release, will allow you to specify what \n is normalized to on output. You can pick <xsl:output xalan:line-separator=" " > and it won't use the runtime library value for the line separator. > linefeed character not handle properly on Windows. > -------------------------------------------------- > > Key: XALANJ-1572 > URL: http://issues.apache.org/jira/browse/XALANJ-1572 > Project: XalanJ2 > Type: Bug > Components: parse-or-compile, Xalan-interpretive > Versions: 2.5 > Environment: Operating System: All > Platform: PC > Reporter: William Lee > Assignee: Brian Minchau > Attachments: serializer.bug20841.patch.txt > > xsl:attribute with value contains " " will be convert to "0x0d 0x0d 0x0a" > when using with HTML output format. > My investigation shown that, in ElemAttribute.constructNode(), Xalan 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 "html output" phase, the SerializerToHTML will > again > convert it to (0x0d,0x0d,0x0a). > After discussing with various Xalan developer, seems like we should not use > the text serializer to construct element node and attribute value. > XML Testcase: > <?xml version="1.0" encoding="UTF-8"?> > <root><env><param name="f1">aaa bbb</param></env></root> > XSLT Testcase: > <?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/param > [EMAIL PROTECTED]'f1']"/></xsl:attribute> > </x> > </xsl:template> > </xsl:stylesheet> -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
