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

RE: XSL-List Digest V4 #1774

Subject: RE: XSL-List Digest V4 #1774
From: constantin.vasiliu@xxxxxxxxxxxxxx
Date: Thu, 6 Nov 2003 17:21:49 -0800
 RE: XSL-List Digest V4 #1774
> Try to restructure it so you select the subset using xsl:for-each.
> 
> Instead of 
> 
> <xsl:for-each select="x">
>   <xsl:if test="c">
>     <tr>
> 
> do
> 
> <xsl:for-each select="x[c]">
>   <tr>

Excellent advice! Now that you mentioned it, it really looks simple! :) But
that's the role of an expert--to make it look simple. Got it working. It
wasn't as simple as the above because the XML document had a recursive
structure, thus I had to decide when to choose the node subset on other
checks (to avoid selecting a null node-set and get no output). However,
pointing me in the right direction made the whole difference.



> > > <xsl:value-of select="name(element[.//*[conditions]][1])"/>
> > 
> > Can you explain more on this? Should "element" stay as such 
> > or be replaced with the real name of the element I'm looking 
> > for (which turns out to be "Sequence").
> 
> This was intended as pseudo-code. Substitute the right things for
> "element" and "conditions".

I didn't need to do this any more. Solving the first problem gave a free
solution for this one too. Once I got the correct subset, I could make the
decision to output what I wanted based on the position info.

> 
>  Also, "conditions" 
> > need to contain an "xsl:for-each". Is that possible?
> 
> No, it's not possible, but are you really sure it is necessary?

I guess not, since I could solve it another way.

Many thanks, Michael, your help was very valuable!

Constantin Vasiliu

 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.