aspose file tools*
The moose likes Product and Other Certifications and the fly likes XSL question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "XSL question" Watch "XSL question" New topic
Author

XSL question

Jun Hong
Ranch Hand

Joined: Sep 05, 2001
Posts: 181
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?


Jun Hong<br />SCJP, SCJD, SCWCD, SCEA<br />IBM Certified Systems Expert(V4.0)
Shashank Tanksali
Ranch Hand

Joined: Feb 21, 2001
Posts: 122
You can use xsl:copy-of to do a deep (recursive) copy.
Hope this helps.
Shashank


<b><br /><a href="http://mailto:tanksali@hotmail.com" target="_blank" rel="nofollow">Shashank Tanksali</a><br /><i><br />SCJP2,SCJD2,SCWCD<br />IBM Certified Developer - XML and Related Technologies<br />PMI Certified Project Management Professional<br /></i><br /></b>
Jun Hong
Ranch Hand

Joined: Sep 05, 2001
Posts: 181
Thank you so much. I tried copy-of and it works. I do appreciate your help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XSL question
 
Similar Threads
node() test condition
Position() ?
Multiple Transformations per XSL - 1.0
Display first 5 nodes of result tree?
Adding a carriage return to a Node