lib/isodoc/iho/iho.specification.xsl in metanorma-iho-0.3.9 vs lib/isodoc/iho/iho.specification.xsl in metanorma-iho-0.3.10
- old
+ new
@@ -153,11 +153,11 @@
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-IHO))}" width="25.9mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image IHO"/>
</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="2" border="0.5pt solid rgb(0, 21, 50)">
<fo:block-container height="154.4mm" text-align="center" display-align="center">
- <fo:block font-size="28pt" font-weight="bold" color="rgb(0, 0, 76)">
+ <fo:block font-size="28pt" font-weight="bold" color="rgb(0, 0, 76)" role="H1">
<xsl:value-of select="$title-en"/>
</fo:block>
</fo:block-container>
</fo:table-cell>
</fo:table-row>
@@ -213,65 +213,67 @@
<fo:block break-after="page"/>
<!-- Table of Contents -->
<fo:block-container margin-right="-12.7mm">
<fo:block-container margin-right="0mm">
- <fo:block color="rgb(14, 36, 133)" margin-bottom="15.5pt">
- <xsl:variable name="title-toc">
- <xsl:call-template name="getTitle">
- <xsl:with-param name="name" select="'title-toc'"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="$title-toc"/>
- </fo:block>
- <xsl:if test="$debug = 'true'">
- <xsl:text disable-output-escaping="yes"><!--</xsl:text>
- DEBUG
- contents=<xsl:copy-of select="xalan:nodeset($contents)"/>
- <xsl:text disable-output-escaping="yes">--></xsl:text>
- </xsl:if>
-
- <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
- <fo:block>
- <xsl:if test="@level = 1">
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
- </xsl:if>
-
- <fo:list-block>
-
- <xsl:attribute name="provisional-distance-between-starts">
- <xsl:choose>
- <xsl:when test="@level >= 1 and @root = 'preface'">0mm</xsl:when>
- <xsl:when test="@level >= 1 and @root = 'annex' and not(@type = 'annex')">13mm</xsl:when>
- <xsl:when test="@level >= 1 and not(@type = 'annex')">10mm</xsl:when>
- <xsl:otherwise>0mm</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <fo:list-item>
- <fo:list-item-label end-indent="label-end()">
- <fo:block>
- <xsl:if test="@section != '' and not(@type = 'annex')"> <!-- output below -->
- <xsl:value-of select="@section"/>
- </xsl:if>
- </fo:block>
- </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
- <xsl:apply-templates select="title"/>
- <fo:inline keep-together.within-line="always">
- <fo:leader font-size="9pt" font-weight="normal" leader-pattern="dots"/>
- <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
- </fo:inline>
- </fo:basic-link>
- </fo:block>
- </fo:list-item-body>
- </fo:list-item>
- </fo:list-block>
+ <fo:block role="TOC">
+ <fo:block color="rgb(14, 36, 133)" margin-bottom="15.5pt" role="H1">
+ <xsl:variable name="title-toc">
+ <xsl:call-template name="getTitle">
+ <xsl:with-param name="name" select="'title-toc'"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="$title-toc"/>
</fo:block>
+ <xsl:if test="$debug = 'true'">
+ <xsl:text disable-output-escaping="yes"><!--</xsl:text>
+ DEBUG
+ contents=<xsl:copy-of select="xalan:nodeset($contents)"/>
+ <xsl:text disable-output-escaping="yes">--></xsl:text>
+ </xsl:if>
- </xsl:for-each>
+ <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
+ <fo:block role="TOCI">
+ <xsl:if test="@level = 1">
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
+ </xsl:if>
+
+ <fo:list-block>
+
+ <xsl:attribute name="provisional-distance-between-starts">
+ <xsl:choose>
+ <xsl:when test="@level >= 1 and @root = 'preface'">0mm</xsl:when>
+ <xsl:when test="@level >= 1 and @root = 'annex' and not(@type = 'annex')">13mm</xsl:when>
+ <xsl:when test="@level >= 1 and not(@type = 'annex')">10mm</xsl:when>
+ <xsl:otherwise>0mm</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <fo:list-item>
+ <fo:list-item-label end-indent="label-end()">
+ <fo:block>
+ <xsl:if test="@section != '' and not(@type = 'annex')"> <!-- output below -->
+ <xsl:value-of select="@section"/>
+ </xsl:if>
+ </fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()">
+ <fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
+ <xsl:apply-templates select="title"/>
+ <fo:inline keep-together.within-line="always">
+ <fo:leader font-size="9pt" font-weight="normal" leader-pattern="dots"/>
+ <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
+ </fo:inline>
+ </fo:basic-link>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ </fo:block>
+
+ </xsl:for-each>
+ </fo:block>
</fo:block-container>
</fo:block-container>
<!-- Foreword, Introduction -->
<xsl:call-template name="processPrefaceSectionsDefault"/>
@@ -295,11 +297,11 @@
</fo:static-content>
<xsl:call-template name="insertHeaderFooter"/>
<fo:flow flow-name="xsl-region-body">
<fo:block-container>
- <fo:block font-size="16pt" font-weight="bold" margin-bottom="18pt"><xsl:value-of select="$title-en"/></fo:block>
+ <fo:block font-size="16pt" font-weight="bold" margin-bottom="18pt" role="H1"><xsl:value-of select="$title-en"/></fo:block>
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
<!-- Normative references -->
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
<!-- Terms and definitions -->
@@ -451,17 +453,18 @@
<!-- ====== -->
<!-- title -->
<!-- ====== -->
<xsl:template match="iho:annex/iho:title">
- <fo:block font-size="13pt" font-weight="bold" text-align="center" margin-bottom="12pt" keep-with-next="always">
+ <fo:block font-size="13pt" font-weight="bold" text-align="center" margin-bottom="12pt" keep-with-next="always" role="H1">
<xsl:apply-templates/>
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
</fo:block>
</xsl:template>
<xsl:template match="iho:bibliography/iho:references[not(@normative='true')]/iho:title">
- <fo:block font-size="16pt" font-weight="bold" text-align="center" margin-top="6pt" margin-bottom="36pt" keep-with-next="always">
+ <fo:block font-size="16pt" font-weight="bold" text-align="center" margin-top="6pt" margin-bottom="36pt" keep-with-next="always" role="H1">
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match="iho:title">
@@ -502,11 +505,14 @@
</xsl:attribute>
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
<xsl:attribute name="keep-with-next">always</xsl:attribute>
+ <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
+
<xsl:apply-templates/>
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
</xsl:element>
<xsl:if test="$element-name = 'fo:inline' and not(following-sibling::iho:p)">
<fo:block> <!-- margin-bottom="12pt" -->
<xsl:value-of select="$linebreak"/>
@@ -804,12 +810,14 @@
<!-- https://github.com/metanorma/mn-native-pdf/issues/214 -->
<xsl:template match="iho:index"/>
<xsl:template match="iho:preferred">
-
- <fo:block line-height="1.1">
+ <xsl:variable name="levelTerm">
+ <xsl:call-template name="getLevelTermName"/>
+ </xsl:variable>
+ <fo:block line-height="1.1" role="H{$levelTerm}">
<fo:block font-weight="bold" keep-with-next="always">
<xsl:apply-templates select="ancestor::iho:term/iho:name" mode="presentation"/>
</fo:block>
<fo:block font-weight="bold" keep-with-next="always">
<xsl:apply-templates/>
@@ -820,18 +828,18 @@
<xsl:template name="insertHeaderFooter">
<xsl:param name="font-weight" select="'bold'"/>
- <fo:static-content flow-name="header-odd">
+ <fo:static-content flow-name="header-odd" role="artifact">
<fo:block-container height="100%">
<fo:block padding-top="12.5mm" text-align="right">
<xsl:value-of select="$docidentifier"/>
</fo:block>
</fo:block-container>
</fo:static-content>
- <fo:static-content flow-name="footer-odd">
+ <fo:static-content flow-name="footer-odd" role="artifact">
<fo:block-container height="100%" margin-right="-10mm" display-align="after">
<fo:block-container margin-right="0mm">
<fo:block padding-bottom="17mm" font-size="10pt" text-align-last="justify">
<fo:inline><xsl:value-of select="$copyrightText"/></fo:inline>
<fo:inline keep-together.within-line="always">
@@ -840,18 +848,18 @@
</fo:inline>
</fo:block>
</fo:block-container>
</fo:block-container>
</fo:static-content>
- <fo:static-content flow-name="header-even">
+ <fo:static-content flow-name="header-even" role="artifact">
<fo:block-container height="100%">
<fo:block padding-top="12.5mm">
<xsl:value-of select="$docidentifier"/>
</fo:block>
</fo:block-container>
</fo:static-content>
- <fo:static-content flow-name="footer-even">
+ <fo:static-content flow-name="footer-even" role="artifact">
<fo:block-container height="100%" margin-right="-10mm" display-align="after">
<fo:block-container margin-right="0mm">
<fo:block padding-bottom="17mm" font-size="10pt" text-align-last="justify">
<fo:inline font-weight="{$font-weight}"><fo:page-number/></fo:inline>
<fo:inline keep-together.within-line="always">
@@ -1129,10 +1137,11 @@
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
<xsl:attribute name="white-space">pre</xsl:attribute>
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
+ <xsl:attribute name="role">Code</xsl:attribute>
@@ -1155,12 +1164,17 @@
</xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
</xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
- </xsl:attribute-set><xsl:attribute-set name="requirement-subject-style">
- </xsl:attribute-set><xsl:attribute-set name="requirement-inherit-style">
+ </xsl:attribute-set><xsl:attribute-set name="subject-style">
+ </xsl:attribute-set><xsl:attribute-set name="inherit-style">
+ </xsl:attribute-set><xsl:attribute-set name="description-style">
+ </xsl:attribute-set><xsl:attribute-set name="specification-style">
+ </xsl:attribute-set><xsl:attribute-set name="measurement-target-style">
+ </xsl:attribute-set><xsl:attribute-set name="verification-style">
+ </xsl:attribute-set><xsl:attribute-set name="import-style">
</xsl:attribute-set><xsl:attribute-set name="recommendation-style">
</xsl:attribute-set><xsl:attribute-set name="recommendation-name-style">
@@ -1369,11 +1383,12 @@
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
- </xsl:attribute-set><xsl:attribute-set name="quote-style">
+ </xsl:attribute-set><xsl:attribute-set name="quote-style">
+ <xsl:attribute name="role">BlockQuote</xsl:attribute>
@@ -1574,12 +1589,14 @@
<!-- Display table's name before table as standalone block -->
<!-- $namespace = 'iso' or -->
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
-
+
+
+
<xsl:call-template name="fn_name_display"/>
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
@@ -3443,20 +3460,72 @@
<xsl:call-template name="setTrackChangesStyles">
<xsl:with-param name="isAdded" select="$isAdded"/>
<xsl:with-param name="isDeleted" select="$isDeleted"/>
</xsl:call-template>
+
+
<xsl:variable name="mathml">
<xsl:apply-templates select="." mode="mathml"/>
</xsl:variable>
<fo:instream-foreign-object fox:alt-text="Math">
+ <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
+ <xsl:variable name="comment_text_">
+ <xsl:choose>
+ <xsl:when test="normalize-space($comment_text_following) != ''">
+ <xsl:value-of select="$comment_text_following"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="normalize-space(translate(.,' ',' '))"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
+
+ <xsl:if test="normalize-space($comment_text) != ''">
+ <!-- put Mathin Alternate Text -->
+ <xsl:attribute name="fox:alt-text">
+ <xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:variable name="mathml_content">
+ <xsl:apply-templates select="." mode="mathml_actual_text"/>
+ </xsl:variable>
+ <!-- put MathML in Actual Text -->
+ <xsl:attribute name="fox:actual-text">
+ <xsl:value-of select="$mathml_content"/>
+ </xsl:attribute>
+
+
<!-- <xsl:copy-of select="."/> -->
<xsl:copy-of select="xalan:nodeset($mathml)"/>
</fo:instream-foreign-object>
</fo:inline>
+ </xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
+ <!-- <xsl:text>a+b</xsl:text> -->
+ <xsl:text><</xsl:text>
+ <xsl:value-of select="local-name()"/>
+ <xsl:if test="local-name() = 'math'">
+ <xsl:text> xmlns="http://www.w3.org/1998/Math/MathML"</xsl:text>
+ </xsl:if>
+ <xsl:for-each select="@*">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="local-name()"/>
+ <xsl:text>="</xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>"</xsl:text>
+ </xsl:for-each>
+ <xsl:text>></xsl:text>
+ <xsl:apply-templates mode="mathml_actual_text"/>
+ <xsl:text></</xsl:text>
+ <xsl:value-of select="local-name()"/>
+ <xsl:text>></xsl:text>
+ </xsl:template><xsl:template match="text()" mode="mathml_actual_text">
+ <xsl:value-of select="normalize-space()"/>
</xsl:template><xsl:template match="@*|node()" mode="mathml">
<xsl:copy>
<xsl:apply-templates select="@*|node()" mode="mathml"/>
</xsl:copy>
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
@@ -3514,11 +3583,14 @@
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
</fo:block>
<xsl:apply-templates/>
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
- <fo:inline><xsl:apply-templates/></fo:inline>
+ <xsl:variable name="level">
+ <xsl:call-template name="getLevel"/>
+ </xsl:variable>
+ <fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
</fo:block>
<xsl:apply-templates/>
@@ -3549,13 +3621,14 @@
<xsl:with-param name="name" select="'title-modified'"/>
</xsl:call-template>
</xsl:variable>
+ <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
<xsl:choose>
- <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
- <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
+ <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
+ <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
</xsl:choose>
<xsl:apply-templates/>
</xsl:template><xsl:template match="*[local-name() = 'xref']">
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
@@ -3699,11 +3772,14 @@
<xsl:apply-templates/>
</fo:block>
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
<xsl:if test="normalize-space() != ''">
- <fo:inline>
+ <xsl:variable name="level">
+ <xsl:call-template name="getLevelTermName"/>
+ </xsl:variable>
+ <fo:inline role="H{$level}">
<xsl:apply-templates/>
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
<xsl:text>.</xsl:text>
</xsl:if> -->
</fo:inline>
@@ -4330,10 +4406,11 @@
<xsl:when test="*[local-name() = 'tab']">
<xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
</xsl:otherwise>
</xsl:choose>
</fo:block>
</fo:list-item-body>
</fo:list-item>
@@ -4470,18 +4547,10 @@
</fo:block>
</xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
<fo:block>
<fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
</fo:block>
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
- <fo:block xsl:use-attribute-sets="requirement-subject-style">
- <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
- </fo:block>
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
- <fo:block xsl:use-attribute-sets="requirement-inherit-style">
- <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
- </fo:block>
</xsl:template><xsl:template match="*[local-name() = 'recommendation']">
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
<xsl:apply-templates/>
</fo:block>
@@ -4494,10 +4563,42 @@
</xsl:if>
</xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'label']">
<fo:block xsl:use-attribute-sets="recommendation-label-style">
<xsl:apply-templates/>
</fo:block>
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
+ <fo:block xsl:use-attribute-sets="subject-style">
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
+ </fo:block>
+ </xsl:template><xsl:template match="*[local-name() = 'subject']">
+ <fo:block xsl:use-attribute-sets="subject-style">
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
+ </fo:block>
+ </xsl:template><xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
+ <fo:block xsl:use-attribute-sets="inherit-style">
+ <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
+ </fo:block>
+ </xsl:template><xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
+ <fo:block xsl:use-attribute-sets="description-style">
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:template><xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
+ <fo:block xsl:use-attribute-sets="specification-style">
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:template><xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
+ <fo:block xsl:use-attribute-sets="measurement-target-style">
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:template><xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
+ <fo:block xsl:use-attribute-sets="verification-style">
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:template><xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
+ <fo:block xsl:use-attribute-sets="import-style">
+ <xsl:apply-templates/>
+ </fo:block>
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
</xsl:if>
@@ -5467,10 +5568,13 @@
</fo:inline>
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']">
<fo:block-container border="1pt solid black" width="50%">
<fo:block> </fo:block>
</fo:block-container>
+ </xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
+ <fo:inline padding-right="5mm"> </fo:inline>
+ <fo:inline><xsl:apply-templates/></fo:inline>
</xsl:template><xsl:template name="convertDate">
<xsl:param name="date"/>
<xsl:param name="format" select="'short'"/>
<xsl:variable name="year" select="substring($date, 1, 4)"/>
<xsl:variable name="month" select="substring($date, 6, 2)"/>
@@ -5703,9 +5807,29 @@
<xsl:value-of select="$level_total - 1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:value-of select="$level"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template><xsl:template name="getLevelTermName">
+ <xsl:choose>
+ <xsl:when test="normalize-space(../@depth) != ''">
+ <xsl:value-of select="../@depth"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="title_level_">
+ <xsl:for-each select="../preceding-sibling::*[local-name() = 'title'][1]">
+ <xsl:call-template name="getLevel"/>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:variable name="title_level" select="normalize-space($title_level_)"/>
+ <xsl:choose>
+ <xsl:when test="$title_level != ''"><xsl:value-of select="$title_level + 1"/></xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="getLevel"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template><xsl:template name="split">
<xsl:param name="pText" select="."/>
<xsl:param name="sep" select="','"/>
\ No newline at end of file