xslt 2.0では、index-ofxpath関数を使用して効率的なルックアップを生成します。
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output indent="yes"/>
<xsl:param name="days" select="('monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday')"/>
<xsl:param name="day-image" select="('image1.png','image2.png','image3.png','image4.png','image5.png','image6.png','image7.png')"/>
<xsl:template match="/root">
<root>
<xsl:apply-templates/>
</root>
</xsl:template>
<xsl:template match="prop[@name='day']">
<img src="{$day-image[index-of($days, current())]}"/>
</xsl:template>
<xsl:template match="prop[@name='week']">
<p>Week number <xsl:value-of select="."/></p>
</xsl:template>
</xsl:transform>
実例