2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:pz="http://www.indexdata.com/pazpar2/1.0" >
5 <xsl:param name="medium" />
7 <xsl:template match="/">
8 <xsl:apply-templates></xsl:apply-templates>
11 <xsl:template match="doc">
13 <xsl:apply-templates></xsl:apply-templates>
17 <xsl:template match="float[@name]">
19 <xsl:attribute name="type">
20 <xsl:value-of select="@name"/>
22 <xsl:value-of select="."/>
26 <xsl:template match="str[@name]">
28 <xsl:attribute name="type">
29 <xsl:value-of select="@name"/>
31 <xsl:value-of select="."/>
35 <xsl:template match="arr">
36 <xsl:for-each select="str">
37 <xsl:call-template name="string"/>
41 <xsl:template name="string">
43 <xsl:attribute name="type">
44 <xsl:value-of select="../@name"/>
47 <xsl:when test="../@name = 'medium' and string-length($medium) > 0">
48 <xsl:value-of select="$medium"/>
51 <xsl:value-of select="."/>