Re: [xsl] Carriage Return & # 13 ;

Subject: Re: [xsl] Carriage Return & # 13 ;
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Tue, 03 Dec 2002 23:07:56 +0100
Jan Mendling wrote:
...
and I want to identify the carriage return in this Text-Element.

The XSLT processor wont see carriage returns (0xD) characters, because
they are transformed to linefeed characters (0xA) by the parser before
passed up (there are exceptions which are not of interest here).
See
 http://www.w3.org/TR/2000/REC-xml-20001006#sec-line-ends

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'),
                                 ^     ^
[snip]
This will return the entire $Text unless it contains the string '$UC13'.
Same for the substring-after. This means you basically pass
 concat($Text,' UC13',$Text) to the recursive invocation of the template,
and the recursion will never terminate.

J.Pietschmann


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



Current Thread