|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Can not store value into xsl:variable
Hello All , 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' How do I go about doing this ? I tried using this global variable <xsl:variable name="roleVar"> <xsl:for-each select="/OuterTag/InnerTag/PARAMETERS/PARAMETER"> <xsl:if test="NAME/text() = 'ROLE'"> <xsl:value-of select="VALUE"/> </xsl:if> </xsl:for-each> </xsl:variable> However when I try to use the value of $roleVar using xsl:value-of tag , I do not get any result . I also tried <xsl:variable name="roleVar" select="/OuterTag/InnerTag/PARAMETERS/PARAMETER/NAME[text() = 'ROLE']/../VALUE"/> But this too returns empty value .I am using XALAN API for transform. Thanks in advance for your help Thanks Manish Any comments or statements made in this email are not necessarily those of Fidelity Business Services India Pvt. Ltd. or any of the Fidelity Investments group companies. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you have received this in error, please contact the sender and delete the material from any computer. All e-mails sent from or to Fidelity Business Services India Pvt. Ltd. may be subject to our monitoring procedures.
|
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








