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:
5c59177
)
Add test on type (only if present)
author
Dennis Schafroth
<dennis@indexdata.com>
Fri, 15 Jul 2011 13:50:48 +0000
(15:50 +0200)
committer
Dennis Schafroth
<dennis@indexdata.com>
Fri, 15 Jul 2011 13:50:48 +0000
(15:50 +0200)
etc/pz2-solr.xsl
patch
|
blob
|
history
diff --git
a/etc/pz2-solr.xsl
b/etc/pz2-solr.xsl
index
e2e0f04
..
0b7b796
100644
(file)
--- a/
etc/pz2-solr.xsl
+++ b/
etc/pz2-solr.xsl
@@
-13,11
+13,13
@@
</doc>
</xsl:template>
<xsl:template match="pz:metadata">
- <field>
- <xsl:attribute name="name">
- <xsl:value-of select="@type"/>
- </xsl:attribute>
+ <xsl:if test="@type">
+ <field>
+ <xsl:attribute name="name">
+ <xsl:value-of select="@type"/>
+ </xsl:attribute>
<xsl:value-of select="."/>
- </field>
+ </field>
+ </xsl:if>
</xsl:template>
</xsl:stylesheet>