• Post Reply Bookmark Topic Watch Topic
  • New Topic

Any solutions to have one xml source file, one XSLT file and create many html files??  RSS feed

 
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
there was a thread last year. http://www.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=31&t=000526
Seems that it works with xt. Isn't xt an outdated parser?
Jane Grisci said it would be possible with Saxon. Saxon would be o.k. for me, but I didn't understand howTo do it on the saxon site.
As I am not a XSLT guru any hint would be helpful.
Or shouldn't I use XSLT for the 1-XML-file --> many HTML files problem???
One may think, that with a simple xml structure this goal would be achieved more easily with SAX-parsing.
Axel
[ January 22, 2002: Message edited by: Axel Janssen ]
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Axel,
you can use Saxon to generate via XSLT several html files out of on xml file.
In the XSLT style-sheet include another namespace which points to the Saxon extension:
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
xmlns:saxon="http://icl.com/saxon"
extension-element-prefixes="saxon"
version="1.0">
Now you are able to use the following code inside your templates:
<saxon utput href="xxx_01.html">
<!-- the xslt code which generates the content for the first output -->
</saxon utput>
<saxon utput href="xxx_02.html">
<!-- the xslt code which generates the content for the second output -->
</saxon utput>
That's it for the XSLT style-sheet.
Well I use an ant script to run Saxon - actually don't have the commandline syntax by hand:
<exec executable="c:/programme/xml/Saxon/saxon.exe">
<arg value="input.xml"/>
<arg value="the.xsl"/>
</exec>
This works pretty similar with Xalan.
Hope this helps
Regards
Berny
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bernie.
Will give it a try!!!
Axel
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!