Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
dpmccool
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is that some easy way to have 2 XML files and use 1 XSL file to output a HTML page?
 
Raj Devaraj
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic