Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XSLT question

 
sanagapalli
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
roopa sudhi
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
sanagapalli
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic