There's no extension like this built-in to the product, but
you should be able to call Runtime.exec() easily enough, for
<xsl:sequence select="Runtime:Runtime:exec('convert -rotate 90 myimage.jpg
The tricky bit is getting output from the spawned process. I've only
attempted to do this the very crude way of having the spawned process write a
file, and then reading this file using unparsed-text().
It's much better of course to call an application like ImageMagick
through a Java API rather than through a shell command. Have you looked at the
JMagick interface (http://www.yeo.id.au/jmagick/)?
I am looking for a way to shell out to programs
via some sort of XSLT extension and have the returned information available
within my transform. Anything like this available?
Specifically, in saxon 8+ I would like to use
ImageMagick to return info about an image or modify the image.
select="shell(identify -myimage.jpg)" /> <!--return info
<saxon:shell select="convert -rotate 90
myimage.jpg myrotatedimage.jpg" /> <!-- shell out and do something