[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 2 Questions on message and whitespace
Hi I am trying to get rid of 
 in an attribute T58=" tt " 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",'
','')" /></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,'
','')" 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|