Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Create many XML-Outputs with one XSL-file

 
Robert Jaeger
Ranch Hand
Posts: 62
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I allways used XSLT to create one output file (XML, PDF, HTML, ...) out of one source file (source.xml).
I would like to know if it is possible to create more output files out of one source file with one xslt-file.
Which function/class/... do I have to use in a servlet? (Until now I allways used Cocoon.)
I also thought about programming a servlet that parses (with JDOM) a XML file and generates many output XML-files (the servlet is a substitute for my XSLT-file), but I think this is not the best method (performance, complexity).
Hopefully somebody can help me,
greetings, Robert.
 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
For XSLT 1.0 compatible stylesheets Saxon, Xalan and xt do offer a proprietary extension tag which is placed somewhere in between a template and lets you output multiple files out of one XSL Stylesheet. This looks something like this for Saxon
.
And like this for Xalan
,
and for xt it is
.
All this workarounds have an end in XSLT 1.1 where there is a new standard <xsl:document/> element. Check out the following link to read what the W3C Spec tells about it:
http://www.w3.org/TR/xslt11/#multiple-output
As far as I know Saxon supports this new feature since Saxon version 7.0.
Hope this will help you.
Regards
Berny
(Map disabled smiles)
[ July 12, 2002: Message edited by: Mapraputa Is ]
 
Robert Jaeger
Ranch Hand
Posts: 62
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your help!
That will help me.
Robert.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic