With the double book, it may happen that <phrase> is used

inside <title>, and that generates an unwanted linefeed. So, use
normalize-space for titles when generating the package list
This commit is contained in:
Pierre Labastie 2016-08-24 15:21:49 +00:00
parent 78d47793a9
commit ebb631aad8

View file

@ -40,7 +40,7 @@
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute> <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
<xsl:text>&#xA; </xsl:text> <xsl:text>&#xA; </xsl:text>
<xsl:element name="name"> <xsl:element name="name">
<xsl:value-of select="title"/> <xsl:value-of select="normalize-space(title)"/>
</xsl:element> </xsl:element>
<xsl:text>&#xA;&#xA;</xsl:text> <xsl:text>&#xA;&#xA;</xsl:text>
<xsl:apply-templates select="chapter"/> <xsl:apply-templates select="chapter"/>
@ -61,7 +61,7 @@
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute> <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
<xsl:text>&#xA; </xsl:text> <xsl:text>&#xA; </xsl:text>
<xsl:element name="name"> <xsl:element name="name">
<xsl:value-of select="title"/> <xsl:value-of select="normalize-space(title)"/>
</xsl:element> </xsl:element>
<xsl:text>&#xA;</xsl:text> <xsl:text>&#xA;</xsl:text>
<xsl:apply-templates select=".//sect1"> <xsl:apply-templates select=".//sect1">
@ -89,7 +89,7 @@
<xsl:text> </xsl:text> <xsl:text> </xsl:text>
<package><xsl:text>&#xA; </xsl:text> <package><xsl:text>&#xA; </xsl:text>
<xsl:element name="name"> <xsl:element name="name">
<xsl:value-of select="title"/> <xsl:value-of select="normalize-space(title)"/>
</xsl:element> </xsl:element>
<xsl:text>&#xA;</xsl:text> <xsl:text>&#xA;</xsl:text>
<!-- Do not use .//*, which would include self. --> <!-- Do not use .//*, which would include self. -->