lib/isodoc/ogc/ogc.white-paper.xsl in metanorma-ogc-2.3.12 vs lib/isodoc/ogc/ogc.white-paper.xsl in metanorma-ogc-2.3.13

- old
+ new

@@ -1662,20 +1662,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-size">11pt</xsl:attribute> <xsl:attribute name="text-align">left</xsl:attribute> <xsl:attribute name="color">rgb(68, 84, 106)</xsl:attribute> <xsl:attribute name="font-weight">normal</xsl:attribute> @@ -1722,10 +1724,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 name="space-before">12pt</xsl:attribute> <xsl:attribute name="space-after">0pt</xsl:attribute> @@ -2007,10 +2010,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-set> @@ -2400,28 +2408,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']"> @@ -2619,11 +2627,11 @@ <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 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> @@ -3657,11 +3665,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"/> @@ -3680,11 +3688,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> @@ -3693,21 +3701,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> @@ -3976,15 +3984,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 --> @@ -3995,11 +4003,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> @@ -4030,11 +4038,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(..)"/> @@ -4095,19 +4103,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> @@ -4698,10 +4706,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> @@ -5634,10 +5645,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"/> @@ -5672,20 +5695,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"/> @@ -6142,14 +6195,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> @@ -6162,10 +6215,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> --> @@ -6321,21 +6395,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> @@ -6411,17 +6485,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"/> @@ -6581,16 +6655,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> <!-- ====== --> <!-- ====== --> @@ -6610,11 +6685,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> @@ -7743,11 +7818,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> @@ -7764,11 +7839,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()}"> @@ -8318,15 +8393,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"> @@ -8498,22 +8573,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')"> @@ -8522,12 +8597,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> @@ -8576,12 +8651,12 @@ </fo:inline> </fo:block> <xsl:if test="*[not(local-name() = 'name')][position() &gt; 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() &gt; 1]"> <xsl:with-param name="fo_element" select="'block'"/> </xsl:apply-templates> </fo:block-container> </fo:block-container> @@ -8630,11 +8705,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"> @@ -8771,26 +8846,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> @@ -8950,22 +9025,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 --> @@ -8996,16 +9071,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> @@ -9042,11 +9117,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']]"> @@ -9090,10 +9165,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"/> @@ -9326,30 +9405,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> @@ -9763,11 +9842,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"> @@ -9812,11 +9894,11 @@ </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 --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' --> <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages --> <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style"> <fo:list-item> @@ -9840,10 +9922,39 @@ </fo:list-item> </fo:list-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 bibitem processing --> <xsl:if test=".//*[local-name() = 'fn']"> @@ -10173,10 +10284,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