lib/isodoc/m3aawg/m3aawg.policy.xsl in metanorma-m3aawg-2.0.8 vs lib/isodoc/m3aawg/m3aawg.policy.xsl in metanorma-m3aawg-2.1.0
- old
+ new
@@ -171,25 +171,22 @@
<fo:block font-size="22pt" margin-bottom="12pt" role="H1">
<xsl:value-of select="$title-en"/>
</fo:block>
<!-- Version 1.0 -->
<fo:block font-size="12pt" margin-bottom="6pt">
- <xsl:variable name="title-edition">
- <xsl:call-template name="getTitle">
- <xsl:with-param name="name" select="'title-edition'"/>
+ <xsl:variable name="edition" select="normalize-space(/m3d:m3d-standard/m3d:bibdata/m3d:edition[normalize-space(@language) = ''])"/>
+ <xsl:if test="$edition != ''">
+ <xsl:call-template name="capitalize">
+ <xsl:with-param name="str">
+ <xsl:call-template name="getLocalizedString">
+ <xsl:with-param name="key">version</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
</xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="$title-edition"/><xsl:text>: </xsl:text>
- <xsl:variable name="edition" select="/m3d:m3d-standard/m3d:bibdata/m3d:edition"/>
- <xsl:choose>
- <xsl:when test="contains($edition, '.')">
- <xsl:value-of select="$edition"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$edition"/><xsl:text>.0</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:text>: </xsl:text>
+ <xsl:value-of select="$edition"/><xsl:if test="not(contains($edition, '.'))"><xsl:text>.0</xsl:text></xsl:if>
+ </xsl:if>
</fo:block>
<fo:block font-size="12pt" margin-bottom="12pt">
<xsl:call-template name="convertDate">
<xsl:with-param name="date" select="/m3d:m3d-standard/m3d:bibdata/m3d:version/m3d:revision-date"/>
</xsl:call-template>
@@ -646,29 +643,15 @@
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
-
- <xsl:template match="mathml:math" priority="2">
- <fo:inline font-family="Cambria Math">
- <xsl:variable name="mathml">
- <xsl:apply-templates select="." mode="mathml"/>
- </xsl:variable>
- <fo:instream-foreign-object fox:alt-text="Math">
- <!-- <xsl:copy-of select="."/> -->
- <xsl:copy-of select="xalan:nodeset($mathml)"/>
- </fo:instream-foreign-object>
- </fo:inline>
- </xsl:template>
-
-
<xsl:variable name="Image-M3AAWG-Logo">
<xsl:text>iVBORw0KGgoAAAANSUhEUgAAAjUAAAA8CAYAAACehUt5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA99pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ1dWlkOmZhZjViZGQ1LWJhM2QtMTFkYS1hZDMxLWQzM2Q3NTE4MmYxYiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1QjFGQUNFRDVCODYxMUU0OUZCN0FCODI3QzkxM0M3RiIgeG1wTU06SW5zdGF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1yDdZ5rqVfsk3NFkMJL4HkmbZYabCMMUYsM4wNDz3VFkKzUrNShVr7FUOZ9NShw35f64SwWk60P1I2fJiwW9gDQlGR1cGTSNv0gbYKhLrYvh9WWD5peZ3C5fFLqB3dI7HfDm2YPzqkkhzFChQ+bC2gOAdpwAOpSxzYdOXJUW8m8/VQPKGr7yVHdJbgdKy+GwcowwKvGOsCgFnZZy2jfUtv7DMAXtgDYy4dHFM5Yakzw/AsXBTBqhR3AXAaFzOI7nKfc9pMjR44KTNh+cmc/OaqTRBCxpIbrgO2dVXWoz6DF+ZLJkSNHjuodOZduR44cOXLkyJEDNY4cOXLkyJEjR7WF/O2nDbnvXd9oIzfEjhw5cuTI0W8L1CAA0DauOxw5clQA6khe84PrCkeOHBWS/l+AAQACYD7v73Ou8wAAAABJRU5ErkJggg==</xsl:text>
</xsl:variable>
-<xsl:param name="svg_images"/><xsl:variable name="images" select="document($svg_images)"/><xsl:param name="basepath"/><xsl:param name="external_index"/><xsl:param name="syntax-highlight">false</xsl:param><xsl:variable name="lang">
+<xsl:param name="svg_images"/><xsl:variable name="images" select="document($svg_images)"/><xsl:param name="basepath"/><xsl:param name="external_index"/><xsl:param name="syntax-highlight">false</xsl:param><xsl:param name="add_math_as_text">true</xsl:param><xsl:variable name="lang">
<xsl:call-template name="getLang"/>
</xsl:variable><xsl:variable name="pageWidth_">
215.9
</xsl:variable><xsl:variable name="pageWidth" select="normalize-space($pageWidth_)"/><xsl:variable name="pageHeight_">
279.4
@@ -679,25 +662,12 @@
</xsl:variable><xsl:variable name="marginLeftRight2" select="normalize-space($marginLeftRight2_)"/><xsl:variable name="marginTop_">
35
</xsl:variable><xsl:variable name="marginTop" select="normalize-space($marginTop_)"/><xsl:variable name="marginBottom_">
23
</xsl:variable><xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/><xsl:variable name="titles_">
-
- <title-edition lang="en">
-
- <xsl:text>Version</xsl:text>
-
- </title-edition>
- <title-edition lang="fr">
- <xsl:text>Édition </xsl:text>
- </title-edition>
- <title-edition lang="ru">
- <xsl:text>Издание </xsl:text>
- </title-edition>
-
<!-- These titles of Table of contents renders different than determined in localized-strings -->
<title-toc lang="en">
<xsl:text>Table of Contents</xsl:text>
@@ -773,11 +743,11 @@
</xsl:call-template>
</xsl:if>
</xsl:variable><xsl:variable name="bibdata">
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
- </xsl:variable><xsl:variable name="linebreak">
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:variable name="non_breaking_hyphen">‑</xsl:variable><xsl:variable name="thin_space"> </xsl:variable><xsl:variable name="zero_width_space"></xsl:variable><xsl:variable name="en_dash">–</xsl:variable><xsl:template name="getTitle">
+ </xsl:variable><xsl:variable name="linebreak">
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:variable name="non_breaking_hyphen">‑</xsl:variable><xsl:variable name="thin_space"> </xsl:variable><xsl:variable name="zero_width_space"></xsl:variable><xsl:variable name="hair_space"> </xsl:variable><xsl:variable name="en_dash">–</xsl:variable><xsl:template name="getTitle">
<xsl:param name="name"/>
<xsl:param name="lang"/>
<xsl:variable name="lang_">
<xsl:choose>
<xsl:when test="$lang != ''">
@@ -821,11 +791,11 @@
</xsl:attribute-set><xsl:template name="insertRootStyle">
<xsl:param name="root-style"/>
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
<xsl:variable name="additional_fonts_">
- <xsl:for-each select="//*[local-name() = 'misc-container'][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
+ <xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[contains(local-name(), '-standard')][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="additional_fonts" select="normalize-space($additional_fonts_)"/>
@@ -896,11 +866,10 @@
</xsl:attribute-set><xsl:attribute-set name="sourcecode-container-style">
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
</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>
@@ -982,10 +951,11 @@
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
+
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
@@ -1535,11 +1505,13 @@
<xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
</xsl:attribute-set><xsl:attribute-set name="mathml-style">
<xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
+ <xsl:attribute name="font-family">Cambria Math</xsl:attribute>
+
</xsl:attribute-set><xsl:attribute-set name="list-style">
@@ -2048,33 +2020,45 @@
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
<xsl:sort select="@displayorder" data-type="number"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
- </xsl:template><xsl:variable name="tag_open">###fo:inline###</xsl:variable><xsl:variable name="tag_close">###/fo:inline###</xsl:variable><xsl:template match="text()" name="text">
- <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
- <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_open,'$1',$tag_close))"/>
- <xsl:call-template name="replace_fo_inline">
- <xsl:with-param name="text" select="$text"/>
- </xsl:call-template>
- </xsl:template><xsl:template name="replace_fo_inline">
+ </xsl:template><xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable><xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable><xsl:template match="text()" name="text">
+
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
+ <xsl:call-template name="replace_fo_inline_tags">
+ <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
+ <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
+ <xsl:with-param name="text" select="$text"/>
+ </xsl:call-template>
+
+ </xsl:template><xsl:template name="replace_fo_inline_tags">
+ <xsl:param name="tag_open"/>
+ <xsl:param name="tag_close"/>
<xsl:param name="text"/>
<xsl:choose>
<xsl:when test="contains($text, $tag_open)">
<xsl:value-of select="substring-before($text, $tag_open)"/>
- <xsl:text disable-output-escaping="yes"><fo:inline keep-together.within-line="always"></xsl:text>
+ <!-- <xsl:text disable-output-escaping="yes"><fo:inline keep-together.within-line="always"></xsl:text> -->
<xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
- <xsl:value-of select="substring-before($text_after, $tag_close)"/>
- <xsl:text disable-output-escaping="yes"></fo:inline></xsl:text>
- <xsl:call-template name="replace_fo_inline">
+ <fo:inline keep-together.within-line="always">
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
+ </fo:inline>
+ <!-- <xsl:text disable-output-escaping="yes"></fo:inline></xsl:text> -->
+ <xsl:call-template name="replace_fo_inline_tags">
+ <xsl:with-param name="tag_open" select="$tag_open"/>
+ <xsl:with-param name="tag_close" select="$tag_close"/>
<xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
</xsl:choose>
</xsl:template><xsl:template match="*[local-name()='br']">
<xsl:value-of select="$linebreak"/>
+ </xsl:template><xsl:template match="*[local-name() = 'keep-together_within-line']">
+ <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
</xsl:template><xsl:template match="*[local-name()='copyright-statement']">
<fo:block xsl:use-attribute-sets="copyright-statement-style">
<xsl:apply-templates/>
</fo:block>
</xsl:template><xsl:template match="*[local-name()='copyright-statement']//*[local-name()='title']">
@@ -2136,12 +2120,27 @@
<xsl:call-template name="paragraph">
<xsl:with-param name="margin" select="$margin"/>
</xsl:call-template>
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
- <!-- <xsl:call-template name="add-zero-spaces"/> -->
- <xsl:call-template name="add-zero-spaces-java"/>
+ <xsl:choose>
+ <xsl:when test="parent::*[local-name() = 'keep-together_within-line']">
+ <xsl:value-of select="."/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="addZeroWidthSpacesToTextNodes"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template><xsl:template name="addZeroWidthSpacesToTextNodes">
+ <xsl:variable name="text"><text><xsl:call-template name="text"/></text></xsl:variable>
+ <!-- <xsl:copy-of select="$text"/> -->
+ <xsl:for-each select="xalan:nodeset($text)/text/node()">
+ <xsl:choose>
+ <xsl:when test="self::text()"><xsl:call-template name="add-zero-spaces-java"/></xsl:when>
+ <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise> <!-- copy 'as-is' for <fo:inline keep-together.within-line="always" ... -->
+ </xsl:choose>
+ </xsl:for-each>
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
<xsl:variable name="table-preamble">
@@ -2261,20 +2260,13 @@
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
<fo:table-column column-width="{@width}"/>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
- <xsl:choose>
- <xsl:when test=". = 1 or . = 0">
- <fo:table-column column-width="proportional-column-width(2)"/>
- </xsl:when>
- <xsl:otherwise>
- <fo:table-column column-width="proportional-column-width({.})"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
+ <xsl:call-template name="insertTableColumnWidth">
+ <xsl:with-param name="colwidths" select="$colwidths"/>
+ </xsl:call-template>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
@@ -2434,10 +2426,11 @@
<xsl:variable name="string_with_added_zerospaces">
<xsl:call-template name="add-zero-spaces-java">
<xsl:with-param name="text" select="$td_text"/>
</xsl:call-template>
</xsl:variable>
+ <!-- <xsl:message>string_with_added_zerospaces=<xsl:value-of select="$string_with_added_zerospaces"/></xsl:message> -->
<xsl:call-template name="tokenize">
<!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
<!-- 2009 thinspace -->
<!-- <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/> -->
<xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
@@ -2446,10 +2439,11 @@
<xsl:variable name="max_length">
<xsl:call-template name="max_length">
<xsl:with-param name="words" select="xalan:nodeset($words)"/>
</xsl:call-template>
</xsl:variable>
+ <!-- <xsl:message>max_length=<xsl:value-of select="$max_length"/></xsl:message> -->
<width>
<xsl:variable name="divider">
<xsl:choose>
<xsl:when test="td[$curr-col]/@divide">
<xsl:value-of select="td[$curr-col]/@divide"/>
@@ -2478,10 +2472,14 @@
<xsl:with-param name="cols-count" select="$cols-count"/>
<xsl:with-param name="curr-col" select="$curr-col +1"/>
<xsl:with-param name="table" select="$table"/>
</xsl:call-template>
</xsl:if>
+ </xsl:template><xsl:template match="*[@keep-together.within-line]/text()" priority="2" mode="td_text">
+ <!-- <xsl:message>DEBUG t1=<xsl:value-of select="."/></xsl:message>
+ <xsl:message>DEBUG t2=<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'.','X')"/></xsl:message> -->
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'.','X')"/>
</xsl:template><xsl:template match="text()" mode="td_text">
<xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
</xsl:template><xsl:template match="*[local-name()='termsource']" mode="td_text">
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
@@ -2579,20 +2577,13 @@
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
<fo:table-column column-width="{@width}"/>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
- <xsl:choose>
- <xsl:when test=". = 1 or . = 0">
- <fo:table-column column-width="proportional-column-width(2)"/>
- </xsl:when>
- <xsl:otherwise>
- <fo:table-column column-width="proportional-column-width({.})"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
+ <xsl:call-template name="insertTableColumnWidth">
+ <xsl:with-param name="colwidths" select="$colwidths"/>
+ </xsl:call-template>
</xsl:otherwise>
</xsl:choose>
<fo:table-body>
<fo:table-row>
@@ -3129,12 +3120,14 @@
<xsl:variable name="key_iso">
<!-- and (not(../@class) or ../@class !='pseudocode') -->
</xsl:variable>
+ <xsl:variable name="onlyOneComponent" select="normalize-space($parent = 'formula' and count(*[local-name()='dt']) = 1)"/>
+
<xsl:choose>
- <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
+ <xsl:when test="$onlyOneComponent = 'true'"> <!-- only one component -->
<fo:block margin-bottom="12pt" text-align="left">
<xsl:variable name="title-where">
<xsl:call-template name="getLocalizedString">
@@ -3145,11 +3138,11 @@
<xsl:apply-templates select="*[local-name()='dt']/*"/>
<xsl:text/>
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
</fo:block>
- </xsl:when>
+ </xsl:when> <!-- END: only one component -->
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
<fo:block margin-bottom="12pt" text-align="left">
@@ -3159,12 +3152,12 @@
<xsl:with-param name="key">where</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="$title-where"/>
</fo:block>
- </xsl:when>
- <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
+ </xsl:when> <!-- END: a few components -->
+ <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
@@ -3173,15 +3166,15 @@
<xsl:with-param name="key">key</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="$title-key"/>
</fo:block>
- </xsl:when>
+ </xsl:when> <!-- END: definition list in a figure -->
</xsl:choose>
<!-- a few components -->
- <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
+ <xsl:if test="$onlyOneComponent = 'false'">
<fo:block>
@@ -3216,46 +3209,59 @@
</xsl:variable>
<tbody>
<xsl:apply-templates mode="dl"/>
</tbody>
</xsl:variable>
- <!-- html-table<xsl:copy-of select="$html-table"/> -->
+ <!-- DEBUG: html-table<xsl:copy-of select="$html-table"/> -->
<xsl:variable name="colwidths">
<xsl:call-template name="calculate-column-widths">
<xsl:with-param name="cols-count" select="2"/>
<xsl:with-param name="table" select="$html-table"/>
</xsl:call-template>
</xsl:variable>
- <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
+ <!-- DEBUG: colwidths=<xsl:copy-of select="$colwidths"/> -->
<xsl:variable name="maxlength_dt">
<xsl:call-template name="getMaxLength_dt"/>
</xsl:variable>
+ <xsl:variable name="isContainsKeepTogetherTag_">
+ false
+ </xsl:variable>
+ <xsl:variable name="isContainsKeepTogetherTag" select="normalize-space($isContainsKeepTogetherTag_)"/>
+ <!-- isContainsExpressReference=<xsl:value-of select="$isContainsExpressReference"/> -->
<xsl:call-template name="setColumnWidth_dl">
<xsl:with-param name="colwidths" select="$colwidths"/>
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
+ <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
</xsl:call-template>
+
<fo:table-body>
<xsl:apply-templates>
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
</xsl:apply-templates>
</fo:table-body>
</fo:table>
</fo:block>
</fo:block>
- </xsl:if>
+ </xsl:if> <!-- END: a few components -->
</fo:block-container>
</fo:block-container>
</xsl:template><xsl:template name="setColumnWidth_dl">
<xsl:param name="colwidths"/>
<xsl:param name="maxlength_dt"/>
+ <xsl:param name="isContainsKeepTogetherTag"/>
<xsl:choose>
<xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
<fo:table-column column-width="50%"/>
<fo:table-column column-width="50%"/>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
+ <xsl:when test="$isContainsKeepTogetherTag">
+ <xsl:call-template name="insertTableColumnWidth">
+ <xsl:with-param name="colwidths" select="$colwidths"/>
+ </xsl:call-template>
+ </xsl:when>
<!-- to set width check most wide chars like `W` -->
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
<fo:table-column column-width="7%"/>
<fo:table-column column-width="93%"/>
</xsl:when>
@@ -3282,24 +3288,29 @@
<xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 0.5">
<fo:table-column column-width="40%"/>
<fo:table-column column-width="60%"/>
</xsl:when>
<xsl:otherwise>
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
- <xsl:choose>
- <xsl:when test=". = 1 or . = 0">
- <fo:table-column column-width="proportional-column-width(2)"/>
- </xsl:when>
- <xsl:otherwise>
- <fo:table-column column-width="proportional-column-width({.})"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
+ <xsl:call-template name="insertTableColumnWidth">
+ <xsl:with-param name="colwidths" select="$colwidths"/>
+ </xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
+ </xsl:template><xsl:template name="insertTableColumnWidth">
+ <xsl:param name="colwidths"/>
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
+ <xsl:choose>
+ <xsl:when test=". = 1 or . = 0">
+ <fo:table-column column-width="proportional-column-width(2)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:table-column column-width="proportional-column-width({.})"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
</xsl:template><xsl:template name="getMaxLength_dt">
<xsl:variable name="lengths">
<xsl:for-each select="*[local-name()='dt']">
<xsl:variable name="maintext_length" select="string-length(normalize-space(.))"/>
<xsl:variable name="attributes">
@@ -3319,32 +3330,43 @@
</xsl:variable>
<!-- <xsl:message>DEBUG:<xsl:value-of select="$maxLength"/></xsl:message> -->
<xsl:value-of select="$maxLength"/>
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
<xsl:param name="key_iso"/>
-
<!-- <tr>
<td>NOTE</td>
<td>
<xsl:apply-templates />
</td>
</tr>
-->
- <fo:table-row>
+ <!-- OLD Variant -->
+ <!-- <fo:table-row>
<fo:table-cell>
<fo:block margin-top="6pt">
<xsl:if test="normalize-space($key_iso) = 'true'">
<xsl:attribute name="margin-top">0</xsl:attribute>
</xsl:if>
- <xsl:apply-templates select="*[local-name() = 'name']"/>
+ <xsl:apply-templates select="*[local-name() = 'name']" />
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]" />
</fo:block>
</fo:table-cell>
+ </fo:table-row> -->
+ <!-- <tr>
+ <td number-columns-spanned="2">NOTE <xsl:apply-templates /> </td>
+ </tr>
+ -->
+ <fo:table-row>
+ <fo:table-cell number-columns-spanned="2">
+ <fo:block>
+ <xsl:call-template name="note"/>
+ </fo:block>
+ </fo:table-cell>
</fo:table-row>
</xsl:template><xsl:template match="*[local-name()='dt']" mode="dl">
<tr>
<td>
<xsl:apply-templates/>
@@ -3445,17 +3467,19 @@
<xsl:if test="$font-size != ''">
<xsl:attribute name="font-size">
<xsl:choose>
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
- <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
+ <xsl:when test="ancestor::*[local-name()='note'] or ancestor::*[local-name()='example']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
</fo:inline>
+ </xsl:template><xsl:template match="*[local-name()='tt']/text()" priority="2">
+ <xsl:call-template name="add_spaces_to_sourcecode"/>
</xsl:template><xsl:template match="*[local-name()='underline']">
<fo:inline text-decoration="underline">
<xsl:apply-templates/>
</fo:inline>
</xsl:template><xsl:template match="*[local-name()='add']" name="tag_add">
@@ -3599,45 +3623,54 @@
</xsl:if>
</xsl:template><xsl:template match="*[local-name() = 'pagebreak']">
<fo:block break-after="page"/>
<fo:block> </fo:block>
<fo:block break-after="page"/>
+ </xsl:template><xsl:template match="*[local-name() = 'span']">
+ <xsl:apply-templates/>
</xsl:template><xsl:template name="tokenize">
<xsl:param name="text"/>
<xsl:param name="separator" select="' '"/>
<xsl:choose>
<xsl:when test="not(contains($text, $separator))">
<word>
- <xsl:variable name="str_no_en_chars" select="normalize-space(translate($text, $en_chars, ''))"/>
- <xsl:variable name="len_str_no_en_chars" select="string-length($str_no_en_chars)"/>
<xsl:variable name="len_str_tmp" select="string-length(normalize-space($text))"/>
- <xsl:variable name="len_str">
- <xsl:choose>
- <xsl:when test="normalize-space(translate($text, $upper, '')) = ''"> <!-- english word in CAPITAL letters -->
- <xsl:value-of select="$len_str_tmp * 1.5"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$len_str_tmp"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <!-- <xsl:if test="$len_str_no_en_chars div $len_str > 0.8">
- <xsl:message>
- div=<xsl:value-of select="$len_str_no_en_chars div $len_str"/>
- len_str=<xsl:value-of select="$len_str"/>
- len_str_no_en_chars=<xsl:value-of select="$len_str_no_en_chars"/>
- </xsl:message>
- </xsl:if> -->
- <!-- <len_str_no_en_chars><xsl:value-of select="$len_str_no_en_chars"/></len_str_no_en_chars>
- <len_str><xsl:value-of select="$len_str"/></len_str> -->
<xsl:choose>
- <xsl:when test="$len_str_no_en_chars div $len_str > 0.8"> <!-- means non-english string -->
- <xsl:value-of select="$len_str - $len_str_no_en_chars"/>
+ <xsl:when test="normalize-space(translate($text, 'X', '')) = ''"> <!-- special case for keep-together.within-line -->
+ <xsl:value-of select="$len_str_tmp"/>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$len_str"/>
+ <xsl:variable name="str_no_en_chars" select="normalize-space(translate($text, $en_chars, ''))"/>
+ <xsl:variable name="len_str_no_en_chars" select="string-length($str_no_en_chars)"/>
+ <xsl:variable name="len_str">
+ <xsl:choose>
+ <xsl:when test="normalize-space(translate($text, $upper, '')) = ''"> <!-- english word in CAPITAL letters -->
+ <xsl:value-of select="$len_str_tmp * 1.5"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$len_str_tmp"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- <xsl:if test="$len_str_no_en_chars div $len_str > 0.8">
+ <xsl:message>
+ div=<xsl:value-of select="$len_str_no_en_chars div $len_str"/>
+ len_str=<xsl:value-of select="$len_str"/>
+ len_str_no_en_chars=<xsl:value-of select="$len_str_no_en_chars"/>
+ </xsl:message>
+ </xsl:if> -->
+ <!-- <len_str_no_en_chars><xsl:value-of select="$len_str_no_en_chars"/></len_str_no_en_chars>
+ <len_str><xsl:value-of select="$len_str"/></len_str> -->
+ <xsl:choose>
+ <xsl:when test="$len_str_no_en_chars div $len_str > 0.8"> <!-- means non-english string -->
+ <xsl:value-of select="$len_str - $len_str_no_en_chars"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$len_str"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
</word>
</xsl:when>
<xsl:otherwise>
@@ -3908,59 +3941,94 @@
</xsl:template><xsl:template match="mathml:math">
<xsl:variable name="isAdded" select="@added"/>
<xsl:variable name="isDeleted" select="@deleted"/>
<fo:inline xsl:use-attribute-sets="mathml-style">
+
+
+
<xsl:call-template name="setTrackChangesStyles">
<xsl:with-param name="isAdded" select="$isAdded"/>
<xsl:with-param name="isDeleted" select="$isDeleted"/>
</xsl:call-template>
+ <xsl:if test="$add_math_as_text = 'true'">
+ <!-- insert helper tag -->
+ <!-- set unique font-size (fiction) -->
+ <xsl:variable name="font-size_sfx"><xsl:number level="any"/></xsl:variable>
+ <fo:inline color="white" font-size="1.{$font-size_sfx}pt" font-style="normal" font-weight="normal"><xsl:value-of select="$zero_width_space"/></fo:inline> <!-- zero width space -->
+ </xsl:if>
-
- <xsl:variable name="mathml">
- <xsl:apply-templates select="." mode="mathml"/>
+ <xsl:variable name="mathml_content">
+ <xsl:apply-templates select="." mode="mathml_actual_text"/>
</xsl:variable>
- <fo:instream-foreign-object fox:alt-text="Math">
+
+ <xsl:call-template name="mathml_instream_object">
+ <xsl:with-param name="mathml_content" select="$mathml_content"/>
+ </xsl:call-template>
-
- <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="xalan:nodeset($mathml)"/>
- </fo:instream-foreign-object>
+
</fo:inline>
+ </xsl:template><xsl:template name="getMathml_comment_text">
+ <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_2" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
+ <xsl:variable name="comment_text" select="java:trim(java:java.lang.String.new($comment_text_2))"/>
+ <xsl:value-of select="$comment_text"/>
+ </xsl:template><xsl:template name="mathml_instream_object">
+ <xsl:param name="comment_text"/>
+ <xsl:param name="mathml_content"/>
+
+ <xsl:variable name="comment_text_">
+ <xsl:choose>
+ <xsl:when test="normalize-space($comment_text) != ''"><xsl:value-of select="$comment_text"/></xsl:when>
+ <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="mathml">
+ <xsl:apply-templates select="." mode="mathml"/>
+ </xsl:variable>
+
+ <fo:instream-foreign-object fox:alt-text="Math">
+
+
+
+
+
+
+
+ <!-- put MathML in Actual Text -->
+ <!-- DEBUG: mathml_content=<xsl:value-of select="$mathml_content"/> -->
+ <xsl:attribute name="fox:actual-text">
+ <xsl:value-of select="$mathml_content"/>
+ </xsl:attribute>
+
+ <!-- <xsl:if test="$add_math_as_text = 'true'"> -->
+ <xsl:if test="normalize-space($comment_text_) != ''">
+ <!-- put Mathin Alternate Text -->
+ <xsl:attribute name="fox:alt-text">
+ <xsl:value-of select="$comment_text_"/>
+ </xsl:attribute>
+ </xsl:if>
+ <!-- </xsl:if> -->
+
+ <xsl:copy-of select="xalan:nodeset($mathml)"/>
+
+ </fo:instream-foreign-object>
</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'">
@@ -3987,11 +4055,13 @@
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
<xsl:copy>
<!-- replace start and end spaces to non-break space -->
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
</xsl:copy>
- </xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
+ </xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="mathml:mtd/mathml:mo/text()[. = '/']" mode="mathml">
+ <xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
+ </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
<xsl:variable name="target">
<xsl:choose>
<xsl:when test="@updatetype = 'true'">
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
</xsl:when>
@@ -4584,22 +4654,37 @@
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:template><xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
<xsl:copy>
<xsl:apply-templates select="@*" mode="svg_update"/>
- <xsl:variable name="viewbox">
+ <xsl:variable name="viewbox_">
<xsl:call-template name="split">
<xsl:with-param name="pText" select="@viewBox"/>
<xsl:with-param name="sep" select="' '"/>
</xsl:call-template>
</xsl:variable>
+ <xsl:variable name="viewbox" select="xalan:nodeset($viewbox_)"/>
+ <xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
+ <xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
+
<xsl:attribute name="width">
- <xsl:value-of select="round(xalan:nodeset($viewbox)//item[3])"/>
+ <xsl:choose>
+ <xsl:when test="$width != ''">
+ <xsl:value-of select="round($width)"/>
+ </xsl:when>
+ <xsl:otherwise>400</xsl:otherwise> <!-- default width -->
+ </xsl:choose>
</xsl:attribute>
<xsl:attribute name="height">
- <xsl:value-of select="round(xalan:nodeset($viewbox)//item[4])"/>
+ <xsl:choose>
+ <xsl:when test="$height != ''">
+ <xsl:value-of select="round($height)"/>
+ </xsl:when>
+ <xsl:otherwise>400</xsl:otherwise> <!-- default height -->
+ </xsl:choose>
</xsl:attribute>
+
<xsl:apply-templates mode="svg_update"/>
</xsl:copy>
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
<xsl:for-each select="*[local-name() = 'svg']">
@@ -4790,12 +4875,16 @@
</xsl:if>
</xsl:template><xsl:template match="node()" mode="bookmarks">
<xsl:apply-templates mode="bookmarks"/>
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
<xsl:apply-templates select="."/>
- </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/><xsl:template match="*[local-name() = 'span']" mode="contents">
+ <xsl:apply-templates mode="contents"/>
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
<xsl:apply-templates mode="bookmarks"/>
+ </xsl:template><xsl:template match="*[local-name() = 'span']" mode="bookmarks">
+ <xsl:apply-templates mode="bookmarks"/>
</xsl:template><xsl:template name="addBookmarks">
<xsl:param name="contents"/>
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
<xsl:if test="$contents_nodes//item">
<fo:bookmark-tree>
@@ -5072,11 +5161,13 @@
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
- </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
+ </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'xref']" mode="contents">
+ <xsl:value-of select="."/>
+ </xsl:template><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
<xsl:text> </xsl:text>
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
<xsl:copy>
<xsl:apply-templates mode="contents_item"/>
</xsl:copy>
@@ -5103,13 +5194,26 @@
</xsl:copy>
</xsl:if>
</xsl:when>
<xsl:otherwise><xsl:apply-templates mode="contents_item"/></xsl:otherwise>
</xsl:choose>
+ </xsl:template><xsl:template match="text()" mode="contents_item">
+ <xsl:call-template name="keep_together_standard_number"/>
+ </xsl:template><xsl:template match="*[local-name() = 'span']" mode="contents_item">
+ <xsl:apply-templates mode="contents_item"/>
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
+
+ <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="ancestor::*[local-name() = 'example']">
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
+ </xsl:if>
+
<xsl:copy-of select="@id"/>
<xsl:if test="parent::*[local-name() = 'note']">
<xsl:attribute name="margin-left">
<xsl:choose>
@@ -5583,43 +5687,71 @@
<xsl:otherwise>
<fo:inline><xsl:apply-templates/></fo:inline>
</xsl:otherwise>
</xsl:choose>
</xsl:template><xsl:template match="*[local-name() = 'example']">
- <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
+
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style">
+
-
+
<xsl:variable name="fo_element">
- <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
inline
</xsl:variable>
- <!-- display 'EXAMPLE' -->
- <xsl:apply-templates select="*[local-name()='name']">
- <xsl:with-param name="fo_element" select="$fo_element"/>
- </xsl:apply-templates>
+ <fo:block-container margin-left="0mm">
- <xsl:choose>
- <xsl:when test="contains(normalize-space($fo_element), 'block')">
- <fo:block-container xsl:use-attribute-sets="example-body-style">
- <fo:block-container margin-left="0mm" margin-right="0mm">
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
+ <xsl:choose>
+
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
+
+ <!-- display name 'EXAMPLE' in a separate block -->
+ <fo:block>
+ <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">
+ <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>
- </fo:block-container>
- </xsl:when>
- <xsl:otherwise>
- <fo:inline>
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
- <xsl:with-param name="fo_element" select="$fo_element"/>
- </xsl:apply-templates>
- </fo:inline>
- </xsl:otherwise>
- </xsl:choose>
-
- </fo:block>
+ </xsl:when> <!-- end block -->
+
+ <xsl:otherwise> <!-- inline -->
+
+ <!-- display 'EXAMPLE' and first element in the same line -->
+ <fo:block>
+ <xsl:apply-templates select="*[local-name()='name']">
+ <xsl:with-param name="fo_element" select="$fo_element"/>
+ </xsl:apply-templates>
+ <fo:inline>
+ <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
+ <xsl:with-param name="fo_element" select="$fo_element"/>
+ </xsl:apply-templates>
+ </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">
+ <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>
+ </xsl:if>
+ </xsl:otherwise> <!-- end inline -->
+
+ </xsl:choose>
+ </fo:block-container>
+ </fo:block-container>
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
<xsl:param name="fo_element">block</xsl:param>
<xsl:choose>
<xsl:when test="ancestor::*[local-name() = 'appendix']">
@@ -5647,14 +5779,20 @@
<xsl:value-of select="$fo_element"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="starts-with(normalize-space($element), 'block')">
- <fo:block xsl:use-attribute-sets="example-p-style">
-
- <xsl:apply-templates/>
- </fo:block>
+ <fo:block-container>
+ <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">
+
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:block-container>
</xsl:when>
<xsl:otherwise>
<fo:inline xsl:use-attribute-sets="example-p-style">
<xsl:apply-templates/>
</fo:inline>
@@ -5831,11 +5969,20 @@
</fo:basic-link>
</fo:inline>
</xsl:when>
<xsl:otherwise> <!-- if there is key('bibitems_hidden', $current_bibitemid) -->
- <fo:inline><xsl:apply-templates/></fo:inline>
+
+ <!-- if in bibitem[@hidden='true'] there is url[@type='src'], then create hyperlink -->
+ <xsl:variable name="uri_src" select="normalize-space($bibitems_hidden/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'src'])"/>
+ <xsl:choose>
+ <xsl:when test="$uri_src != ''">
+ <fo:basic-link external-destination="{$uri_src}" fox:alt-text="{$uri_src}"><xsl:apply-templates/></fo:basic-link>
+ </xsl:when>
+ <xsl:otherwise><fo:inline><xsl:apply-templates/></fo:inline></xsl:otherwise>
+ </xsl:choose>
+
</xsl:otherwise>
</xsl:choose>
</xsl:template><xsl:template match="*[local-name() = 'tab']">
<!-- zero-space char -->
<xsl:variable name="depth">
@@ -6012,14 +6159,28 @@
<fo:block break-after="page"/>
<fo:block id="{@id}">
</fo:block>
<xsl:apply-templates/>
- </xsl:template><xsl:template match="*[local-name() = 'review']">
+ </xsl:template><xsl:template match="*[local-name() = 'review']"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
<!-- comment 2019-11-29 -->
<!-- <fo:block font-weight="bold">Review:</fo:block>
<xsl:apply-templates /> -->
+
+ <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
+
+ <xsl:choose>
+ <!-- if there isn't the attribute '@from', then -->
+ <xsl:when test="$id_from = ''">
+ <fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
+ </xsl:when>
+ <!-- if there isn't element with id 'from', then create 'bookmark' here -->
+ <xsl:when test="not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
+ <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
+ </xsl:when>
+ </xsl:choose>
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
<!-- 0xA0 to space replacement -->
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
</xsl:template><xsl:variable name="ul_labels_">
@@ -6376,11 +6537,14 @@
</fo:block>
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']/text()">
<!-- to split by '_' and other chars -->
<xsl:call-template name="add-zero-spaces-java"/>
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
- <fo:inline id="{@id}" font-size="1pt"/>
+ <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
+ <fo:inline id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:inline>
+ <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
+ <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"> </xsl:if>
</xsl:template><xsl:template match="*[local-name() = 'errata']">
<!-- <row>
<date>05-07-2013</date>
<type>Editorial</type>
<change>Changed CA-9 Priority Code from P1 to P2 in <xref target="tabled2"/>.</change>
@@ -6923,9 +7087,123 @@
<xsl:for-each select="*[not(@normative='true') and not(*[@normative='true'])]">
<xsl:sort select="@displayorder" data-type="number"/>
<xsl:apply-templates select="." mode="update_xml_step1"/>
</xsl:for-each>
</xsl:copy>
+ </xsl:template><xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
+ <xsl:apply-templates mode="update_xml_step1"/>
+ </xsl:template><xsl:template match="@*|node()" mode="update_xml_enclose_keep-together_within-line">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()" mode="update_xml_enclose_keep-together_within-line"/>
+ </xsl:copy>
+ </xsl:template><xsl:variable name="express_reference_separators">_.\</xsl:variable><xsl:variable name="express_reference_characters" select="concat($upper,$lower,'1234567890',$express_reference_separators)"/><xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable><xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'])]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
+
+ <!-- enclose standard's number into tag 'keep-together_within-line' -->
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
+ <xsl:variable name="tag_keep-together_within-line_open">###<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
+ <xsl:variable name="tag_keep-together_within-line_close">###/<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
+ <xsl:variable name="text_" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
+ <xsl:variable name="text"><text><xsl:call-template name="replace_text_tags">
+ <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
+ <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
+ <xsl:with-param name="text" select="$text_"/>
+ </xsl:call-template></text></xsl:variable>
+
+ <xsl:variable name="parent" select="local-name(..)"/>
+
+ <xsl:variable name="text2">
+ <text><xsl:for-each select="xalan:nodeset($text)/text/node()">
+ <xsl:copy-of select="."/>
+ </xsl:for-each></text>
+ </xsl:variable>
+
+ <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
+ <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable>
+ <xsl:variable name="text3">
+ <text><xsl:for-each select="xalan:nodeset($text2)/text/node()">
+ <xsl:choose>
+ <xsl:when test="self::text()">
+ <xsl:variable name="text_units_" select="java:replaceAll(java:java.lang.String.new(.),$regex_solidus_units,concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
+ <xsl:variable name="text_units"><text><xsl:call-template name="replace_text_tags">
+ <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
+ <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
+ <xsl:with-param name="text" select="$text_units_"/>
+ </xsl:call-template></text></xsl:variable>
+ <xsl:copy-of select="xalan:nodeset($text_units)/text/node()"/>
+ </xsl:when>
+ <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise> <!-- copy 'as-is' for <fo:inline keep-together.within-line="always" ... -->
+ </xsl:choose>
+ </xsl:for-each></text>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="ancestor::*[local-name() = 'td' or local-name() = 'th']">
+ <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
+ <xsl:variable name="regex_dots_units">((\b((\S{1,3}\.\S+)|(\S+\.\S{1,3}))\b)|(\.\S{1,3})\b)</xsl:variable>
+ <xsl:for-each select="xalan:nodeset($text3)/text/node()">
+ <xsl:choose>
+ <xsl:when test="self::text()">
+ <xsl:variable name="text_dots_" select="java:replaceAll(java:java.lang.String.new(.),$regex_dots_units,concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
+ <xsl:variable name="text_dots"><text><xsl:call-template name="replace_text_tags">
+ <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
+ <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
+ <xsl:with-param name="text" select="$text_dots_"/>
+ </xsl:call-template></text></xsl:variable>
+ <xsl:copy-of select="xalan:nodeset($text_dots)/text/node()"/>
+ </xsl:when>
+ <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise> <!-- copy 'as-is' for <fo:inline keep-together.within-line="always" ... -->
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise><xsl:copy-of select="xalan:nodeset($text3)/text/node()"/></xsl:otherwise>
+ </xsl:choose>
+
+ </xsl:template><xsl:template name="replace_text_tags">
+ <xsl:param name="tag_open"/>
+ <xsl:param name="tag_close"/>
+ <xsl:param name="text"/>
+ <xsl:choose>
+ <xsl:when test="contains($text, $tag_open)">
+ <xsl:value-of select="substring-before($text, $tag_open)"/>
+ <xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
+
+ <xsl:element name="{substring-before(substring-after($tag_open, '###'),'###')}">
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
+ </xsl:element>
+
+ <xsl:call-template name="replace_text_tags">
+ <xsl:with-param name="tag_open" select="$tag_open"/>
+ <xsl:with-param name="tag_close" select="$tag_close"/>
+ <xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:template><xsl:template name="printEdition">
+ <xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
+ <xsl:text> </xsl:text>
+ <xsl:choose>
+ <xsl:when test="$edition_i18n != ''">
+ <!-- Example: <edition language="fr">deuxième édition</edition> -->
+ <xsl:call-template name="capitalize">
+ <xsl:with-param name="str" select="$edition_i18n"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="edition" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'])"/>
+ <xsl:if test="$edition != ''"> <!-- Example: 1.3 -->
+ <xsl:call-template name="capitalize">
+ <xsl:with-param name="str">
+ <xsl:call-template name="getLocalizedString">
+ <xsl:with-param name="key">edition</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$edition"/>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
</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)"/>
\ No newline at end of file