Subject: RE: Finding immediately preceding node.
From: "Lars Huttar" <lars_huttar@xxxxxxx>
Date: Mon, 2 Jun 2003 13:33:00 -0500
|
Betty Harvey wrote:
> Thanks Ken:
>
> Your example reinforces my theory that I was going
> to have to rewrite the current model and use the 'for-each'.
> I was trying to avoid rewriting some complex models but I
> I guess there isn't an easy way of looking back at the
> parent, then the immediate preceding node without the template
> being in the parent node.
Betty, I can't see why not.
Your test expression,
<xsl:if test="../b[@name='cde']/preceding-sibling::b[1]/@name='abc'">
looks like it should work, assuming that the context node
is a child of <b>, e.g. if it's in a template that matches "c" elements.
Maybe if you showed more of your xslt code we could see why you're
never getting a 'true'.
Lars
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|
Lars Huttar - Mon, 2 Jun 2003 15:31:03 -0400 (EDT)
Passin, Tom - Mon, 2 Jun 2003 14:12:40 -0400 (EDT)
Passin, Tom - Mon, 2 Jun 2003 14:23:10 -0400 (EDT)
|
|