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

setMetadata (imageEncoder : nodeset, metadata : nodeset) : void

The meta data of an encoder can be changed using this method. The meta data can be specified in the IPTC format or the XMPMETA format. In the following example, the syntax of the IPTC format is shown.

<iptc>
<tag section="2" id="0" index="0">1</tag>
<tag section="2" id="10">1</tag>
</iptc>

The IPTC format consists of the<iptc> root element and any number of<tag> sub-elements. The<tag> elements contain the parameters “section”, “id” and “index”. If the elements “section” and “index” are not set, then the value “2” for “section” and the value “0” for “index” are set. IPTC information is subdivided into different sections containing their own set of tags. The sections can be controlled with the parameter “section”, the tags with the parameter “id”. You will find an overview of the available ranges on the page http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/IPTC.html

You will find more detailled information on XMP at http://www.adobe.com/products/xmp/.

In the following example, the syntax of the method is represented:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ise="http://onionworks.net/2006/imageservice/encoders" xmlns:is="http://onionworks.net/2006/imageservice" xmlns:b="http://onionworks.net/2004/renderengine/binary" xmlns:onion="http://onionworks.net/2004/data" 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, true())" />
<xsl:variable name="encoder" select="ise:createJpegEncoder(100)" />
<xsl:variable name="metaData">
<iptc>
<tag section="2" id="0" index="0">1</tag>
<tag section="2" id="10">1</tag>
</iptc>
</xsl:variable>
<xsl:variable name="meta" select="ise:setMetadata($encoder,$metaData)" />
<xsl:variable name="doWrite" select="is:writeWorkspace($workspace, $encoder)" />
<b:output mimeType="image/jpeg">
<b:webResponse expires="60" />
</b:output>
</xsl:template>
</xsl:stylesheet>
Example of IPTC meta data

In this example, the meta data is changed using IPTC data and then output as JPEG.