projects
/
pazpar2-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ensure medium is also applied if Solr record do not have it PAZ-929
[pazpar2-moved-to-github.git]
/
etc
/
solr-pz2.xsl
diff --git
a/etc/solr-pz2.xsl
b/etc/solr-pz2.xsl
index
bed0c9c
..
f6fa5dd
100644
(file)
--- a/
etc/solr-pz2.xsl
+++ b/
etc/solr-pz2.xsl
@@
-8,8
+8,21
@@
<xsl:apply-templates></xsl:apply-templates>
</xsl:template>
<xsl:apply-templates></xsl:apply-templates>
</xsl:template>
+ <xsl:template match="response">
+ <xsl:apply-templates></xsl:apply-templates>
+ </xsl:template>
+
+ <xsl:template match="records">
+ <xsl:apply-templates></xsl:apply-templates>
+ </xsl:template>
+
<xsl:template match="doc">
<pz:record>
<xsl:template match="doc">
<pz:record>
+ <xsl:if test="string-length($medium) > 0">
+ <pz:metadata type="medium">
+ <xsl:value-of select="$medium"/>
+ </pz:metadata>
+ </xsl:if>
<xsl:apply-templates></xsl:apply-templates>
</pz:record>
</xsl:template>
<xsl:apply-templates></xsl:apply-templates>
</pz:record>
</xsl:template>
@@
-32,6
+45,15
@@
</pz:metadata>
</xsl:template>
</pz:metadata>
</xsl:template>
+ <xsl:template match="date[@name]">
+ <pz:metadata>
+ <xsl:attribute name="type">
+ <xsl:value-of select="@name"/>
+ </xsl:attribute>
+ <xsl:value-of select="."/>
+ </pz:metadata>
+ </xsl:template>
+
<xsl:template match="arr">
<xsl:for-each select="str">
<xsl:call-template name="string"/>
<xsl:template match="arr">
<xsl:for-each select="str">
<xsl:call-template name="string"/>
@@
-44,8
+66,7
@@
<xsl:value-of select="../@name"/>
</xsl:attribute>
<xsl:choose>
<xsl:value-of select="../@name"/>
</xsl:attribute>
<xsl:choose>
- <xsl:when test="../@name = 'medium' and string-length($medium) > 0">
- <xsl:value-of select="$medium"/>
+ <xsl:when test="../@name = 'medium' and string-length($medium) = 0">
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>