tags:

views:

101

answers:

1

I've previously processed XSLT to output single HTML files that were supposed to be viewed in a browser.

Now I was hoping if someone could outline would it be possible to use XML data and XSLT to create separate image files auto magically?

+1  A: 

If your XSLT processor supports EXSLT, the exsl:document element will allow you to create multiple output files from a single input file.

AFAIK, only libxslt-based processors support this tag, currently, but this includes PHP 5 and, of course, xsltproc.

EDIT:

As you've found, XSLT 2.0 provides the similar xsl:result-document tag. The XSLT 2.0 processors I'm aware of are Saxon, Altova XML, and Gexslt/Gestalt.

Ben Blank
I've checked it. This can work, as can the xsl:result-document element (http://www.w3.org/TR/xslt20/#element-result-document). Well I guess this is one less mystery then :)
kRON
Many XSLT 1.0 processors have support for XSLT -- saying this is only libxslt is not true. Also, the current XSLT 2.0 processors are actually three: Saxon, Altova and Gexslt (or Gestalt).
Dimitre Novatchev
@Dimitre — I was referring specifically to the `exsl:document` tag, not EXSLT in general. If you know of others, I'd be happy to add them.
Ben Blank