extractMetadata (target : xlink, type : string, [fromDataSource : boolean]) : nodeset

With this method it is possible to read out the meta data from picture data. Picture data can be loaded either directly via the data source (default) or via a binary method. If the picture data is loaded via a binary method, then the parameter “fromDataSource” must be allocated the value “false”. If the picture data is loaded via a data source however, then the parameter “fromDataSource” can be omitted, since it is allocated the value “true” by default. Possible values for the parameter “type” can be seen in the following list.

  • iptc
  • xmp
  • exif

In the following example, the iptc meta data is read out and output from a data source in an XML method.

<xsl:stylesheet xmlns:xsl="" xmlns:is="" xmlns:onion="" version="1.0">
<xsl:output method="xml" omit-xml-declaration="yes" indent="no" />
<xsl:template match="/resource">
<xsl:variable name="metaData" select="is:extractMetadata(@src,'iptc')" />
<xsl:copy-of select="$metaData" />
Reading out meta data

Outputting the method could supply the following result.

<tag section="2" id="5" index="0">example</tag>
<tag section="2" id="25" index="0">example</tag>
<tag section="2" id="105" index="0">example</tag>
<tag section="2" id="120" index="0">example</tag>
IPTC output

You will find more detailled information on IPTC and XMP on the following pages .