http://onionworks.net/2006/imageservice/commands

create (commandName : string, [arg : any]*) : nodeset

With this method, all commands available in the imageserver can be executed. An overview of the available commands, their syntax and the possible parameters can be seen on their imageserver. The syntax of the method can be seen in the following example:

<xsl:variable name="apply" select="is:applyCommand($workspace,isc:create('resample',is:createSize(400,300),'HanningFilter') )" />

Here the command "resample" is executed with the parameters “is:createSize(400,300)” and 'HanningFilter'. The command "resample" serves for adapting the picture size to a desired format. As can be seen in the example, the method is called with the name and parameters of the command as transfer values separated by a comma. The maximum number of parameters of the command is 7.

In the following example, a possible use of the method is shown:

<xsl:stylesheet xmlns:b="http://onionworks.net/2004/renderengine/binary" xmlns:onion="http://onionworks.net/2004/data" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:isc="http://onionworks.net/2006/imageservice/commands" xmlns:ise="http://onionworks.net/2006/imageservice/encoders" xmlns:is="http://onionworks.net/2006/imageservice" version="1.0">
<xsl:output method="xml" omit-xml-declaration="yes" indent="no" />
<xsl:template match="/resource">
<xsl:variable name="workspace" select="is:createWorkspace('onion://data/binaries/665.101', true())" />
<xsl:variable name="apply" select="is:applyCommand($workspace,isc:create('resample',is:createSize(400,300),'HanningFilter') )" />
<xsl:variable name="doWrite" select="is:writeWorkspace($workspace, ise:createJpegEncoder(80))" />
<b:output mimeType="{@onion:src.mimeType}">
<b:webResponse expires="60" />
</b:output>
</xsl:template>
</xsl:stylesheet>
Using the method “create”

In this example, an existing picture is adjusted to the size of 300 x 400 and then saved in JPEG picture format with 80% picture quality.