[ 
http://issues.apache.org/jira/browse/XALANJ-1974?page=comments#action_58567 ]
     
Ari Miller commented on XALANJ-1974:
------------------------------------

I've divorced this from the HTML issues described in the original bug by the 
individual who entered that bug, and I'm about to attach a reproducible 
testcase without external dependencies.

To explain the original HTML issues, as I understand them:
If you have a textarea on an HTML page, and you submit the text in it to an 
application server, you end up persisting any line breaks as crlf.  If you then 
use that in your source xml document, the crlf gets inappropriately transformed 
into 
 and then a line feed, rather than just a line feed.
The documents I am about to attach should clarify and allow for reproduction.
Because internet explorer treats the &#13 character in HTML as another line 
break, you end up doubling the number of displayed line breaks when you read 
back the submitted text into the textarea on the page.

Take a very simple xml input file, attached (transform.xml).  Put it in the 
directory /tmp/stylesheet_utilities.
Take the attached simplistic stylesheet, attached (paragraph.xsl).
Transform it using the attached code (UtilityStylesheetTester).  The attached 
code requires the stylesheet to be in the same directory as you are running 
UtilityStylesheetTester from, but it shouldn't have any other dependencies.
Output will be generated and saved to:
/tmp/stylesheet_utilities/transformed.html

I think XERCESJ-92 has some useful information on this.  Specifically, this 
might be an issue with org.apache.xerces.parsers.DOMParser, rather than xalan.  
I think the 
 should be normalized to just 
 by xerces, when the 
Element is created (http://www.w3.org/TR/2000/REC-xml-20001006#sec-line-ends).

Note that running the same code with Saxon (saxon-6.5.3) does not show this 
problem (I will attach the output as saxontransformed.html).

I'm using the libraries from xalan-j_2_6_0 in this example.



> Doubles newline character
> -------------------------
>
>          Key: XALANJ-1974
>          URL: http://issues.apache.org/jira/browse/XALANJ-1974
>      Project: XalanJ2
>         Type: Bug
>   Components: Serialization
>     Versions: 2.6
>  Environment: Windows Xp Professional O.S., Jrun 4, netBeans 3.6, sql server, 
> jdk 1.4.2_03
>     Reporter: vaibhav kakadia
>     Priority: Critical

>
> Hi,
>    It seems to be a strage problem. I put a text like 
> 1
> 2
> and saves data. When I come back it is 
> 1
> 2
> I again saved data and came back it is
> 1
> 2
> It seems that it is unable to parse #xd;#xa; (CR-LF) into #xa; (LF). So it 
> increases newline character everytime. I don't know why this problem arises 
> but when I was using older version of Xalan set it was 2.2.0 this was not 
> taking place.
> Please do the needful.
> Vaibhav

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to