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

RE: if statement

Subject: RE: if statement
From: "Andrew Welch" <AWelch@xxxxxxxxxxxxxxx>
Date: Thu, 3 Jul 2003 08:18:11 +0100
xml if statement
> Thanks for all the answers I got here.
> 
> This one seems to be good for me.  There are troubles just makeing:
> 
> <xsl:when test="@wrap='yes'">
>    </tr><tr>
> </xsl:when>
> 
> I think I have to make everything inside the when clause.  I think I
> can handle that.

Yes, you may have to make eveything into a when clause.  You can't output </tr><tr> pairs based on the @wrap attribute, as its not well-formed xml.

One way to think of it (is as it actually happens I suppose), is that you are adding well-formed chunks of xml to the result tree, you are not inserting tags into a 'result string'.  You can only ever add well-formed xml to the result tree. (d-o-e aside)

So you have your source xml, which is parsed into a tree, your xslt stylesheet which is parsed into a tree, and your result tree, which is built by the xslt processor based on the rules in your stylesheet.  

You only have a string when the serliaser traverses the result tree and produces the string that is your output xml/html/text.

I hope that makes sense, 

cheers
andrew

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003
 

 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.