You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Brian Minchau (JIRA)" <xa...@xml.apache.org> on 2005/06/03 23:35:55 UTC

[jira] Commented: (XALANJ-1572) linefeed character not handle properly on Windows.

    [ 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="&#10;" > 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 "&#10;" 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&#10;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
> [@name='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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org