xsl-list
[Top] [All Lists]

How to do an OR within SELECT for a variable

2005-08-20 09:27:14
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'

Thanks in advance,

Steve


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



<Prev in Thread] Current Thread [Next in Thread>