This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, I have a question. How can we transform two XML files by using XSLT. For eg I have two XML files. One XML file contains structure of a database table like tabel name, column names etc., Other XML file has data corresponding to the table defined in first XML. I need to convert to a single HTML file using XSLT. How I can do. Appreciate the reply.
hey, You can use document expression to get the data from another xml file. if u r processing one xml file and building up xhtml file u can use <xsl:value-of select="document('another.xml')/element"/> to insert the data from another xml file into ur xhtml file. HTH, Roopa
Joined: Nov 17, 2001
Thanks for your reply. I am not clear about the solution. I need to process two XML files and generate HTML by using single XSLT. How can do?
Sanagapalli, normally XSLT has one XML document as an input. So you should choose which XML document will be your "master file". Think about another as a lookup file. You can retrieve data from it via document() function, as roopa sudhi said. If you need more details, you should tell us what is structure of your XML files and what output you want to see. Also, it happened that your name does not comply with the JavaRanch naming policy. We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please spare a moment and re-register with a name that meets the requirements. Thanks!
[This message has been edited by Mapraputa Is (edited December 08, 2001).]