• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

XSL question

 
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there a way to copy a node in source file to result file? I am using XSL to transform a source XML to a result XML. Most of my source nodes can be used as result nodes. Basically, I just remove some unrelated nodes and build the result tree. So I hope I can copy useful nodes direclty. Right now, I have to use template to copy tags, attributes, and texts one by one. I hope there is a function called copyNodeRecursively() to copy a node recursively for me. Because the child nodes of a node may change and templates are not dynamic, I really need this kind of function. Does it exit?
 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use xsl:copy-of to do a deep (recursive) copy.
Hope this helps.
Shashank
 
Jun Hong
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you so much. I tried copy-of and it works. I do appreciate your help.
 
reply
    Bookmark Topic Watch Topic
  • New Topic