FB2 Input: Fix paras with both id and style

FB2 Input: Fix a regression that broke conversion of FB2 files with
paragraphs having both a style and an id attribute. Fixes #1243709 [xls:attribute error in FB2 files](https://bugs.launchpad.net/calibre/+bug/1243709)
This commit is contained in:
Kovid Goyal 2013-10-23 20:11:35 +05:30
parent 2fef9eb3ba
commit 3f6c88f0ae

View File

@ -223,14 +223,14 @@
<xsl:template match="fb:p"> <xsl:template match="fb:p">
<xsl:element name="div"> <xsl:element name="div">
<xsl:attribute name="class">paragraph</xsl:attribute> <xsl:attribute name="class">paragraph</xsl:attribute>
<xsl:if test="@style">
<xsl:attribute name="style"><xsl:value-of select="@style"/></xsl:attribute>
</xsl:if>
<xsl:if test="@id"> <xsl:if test="@id">
<xsl:element name="a"> <xsl:element name="a">
<xsl:attribute name="name"><xsl:value-of select="@id"/></xsl:attribute> <xsl:attribute name="name"><xsl:value-of select="@id"/></xsl:attribute>
</xsl:element> </xsl:element>
</xsl:if> </xsl:if>
<xsl:if test="@style">
<xsl:attribute name="style"><xsl:value-of select="@style"/></xsl:attribute>
</xsl:if>
<xsl:apply-templates/> <xsl:apply-templates/>
</xsl:element> </xsl:element>
</xsl:template> </xsl:template>