applyCommand (workspaceOrImage : nodeset, imageCommand : nodeset) : void

With this method it is possible to execute commands for changing the picture information or form. You will find a list of possible commands on your imageserver under port 8082 (e.g.: Possible transfer types of the parameter “workspaceOrImage” are a workspace created with “createWorkspace” or an image object created with “createImage”. The commands executed with the “create” method of the commands library are to be transferred to the parameter “imageCommand”.

In the following example, the syntax of the method is illustrated.

<xsl:stylesheet xmlns:xsl="" xmlns:ise="" xmlns:isc="" xmlns:iscan="" xmlns:is="" xmlns:b="" xmlns:onion="" version="1.0">
<xsl:output method="xml" omit-xml-declaration="yes" indent="no" />
<xsl:template match="/resource">
<xsl:variable name="workspace" select="is:createWorkspace(@src)" />
<xsl:variable name="resample" select="is:applyCommand($workspace,isc:create('resample',is:createSize(100,100)))" />
<xsl:variable name="doWrite" select="is:writeWorkspace($workspace, 'Jpeg')" />
<b:output mimeType="image/jpeg">
<b:webResponse expires="60" />
Changing the picture size

In this example, a picture loaded from the data source is reduced to the size 100 x 100 and then written into the output stream in JPEG picture format.