Fwd: FW: type casting variable to a node in xsl

Subject: Fwd: FW: type casting variable to a node in xsl
From: Josh Canfield <joshcanfield@xxxxxxxxx>
Date: Fri, 18 Jun 2004 11:12:51 -0700
Hmm... let me see, you want to take the string "Value" and append a
number to it  to make the strings "Value1", "Value2"... "Value6" and
with those strings select a node with that name.

That is a very popular question the last couple of days.

The answer is, either use the evaluate() extension function, or use
something like

<xsl:value-of select="*[name()=$theNameOfTheElement"/>
or
<xsl:value-of select="*[local-name()=$theNameOfTheElement"/>


Josh
---------- Forwarded message ----------
From: Josh Canfield <josh.canfield@xxxxxxxxxxxx>
Date: Fri, 18 Jun 2004 09:56:18 -0700
Subject: FW: type casting variable to a node in xsl
To: joshcanfield@xxxxxxxxx


 
-----Original Message-----
From: Satish Kumar Venkata , Sura (Cognizant)
[mailto:Sura.Satish@xxxxxxxxxxxxxxxxx]
Sent: Thursday, June 17, 2004 12:20 PM
To: Josh Canfield
Subject: type casting variable to a node in xsl


Hi,
I am trying to post the same in xsl-list, but it is throwing up
Mailer-demon. I am sorry if i have posted to you with out permission.
Is there a way in which we can typecast a variable to an element
(node). I am facing a problem when directly using a variable to select
the value of it. I have xml which contains Value1,Value2 ..... Value6.
In this way i can run through a loop and concatenate the numeric and
then obtain the value associated with the node.
 If it is not possible, is there a simple way in which we can do
rather than repeating the node value.
 Thanks in advance
Satish
This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.
Any unauthorised review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on
this e-mail is strictly
prohibited and may be unlawful.

  Visit us at http://www.cognizant.com

Current Thread