This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread 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 Android Security Essentials Live Lessons this week in the Android 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??
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 2 XML files + 1 XSL file = 1 HTML file... Help!
 
Similar Threads
converting xsd to html
How can servlets sent XML files?
Is there an automated way of creating XSL file?
Use different XSL files on the same XML doc
How can I apply a XSL to the result of another XSL?