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="str[@name]">
19 <xsl:attribute name="type">
20 <xsl:value-of select="@name"/>
22 <xsl:value-of select="."/>
26 <xsl:template match="arr">
27 <xsl:for-each select="str">
28 <xsl:call-template name="string"/>
32 <xsl:template name="string">
34 <xsl:attribute name="type">
35 <xsl:value-of select="../@name"/>
38 <xsl:when test="../@name = 'medium' and string-length($medium) > 0">
39 <xsl:value-of select="$medium"/>
42 <xsl:value-of select="."/>