RE: [xsl] How to select either ElementA -OR- ElementB in an axis

Subject: RE: [xsl] How to select either ElementA -OR- ElementB in an axis
From: "Aron Bock" <aronbock@xxxxxxxxxxx>
Date: Wed, 15 Jun 2005 19:00:19 +0000
<xsl:variable name="myvar" select="ancestor::(ElementA | ElementB)[1]/foo/bar"/>

--A

From: chris <oneskiingfool@xxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xslt <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: [xsl] How to select either ElementA -OR- ElementB in an axis
Date: Wed, 15 Jun 2005 12:35:16 -0600

Hello,
This has me stumped.  I want to do something simple like this (I'll
keep it short as I think it's self-explanatory)....

<xsl:variable name="myvar" select="ancestor::(ElementA or ElementB)/foo/bar"/>

... where either ElementA or ElementB is selected, whichever is first.

Any ideas? I'm using XPath 2.0

Thanks!


_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement


Current Thread