Skip to main content

 

Documentation & User Guides | FotoWare

Example of XSL Transform

The returned XML output from the Archive Agent can easily be converted to HTML that can be displayed by any web browser using a technique called 'XSL Transforms'. A sample XSL Transform document for showing thumbnails from the result of an Archive Agent is shown below:


<?xml version="1.0" encoding="UTF-8"?>
<xsl:template xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<HTML>
<HEAD>
<TITLE>FotoWare Archive Agent Thumbnail Result</TITLE>
</HEAD>
<BODY bgcolor="#ffffff">
<H2>Hits: <xsl:value-of select="FileList/@ReturnedHits" /> (<xsl:value-of
select="FileList/@TotalHits" />), Search time: <xsl:value-of
select="FileList/@SearchTimeMs" /> ms, Processing time: <xsl:value-of
select="FileList/@ProcessingTimeMs" /> ms</H2>
<xsl:for-each select="FileList/File">
<xsl:for-each select="PreviewLinks/PreviewUrl">
<IMG>
<xsl:attribute name="src">
<xsl:value-of select="." />
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="../../MetaData/Text/Field[@Id='IPTC2:120']" />
</xsl:attribute>
</IMG>
</xsl:for-each>
</xsl:for-each>
</BODY>
</HTML>
</xsl:template>
  • Was this article helpful?