Subject: [xsl] Can not store value into xsl:variable From: "Manwani, Manish" <Manish.Manwani@xxxxxxx> Date: Tue, 11 Oct 2005 06:44:57 -0400 |
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.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Import stylesheet, Mark Williams | Thread | RE: [xsl] Can not store value into , Jarno.Elovirta |
RE: [xsl] Import stylesheet, Mark Williams | Date | [xsl] Need Help... can't get desire, UlyLee |
Month |