Skip to content

Commit

Permalink
Really fixes #68 by only emitting publisher if there's actual text.
Browse files Browse the repository at this point in the history
  • Loading branch information
contrext committed May 31, 2016
1 parent 05fb761 commit 1f824c4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions xsl/map2epubOpfImpl.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -610,9 +610,15 @@
"
mode="generate-opf">
<xsl:param name="doDebug" as="xs:boolean" tunnel="yes" select="false()"/>
<dc:publisher><xsl:apply-templates mode="#current">
<xsl:with-param name="doDebug" as="xs:boolean" tunnel="yes" select="$doDebug"/>
</xsl:apply-templates></dc:publisher>
<xsl:variable name="publisherText" as="node()*">
<xsl:apply-templates mode="#current">
<xsl:with-param name="doDebug" as="xs:boolean" tunnel="yes" select="$doDebug"/>
</xsl:apply-templates>
</xsl:variable>
<xsl:if test="not(matches($publisherText, '^\s*$'))">
<dc:publisher><xsl:value-of select="$publisherText"/></dc:publisher>
</xsl:if>

</xsl:template>

<xsl:template match="*[df:class(., 'topic/data')]/text()" mode="generate-opf">
Expand Down

0 comments on commit 1f824c4

Please sign in to comment.