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/04/06 21:17:11 UTC

[jira] Updated: (XALANJ-2095) Tab characters in text nodes are serialized to but shouldn't be

     [ http://issues.apache.org/jira/browse/XALANJ-2095?page=history ]

Brian Minchau updated XALANJ-2095:
----------------------------------

    Attachment: CharInfo.patch1.txt

Attaching a patch for serializer's CharInfo.
The fix is not to set the horizontal tab as special for both
XML text nodes and attribute values, but just for XML attribute values.

> Tab characters in text nodes are serialized to &#9; but shouldn't be
> --------------------------------------------------------------------
>
>          Key: XALANJ-2095
>          URL: http://issues.apache.org/jira/browse/XALANJ-2095
>      Project: XalanJ2
>         Type: Bug
>     Reporter: Brian Minchau
>     Assignee: Brian Minchau
>     Priority: Minor
>  Attachments: CharInfo.patch1.txt
>
> The serializer has code in CharInfo to check if characters in attribute values, or int text nodes need special processing.
> The fact that a tab is special in an XML attribute value and needed to be output as &#9; leaked into the processing of XML text nodes.
> Consider the following stylesheet, with tab characters where indicated
> in the attribute value, and text node value.
> ---------------------------------------------------------
> <?xml version="1.0"?>
> <xsl:stylesheet 
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  
>   version="1.0">
> <xsl:output method="xml" indent="yes" version="1.1" />
> <xsl:template match="/">
> <out>
>   <xsl:attribute name="attr1">tab:	:</xsl:attribute>
>   <xsl:text>tab here:	:</xsl:text>
> </out>
> </xsl:template>
> </xsl:stylesheet>
> ----------------------------------------------------------
> The output produced is:
> <?xml version="1.1" encoding="UTF-8"?>
> <out attr1="tab:&#9;:">tab here:&#9;:</out>
> But should have produced:
> <?xml version="1.1" encoding="UTF-8"?>
> <out attr1="tab:&#9;:">tab here:	:</out>

-- 
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
-
If you want more information on JIRA, or have a bug to report 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