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="response">
12 <xsl:apply-templates></xsl:apply-templates>
15 <xsl:template match="records">
16 <xsl:apply-templates></xsl:apply-templates>
19 <xsl:template match="doc">
21 <xsl:apply-templates></xsl:apply-templates>
25 <xsl:template match="float[@name]">
27 <xsl:attribute name="type">
28 <xsl:value-of select="@name"/>
30 <xsl:value-of select="."/>
34 <xsl:template match="str[@name]">
36 <xsl:attribute name="type">
37 <xsl:value-of select="@name"/>
39 <xsl:value-of select="."/>
43 <xsl:template match="date[@name]">
45 <xsl:attribute name="type">
46 <xsl:value-of select="@name"/>
48 <xsl:value-of select="."/>
52 <xsl:template match="arr">
53 <xsl:for-each select="str">
54 <xsl:call-template name="string"/>
58 <xsl:template name="string">
60 <xsl:attribute name="type">
61 <xsl:value-of select="../@name"/>
64 <xsl:when test="../@name = 'medium' and string-length($medium) > 0">
65 <xsl:value-of select="$medium"/>
68 <xsl:value-of select="."/>