Re: [xsl] How can i convert the variable value into xpath

Subject: Re: [xsl] How can i convert the variable value into xpath
From: "Laura Jenkins" <xsl_list@xxxxxxxxxxx>
Date: Fri, 08 Mar 2002 09:40:44 +0000
hi gurpreet,
if i understand the problem coreectly,
your xml file looks like
<a>
<c>
Text in C Node
</c>

</a>

and u want to write xpath expression to get c text

try running the xsl in the following way

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:template match="/">
<xsl:variable name="var" select="//a/c"/>
<xsl:value-of select="$var"/>
</xsl:template>
</xsl:stylesheet>



Well, this is what i understod and it looks fairly simple. please let me know if this is not your problem , in which case please give a sample xml file and a sample output.
regards
laura


From: Gurpreet Singh <gpsingh@xxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: "'XSL-List@xxxxxxxxxxxxxxxxxxxxxx'" <XSL-List@xxxxxxxxxxxxxxxxxxxxxx>
Subject: [xsl] How can i convert the variable value into xpath
Date: Thu, 7 Mar 2002 09:37:44 +0530


> Hi, > How can i convert the variable value into xpath ?? > e.g . a variable var has value //a/c > now if i write <xsl:value-of select="$var"/> > i am getting the value //a/c and not the value of xpath //a/c. > > > > Gurpreet Singh > QUARK Media House (I) Pvt. Ltd. > A-45, Indl Area, Phase VIII-B, > Mohali-160059. > Tel : +91.172.257801-16(O) Ext : 9550 > +91.172.569799(R) > Fax : +91.172.257414 > E-Mail : gpsingh@xxxxxxxxxxx <mailto:gpsingh@xxxxxxxxxxx> > >

XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list





_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread