• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XSLT value concatenate in order problem

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am new to XSLT and I am trying to solve this problem. I have to get some values from the XML and concatenate them. Whenever I am trying to do that I am getting only one value but I want all 4 values in my result. The XML values can be in any order but I want the result in the particular format only. The result should be Tag61 value+Tag9F01 value+Tag81 value+Tag4F value (Please ignore + sign).

Please find the XML below



The code I have written




After this code when I am concatenating the values I am getting only 1 value.
I am using XSLT 1.0. Could some one please advice how to achieve the desired result. Which one good option recursive template or for_each to solve this problem?

thank you in advance,

Kaushik
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have to say that in my opinion declaring all those variables inside your xsl:for-each loop is kind of pointless, since you're only going to write their values to the output anyway before the end of the loop. But probably I should ask my first question first: what's the "only 1 value" that you're getting? And what does "getting" mean in that context?
 
Kaushik Baral
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Please ignore the code I have written. Could you please suggest me some code which will give me the concatenated tag_value node value of tag 61, 9F01, 81 and 4F?

thanks
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Will the following select work for you?




What is special about the values 61, 9F01 etc etc?
 
Ranch Hand
Posts: 734
7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is done like this.
 
You totally ruined the moon. You're gonna hafta pay for that you know. This tiny ad agrees:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic