metanorma-jis 0.5.2 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/jis/base_convert.rb +2 -1
- data/lib/isodoc/jis/html/style-human.css +7 -0
- data/lib/isodoc/jis/html/style-iso.css +7 -0
- data/lib/isodoc/jis/html_convert.rb +0 -14
- data/lib/isodoc/jis/jis.international-standard.xsl +312 -77
- data/lib/isodoc/jis/presentation_list.rb +72 -0
- data/lib/isodoc/jis/presentation_xml_convert.rb +1 -53
- data/lib/isodoc/jis/table.rb +0 -12
- data/lib/isodoc/jis/word_convert.rb +0 -20
- data/lib/isodoc/jis/xref.rb +24 -71
- data/lib/metanorma/jis/basicdoc.rng +48 -35
- data/lib/metanorma/jis/biblio-standoc.rng +37 -7
- data/lib/metanorma/jis/biblio.rng +30 -18
- data/lib/metanorma/jis/isodoc.rng +126 -80
- data/lib/metanorma/jis/isostandard.rng +6 -149
- data/lib/metanorma/jis/jis.rng +0 -37
- data/lib/metanorma/jis/relaton-jis.rng +8 -16
- data/lib/metanorma/jis/reqt.rng +7 -6
- data/lib/metanorma/jis/validate.rb +2 -4
- data/lib/metanorma/jis/version.rb +1 -1
- metadata +3 -2
@@ -6267,6 +6267,7 @@
|
|
6267
6267
|
</xsl:template> <!-- refine_table-style -->
|
6268
6268
|
|
6269
6269
|
<xsl:attribute-set name="table-name-style">
|
6270
|
+
<xsl:attribute name="role">Caption</xsl:attribute>
|
6270
6271
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
6271
6272
|
|
6272
6273
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -6276,6 +6277,9 @@
|
|
6276
6277
|
|
6277
6278
|
<xsl:template name="refine_table-name-style">
|
6278
6279
|
<xsl:param name="continued"/>
|
6280
|
+
<xsl:if test="$continued = 'true'">
|
6281
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
6282
|
+
</xsl:if>
|
6279
6283
|
|
6280
6284
|
<xsl:if test="not($vertical_layout = 'true')">
|
6281
6285
|
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
@@ -8147,7 +8151,7 @@
|
|
8147
8151
|
</xsl:if>
|
8148
8152
|
|
8149
8153
|
</fo:block-container>
|
8150
|
-
</xsl:variable>
|
8154
|
+
</xsl:variable> <!-- END: variable name="table" -->
|
8151
8155
|
|
8152
8156
|
<xsl:variable name="isAdded" select="@added"/>
|
8153
8157
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -8157,14 +8161,14 @@
|
|
8157
8161
|
|
8158
8162
|
<!-- centered table when table name is centered (see table-name-style) -->
|
8159
8163
|
|
8160
|
-
<fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style">
|
8164
|
+
<fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style" role="SKIP">
|
8161
8165
|
|
8162
8166
|
<fo:table-column column-width="proportional-column-width(1)"/>
|
8163
8167
|
<fo:table-column column-width="{@width}"/>
|
8164
8168
|
<fo:table-column column-width="proportional-column-width(1)"/>
|
8165
|
-
<fo:table-body>
|
8166
|
-
<fo:table-row>
|
8167
|
-
<fo:table-cell column-number="2">
|
8169
|
+
<fo:table-body role="SKIP">
|
8170
|
+
<fo:table-row role="SKIP">
|
8171
|
+
<fo:table-cell column-number="2" role="SKIP">
|
8168
8172
|
<xsl:copy-of select="$table-preamble"/>
|
8169
8173
|
<fo:block role="SKIP">
|
8170
8174
|
<xsl:call-template name="setTrackChangesStyles">
|
@@ -8205,11 +8209,12 @@
|
|
8205
8209
|
|
8206
8210
|
</xsl:template>
|
8207
8211
|
|
8212
|
+
<!-- table/name-->
|
8208
8213
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
8209
8214
|
<xsl:param name="continued"/>
|
8210
8215
|
<xsl:if test="normalize-space() != ''">
|
8211
8216
|
|
8212
|
-
<fo:block xsl:use-attribute-sets="table-name-style"
|
8217
|
+
<fo:block xsl:use-attribute-sets="table-name-style">
|
8213
8218
|
|
8214
8219
|
<xsl:call-template name="refine_table-name-style">
|
8215
8220
|
<xsl:with-param name="continued" select="$continued"/>
|
@@ -8686,7 +8691,7 @@
|
|
8686
8691
|
|
8687
8692
|
<xsl:variable name="tableWithNotesAndFootnotes">
|
8688
8693
|
|
8689
|
-
<fo:table keep-with-previous="always">
|
8694
|
+
<fo:table keep-with-previous="always" role="SKIP">
|
8690
8695
|
<xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
|
8691
8696
|
<xsl:variable name="name" select="local-name()"/>
|
8692
8697
|
<xsl:choose>
|
@@ -8717,9 +8722,9 @@
|
|
8717
8722
|
</xsl:otherwise>
|
8718
8723
|
</xsl:choose>
|
8719
8724
|
|
8720
|
-
<fo:table-body>
|
8721
|
-
<fo:table-row>
|
8722
|
-
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
8725
|
+
<fo:table-body role="SKIP">
|
8726
|
+
<fo:table-row role="SKIP">
|
8727
|
+
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
|
8723
8728
|
|
8724
8729
|
<xsl:call-template name="refine_table-footer-cell-style"/>
|
8725
8730
|
|
@@ -8919,6 +8924,8 @@
|
|
8919
8924
|
|
8920
8925
|
<xsl:template name="setTableRowAttributes">
|
8921
8926
|
|
8927
|
+
<xsl:call-template name="setColors"/>
|
8928
|
+
|
8922
8929
|
</xsl:template> <!-- setTableRowAttributes -->
|
8923
8930
|
<!-- ===================== -->
|
8924
8931
|
<!-- END Table's row processing -->
|
@@ -8970,6 +8977,7 @@
|
|
8970
8977
|
</xsl:attribute>
|
8971
8978
|
</xsl:if>
|
8972
8979
|
<xsl:call-template name="display-align"/>
|
8980
|
+
<xsl:call-template name="setColors"/>
|
8973
8981
|
</xsl:template>
|
8974
8982
|
|
8975
8983
|
<xsl:template name="display-align">
|
@@ -8985,6 +8993,29 @@
|
|
8985
8993
|
</xsl:if>
|
8986
8994
|
</xsl:template>
|
8987
8995
|
|
8996
|
+
<xsl:template name="setColors">
|
8997
|
+
<xsl:variable name="styles__">
|
8998
|
+
<xsl:call-template name="split">
|
8999
|
+
<xsl:with-param name="pText" select="concat(@style,';')"/>
|
9000
|
+
<xsl:with-param name="sep" select="';'"/>
|
9001
|
+
</xsl:call-template>
|
9002
|
+
</xsl:variable>
|
9003
|
+
<xsl:variable name="quot">"</xsl:variable>
|
9004
|
+
<xsl:variable name="styles_">
|
9005
|
+
<xsl:for-each select="xalan:nodeset($styles__)/item">
|
9006
|
+
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
|
9007
|
+
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
|
9008
|
+
<xsl:if test="$key = 'color' or $key = 'background-color'">
|
9009
|
+
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
9010
|
+
</xsl:if>
|
9011
|
+
</xsl:for-each>
|
9012
|
+
</xsl:variable>
|
9013
|
+
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
9014
|
+
<xsl:for-each select="$styles/style">
|
9015
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
9016
|
+
</xsl:for-each>
|
9017
|
+
</xsl:template>
|
9018
|
+
|
8988
9019
|
<!-- cell in table body, footer -->
|
8989
9020
|
<xsl:template match="*[local-name()='td']" name="td">
|
8990
9021
|
<fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
|
@@ -8996,12 +9027,12 @@
|
|
8996
9027
|
|
8997
9028
|
<xsl:call-template name="refine_table-cell-style"/>
|
8998
9029
|
|
9030
|
+
<xsl:call-template name="setTableCellAttributes"/>
|
9031
|
+
|
8999
9032
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
9000
9033
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
9001
9034
|
</xsl:if>
|
9002
9035
|
|
9003
|
-
<xsl:call-template name="setTableCellAttributes"/>
|
9004
|
-
|
9005
9036
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
9006
9037
|
<xsl:attribute name="border">1pt solid black</xsl:attribute> <!-- border is mandatory, to determine page width -->
|
9007
9038
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
@@ -9088,6 +9119,7 @@
|
|
9088
9119
|
<!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
|
9089
9120
|
<!-- fn in text -->
|
9090
9121
|
<xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))]" priority="2" name="fn">
|
9122
|
+
<xsl:param name="footnote_body_from_table">false</xsl:param>
|
9091
9123
|
|
9092
9124
|
<!-- list of unique footnotes -->
|
9093
9125
|
<xsl:variable name="p_fn_">
|
@@ -9186,7 +9218,7 @@
|
|
9186
9218
|
<xsl:copy-of select="$footnote_inline"/>
|
9187
9219
|
</xsl:when>
|
9188
9220
|
<!-- <xsl:when test="$footnotes//*[local-name() = 'fmt-fn-body'][@id = $ref_id] or normalize-space(@skip_footnote_body) = 'false'"> -->
|
9189
|
-
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
9221
|
+
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
|
9190
9222
|
|
9191
9223
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
9192
9224
|
<xsl:copy-of select="$footnote_inline"/>
|
@@ -9665,39 +9697,51 @@
|
|
9665
9697
|
<!-- fn reference in the table rendering (for instance, 'some text 1) some text' ) -->
|
9666
9698
|
<!-- fn --> <!-- in table --> <!-- for figure see <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/> -->
|
9667
9699
|
<xsl:template match="*[local-name()='fn']">
|
9668
|
-
<
|
9669
|
-
|
9670
|
-
|
9700
|
+
<xsl:variable name="target" select="@target"/>
|
9701
|
+
<xsl:choose>
|
9702
|
+
<!-- case for footnotes in Requirement tables (https://github.com/metanorma/metanorma-ogc/issues/791) -->
|
9703
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'][1]/*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body'][@id = $target]) and $footnotes/*[local-name() = 'fmt-fn-body'][@id = $target]">
|
9704
|
+
<xsl:call-template name="fn">
|
9705
|
+
<xsl:with-param name="footnote_body_from_table">true</xsl:with-param>
|
9706
|
+
</xsl:call-template>
|
9707
|
+
</xsl:when>
|
9708
|
+
<xsl:otherwise>
|
9671
9709
|
|
9672
|
-
|
9673
|
-
<fo:basic-link internal-destination="{@target}" fox:alt-text="footnote {@reference}">
|
9674
|
-
<!-- <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> --> <!-- for footnotes in tables -->
|
9675
|
-
<!-- <xsl:attribute name="internal-destination">
|
9676
|
-
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
9677
|
-
</xsl:attribute>
|
9678
|
-
</xsl:if>
|
9679
|
-
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
9680
|
-
<xsl:attribute name="internal-destination">
|
9681
|
-
<xsl:value-of select="@reference"/><xsl:text>_</xsl:text>
|
9682
|
-
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
9683
|
-
</xsl:attribute>
|
9684
|
-
</xsl:if> -->
|
9685
|
-
<!-- <xsl:if test="$namespace = 'plateau'">
|
9686
|
-
<xsl:text>※</xsl:text>
|
9687
|
-
</xsl:if> -->
|
9688
|
-
<!-- <xsl:value-of select="@reference"/> -->
|
9710
|
+
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
9689
9711
|
|
9690
|
-
|
9712
|
+
<xsl:call-template name="refine_fn-reference-style"/>
|
9691
9713
|
|
9692
|
-
|
9693
|
-
<
|
9694
|
-
|
9695
|
-
|
9696
|
-
|
9697
|
-
|
9698
|
-
|
9699
|
-
|
9700
|
-
|
9714
|
+
<!-- <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> --> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
9715
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="footnote {@reference}">
|
9716
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> --> <!-- for footnotes in tables -->
|
9717
|
+
<!-- <xsl:attribute name="internal-destination">
|
9718
|
+
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
9719
|
+
</xsl:attribute>
|
9720
|
+
</xsl:if>
|
9721
|
+
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
9722
|
+
<xsl:attribute name="internal-destination">
|
9723
|
+
<xsl:value-of select="@reference"/><xsl:text>_</xsl:text>
|
9724
|
+
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
9725
|
+
</xsl:attribute>
|
9726
|
+
</xsl:if> -->
|
9727
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
9728
|
+
<xsl:text>※</xsl:text>
|
9729
|
+
</xsl:if> -->
|
9730
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
9731
|
+
|
9732
|
+
<xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
|
9733
|
+
|
9734
|
+
<!-- <xsl:if test="$namespace = 'bsi'">
|
9735
|
+
<xsl:text>)</xsl:text>
|
9736
|
+
</xsl:if> -->
|
9737
|
+
<!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
|
9738
|
+
<!-- <xsl:if test="$namespace = 'jis'">
|
9739
|
+
<fo:inline font-weight="normal">)</fo:inline>
|
9740
|
+
</xsl:if> -->
|
9741
|
+
</fo:basic-link>
|
9742
|
+
</fo:inline>
|
9743
|
+
</xsl:otherwise>
|
9744
|
+
</xsl:choose>
|
9701
9745
|
</xsl:template> <!-- fn -->
|
9702
9746
|
|
9703
9747
|
<!-- fn/text() -->
|
@@ -10914,7 +10958,7 @@
|
|
10914
10958
|
<xsl:choose>
|
10915
10959
|
<xsl:when test="ancestor::*[local-name() = 'table']"><xsl:apply-templates/></xsl:when>
|
10916
10960
|
<xsl:when test="following-sibling::*[2][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']">
|
10917
|
-
<fo:inline keep-with-next.within-line="always"><xsl:apply-templates/></fo:inline>
|
10961
|
+
<fo:inline keep-with-next.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
|
10918
10962
|
</xsl:when>
|
10919
10963
|
<xsl:otherwise>
|
10920
10964
|
<xsl:apply-templates/>
|
@@ -10922,7 +10966,7 @@
|
|
10922
10966
|
</xsl:choose>
|
10923
10967
|
</xsl:template>
|
10924
10968
|
<xsl:template match="text()[not(ancestor::*[local-name() = 'table']) and preceding-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear'] and following-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']]" priority="2">
|
10925
|
-
<fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
|
10969
|
+
<fo:inline keep-with-next.within-line="always" role="SKIP"><xsl:value-of select="."/></fo:inline>
|
10926
10970
|
</xsl:template>
|
10927
10971
|
|
10928
10972
|
<xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
|
@@ -11962,24 +12006,26 @@
|
|
11962
12006
|
<xsl:apply-templates select="." mode="mathml"/>
|
11963
12007
|
</xsl:variable>
|
11964
12008
|
|
11965
|
-
<fo:instream-foreign-object fox:alt-text="Math">
|
12009
|
+
<fo:instream-foreign-object fox:alt-text="Math" fox:actual-text="Math">
|
11966
12010
|
|
11967
12011
|
<xsl:call-template name="refine_mathml_insteam_object_style"/>
|
11968
12012
|
|
11969
|
-
|
11970
|
-
|
11971
|
-
|
11972
|
-
<xsl:
|
11973
|
-
|
11974
|
-
|
11975
|
-
<!-- <xsl:if test="$add_math_as_text = 'true'"> -->
|
11976
|
-
<xsl:if test="normalize-space($asciimath_text_) != ''">
|
11977
|
-
<!-- put Mathin Alternate Text -->
|
11978
|
-
<xsl:attribute name="fox:alt-text">
|
11979
|
-
<xsl:value-of select="$asciimath_text_"/>
|
12013
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
12014
|
+
<!-- put MathML in Actual Text -->
|
12015
|
+
<!-- DEBUG: mathml_content=<xsl:value-of select="$mathml_content"/> -->
|
12016
|
+
<xsl:attribute name="fox:actual-text">
|
12017
|
+
<xsl:value-of select="$mathml_content"/>
|
11980
12018
|
</xsl:attribute>
|
12019
|
+
|
12020
|
+
<!-- <xsl:if test="$add_math_as_text = 'true'"> -->
|
12021
|
+
<xsl:if test="normalize-space($asciimath_text_) != ''">
|
12022
|
+
<!-- put Mathin Alternate Text -->
|
12023
|
+
<xsl:attribute name="fox:alt-text">
|
12024
|
+
<xsl:value-of select="$asciimath_text_"/>
|
12025
|
+
</xsl:attribute>
|
12026
|
+
</xsl:if>
|
12027
|
+
<!-- </xsl:if> -->
|
11981
12028
|
</xsl:if>
|
11982
|
-
<!-- </xsl:if> -->
|
11983
12029
|
|
11984
12030
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
11985
12031
|
|
@@ -13734,6 +13780,13 @@
|
|
13734
13780
|
<xsl:apply-templates select="."/>
|
13735
13781
|
</xsl:template>
|
13736
13782
|
|
13783
|
+
<!-- prevent missing stem for table and figures in ToC -->
|
13784
|
+
<xsl:template match="*[local-name() = 'name' or local-name() = 'fmt-name']//*[local-name() = 'stem']" mode="contents">
|
13785
|
+
<xsl:if test="not(following-sibling::*[1][local-name() = 'fmt-stem'])">
|
13786
|
+
<xsl:apply-templates select="."/>
|
13787
|
+
</xsl:if>
|
13788
|
+
</xsl:template>
|
13789
|
+
|
13737
13790
|
<xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/>
|
13738
13791
|
|
13739
13792
|
<xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/>
|
@@ -13754,6 +13807,8 @@
|
|
13754
13807
|
<xsl:template match="*[local-name() = 'origin']" mode="contents"/>
|
13755
13808
|
<xsl:template match="*[local-name() = 'erefstack ']" mode="contents"/>
|
13756
13809
|
|
13810
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="contents" priority="3"/>
|
13811
|
+
|
13757
13812
|
<xsl:template match="*[local-name() = 'stem']" mode="bookmarks"/>
|
13758
13813
|
<xsl:template match="*[local-name() = 'fmt-stem']" mode="bookmarks">
|
13759
13814
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -13775,6 +13830,8 @@
|
|
13775
13830
|
<xsl:template match="*[local-name() = 'origin']" mode="bookmarks"/>
|
13776
13831
|
<xsl:template match="*[local-name() = 'erefstack ']" mode="bookmarks"/>
|
13777
13832
|
|
13833
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="bookmarks" priority="3"/>
|
13834
|
+
|
13778
13835
|
<!-- Bookmarks -->
|
13779
13836
|
<xsl:template name="addBookmarks">
|
13780
13837
|
<xsl:param name="contents"/>
|
@@ -13953,7 +14010,8 @@
|
|
13953
14010
|
|
13954
14011
|
<xsl:for-each select="$contents_nodes//tables/table">
|
13955
14012
|
<fo:bookmark internal-destination="{@id}">
|
13956
|
-
<fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
|
14013
|
+
<!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
|
14014
|
+
<fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
|
13957
14015
|
</fo:bookmark>
|
13958
14016
|
</xsl:for-each>
|
13959
14017
|
</fo:bookmark>
|
@@ -13962,6 +14020,26 @@
|
|
13962
14020
|
</xsl:template> <!-- insertTableBookmarks -->
|
13963
14021
|
<!-- End Bookmarks -->
|
13964
14022
|
|
14023
|
+
<!-- ============================ -->
|
14024
|
+
<!-- mode="bookmark_clean" -->
|
14025
|
+
<!-- ============================ -->
|
14026
|
+
<xsl:template match="node()" mode="bookmark_clean">
|
14027
|
+
<xsl:apply-templates select="node()" mode="bookmark_clean"/>
|
14028
|
+
</xsl:template>
|
14029
|
+
|
14030
|
+
<xsl:template match="text()" mode="bookmark_clean">
|
14031
|
+
<xsl:value-of select="."/>
|
14032
|
+
</xsl:template>
|
14033
|
+
|
14034
|
+
<xsl:template match="*[local-name() = 'math']" mode="bookmark_clean">
|
14035
|
+
<xsl:value-of select="normalize-space(.)"/>
|
14036
|
+
</xsl:template>
|
14037
|
+
|
14038
|
+
<xsl:template match="*[local-name() = 'asciimath']" mode="bookmark_clean"/>
|
14039
|
+
<!-- ============================ -->
|
14040
|
+
<!-- END: mode="bookmark_clean" -->
|
14041
|
+
<!-- ============================ -->
|
14042
|
+
|
13965
14043
|
<xsl:template name="getLangVersion">
|
13966
14044
|
<xsl:param name="lang"/>
|
13967
14045
|
<xsl:param name="doctype" select="''"/>
|
@@ -15617,21 +15695,32 @@
|
|
15617
15695
|
<!-- ========== -->
|
15618
15696
|
|
15619
15697
|
<xsl:variable name="reviews_">
|
15620
|
-
<xsl:for-each select="//*[local-name() = 'review'][@from]">
|
15698
|
+
<xsl:for-each select="//*[local-name() = 'review'][not(parent::*[local-name() = 'review-container'])][@from]">
|
15621
15699
|
<xsl:copy>
|
15622
15700
|
<xsl:copy-of select="@from"/>
|
15623
15701
|
<xsl:copy-of select="@id"/>
|
15624
15702
|
</xsl:copy>
|
15625
15703
|
</xsl:for-each>
|
15704
|
+
<xsl:for-each select="//*[local-name() = 'fmt-review-start'][@source]">
|
15705
|
+
<xsl:copy>
|
15706
|
+
<xsl:copy-of select="@source"/>
|
15707
|
+
<xsl:copy-of select="@id"/>
|
15708
|
+
</xsl:copy>
|
15709
|
+
</xsl:for-each>
|
15626
15710
|
</xsl:variable>
|
15627
15711
|
<xsl:variable name="reviews" select="xalan:nodeset($reviews_)"/>
|
15628
15712
|
|
15629
15713
|
<xsl:template name="addReviewHelper">
|
15630
|
-
|
15631
|
-
|
15632
|
-
|
15633
|
-
|
15634
|
-
<
|
15714
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
15715
|
+
<!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
|
15716
|
+
<xsl:variable name="curr_id" select="@id"/>
|
15717
|
+
<!-- <xsl:variable name="review_id" select="normalize-space(/@id)"/> -->
|
15718
|
+
<xsl:for-each select="$reviews//*[local-name() = 'review'][@from = $curr_id]"> <!-- $reviews//*[local-name() = 'fmt-review-start'][@source = $curr_id] -->
|
15719
|
+
<xsl:variable name="review_id" select="normalize-space(@id)"/>
|
15720
|
+
<xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
|
15721
|
+
<fo:block keep-with-next="always" line-height="0.1" id="{$review_id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$review_id}" fox:alt-text="Annot___{$review_id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
15722
|
+
</xsl:if>
|
15723
|
+
</xsl:for-each>
|
15635
15724
|
</xsl:if>
|
15636
15725
|
<!-- <fo:block>
|
15637
15726
|
<curr_id><xsl:value-of select="$curr_id"/></curr_id>
|
@@ -15768,14 +15857,61 @@
|
|
15768
15857
|
|
15769
15858
|
</xsl:template>
|
15770
15859
|
|
15771
|
-
|
15860
|
+
<!-- document text (not figures, or tables) footnotes -->
|
15861
|
+
<xsl:variable name="reviews_container_">
|
15862
|
+
<xsl:for-each select="//*[local-name() = 'review-container']/*[local-name() = 'fmt-review-body']">
|
15863
|
+
<xsl:variable name="update_xml_step1">
|
15864
|
+
<xsl:apply-templates select="." mode="update_xml_step1"/>
|
15865
|
+
</xsl:variable>
|
15866
|
+
<xsl:apply-templates select="xalan:nodeset($update_xml_step1)" mode="update_xml_enclose_keep-together_within-line"/>
|
15867
|
+
</xsl:for-each>
|
15868
|
+
</xsl:variable>
|
15869
|
+
<xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
|
15870
|
+
|
15871
|
+
<xsl:template match="*[local-name() = 'review-container']"/>
|
15872
|
+
|
15873
|
+
<!-- for old Presentation XML (before https://github.com/metanorma/isodoc/issues/670) -->
|
15874
|
+
<xsl:template match="*[local-name() = 'review'][not(parent::*[local-name() = 'review-container'])]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
15875
|
+
<xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
|
15876
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
15877
|
+
<xsl:choose>
|
15878
|
+
<!-- if there isn't the attribute '@from', then -->
|
15879
|
+
<xsl:when test="$id_from = ''">
|
15880
|
+
<fo:block id="{@id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@id}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
15881
|
+
</xsl:when>
|
15882
|
+
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
15883
|
+
<xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
|
15884
|
+
<fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
15885
|
+
</xsl:when>
|
15886
|
+
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
15887
|
+
<fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
15888
|
+
</xsl:when>
|
15889
|
+
</xsl:choose>
|
15890
|
+
</xsl:if>
|
15891
|
+
</xsl:template>
|
15892
|
+
|
15893
|
+
<!-- for new Presentation XML (https://github.com/metanorma/isodoc/issues/670) -->
|
15894
|
+
<xsl:template match="*[local-name() = 'fmt-review-start']" name="fmt-review-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
15772
15895
|
<!-- comment 2019-11-29 -->
|
15773
15896
|
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
15774
15897
|
<xsl:apply-templates /> -->
|
15775
15898
|
|
15776
|
-
<xsl:variable name="id_from" select="normalize-space(current()/@
|
15899
|
+
<xsl:variable name="id_from" select="normalize-space(current()/@source)"/>
|
15777
15900
|
|
15778
|
-
<xsl:
|
15901
|
+
<xsl:variable name="source" select="normalize-space(@source)"/>
|
15902
|
+
|
15903
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
15904
|
+
<!-- <xsl:variable name="id_from" select="normalize-space(current()/@from)"/> -->
|
15905
|
+
|
15906
|
+
<!-- <xsl:if test="@source = @end"> -->
|
15907
|
+
<!-- following-sibling::node()[1][local-name() = 'bookmark'][@id = $source] and
|
15908
|
+
following-sibling::node()[2][local-name() = 'fmt-review-end'][@source = $source] -->
|
15909
|
+
<!-- <fo:block id="{$source}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$source}" fox:alt-text="Annot___{$source}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block> -->
|
15910
|
+
<fo:block id="{@id}" font-size="1pt" role="SKIP" keep-with-next="always" line-height="0.1"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@id}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
15911
|
+
<!-- </xsl:if> -->
|
15912
|
+
</xsl:if>
|
15913
|
+
|
15914
|
+
<xsl:if test="1 = 2">
|
15779
15915
|
<xsl:choose>
|
15780
15916
|
<!-- if there isn't the attribute '@from', then -->
|
15781
15917
|
<xsl:when test="$id_from = ''">
|
@@ -15783,10 +15919,10 @@
|
|
15783
15919
|
</xsl:when>
|
15784
15920
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
15785
15921
|
<xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
|
15786
|
-
<fo:block id="{
|
15922
|
+
<fo:block id="{$id_from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$id_from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
15787
15923
|
</xsl:when>
|
15788
15924
|
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
15789
|
-
<fo:block id="{
|
15925
|
+
<fo:block id="{$id_from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$id_from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
15790
15926
|
</xsl:when>
|
15791
15927
|
</xsl:choose>
|
15792
15928
|
</xsl:if>
|
@@ -15836,16 +15972,21 @@
|
|
15836
15972
|
<xsl:variable name="list_level">
|
15837
15973
|
<xsl:choose>
|
15838
15974
|
<xsl:when test="$list_level_ <= 3"><xsl:value-of select="$list_level_"/></xsl:when>
|
15839
|
-
<xsl:
|
15975
|
+
<xsl:when test="$ul_labels/label[@level = 3]"><xsl:value-of select="$list_level_ mod 3"/></xsl:when>
|
15976
|
+
<xsl:when test="$list_level_ mod 2 = 0">2</xsl:when>
|
15977
|
+
<xsl:otherwise><xsl:value-of select="$list_level_ mod 2"/></xsl:otherwise>
|
15840
15978
|
</xsl:choose>
|
15841
15979
|
</xsl:variable>
|
15842
15980
|
<xsl:choose>
|
15843
15981
|
<xsl:when test="$ul_labels/label[not(@level)]"> <!-- one label for all levels -->
|
15844
15982
|
<xsl:apply-templates select="$ul_labels/label[not(@level)]" mode="ul_labels"/>
|
15845
15983
|
</xsl:when>
|
15846
|
-
<xsl:when test="$list_level mod 3 = 0">
|
15984
|
+
<xsl:when test="$list_level mod 3 = 0 and $ul_labels/label[@level = 3]">
|
15847
15985
|
<xsl:apply-templates select="$ul_labels/label[@level = 3]" mode="ul_labels"/>
|
15848
15986
|
</xsl:when>
|
15987
|
+
<xsl:when test="$list_level mod 3 = 0">
|
15988
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 1]" mode="ul_labels"/>
|
15989
|
+
</xsl:when>
|
15849
15990
|
<xsl:when test="$list_level mod 2 = 0">
|
15850
15991
|
<xsl:apply-templates select="$ul_labels/label[@level = 2]" mode="ul_labels"/>
|
15851
15992
|
</xsl:when>
|
@@ -15866,9 +16007,15 @@
|
|
15866
16007
|
<xsl:when test="local-name(..) = 'ul'">
|
15867
16008
|
<xsl:choose>
|
15868
16009
|
<xsl:when test="normalize-space($processing_instruction_type) = 'simple'"/>
|
16010
|
+
<!-- https://github.com/metanorma/isodoc/issues/675 -->
|
16011
|
+
<xsl:when test="@label"><xsl:value-of select="@label"/></xsl:when>
|
15869
16012
|
<xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
|
15870
16013
|
</xsl:choose>
|
15871
16014
|
</xsl:when>
|
16015
|
+
<!-- https://github.com/metanorma/isodoc/issues/675 -->
|
16016
|
+
<xsl:when test="local-name(..) = 'ol' and @label and @full = 'true'"> <!-- @full added in the template li/fmt-name -->
|
16017
|
+
<xsl:value-of select="@label"/>
|
16018
|
+
</xsl:when>
|
15872
16019
|
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
15873
16020
|
|
15874
16021
|
<xsl:variable name="type" select="../@type"/>
|
@@ -15993,7 +16140,7 @@
|
|
15993
16140
|
|
15994
16141
|
</xsl:otherwise>
|
15995
16142
|
</xsl:choose>
|
15996
|
-
</xsl:template>
|
16143
|
+
</xsl:template> <!-- getListItemFormat -->
|
15997
16144
|
|
15998
16145
|
<xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
15999
16146
|
<xsl:param name="indent">0</xsl:param>
|
@@ -16150,6 +16297,11 @@
|
|
16150
16297
|
|
16151
16298
|
<xsl:call-template name="refine_list-item-label-style"/>
|
16152
16299
|
|
16300
|
+
<xsl:if test="local-name(..) = 'ul'">
|
16301
|
+
<xsl:variable name="li_label" select="@label"/>
|
16302
|
+
<xsl:copy-of select="$ul_labels//label[. = $li_label]/@*[not(local-name() = 'level')]"/>
|
16303
|
+
</xsl:if>
|
16304
|
+
|
16153
16305
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
16154
16306
|
<xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
16155
16307
|
<xsl:call-template name="append_add-style"/>
|
@@ -16413,10 +16565,22 @@
|
|
16413
16565
|
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'bookmark']" priority="2"/>
|
16414
16566
|
|
16415
16567
|
<xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
16416
|
-
|
16417
|
-
<
|
16418
|
-
|
16419
|
-
|
16568
|
+
<xsl:variable name="bookmark_id" select="@id"/>
|
16569
|
+
<xsl:choose>
|
16570
|
+
<!-- Example:
|
16571
|
+
<fmt-review-start id="_7ef81cf7-3f6c-4ed4-9c1f-1ba092052bbd" source="_dda23915-8574-ef1e-29a1-822d465a5b97" target="_ecfb2210-3b1b-46a2-b63a-8b8505be6686" end="_dda23915-8574-ef1e-29a1-822d465a5b97" author="" date="2025-03-24T00:00:00Z"/>
|
16572
|
+
<bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
|
16573
|
+
<fmt-review-end id="_f336a8d0-08a8-4b7f-a1aa-b04688ed40c1" source="_dda23915-8574-ef1e-29a1-822d465a5b97" target="_ecfb2210-3b1b-46a2-b63a-8b8505be6686" start="_dda23915-8574-ef1e-29a1-822d465a5b97" author="" date="2025-03-24T00:00:00Z"/> -->
|
16574
|
+
<xsl:when test="1 = 2 and preceding-sibling::node()[local-name() = 'fmt-review-start'][@source = $bookmark_id] and following-sibling::node()[local-name() = 'fmt-review-end'][@source = $bookmark_id]">
|
16575
|
+
<!-- skip here, see the template 'fmt-review-start' -->
|
16576
|
+
</xsl:when>
|
16577
|
+
<xsl:otherwise>
|
16578
|
+
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
16579
|
+
<fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[local-name() = 'fmt-review-start'][@source = $bookmark_id] and following-sibling::node()[local-name() = 'fmt-review-end'][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
|
16580
|
+
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
16581
|
+
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
16582
|
+
</xsl:otherwise>
|
16583
|
+
</xsl:choose>
|
16420
16584
|
</xsl:template>
|
16421
16585
|
<!-- =================== -->
|
16422
16586
|
<!-- End of Index processing -->
|
@@ -17554,6 +17718,16 @@
|
|
17554
17718
|
</xsl:choose>
|
17555
17719
|
</xsl:template>
|
17556
17720
|
|
17721
|
+
<!-- li/fmt-name -->
|
17722
|
+
<xsl:template match="*[local-name() = 'li']/*[local-name() = 'fmt-name']" priority="2" mode="update_xml_step1">
|
17723
|
+
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
17724
|
+
<xsl:attribute name="full">true</xsl:attribute>
|
17725
|
+
</xsl:template>
|
17726
|
+
<xsl:template match="*[local-name() = 'li']/*[local-name() = 'fmt-name']" priority="2" mode="update_xml_pres">
|
17727
|
+
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
17728
|
+
<xsl:attribute name="full">true</xsl:attribute>
|
17729
|
+
</xsl:template>
|
17730
|
+
|
17557
17731
|
<xsl:template match="*[local-name() = 'fmt-preferred']"/>
|
17558
17732
|
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_step1">
|
17559
17733
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -17783,6 +17957,9 @@
|
|
17783
17957
|
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_step1"/>
|
17784
17958
|
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_pres"/>
|
17785
17959
|
|
17960
|
+
<xsl:template match="*[local-name() = 'review-container']" mode="update_xml_step1"/>
|
17961
|
+
<xsl:template match="*[local-name() = 'review-container']" mode="update_xml_pres"/>
|
17962
|
+
|
17786
17963
|
<!-- END: update new Presentation XML -->
|
17787
17964
|
|
17788
17965
|
<!-- =========================================================================== -->
|
@@ -18472,6 +18649,64 @@
|
|
18472
18649
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
18473
18650
|
</xsl:template>
|
18474
18651
|
|
18652
|
+
<!-- ===================================== -->
|
18653
|
+
<!-- ===================================== -->
|
18654
|
+
<!-- Ruby text (CJK languages) rendering -->
|
18655
|
+
<!-- ===================================== -->
|
18656
|
+
<!-- ===================================== -->
|
18657
|
+
<xsl:template match="*[local-name() = 'ruby']">
|
18658
|
+
<fo:inline-container text-indent="0mm" last-line-end-indent="0mm">
|
18659
|
+
<xsl:if test="not(ancestor::*[local-name() = 'ruby'])">
|
18660
|
+
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
18661
|
+
</xsl:if>
|
18662
|
+
<xsl:variable name="rt_text" select="*[local-name() = 'rt']"/>
|
18663
|
+
<xsl:variable name="rb_text" select=".//*[local-name() = 'rb'][not(*[local-name() = 'ruby'])]"/>
|
18664
|
+
<!-- Example: width="2em" -->
|
18665
|
+
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
18666
|
+
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
18667
|
+
<xsl:variable name="text_width">
|
18668
|
+
<xsl:choose>
|
18669
|
+
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
18670
|
+
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
18671
|
+
</xsl:choose>
|
18672
|
+
</xsl:variable>
|
18673
|
+
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
18674
|
+
|
18675
|
+
<xsl:choose>
|
18676
|
+
<xsl:when test="ancestor::*[local-name() = 'ruby']">
|
18677
|
+
<xsl:apply-templates select="*[local-name() = 'rb']"/>
|
18678
|
+
<xsl:apply-templates select="*[local-name() = 'rt']"/>
|
18679
|
+
</xsl:when>
|
18680
|
+
<xsl:otherwise>
|
18681
|
+
<xsl:apply-templates select="*[local-name() = 'rt']"/>
|
18682
|
+
<xsl:apply-templates select="*[local-name() = 'rb']"/>
|
18683
|
+
</xsl:otherwise>
|
18684
|
+
</xsl:choose>
|
18685
|
+
|
18686
|
+
<xsl:apply-templates select="node()[not(local-name() = 'rt') and not(local-name() = 'rb')]"/>
|
18687
|
+
</fo:inline-container>
|
18688
|
+
</xsl:template>
|
18689
|
+
|
18690
|
+
<xsl:template match="*[local-name() = 'rb']">
|
18691
|
+
<fo:block line-height="1em" text-align="center"><xsl:apply-templates/></fo:block>
|
18692
|
+
</xsl:template>
|
18693
|
+
|
18694
|
+
<xsl:template match="*[local-name() = 'rt']">
|
18695
|
+
<fo:block font-size="0.5em" text-align="center" line-height="1.2em" space-before="-1.4em" space-before.conditionality="retain"> <!-- -->
|
18696
|
+
<xsl:if test="ancestor::*[local-name() = 'ruby'][last()]//*[local-name() = 'ruby'] or ancestor::*[local-name() = 'rb']">
|
18697
|
+
<xsl:attribute name="space-before">0em</xsl:attribute>
|
18698
|
+
</xsl:if>
|
18699
|
+
<xsl:apply-templates/>
|
18700
|
+
</fo:block>
|
18701
|
+
|
18702
|
+
</xsl:template>
|
18703
|
+
|
18704
|
+
<!-- ===================================== -->
|
18705
|
+
<!-- ===================================== -->
|
18706
|
+
<!-- END: Ruby text (CJK languages) rendering -->
|
18707
|
+
<!-- ===================================== -->
|
18708
|
+
<!-- ===================================== -->
|
18709
|
+
|
18475
18710
|
<xsl:template name="printEdition">
|
18476
18711
|
<xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
18477
18712
|
|