This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes XML and Related Technologies and the fly likes 2 XML files + 1 XSL file = 1 HTML file... Help! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "2 XML files + 1 XSL file = 1 HTML file... Help!" Watch "2 XML files + 1 XSL file = 1 HTML file... Help!" New topic
Author

2 XML files + 1 XSL file = 1 HTML file... Help!

dpmccool
Greenhorn

Joined: Oct 12, 2000
Posts: 3
Is that some easy way to have 2 XML files and use 1 XSL file to output a HTML page?
Raj Devaraj
Ranch Hand

Joined: Jun 29, 2000
Posts: 44
You need to provide more info. about the XML files. In the absense of that, try this.
1. First file A.XML includes second XML file B.XML file which uses an xsl file C.XSL.

This can be done. This will output an HTML page.
An excellent example is in the book "Step by Step XML by Michael Young". Look at the example for finding the lowest price in that book towards the end.
Other alternatives depend on more info.
Good luck
Raj
dpmccool
Greenhorn

Joined: Oct 12, 2000
Posts: 3
Anyone know where I can learn about including XML files in other XML files? Thanks for the help, wish I had that book!
dpmccool
Greenhorn

Joined: Oct 12, 2000
Posts: 3
Okay, suppose I have two XML files, story1.xml and story2.xml. Neither of the two XML files knows that the other exists. This is what the files look like:
story1.xml:
<STORY>
<HEADING>Sports Story of the Day</HEADING>
<TEXT>Sports text here.</TEXT>
</STORY>
story2.xml:
<STORY>
<HEADING>News Story of the Day</HEADING>
<TEXT>News text here.</TEXT>
</STORY>
Now, I want to generate the following html page:
<HTML>
<BODY>
<H2 ALIGN="CENTER">Sports Story of the Day</H2>
<P>
Sports text here.
<P>
<H2 ALIGN="CENTER">News Story of the Day</H2>
<P>
News text here.
<P>
</BODY>
</HTML>
Can I do this using one stylesheet??
 
wood burning stoves
 
subject: 2 XML files + 1 XSL file = 1 HTML file... Help!