createWorkspace (target : xlink) : nodeset

This method enables the creation of a workspace on the basis of existing picture data or via a space indication. Picture data can be loaded either directly via the data source (default) or via a binary method.

In the example, a picture is now read from a data source. The parameter “fromDataSource” does not have to be set since this is set to the value “true()”by default.

<xsl:stylesheet xmlns:xsl="" xmlns:ise="" 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="doWrite" select="is:writeWorkspace($workspace, ise:createGifEncoder())" />
<b:output mimeType="image/gif">
<b:webResponse expires="60" />
Creating workspace

This example creates a workspace from the picture data of a resource and then writes it into the output stream in picture format Gif.

Moreover, the variable “workspace” now contains the following XML.

<image width="320" colorDepth="32" pixelFormat="Pixel32bppBgra" height="240">
<resolution x="96" y="96" units="DotsPerInch" />