lib/isodoc/itu/itu.technical-report.xsl in metanorma-itu-2.2.11 vs lib/isodoc/itu/itu.technical-report.xsl in metanorma-itu-2.2.12
- old
+ new
@@ -4075,11 +4075,11 @@
<xsl:attribute name="{local-name()}">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:for-each>
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
<xsl:if test="$isNoteOrFnExist = 'true'">
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
</xsl:if>
<xsl:choose>
@@ -4119,11 +4119,11 @@
<xsl:choose>
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
</xsl:when>
<xsl:otherwise>
- <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
@@ -4637,11 +4637,11 @@
<xsl:template name="insertTableFooterInSeparateTable">
<xsl:param name="table_attributes"/>
<xsl:param name="colwidths"/>
<xsl:param name="colgroup"/>
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
<xsl:variable name="isNoteOrFnExistShowAfterTable">
</xsl:variable>
@@ -4720,19 +4720,20 @@
<!-- except gb and bsi -->
<xsl:apply-templates select="../*[local-name()='p']"/>
<xsl:apply-templates select="../*[local-name()='dl']"/>
<xsl:apply-templates select="../*[local-name()='note']"/>
+ <xsl:apply-templates select="../*[local-name()='example']"/>
<xsl:apply-templates select="../*[local-name()='source']"/>
<xsl:variable name="isDisplayRowSeparator">
</xsl:variable>
<!-- horizontal row separator -->
<xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
- <xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
+ <xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
<xsl:call-template name="setBordersTableArray"/>
<fo:block font-size="1pt"> </fo:block>
</fo:block-container>
@@ -4993,17 +4994,17 @@
</fo:block>
</fo:table-cell>
</xsl:template> <!-- td -->
- <xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
+ <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
<fo:block xsl:use-attribute-sets="table-note-style">
<xsl:call-template name="refine_table-note-style"/>
- <!-- Table's note name (NOTE, for example) -->
+ <!-- Table's note/example name (NOTE, for example) -->
<fo:inline xsl:use-attribute-sets="table-note-name-style">
<xsl:call-template name="refine_table-note-name-style"/>
<xsl:apply-templates select="*[local-name() = 'name']"/>
@@ -5013,11 +5014,11 @@
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
</fo:block>
</xsl:template> <!-- table/note -->
- <xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
+ <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
<xsl:apply-templates/>
</xsl:template>
<!-- ===================== -->
<!-- Footnotes processing -->
@@ -6093,14 +6094,19 @@
<!-- ========================= -->
<!-- Rich text formatting -->
<!-- ========================= -->
<xsl:template match="*[local-name()='em']">
<fo:inline font-style="italic">
+ <xsl:call-template name="refine_italic_style"/>
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
+ <xsl:template name="refine_italic_style">
+
+ </xsl:template>
+
<xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
<xsl:param name="split_keep-within-line"/>
<fo:inline font-weight="bold">
<xsl:call-template name="refine_strong_style"/>
@@ -9963,10 +9969,16 @@
</xsl:otherwise>
</xsl:choose>
</xsl:template>
+ <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
+ <fo:inline xsl:use-attribute-sets="example-name-style">
+ <xsl:apply-templates/>
+ </fo:inline>
+ </xsl:template>
+
<xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
<xsl:param name="fo_element">block</xsl:param>
<xsl:variable name="num"><xsl:number/></xsl:variable>
<xsl:variable name="element">
@@ -10543,10 +10555,13 @@
<xsl:choose>
<xsl:when test="normalize-space($processing_instruction_type) = 'simple'"/>
<xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
</xsl:choose>
</xsl:when>
+ <xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
+ <xsl:value-of select="@label"/>
+ </xsl:when>
<xsl:otherwise> <!-- for ordered lists 'ol' -->
<!-- Example: for BSI <?list-start 2?> -->
<xsl:variable name="processing_instruction_start" select="normalize-space(../preceding-sibling::*[1]/processing-instruction('list-start'))"/>
@@ -10600,13 +10615,13 @@
<xsl:variable name="format">
<xsl:choose>
<xsl:when test="$type = 'arabic'">
1)
</xsl:when>
- <xsl:when test="$type = 'alphabet'">
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
a)
</xsl:when>
- <xsl:when test="$type = 'alphabet_upper'">
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
A.
</xsl:when>
<xsl:when test="$type = 'roman'">
i)
</xsl:when>
\ No newline at end of file