lib/isodoc/itu/itu.recommendation-supplement.xsl in metanorma-itu-2.2.13 vs lib/isodoc/itu/itu.recommendation-supplement.xsl in metanorma-itu-2.2.14
- old
+ new
@@ -3108,20 +3108,22 @@
<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="figure-block-style">
+ <xsl:attribute name="role">SKIP</xsl:attribute>
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="figure-style">
</xsl:attribute-set>
<xsl:attribute-set name="figure-name-style">
+ <xsl:attribute name="role">Caption</xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
<xsl:attribute name="text-align">center</xsl:attribute>
<xsl:attribute name="margin-top">6pt</xsl:attribute>
<xsl:attribute name="space-after">6pt</xsl:attribute>
@@ -3168,10 +3170,11 @@
<xsl:template name="refine_formula-stem-number-style">
</xsl:template>
<xsl:attribute-set name="image-style">
+ <xsl:attribute name="role">SKIP</xsl:attribute>
<xsl:attribute name="text-align">center</xsl:attribute>
</xsl:attribute-set>
<xsl:template name="refine_image-style">
@@ -3440,10 +3443,15 @@
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
</xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
+ <xsl:attribute-set name="bibitem-non-normative-list-item-style">
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
+
+ </xsl:attribute-set>
+
<!-- bibitem in bibliography section (references/@normative="false"), list body -->
<xsl:attribute-set name="bibitem-normative-list-body-style">
<xsl:attribute name="margin-top">6pt</xsl:attribute>
<xsl:attribute name="margin-left">14mm</xsl:attribute>
@@ -3842,28 +3850,28 @@
<xsl:choose>
<xsl:when test=". = $sep">
<xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
</xsl:when>
<xsl:otherwise>
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- ================================= -->
<!-- Preface boilerplate sections processing -->
<!-- ================================= -->
<xsl:template match="*[local-name()='copyright-statement']">
- <fo:block xsl:use-attribute-sets="copyright-statement-style">
+ <fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
<xsl:apply-templates/>
</fo:block>
</xsl:template> <!-- copyright-statement -->
<xsl:template match="*[local-name()='copyright-statement']//*[local-name()='title']">
@@ -4042,11 +4050,11 @@
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <fo:block-container xsl:use-attribute-sets="table-container-style">
+ <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
<xsl:call-template name="refine_table-container-style">
<xsl:with-param name="margin-side" select="$margin-side"/>
</xsl:call-template>
@@ -5089,11 +5097,11 @@
<xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="footnote_inline">
- <fo:inline>
+ <fo:inline role="Reference">
<xsl:variable name="fn_styles">
<xsl:choose>
<xsl:when test="ancestor::*[local-name() = 'bibitem']">
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"/>
@@ -5112,11 +5120,11 @@
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
</xsl:if>
<xsl:call-template name="insert_basic_link">
<xsl:with-param name="element">
- <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
+ <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl">
<xsl:copy-of select="$current_fn_number_text"/>
</fo:basic-link>
</xsl:with-param>
</xsl:call-template>
</fo:inline>
@@ -5125,21 +5133,21 @@
<xsl:choose>
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
<xsl:copy-of select="$footnote_inline"/>
</xsl:when>
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
- <fo:footnote xsl:use-attribute-sets="fn-style">
+ <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
<xsl:copy-of select="$footnote_inline"/>
- <fo:footnote-body>
+ <fo:footnote-body role="Note">
- <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
- <fo:block xsl:use-attribute-sets="fn-body-style">
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
<xsl:call-template name="refine_fn-body-style"/>
- <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
+ <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
<xsl:call-template name="refine_fn-body-num-style"/>
<xsl:value-of select="$current_fn_number_text"/>
</fo:inline>
@@ -5403,15 +5411,15 @@
</fo:basic-link>
</fo:inline>
</xsl:template>
<xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
- <fo:inline><xsl:value-of select="."/></fo:inline>
+ <fo:inline role="SKIP"><xsl:value-of select="."/></fo:inline>
</xsl:template>
<xsl:template match="*[local-name()='fn']//*[local-name()='p']">
- <fo:inline>
+ <fo:inline role="P">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
<!-- ===================== -->
<!-- END Footnotes processing -->
@@ -5422,11 +5430,11 @@
<!-- ===================== -->
<xsl:template match="*[local-name()='dl']">
<xsl:variable name="isAdded" select="@added"/>
<xsl:variable name="isDeleted" select="@deleted"/>
<!-- <dl><xsl:copy-of select="."/></dl> -->
- <fo:block-container xsl:use-attribute-sets="dl-block-style">
+ <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
<xsl:call-template name="setBlockSpanAll"/>
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
<xsl:attribute name="margin-left">0mm</xsl:attribute>
@@ -5457,11 +5465,11 @@
<xsl:call-template name="setTrackChangesStyles">
<xsl:with-param name="isAdded" select="$isAdded"/>
<xsl:with-param name="isDeleted" select="$isDeleted"/>
</xsl:call-template>
- <fo:block-container margin-left="0mm">
+ <fo:block-container margin-left="0mm" role="SKIP">
<xsl:attribute name="margin-right">0mm</xsl:attribute>
<xsl:variable name="parent" select="local-name(..)"/>
@@ -5522,19 +5530,19 @@
</xsl:when> <!-- END: definition list in a figure -->
</xsl:choose>
<!-- a few components -->
<xsl:if test="$onlyOneComponent = 'false'">
- <fo:block>
+ <fo:block role="SKIP">
<xsl:call-template name="refine_multicomponent_style"/>
<xsl:if test="ancestor::*[local-name() = 'dd' or local-name() = 'td']">
<xsl:attribute name="margin-top">0</xsl:attribute>
</xsl:if>
- <fo:block>
+ <fo:block role="SKIP">
<xsl:call-template name="refine_multicomponent_block_style"/>
<xsl:apply-templates select="*[local-name() = 'name']">
<xsl:with-param name="process">true</xsl:with-param>
@@ -6137,10 +6145,13 @@
</fo:inline>
</xsl:template>
<xsl:template name="refine_strong_style">
+ <xsl:if test="ancestor::*['preferred']">
+ <xsl:attribute name="role">SKIP</xsl:attribute>
+ </xsl:if>
</xsl:template>
<xsl:template match="*[local-name()='padding']">
<fo:inline padding-right="{@value}"> </fo:inline>
</xsl:template>
@@ -7068,10 +7079,22 @@
<xsl:with-param name="id" select="$id"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
+ <xsl:variable name="font_main_root_style">
+ <root-style xsl:use-attribute-sets="root-style">
+ </root-style>
+ </xsl:variable>
+ <xsl:variable name="font_main_root_style_font_family" select="xalan:nodeset($font_main_root_style)/root-style/@font-family"/>
+ <xsl:variable name="font_main">
+ <xsl:choose>
+ <xsl:when test="contains($font_main_root_style_font_family, ',')"><xsl:value-of select="substring-before($font_main_root_style_font_family, ',')"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="$font_main_root_style_font_family"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
<xsl:template match="*[local-name()='th' or local-name()='td']" mode="simple-table-id">
<xsl:param name="id"/>
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:variable name="row_number" select="count(../preceding-sibling::*) + 1"/>
@@ -7106,20 +7129,50 @@
<xsl:apply-templates select="." mode="td_text_with_formatting"/>
</xsl:variable>
<!-- td_text='<xsl:copy-of select="$td_text"/>' -->
+ <xsl:variable name="words_with_width">
+ <!-- calculate width for 'word' which contain text only (without formatting tags inside) -->
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][not(*)]">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:attribute name="width">
+ <xsl:value-of select="java:org.metanorma.fop.Util.getStringWidth(., $font_main)"/> <!-- Example: 'Times New Roman' -->
+ </xsl:attribute>
+ <xsl:copy-of select="node()"/>
+ </xsl:copy>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:variable name="words_with_width_sorted">
+ <xsl:for-each select="xalan:nodeset($words_with_width)//*[local-name() = 'word']">
+ <xsl:sort select="@width" data-type="number" order="descending"/>
+ <!-- select word maximal width only -->
+ <xsl:if test="position() = 1">
+ <xsl:copy-of select="."/>
+ </xsl:if>
+ </xsl:for-each>
+ <!-- add 'word' with formatting tags inside -->
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][*]">
+ <xsl:copy-of select="."/>
+ </xsl:for-each>
+ </xsl:variable>
+
<xsl:variable name="words">
<xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
<word>
<xsl:copy-of select="."/>
</word>
</xsl:for-each>
- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
+ <xsl:for-each select="xalan:nodeset($words_with_width_sorted)//*[local-name() = 'word'][normalize-space() != '']">
<xsl:copy-of select="."/>
</xsl:for-each>
+ <!-- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
+ <xsl:copy-of select="."/>
+ </xsl:for-each> -->
</xsl:variable>
<xsl:for-each select="xalan:nodeset($words)/word">
<xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
@@ -7576,14 +7629,14 @@
<!-- add space around vertical line -->
<xsl:template match="mathml:mo[normalize-space(text()) = '|']" mode="mathml">
<xsl:copy>
<xsl:apply-templates select="@*" mode="mathml"/>
<xsl:if test="not(@lspace)">
- <xsl:attribute name="lspace">0.4em</xsl:attribute>
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
</xsl:if>
- <xsl:if test="not(@rspace)">
- <xsl:attribute name="rspace">0.4em</xsl:attribute>
+ <xsl:if test="not(@rspace) and not(following-sibling::*[1][self::mathml:mo and normalize-space(text()) = '|'])">
+ <xsl:attribute name="rspace">0.2em</xsl:attribute>
</xsl:if>
<xsl:apply-templates mode="mathml"/>
</xsl:copy>
</xsl:template>
@@ -7596,10 +7649,31 @@
</xsl:if>
<xsl:apply-templates mode="mathml"/>
</xsl:copy>
</xsl:template>
+ <!-- increase space before '(' -->
+ <xsl:template match="mathml:mo[normalize-space(text()) = '(']" mode="mathml">
+ <xsl:copy>
+ <xsl:apply-templates select="@*" mode="mathml"/>
+ <xsl:if test="(preceding-sibling::* and not(preceding-sibling::*[1][self::mathml:mo])) or (../preceding-sibling::* and not(../preceding-sibling::*[1][self::mathml:mo]))">
+ <xsl:if test="not(@lspace)">
+ <xsl:attribute name="lspace">0.4em</xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="../preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:if>
+ <xsl:apply-templates mode="mathml"/>
+ </xsl:copy>
+ </xsl:template>
+
<!-- Examples:
<stem type="AsciiMath">x = 1</stem>
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
<stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
-->
@@ -7755,21 +7829,21 @@
<!-- ====== -->
<!-- formula -->
<!-- ====== -->
<xsl:template match="*[local-name() = 'formula']" name="formula">
- <fo:block-container margin-left="0mm">
+ <fo:block-container margin-left="0mm" role="SKIP">
<xsl:if test="parent::*[local-name() = 'note']">
<xsl:attribute name="margin-left">
<xsl:choose>
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:if>
- <fo:block-container margin-left="0mm">
+ <fo:block-container margin-left="0mm" role="SKIP">
<fo:block id="{@id}">
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
</fo:block>
</fo:block-container>
</fo:block-container>
@@ -7845,17 +7919,17 @@
<!-- termnote -->
<!-- ====== -->
<xsl:template match="*[local-name() = 'note']" name="note">
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
<xsl:call-template name="setBlockSpanAll"/>
<xsl:call-template name="refine_note-style"/>
- <fo:block-container margin-left="0mm" margin-right="0mm">
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
<fo:block>
<xsl:call-template name="refine_note_block_style"/>
@@ -8021,16 +8095,17 @@
</fo:block>
</xsl:template>
<xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
<xsl:if test="normalize-space() != ''">
- <xsl:variable name="level">
+ <!-- <xsl:variable name="level">
<xsl:call-template name="getLevelTermName"/>
</xsl:variable>
<fo:inline role="H{$level}">
- <xsl:apply-templates/>
- </fo:inline>
+ <xsl:apply-templates />
+ </fo:inline> -->
+ <xsl:apply-templates/>
</xsl:if>
</xsl:template>
<!-- ====== -->
<!-- ====== -->
@@ -8050,11 +8125,11 @@
</xsl:call-template>
<!-- Example: Dimensions in millimeters -->
<xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
- <fo:block xsl:use-attribute-sets="figure-style">
+ <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
</fo:block>
<xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
<xsl:call-template name="note"/>
</xsl:for-each>
@@ -9185,11 +9260,11 @@
</xsl:for-each>
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
</xsl:when>
<xsl:otherwise>
- <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
<xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
<xsl:attribute name="margin-left">0mm</xsl:attribute>
</xsl:if>
@@ -9206,11 +9281,11 @@
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:if>
- <fo:block-container margin-left="0mm">
+ <fo:block-container margin-left="0mm" role="SKIP">
<fo:block xsl:use-attribute-sets="sourcecode-style">
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
<xsl:attribute name="{local-name()}">
@@ -9752,15 +9827,15 @@
<!-- ========== -->
<!-- requirement, recommendation, permission table -->
<!-- ========== -->
<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">
+ <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt" role="SKIP">
<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>
- <fo:block-container margin-left="0mm" margin-right="0mm">
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
</xsl:if>
<xsl:variable name="simple-table">
@@ -9918,22 +9993,22 @@
text line 1
text line 2
-->
<xsl:template match="*[local-name() = 'example']">
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style">
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
<xsl:call-template name="setBlockSpanAll"/>
<xsl:call-template name="refine_example-style"/>
<xsl:variable name="fo_element">
<xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
block
</xsl:variable>
- <fo:block-container margin-left="0mm">
+ <fo:block-container margin-left="0mm" role="SKIP">
<xsl:choose>
<xsl:when test="contains(normalize-space($fo_element), 'block')">
@@ -9942,12 +10017,12 @@
<xsl:apply-templates select="*[local-name()='name']">
<xsl:with-param name="fo_element" select="$fo_element"/>
</xsl:apply-templates>
</fo:block>
- <fo:block-container xsl:use-attribute-sets="example-body-style">
- <fo:block-container margin-left="0mm" margin-right="0mm">
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
<xsl:apply-templates select="node()[not(local-name() = 'name')]">
<xsl:with-param name="fo_element" select="$fo_element"/>
</xsl:apply-templates>
</fo:block-container>
</fo:block-container>
@@ -9996,12 +10071,12 @@
</fo:inline>
</fo:block>
<xsl:if test="*[not(local-name() = 'name')][position() > 1]">
<!-- display further elements in blocks -->
- <fo:block-container xsl:use-attribute-sets="example-body-style">
- <fo:block-container margin-left="0mm" margin-right="0mm">
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
<xsl:apply-templates select="*[not(local-name() = 'name')][position() > 1]">
<xsl:with-param name="fo_element" select="'block'"/>
</xsl:apply-templates>
</fo:block-container>
</fo:block-container>
@@ -10050,11 +10125,11 @@
<xsl:value-of select="$fo_element"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="starts-with(normalize-space($element), 'block')">
- <fo:block-container>
+ <fo:block-container role="SKIP">
<xsl:if test="ancestor::*[local-name() = 'li'] and contains(normalize-space($fo_element), 'block')">
<xsl:attribute name="margin-left">0mm</xsl:attribute>
<xsl:attribute name="margin-right">0mm</xsl:attribute>
</xsl:if>
<fo:block xsl:use-attribute-sets="example-p-style">
@@ -10191,26 +10266,26 @@
<!-- qoute -->
<!-- source -->
<!-- author -->
<!-- ====== -->
<xsl:template match="*[local-name() = 'quote']">
- <fo:block-container margin-left="0mm">
+ <fo:block-container margin-left="0mm" role="SKIP">
<xsl:call-template name="setBlockSpanAll"/>
<xsl:if test="parent::*[local-name() = 'note']">
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
<xsl:attribute name="margin-left">5mm</xsl:attribute>
</xsl:if>
</xsl:if>
- <fo:block-container margin-left="0mm">
- <fo:block-container xsl:use-attribute-sets="quote-style">
+ <fo:block-container margin-left="0mm" role="SKIP">
+ <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
<xsl:call-template name="refine_quote-style"/>
- <fo:block-container margin-left="0mm" margin-right="0mm">
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
<fo:block role="BlockQuote">
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
</fo:block>
</fo:block-container>
</fo:block-container>
@@ -10365,22 +10440,22 @@
</xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when test="$lang = 'zh'">
- <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
+ <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
</xsl:when>
<xsl:when test="../../@inline-header = 'true'">
- <fo:inline font-size="90%">
+ <fo:inline font-size="90%" role="SKIP">
<xsl:call-template name="insertNonBreakSpaces">
<xsl:with-param name="count" select="$padding-right"/>
</xsl:call-template>
</fo:inline>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
- <fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/></fo:inline>
+ <fo:inline padding-right="{$padding-right}mm" role="SKIP"><xsl:value-of select="$direction"/></fo:inline>
</xsl:otherwise>
</xsl:choose>
</xsl:template> <!-- tab -->
@@ -10406,16 +10481,16 @@
<xsl:call-template name="getLevelTermName"/>
</xsl:variable>
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
- <fo:block xsl:use-attribute-sets="term-name-style">
+ <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
</fo:block>
</xsl:if>
- <fo:block xsl:use-attribute-sets="preferred-term-style">
+ <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
<xsl:call-template name="setStyle_preferred"/>
<xsl:apply-templates/>
</fo:block>
</fo:block>
</xsl:template>
@@ -10452,11 +10527,11 @@
<!-- ========== -->
<!-- definition -->
<!-- ========== -->
<xsl:template match="*[local-name() = 'definition']">
- <fo:block xsl:use-attribute-sets="definition-style">
+ <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
@@ -10502,10 +10577,14 @@
</fo:block>
</xsl:template>
<xsl:template match="*[local-name() = 'clause']">
<fo:block>
+ <xsl:if test="parent::*[local-name() = 'copyright-statement']">
+ <xsl:attribute name="role">SKIP</xsl:attribute>
+ </xsl:if>
+
<xsl:call-template name="setId"/>
<xsl:call-template name="setBlockSpanAll"/>
<xsl:call-template name="refine_clause_style"/>
@@ -10744,30 +10823,30 @@
</xsl:template>
<xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
<xsl:choose>
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
- <fo:block-container>
+ <fo:block-container role="SKIP">
<xsl:attribute name="margin-left">
<xsl:choose>
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:call-template name="refine_list_container_style"/>
- <fo:block-container margin-left="0mm">
+ <fo:block-container margin-left="0mm" role="SKIP">
<fo:block>
<xsl:apply-templates select="." mode="list"/>
</fo:block>
</fo:block-container>
</fo:block-container>
</xsl:when>
<xsl:otherwise>
- <fo:block>
+ <fo:block role="SKIP">
<xsl:apply-templates select="." mode="list"/>
</fo:block>
</xsl:otherwise>
</xsl:choose>
@@ -11181,11 +11260,14 @@
<!-- ========================================================== -->
<!-- Reference sections (Normative References and Bibliography) -->
<!-- ========================================================== -->
<xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
- <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/>
+ <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
+
+ </xsl:template>
<!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
<xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
<!-- Normative references -->
<xsl:template match="*[local-name() = 'references'][@normative='true']" priority="2">
@@ -11230,17 +11312,47 @@
</xsl:template> <!-- bibitem -->
<!-- Bibliography (non-normative references) -->
<xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
<xsl:call-template name="processBibitem"/>
</fo:block>
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
+ <xsl:template name="insertListItem_Bibitem">
+ <xsl:choose>
+ <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
+ <xsl:otherwise>
+ <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
+ <fo:list-item-label end-indent="label-end()">
+ <fo:block role="SKIP">
+ <fo:inline role="SKIP">
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
+ </xsl:apply-templates>
+ </fo:inline>
+ </fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()">
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
+ <xsl:call-template name="processBibitem">
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
+ </xsl:call-template>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'bibitem']">
+ <xsl:with-param name="skip">false</xsl:with-param>
+ </xsl:apply-templates>
+ </xsl:template>
+
<xsl:template name="processBibitem">
<xsl:param name="biblio_tag_part">both</xsl:param>
<!-- start ITU bibitem processing -->
<!-- Example: [ITU-T A.23] ITU-T A.23, Recommendation ITU-T A.23, Annex A (2014), Guide for ITU-T and ISO/IEC JTC 1 cooperation. -->
@@ -11619,10 +11731,10 @@
<!-- text in the box -->
<fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
<xsl:call-template name="setBlockSpanAll"/>
- <fo:block-container xsl:use-attribute-sets="admonition-container-style">
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
<fo:block xsl:use-attribute-sets="admonition-name-style">
<xsl:call-template name="displayAdmonitionName"/>
</fo:block>
<fo:block xsl:use-attribute-sets="admonition-p-style">
\ No newline at end of file