[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
return</Text>

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:choose>
            <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'))"/>
                </xsl:call-template>
            </xsl:when>
	</xsl:choose>

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
http://freemail.web.de/features/?mc=021137


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


Current Thread