xsl-list
[Top] [All Lists]

Re: [xsl] howto convert node set into 2D table

2007-07-04 02:46:10
On 7/4/07, Sam Carleton <scarleton(_at_)miltonstreet(_dot_)com> 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[(_at_)display='true'] |
categories/category[(_at_)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 [(_at_)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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>