Advertisement

12.14.2007 at 02:43PM PST, ID: 23024842
[x]
Attachment Details

xslt counter value in a variable

Asked by amhicraig in Extensible Stylesheet Language Transformation (XSLT), Extensible Markup Language (XML), Java Server Pages (JSP)

Tags: counter, xslt, variable

I need to iterate through the xml file and store the value of the node number where a particular string is matched.Later i will use this number somewhere else in the xslt.How do i do it.
Code pasted below explains it better.

<row>
<cell>A<c/cell>
<cell>B<c/cell>
<cell>C<c/cell>
<cell>D<c/cell>
<cell>E<c/cell>
<cell>F<c/cell>
<cell>G<c/cell>
</row>

Suppose i want to match string "C".
Then in the above case the value of the variable should be 3.Start Free Trial
[+][-]12.14.2007 at 03:03PM PST, ID: 20475136

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Extensible Stylesheet Language Transformation (XSLT), Extensible Markup Language (XML), Java Server Pages (JSP)
Tags: counter, xslt, variable
Sign Up Now!
Solution Provided By: R7AF
Participating Experts: 2
Solution Grade: B
 
 
[+][-]12.15.2007 at 01:59AM PST, ID: 20476720

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628