xsl-list
[Top] [All Lists]

RE: Can not store value into xsl:variable

2005-10-11 03:53:32
Hi,

I have following xml fragment in my xml ..
<PARAMETERS>
      <PARAMETER>
              <NAME>ROLE</NAME>
              <VALUE>SM</VALUE>
      </PARAMETER>
      <PARAMETER>
              <NAME>ACTION</NAME>
              <VALUE>BLOTTER</VALUE>
      </PARAMETER>
      <PARAMETER>
              <NAME>AMOUNT</NAME>
              <VALUE></VALUE>
      </PARAMETER>
</PARAMETERS>

I want to store the text node of VALUE tag (into a xsl variable) where
PARAMETERS/PARAMETER/NAME/text()='ROLE'

<xsl:variable name="roleVar" 
select="/OuterTag/InnerTag/PARAMETERS/PARAMETER[NAME = 'ROLE']/VALUE/text()" />

If there is more than one PARAMETER with NAME "ROLE", the $roleVar will be 
bound to VALUE/text() all of them.

Cheers,

Jarno

--
UnterART: Kill Your Heart

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