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

Re: Simple Question

Subject: Re: Simple Question
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Wed, 31 Jan 2007 15:12:42 +0100
Re:  Simple Question
Punnoose, Roshan wrote:
Thanks for the replies. I'm better understanding how XSLT works and with
a little help able to get this to work:

<xsl:if test="$a != $times">
 		<xsl:text
disable-output-espacing="yes">&lt;xqx:orOp&gt;</xsl:text>
 			...
 	</xsl:if>

Of course, there are problems in this too, but I'm working them out.

The reason I had to do it this way is because I'm working on a recursive
loop that prints out a binary node tree, which I sort of needed this
for. (Though there probably is a way to do it a little cleaner.)

Regardless of your original problem, this is not the way to do it, and it won't work the way you intend either. There are ways to output non-xml text in an xml serialized output stream, and the preferred way with XSLT 2 is character-maps (but still, you can't output characters that cannot be represented in XML).


If you really have no need for <xqx:orOp>... </xqx:orOp> (nodes) but instead <xqx:orOp>...<xqx:otherOp> (text) you should consider another solution, like using output-method 'text'. This also prevents you from falling into the trap of creating nodes, when you mean the text (which looks like nodes when serialized, but really aren't), because nodes are not serialized in with the text-method (only the 'value-of' value of the nodes).

Please inform us a bit deeper of the target format that you are creating. If it is XML, you must choose another way, if it is text that resembles XML, you may want to use XSLT in text-mode or another language.

-- Abel

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.