This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How can i convert the variable value into xpath


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@quark.co.in>
>Reply-To: xsl-list@lists.mulberrytech.com
>To: "'XSL-List@lists.mulberrytech.com'" <XSL-List@lists.mulberrytech.com>
>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@quark.co.in <mailto:gpsingh@quark.co.in>
> >
> >
>
>  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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]