• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to copy a portion of xsl into a variable

 
Lalit Bansal
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • 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 ]
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • 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 ().
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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
  • 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
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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
  • 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
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic