• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Create many XML-Outputs with one XSL-file

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your help!
That will help me.
Robert.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic