XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Posttop
Minollo I.Subject: xsl:choose code
Author: Minollo I.
Date: 21 Jan 2005 10:26 PM
Nayu,
the "when" condition about "data/@value='premium'" looks fine, but the structure of your XSLT is a bit weird:
- the <xsl:choose> is executed only once, as you are not looping through all the contentBlock elements and it's part of a template that matches "document", which is the (single) document root; so I wonder how you may be hitting multiple branches of the xsl:choose
- after I modified the stylesheet to loop on the contentBlock elements, I noticed that the first <xsl:when> branch (data/@value = 'standard') "hides" the one about data/@value = 'premium'; even in the case in which you have a data sub-element which is "premium", you also have a sibling which is "standard"... As "standard" is checked first, that hides the "premium" branch

I would suggest re-designing that part of the stylesheet and making it rely more heavily on xsl:apply-templates instructions that may better model the structure of your XML document.

Hope this helps,
Minollo

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.