|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to do an OR within SELECT for a variable
* lsl <lsl@xxxxxxxxxxxxx> [2005-08-20 12:47]:
> My XML can look like this :
>
> <A>
> <B>
> <C>
> <D ID="1">data</D>
> </C>
> </B>
> </A>
>
> or
>
> <A>
> <B>
> <X>
> <D ID="2">data</D>
> </X>
> </B>
> </A>
>
> I set a variable like this :
>
> <xsl:variable name="var" select="A/B/C/D/@ID" />
>
> or
>
> <xsl:variable name="var" select="A/B/X/D/@ID" />
>
> Can I use something like :
>
> <xsl:variable name="var" select="A/B/C|X/D/@ID" />
>
> I think this gets interpretted as 'A/B/C' or 'X/D/@ID'
You think correctly.
I spell it out, but there may be a more succinct way.
<xsl:variable name="var" select="A/B/C/D/@ID|A/B/X/D/@ID"/>
--
Alan Gutierrez - alan@xxxxxxxxx
- http://engrm.com/blogometer/index.html
- http://engrm.com/blogometer/rss.2.0.xml
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








