xsl-list
[Top] [All Lists]

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

2005-06-15 12:00:19
<xsl:variable name="myvar" select="ancestor::(ElementA | ElementB)[1]/foo/bar"/>

--A

From: chris <oneskiingfool(_at_)gmail(_dot_)com>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: xslt <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
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!

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


_________________________________________________________________
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


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