You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "David Crossley (JIRA)" <xa...@xml.apache.org> on 2006/01/23 05:29:11 UTC

[jira] Commented: (XALANJ-656) introduces inappropriate line-end characters processing comments

    [ http://issues.apache.org/jira/browse/XALANJ-656?page=comments#action_12363610 ] 

David Crossley commented on XALANJ-656:
---------------------------------------

The original report for this Xalan issue said that the operating system was Mac OS 9. As Ross reported, we also see the issue at Apache Forrest and none of our committers are using Mac OS 9.

It is usually me updating our website (on Linux or Max OS X). Then occasionally a Windows-based committer does. Then we see these line-ending issues within the xml comments in the transformed docs. We use XalanJ 2.7.0

> <xsl:copy> introduces inappropriate line-end characters processing comments
> ---------------------------------------------------------------------------
>
>          Key: XALANJ-656
>          URL: http://issues.apache.org/jira/browse/XALANJ-656
>      Project: XalanJ2
>         Type: Bug
>   Components: Xalan
>     Versions: 2.2.0
>  Environment: Operating System: MacOS 9
> Platform: Macintosh
>     Reporter: Angus McIntyre
>     Assignee: Xalan Developers Mailing List
>     Priority: Minor

>
> I was trying to write a template that would correctly reproduce the script 
> body of a JavaScript (which is typically 'masked' by a comment). My initial 
> attempt was:
> <xsl:template match="script/comment()">
> 	<xsl:copy/>
> </xsl:template>	
> which worked, except that the copied script contained newline (ASCII 10) 
> in place of the carriage-return (ASCII 13) characters in the original. Note 
> that this is on a Macintosh, where line-endings are terminated by CR 
> rather than LF; I suspect it wouldn't manifest as a problem on UN*X). My 
> guess is that in this case, <xsl:copy> is causing Xalan to simply write LF's 
> rather than the appropriate platform-specific line terminators.
> A workaround is to use:
> <xsl:template match="script/comment()">
> 	<xsl:comment><xsl:value-of select="."/></xsl:comment>
> </xsl:template>

-- 
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