fix for empty dc tags
[librarian.git] / librarian / epub / xsltLast.xsl
index 3949878..92f5be6 100644 (file)
   </xsl:template>\r
 \r
   <xsl:template name="editors">\r
-    <xsl:if test="//dc:contributor.editor|//dc:contributor.technical_editor">\r
+    <xsl:if test="//dc:contributor.editor[text()]|//dc:contributor.technical_editor[text()]">\r
         <p class="info">\r
             <xsl:text>Opracowanie redakcyjne i przypisy: </xsl:text>\r
-            <xsl:for-each select="//dc:contributor.editor|//dc:contributor.technical_editor">\r
+            <xsl:for-each select="//dc:contributor.editor[text()]|//dc:contributor.technical_editor[text() and not(//dc:contributor.editor/text()=text())]">\r
+                <xsl:sort />\r
                 <xsl:if test="position() != 1">, </xsl:if>\r
                 <xsl:apply-templates mode="person" />\r
             </xsl:for-each>.\r