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

Re: howto convert node set into 2D table

Subject: Re: howto convert node set into 2D table
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Wed, 4 Jul 2007 10:45:49 +0100
Re:  howto convert node set into 2D table
On 7/4/07, Sam Carleton <scarleton@xxxxxxxxxxxxxxxx> wrote:
There is an attribute to determine if the element should be shown, the
data really looks like this:

<category>
 <images>
   <image name="a" display="true">1</image>
   <image name="b" display="true">2</image>
   <image name="c" display="true">3</image>
   <image name="d" display="true">4</image>
   <image name="e" display="false">5</image>
   <image name="f" display="true">6</image>
   <image name="g" display="false">7</image>
   <image name="h" display="true">8</image>
 </images>
</category>
[snip]
Ok, after writing this out, I think I know what I should be doing:

1: At the top <category> element, go off and create a new temporary
node set of either all the images/image[@display='true'] |
categories/category[@display='true']
2: Turn the <xsl:template match="images"> into a named template and
pass it the temporary node set from #1

Can't you just add [@display = 'true'] to each of your XPaths....?



Any thoughts on all my rambling?

It's always _much_ easier to work with sample inputs and required outputs than ramblings, and someone is more likely to reply to a concise question which takes at most a few minutes to read.

--
http://andrewjwelch.com

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.