[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Carriage Return & # 13 ;

Subject: [xsl] Carriage Return & # 13 ;
From: Jan Mendling <mendling@xxxxxx>
Date: Tue, 3 Dec 2002 22:31:33 +0100

Hello once more, and thanks for the remarks and hints so far.

1. This is my input:

<Text>This is a carriage

and I want to identify the carriage return in this Text-Element.

2.a) This is the template I wrote:
<xsl:template name="Text" mode="Text">        
        <xsl:param name="Text"/>        
        <xsl:variable name="UC13">&#13;</xsl:variable>        
            <xsl:when test="contains($Text,$UC13)">
                <xsl:call-template name="Text">
                    <xsl:with-param name="Text" select="concat(substring-before($Text,'$UC13'),' UC13 ',substring-after($Text,'$UC13'))"/>

2.b) Entities
I also tried to declare !Entities before the stylesheet to refer to the Unicode character in the body. It did not work.

3. I got an error when running the script:
C:\Excalibur Home\Path\>java org.apache.xalan.xslt.Process -in LinkTest.xml -xsl textcleanser.xsl
(Location of error unknown)XSLT Error (java.lang.StackOverflowError): null

QUESTION: Is there any way to detect carriage return in the input file? I need to preserve it in the output. I tried < xsl:preserve-space elements="*" >, but it did not show the intended result.

Greetings and Thanks,
Jan Mendling
Der Anrufbeantworter fur Ihre E-Mail-Korrespondenz - WEB.DE FreeMail

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread