projects
/
pazpar2-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
78a295a
)
Handle medium override AND md field
author
Jakub Skoczen
<jakub@indexdata.dk>
Mon, 14 Apr 2014 20:07:36 +0000
(22:07 +0200)
committer
Jakub Skoczen
<jakub@indexdata.dk>
Mon, 14 Apr 2014 20:07:36 +0000
(22:07 +0200)
etc/cf.xsl
patch
|
blob
|
history
diff --git
a/etc/cf.xsl
b/etc/cf.xsl
index
1c05886
..
7796273
100644
(file)
--- a/
etc/cf.xsl
+++ b/
etc/cf.xsl
@@
-26,7
+26,16
@@
<xsl:template match="/record">
<pz:record>
<pz:metadata type="medium">
<xsl:template match="/record">
<pz:record>
<pz:metadata type="medium">
- <xsl:value-of select="$medium" />
+ <xsl:choose>
+ <xsl:when test="string-length($medium)">
+ <xsl:value-of select="$medium" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="medium">
+ <xsl:value-of select="medium" />
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
</pz:metadata>
<xsl:apply-templates/>
</pz:record>
</pz:metadata>
<xsl:apply-templates/>
</pz:record>
@@
-104,9
+113,9
@@
<xsl:value-of select="."/>
</pz:metadata>
</xsl:template>
<xsl:value-of select="."/>
</pz:metadata>
</xsl:template>
-
- <xsl:template match="medium">
- </xsl:template>
+
+ <!-- no-op template to avoid printing medium out -->
+ <xsl:template match="medium" />
<xsl:template match="*" >
<pz:metadata type="{local-name()}">
<xsl:template match="*" >
<pz:metadata type="{local-name()}">