Bug #3591

Incorrect rendering for lists in the TER

Added by Laurent Foulloy almost 4 years ago. Updated over 2 years ago.

Status:New Start date:2009-06-05
Priority:Should have Due date:
Assignee:- % Done:

0%

Category:- Spent time: -
Target version:-
Votes: 0

Description

The rendering for unordered list is incorrect in the TER. The rendering is also incorrect with ordered lists which have the "continuation" sets.

It seems that Open Office does not generate unordered list tags in the xml file.

For a specific application I've modified the file "oomanual2docbook.xsl" in the extension "ter_doc". A huge improvement is obtained by replacing :

<xsl:template match="text:ordered-list">
<orderedlist>
<xsl:apply-templates/>
</orderedlist>
</xsl:template>

by

<xsl:key name="name" match="text:list-style" use="@style:name"/>
<xsl:template match="text:ordered-list">
<xsl:variable name="listStyleBullet" select="ancestor-or-self::text:ordered-list[key('name',@text:style-name)/text:list-level-style-bullet]"/>
<xsl:variable name="listStyleNumber" select="ancestor-or-self::text:ordered-list[key('name',@text:style-name)/text:list-level-style-number]"/>
<xsl:choose>
<xsl:when test="$listStyleBullet">
<itemizedlist>
<title/>
<xsl:apply-templates />
</itemizedlist>
</xsl:when>
<xsl:when test="$listStyleNumber and @text:continue-numbering">
<orderedlist continuation="continues" >
<xsl:apply-templates />
</orderedlist>
</xsl:when>
<xsl:when test="$listStyleNumber">
<orderedlist>
<xsl:apply-templates />
</orderedlist>
</xsl:when>
<xsl:otherwise>
<orderedlist>
<xsl:apply-templates/>
</orderedlist>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

Also available in: Atom PDF