Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to interact two xml files with one xsl file

 
Srinivas Rallapalli
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,
I have two xml files. Now the thing is, i have to write an xsl file so that it should search for an element in the first xml file and then that element should be replaced with another element in the second xml file. can anybody solve this problem.
Thanks,
srinivas
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to use xslt extention until the next generation of XSLT.
See an example here:
http://bobcat.webappcabaret.net/javachina/faq/xslt_01.htm#xslt_ex_Q01
 
Tiffany Sun
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can do this with extra java code.
1. declare an array of string, put the xml file names in it.
2. Write a method to get Document from the two XML files, like Document getDocFromXMLFiles(String [] XMLFileNames).
3. Transform source using the Document and the XSL file.
Tiffany
 
Steven Broadbent
Ranch Hand
Posts: 400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can use the document function to do this in xsl.
there is a very good example in Sal Manangos XSLT cookbook by O'Reilly
 
jawwad ahmed
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes u can find document example from xfront.com exaple no 22 or 23
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic