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

2 Questions on message and whitespace

Subject: 2 Questions on message and whitespace
From: Raman Kannan <rk2153@xxxxxxxxx>
Date: Tue, 24 May 2005 22:57:16 -0400
 2 Questions on message and whitespace
Hi

I am trying to get rid of &#10 in an attribute
 T58="&#10;&#10;tt&#10;&#10;  "

I have tried
<xsl:strip-space elements="comments"/>

and I am generating this attribute as
<xsl:attribute name="T58"><xsl:value-of  select="$dnode/comments"
disable-output-escaping="yes"/></xsl:attribute>

the $dnode is a variable set to the entity that contains
a comments element.

I am not sure why I still get these characters.
No help from http://www.dpawson.co.uk/xsl/sect2/N3573.html#d4282e842
on this one.

Other attempts (that do not work):
<xsl:attribute name="T58"><xsl:value-of
select="translate("$dnode/comments",'&#x0A;','')" /></xsl:attribute>

Working version:
<xsl:variable name="comment"><xsl:value-of
select="$dnode/comments"/></xsl:variable>

<xsl:attribute name="T58"><xsl:value-of
select="translate($comment,'&#x0A;','')" disable-output-escaping="yes"
/></xsl:attribute>

I would appreciate why the working-version works.

Q 2---------- q on message
I have a series of message as follows when some
conditions are met

<xsl:message terminate="yes">
Dont know how to handle account other than 1 2.
</xsl:message>

<xsl:message terminate="yes">
 Do not know how to process input at loc 2.
</xsl:message>

and so on. I have two more of these xsl:message.

The first one always prints when condition is met.
However, the others do not print.

Then, after reading 249-251 pages in Michael's book and enclosing
the text in <xsl:text> Do not know...</xsl:text>
all three diagnostic messages now print.

The output method is xml. Is this the culprit...If someone could explain
these
two behaviors...my xsl learning would be complete w.r.t whitespace
and message.

Thank you
--
Raman

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.