[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: Gunther Schadow <gunther@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 03 Dec 2002 16:57:45 -0500
line break carriage return
You are looking for a line break, which may not be the same as
carriage return. I am not sure what the rules really are on
line break normalization or if any of that is done in text nodes.
I believe not. So, you need to seach for &#13; and &#10; or
any combination thereof.


<Text>This is a carriage
return</Text>

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>



why do you use mode and param here? They do not pertain to the problem you're describing. Suggest:

<xsl:variable name="UC13" select="'&#13'"/>

instead of creating the carriage return as a text node.

I can see that this template doesn't work, but stack overflow? You
are doing other screwy things perhaps :-)

Your XSLT style is too procedural. Try avoiding use of xsl:choose
and xsl:call-template. You seem to be breaking the text node only
in order to glue it back together. Why? What is it you want to
accomplish?

You definitely have all the original line break characters inside
text node, the preserve-space etc. has nothing to do with what's
going on *inside* a text node. You definitely will find the
line break characters in the test node with contains and
substring-before etc.

regards,
-Gunther


-- Gunther Schadow, M.D., Ph.D. gschadow@xxxxxxxxxxxxxxx Medical Information Scientist Regenstrief Institute for Health Care Adjunct Assistant Professor Indiana University School of Medicine tel:1(317)630-7960 http://aurora.regenstrief.org



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.