Subject: RE: [xsl] Linking Variable to the Path From: "Hofman, Peter" <peter.hofman@xxxxxxxxxxxxx> Date: Wed, 22 Aug 2007 10:24:16 +0200 |
Your variable $dest contains a sequence of destination attributes values, which (of course) do not contain a name attribute. You need to analyze the contents of connection/@destination and use this in a selection of event elements. Regards, Peter >-----Original Message----- >From: Yaswanth Kumar Ravella [mailto:yaswanth.mtrx@xxxxxxxxx] >Sent: woensdag 22 augustus 2007 10:16 >To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx >Subject: [xsl] Linking Variable to the Path > > >Hi, > >::I am having an XML file like this :: > ><root> > <every> > <event name="Ready"/> > </every> > <pattern> > <connection destination="//every[1]/event[1]" /> > </pattern> ></root> >------------------------------- >::When my XSL file has this code:: > ><xsl:template match="root"> > <xsl:variable name="dest" select="//every[1]/event[1]"/> > <xsl:value-of select="$dest/@name"/> ></xsl:template> > >It prints 'Ready'. >Here I am directly assigning variable 'dest' to the path of the event. >This is ok. >------------------------------- >::When I changed my XSL code to :: > ><xsl:template match="root"> > <xsl:variable name="dest" >select="//pattern[1]/connection[1]/@destination"/> > <xsl:value-of select="$dest/@name"/> ></xsl:template> > >It doesn't print 'Ready' or anything. >Here I am storing variable 'dest' with the value of the >'connection/@destination', Which I expected to work properly >but it is not working. >------------------------------ > >How can I print 'event-name' using 'connection-destination'? > > >Regards >Yaswanth Ravella > > This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Linking Variable to the P, mozer | Thread | RE: [xsl] Linking Variable to the P, Yaswanth Kumar Ravel |
[xsl] Linking Variable to the Path, Yaswanth Kumar Ravel | Date | [xsl] Linking Variable to the Path, christoph . naber |
Month |