• 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

How to copy a portion of xsl into a variable

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

I've the following XSL:



On applying this XSL on the concerned XML, I get properly required transformed XML.
Now, I want a portion of this transformed XML into an XSL variable. This variable should have exact copy of the portion of XML that I require; which means it should include all the tags, values, etc.
The portion that I require to copy in the variable is between the <lif:xmlInput> and </lif:xmlInput> tags.

Pls help me out with the soultion for same. Any pointers shall be highly appreciated.

Thnx in advance.

regards,
[ December 14, 2007: Message edited by: Ulf Dittmer ]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For future reference, you can edit an existing post (including setting the "Don't use smilies" checkbox") by clicking the little paper-and-pencil icon ().
 
Marshal
Posts: 28177
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
Well, don't generate it (i.e. send it to the output) and then try to put it in a variable. Put it in the variable first, then send it to the output.
 
Lalit Bansal
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Paul,

That is exactly what I want. I want to know how to put the code between <lif:xmlInput> and </lif:xmlInput> tags in a variable.

Thanks in advance.

regards,
 
Paul Clapham
Marshal
Posts: 28177
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'm sorry, I thought that was obvious.
 
Lalit Bansal
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Paul,

Thaks for the information.

I shall be highly obliged if your could help me further in my requirement. I want this variable to be converted to a string. The purpose is that I want the entire code portion between <xmlInput> tags as a String.

Thanks in advance.

regards,
 
Paul Clapham
Marshal
Posts: 28177
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
What kind of string? An XSLT string? (I don't understand what it would mean to convert that element to a string in XSLT so perhaps you could explain a bit more if that's the case.) Or a Java string?
reply
    Bookmark Topic Watch Topic
  • New Topic