> 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
|