lib/isodoc/ogc/ogc.best-practice.xsl in metanorma-ogc-1.4.4 vs lib/isodoc/ogc/ogc.best-practice.xsl in metanorma-ogc-1.4.5

- old
+ new

@@ -1656,10 +1656,12 @@ <title-list-tables lang="en">List of Tables</title-list-tables> <title-list-figures lang="en">List of Figures</title-list-figures> + <title-table-figures lang="en">Table of Figures</title-table-figures> + <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations> <title-acknowledgements lang="en">Acknowledgements</title-acknowledgements> <title-abstract lang="en">Abstract</title-abstract> @@ -4560,10 +4562,11 @@ </fo:inline> </xsl:when> <xsl:otherwise> <fo:block xsl:use-attribute-sets="image-style"> + <xsl:variable name="src"> <xsl:call-template name="image_src"/> </xsl:variable> <xsl:choose> @@ -4926,11 +4929,11 @@ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks"> <xsl:apply-templates mode="bookmarks"/> <xsl:text> </xsl:text> </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2"> <xsl:value-of select="."/> - </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="bookmarks" priority="2"> + </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2"> <xsl:value-of select="."/> </xsl:template><xsl:template match="node()" mode="contents"> <xsl:apply-templates mode="contents"/> </xsl:template><xsl:template match="node()" mode="bookmarks"> <xsl:apply-templates mode="bookmarks"/> @@ -5019,53 +5022,83 @@ </xsl:otherwise> </xsl:choose> - <xsl:if test="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]"> - <fo:bookmark internal-destination="{//*[local-name() = 'figure'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide"> - <fo:bookmark-title>Figures</fo:bookmark-title> - <xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name']]"> + + + + + + <xsl:variable name="list_of_tables_"> + <xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name'] and contains(*[local-name() = 'name'], '—')]"> + <table id="{@id}"><xsl:apply-templates select="*[local-name() = 'name']" mode="bookmarks"/></table> + </xsl:for-each> + </xsl:variable> + <xsl:variable name="list_of_tables" select="xalan:nodeset($list_of_tables_)"/> + + <xsl:variable name="list_of_figures_"> + <xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name'] and contains(*[local-name() = 'name'], '—')]"> + <figure id="{@id}"><xsl:apply-templates select="*[local-name() = 'name']" mode="bookmarks"/></figure> + </xsl:for-each> + </xsl:variable> + <xsl:variable name="list_of_figures" select="xalan:nodeset($list_of_figures_)"/> + + <xsl:if test="$list_of_tables//table or $list_of_figures/figure or //*[local-name() = 'table'][.//*[local-name() = 'p'][@class = 'RecommendationTitle']]"> + <fo:bookmark internal-destination="empty_bookmark"> + <fo:bookmark-title>—————</fo:bookmark-title> + </fo:bookmark> + </xsl:if> + + <xsl:if test="$list_of_tables//table"> + <fo:bookmark internal-destination="empty_bookmark" starting-state="hide"> <!-- {$list_of_tables//table[1]/@id} --> + <fo:bookmark-title> + <xsl:call-template name="getTitle"> + <xsl:with-param name="name" select="'title-list-tables'"/> + </xsl:call-template> + </fo:bookmark-title> + <xsl:for-each select="$list_of_tables//table"> <fo:bookmark internal-destination="{@id}"> - <fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']/text()" mode="bookmarks"/></fo:bookmark-title> + <fo:bookmark-title><xsl:value-of select="."/></fo:bookmark-title> </fo:bookmark> </xsl:for-each> - </fo:bookmark> + </fo:bookmark> </xsl:if> - - - - <xsl:if test="//*[local-name() = 'table'][@id and *[local-name() = 'name']]"> - <fo:bookmark internal-destination="{//*[local-name() = 'table'][@id and *[local-name() = 'name']][1]/@id}" starting-state="hide"> + + <xsl:if test="$list_of_figures//figure"> + <fo:bookmark internal-destination="empty_bookmark" starting-state="hide"> <!-- {$list_of_figures//figure[1]/@id} --> <fo:bookmark-title> - <xsl:choose> - <xsl:when test="@lang = 'fr'">Tableaux</xsl:when> - <xsl:otherwise>Tables</xsl:otherwise> - </xsl:choose> + + <xsl:call-template name="getTitle"> + <xsl:with-param name="name" select="'title-list-figures'"/> + </xsl:call-template> + + </fo:bookmark-title> - <xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name']]"> + <xsl:for-each select="$list_of_figures//figure"> <fo:bookmark internal-destination="{@id}"> - <fo:bookmark-title><xsl:apply-templates select="*[local-name() = 'name']//text()" mode="bookmarks"/></fo:bookmark-title> + <fo:bookmark-title><xsl:value-of select="."/></fo:bookmark-title> </fo:bookmark> </xsl:for-each> - </fo:bookmark> + </fo:bookmark> </xsl:if> - - - - + + <xsl:if test="//*[local-name() = 'table'][.//*[local-name() = 'p'][@class = 'RecommendationTitle']]"> - <fo:bookmark internal-destination="{//*[local-name() = 'table'][.//*[local-name() = 'p'][@class = 'RecommendationTitle']][1]/@id}" starting-state="hide"> - <fo:bookmark-title>Recommendations</fo:bookmark-title> + <fo:bookmark internal-destination="empty_bookmark" starting-state="hide"> <!-- {//*[local-name() = 'table'][.//*[local-name() = 'p'][@class = 'RecommendationTitle']][1]/@id} --> + <fo:bookmark-title> + <xsl:call-template name="getTitle"> + <xsl:with-param name="name" select="'title-list-recommendations'"/> + </xsl:call-template> + </fo:bookmark-title> <xsl:for-each select="//*[local-name() = 'table'][.//*[local-name() = 'p'][@class = 'RecommendationTitle']]"> <xsl:variable name="table_id" select="@id"/> <fo:bookmark internal-destination="{@id}"> <fo:bookmark-title><xsl:value-of select=".//*[local-name() = 'p'][@class = 'RecommendationTitle'][ancestor::*[local-name() = 'table'][1][@id= $table_id]]/node()"/></fo:bookmark-title> </fo:bookmark> </xsl:for-each> </fo:bookmark> - - </xsl:if> + </xsl:if> </fo:bookmark-tree> \ No newline at end of file