[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Carriage Return & # 13 ;

Subject: Re: Carriage Return & # 13 ;
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Tue, 03 Dec 2002 23:07:56 +0100
how to see carriage return
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.