# Image Rendering Reference

## Navigation:

Index General Information Elements Utils Examples

## Custom Record 2.7" Example

A 2.7" example using a custom record

- Template: templates/custom1.xsl
- Record: records/coolpix.xml

## Custom Record 2.7" Example (Template)

<xsl:stylesheet version="2.0" >
<xsl:template match="Record" >
<xsl:variable name="price" >
<xsl:value-of select="translate(Article/Price,'.','')" >
</xsl:value-of>
</xsl:variable>
<image height="176" width="264" >
<field height="20" width="256" x="8" y="8" >
<text font-family="Verdana" font-size="10" text-decoration="underline" >
<xsl:value-of select="Article/Category" >
</xsl:value-of>
</text>
</field>
<field height="19" width="256" x="8" y="28" >
<text font-family="Verdana" font-size="16" font-weight="bold" >
<utils method="toUpperCase" >
<xsl:value-of select="Article/Manufacturer" >
</xsl:value-of>
</utils>
</text>
</field>
<field height="19" width="256" x="8" y="48" >
<text font-family="Verdana" font-size="16" >
<xsl:value-of select="Article/Name" >
</xsl:value-of>
</text>
</field>
<xsl:choose>
<xsl:when test="substring-after($price,',') = '00'" >
<field height="78" width="250" x="0" y="83" >
<text align="right" font-family="Tahoma" font-size="65" font-style="italic" font-weight="bold" >
<xsl:value-of select="substring-before($price,',')" >
</xsl:value-of>
</text>
</field>
</xsl:when>
<xsl:otherwise>
<field height="78" width="210" x="0" y="83" >
<text align="right" font-family="Tahoma" font-size="65" font-style="italic" font-weight="bold" >
<xsl:value-of select="substring-before($price,',')" >
</xsl:value-of>
</text>
</field>
<field height="78" width="64" x="200" y="83" >
<text align="left" font-family="Tahoma" font-size="35" font-style="italic" font-weight="bold" >
<xsl:value-of select="substring-after($price,',')" >
</xsl:value-of>
</text>
</field>
</xsl:otherwise>
</xsl:choose>
<field height="8" width="105" x="4" y="165" >
<barcode humanReadableEnabled="false" type="code128" >
<xsl:value-of select="Article/ArticleNumber" >
</xsl:value-of>
</barcode>
</field>
<field height="13" width="60" x="3" y="153" >
<text font-family="Tahoma" font-size="11" >
<xsl:value-of select="Article/ArticleNumber" >
</xsl:value-of>
</text>
</field>
<field align="right" height="8" width="146" x="114" y="165" >
<barcode humanReadableEnabled="false" type="code128" >
<xsl:value-of select="Label/Id" >
</xsl:value-of>
</barcode>
</field>
</image>
</xsl:template>
</xsl:stylesheet>

## Custom Record 2.7" Example (Record)

<Article>
<ArticleNumber>
1183821
</ArticleNumber>
<Name>
Coolpix S9200 Silber
</Name>
<Manufacturer>
Nikon
</Manufacturer>
<Category>
Digitalkamera
</Category>
<Price>
129,90
</Price>
<Specification>
<Field>
Fotoauflösung: 16 Megapixel max.
</Field>
<Field>
Zoom-Bereich: 25 bis 450 mm
</Field>
<Field>
Speichermedium: SD/SDHC/SDXC
</Field>
<Field>
Mögliche Dateiformate: JPEG, MOV, MPEG4
</Field>
<Field>
Videoauflösung: 1980 x 1080 Pixel
</Field>
<Field>
Zoomfaktor: 18-fach
</Field>
<Field>
optischer Bildstabilisator
</Field>
<Field>
Lichtstärke: F 1:3,5 bis 5,9
</Field>
<Field>
Lichtempfindlichkeit: 3200 ISO
</Field>
</Specification>
<Packaging>
<Item>
Trageschlaufe
</Item>
<Item>
USB-Kabel
</Item>
<Item>
Netzadapter
</Item>
</Packaging>
<Accessories>
<Item>
Akku EN-EL12
</Item>
<Item>
SDHC-Karte
</Item>
</Accessories>
</Article>

## Generated Image