2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pz="http://www.indexdata.com/pazpar2/1.0" version="1.0">
4 <xsl:param name="medium"/>
6 <xsl:template match="/">
10 <xsl:template match="lst[@name='responseHeader']"/>
12 <xsl:template match="doc">
14 <xsl:apply-templates/>
18 <xsl:template match="float[@name]">
20 <xsl:attribute name="type">
21 <xsl:value-of select="@name"/>
23 <xsl:value-of select="."/>
27 <xsl:template match="int[@name]">
29 <xsl:attribute name="type">
30 <xsl:value-of select="@name"/>
32 <xsl:value-of select="."/>
36 <xsl:template match="str[@name]">
38 <xsl:attribute name="type">
39 <xsl:value-of select="@name"/>
41 <xsl:value-of select="."/>
45 <xsl:template match="arr">
46 <xsl:for-each select="str">
47 <xsl:call-template name="string"/>
51 <xsl:template name="string">
53 <xsl:attribute name="type">
54 <xsl:value-of select="../@name"/>
57 <xsl:when test="../@name = 'medium' and string-length($medium) > 0">
58 <xsl:value-of select="$medium"/>
61 <xsl:value-of select="."/>