• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

XSLT question

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).]
 
Hot dog! An advertiser loves us THIS much:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic