metanorma-iec 2.6.2 → 2.6.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/iec/html/htmlstyle.css +7 -0
- data/lib/isodoc/iec/iec.international-standard.xsl +313 -78
- data/lib/isodoc/iec/presentation_terms.rb +20 -75
- data/lib/isodoc/iec/presentation_xml_convert.rb +5 -1
- data/lib/isodoc/iec/word_convert.rb +2 -3
- data/lib/metanorma/iec/basicdoc.rng +48 -35
- data/lib/metanorma/iec/biblio-standoc.rng +37 -7
- data/lib/metanorma/iec/biblio.rng +30 -18
- data/lib/metanorma/iec/converter.rb +2 -5
- data/lib/metanorma/iec/front.rb +1 -5
- data/lib/metanorma/iec/iec.rng +2 -47
- data/lib/metanorma/iec/isodoc.rng +126 -80
- data/lib/metanorma/iec/isostandard.rng +6 -149
- data/lib/metanorma/iec/relaton-iec.rng +62 -46
- data/lib/metanorma/iec/reqt.rng +7 -6
- data/lib/metanorma/iec/version.rb +1 -1
- metadata +2 -2
@@ -2872,6 +2872,7 @@
|
|
2872
2872
|
</xsl:template> <!-- refine_table-style -->
|
2873
2873
|
|
2874
2874
|
<xsl:attribute-set name="table-name-style">
|
2875
|
+
<xsl:attribute name="role">Caption</xsl:attribute>
|
2875
2876
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2876
2877
|
|
2877
2878
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -2884,6 +2885,9 @@
|
|
2884
2885
|
|
2885
2886
|
<xsl:template name="refine_table-name-style">
|
2886
2887
|
<xsl:param name="continued"/>
|
2888
|
+
<xsl:if test="$continued = 'true'">
|
2889
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
2890
|
+
</xsl:if>
|
2887
2891
|
|
2888
2892
|
<xsl:if test="$continued = 'true'">
|
2889
2893
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
@@ -4709,7 +4713,7 @@
|
|
4709
4713
|
</xsl:if>
|
4710
4714
|
|
4711
4715
|
</fo:block-container>
|
4712
|
-
</xsl:variable>
|
4716
|
+
</xsl:variable> <!-- END: variable name="table" -->
|
4713
4717
|
|
4714
4718
|
<xsl:variable name="isAdded" select="@added"/>
|
4715
4719
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -4719,14 +4723,14 @@
|
|
4719
4723
|
|
4720
4724
|
<!-- centered table when table name is centered (see table-name-style) -->
|
4721
4725
|
|
4722
|
-
<fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style">
|
4726
|
+
<fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style" role="SKIP">
|
4723
4727
|
|
4724
4728
|
<fo:table-column column-width="proportional-column-width(1)"/>
|
4725
4729
|
<fo:table-column column-width="{@width}"/>
|
4726
4730
|
<fo:table-column column-width="proportional-column-width(1)"/>
|
4727
|
-
<fo:table-body>
|
4728
|
-
<fo:table-row>
|
4729
|
-
<fo:table-cell column-number="2">
|
4731
|
+
<fo:table-body role="SKIP">
|
4732
|
+
<fo:table-row role="SKIP">
|
4733
|
+
<fo:table-cell column-number="2" role="SKIP">
|
4730
4734
|
<xsl:copy-of select="$table-preamble"/>
|
4731
4735
|
<fo:block role="SKIP">
|
4732
4736
|
<xsl:call-template name="setTrackChangesStyles">
|
@@ -4772,11 +4776,12 @@
|
|
4772
4776
|
|
4773
4777
|
</xsl:template>
|
4774
4778
|
|
4779
|
+
<!-- table/name-->
|
4775
4780
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
4776
4781
|
<xsl:param name="continued"/>
|
4777
4782
|
<xsl:if test="normalize-space() != ''">
|
4778
4783
|
|
4779
|
-
<fo:block xsl:use-attribute-sets="table-name-style"
|
4784
|
+
<fo:block xsl:use-attribute-sets="table-name-style">
|
4780
4785
|
|
4781
4786
|
<xsl:call-template name="refine_table-name-style">
|
4782
4787
|
<xsl:with-param name="continued" select="$continued"/>
|
@@ -5272,7 +5277,7 @@
|
|
5272
5277
|
|
5273
5278
|
<xsl:variable name="tableWithNotesAndFootnotes">
|
5274
5279
|
|
5275
|
-
<fo:table keep-with-previous="always">
|
5280
|
+
<fo:table keep-with-previous="always" role="SKIP">
|
5276
5281
|
<xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
|
5277
5282
|
<xsl:variable name="name" select="local-name()"/>
|
5278
5283
|
<xsl:choose>
|
@@ -5303,9 +5308,9 @@
|
|
5303
5308
|
</xsl:otherwise>
|
5304
5309
|
</xsl:choose>
|
5305
5310
|
|
5306
|
-
<fo:table-body>
|
5307
|
-
<fo:table-row>
|
5308
|
-
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
5311
|
+
<fo:table-body role="SKIP">
|
5312
|
+
<fo:table-row role="SKIP">
|
5313
|
+
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
|
5309
5314
|
|
5310
5315
|
<xsl:call-template name="refine_table-footer-cell-style"/>
|
5311
5316
|
|
@@ -5383,7 +5388,7 @@
|
|
5383
5388
|
|
5384
5389
|
<!-- if there isn't 'thead' and there is a table's title -->
|
5385
5390
|
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='thead']) and ancestor::*[local-name()='table']/*[local-name()='name']">
|
5386
|
-
<fo:table-header>
|
5391
|
+
<fo:table-header role="Caption">
|
5387
5392
|
<xsl:call-template name="table-header-title">
|
5388
5393
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5389
5394
|
</xsl:call-template>
|
@@ -5559,6 +5564,8 @@
|
|
5559
5564
|
|
5560
5565
|
<xsl:template name="setTableRowAttributes">
|
5561
5566
|
|
5567
|
+
<xsl:call-template name="setColors"/>
|
5568
|
+
|
5562
5569
|
</xsl:template> <!-- setTableRowAttributes -->
|
5563
5570
|
<!-- ===================== -->
|
5564
5571
|
<!-- END Table's row processing -->
|
@@ -5610,6 +5617,7 @@
|
|
5610
5617
|
</xsl:attribute>
|
5611
5618
|
</xsl:if>
|
5612
5619
|
<xsl:call-template name="display-align"/>
|
5620
|
+
<xsl:call-template name="setColors"/>
|
5613
5621
|
</xsl:template>
|
5614
5622
|
|
5615
5623
|
<xsl:template name="display-align">
|
@@ -5625,6 +5633,29 @@
|
|
5625
5633
|
</xsl:if>
|
5626
5634
|
</xsl:template>
|
5627
5635
|
|
5636
|
+
<xsl:template name="setColors">
|
5637
|
+
<xsl:variable name="styles__">
|
5638
|
+
<xsl:call-template name="split">
|
5639
|
+
<xsl:with-param name="pText" select="concat(@style,';')"/>
|
5640
|
+
<xsl:with-param name="sep" select="';'"/>
|
5641
|
+
</xsl:call-template>
|
5642
|
+
</xsl:variable>
|
5643
|
+
<xsl:variable name="quot">"</xsl:variable>
|
5644
|
+
<xsl:variable name="styles_">
|
5645
|
+
<xsl:for-each select="xalan:nodeset($styles__)/item">
|
5646
|
+
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
|
5647
|
+
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
|
5648
|
+
<xsl:if test="$key = 'color' or $key = 'background-color'">
|
5649
|
+
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
5650
|
+
</xsl:if>
|
5651
|
+
</xsl:for-each>
|
5652
|
+
</xsl:variable>
|
5653
|
+
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
5654
|
+
<xsl:for-each select="$styles/style">
|
5655
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
5656
|
+
</xsl:for-each>
|
5657
|
+
</xsl:template>
|
5658
|
+
|
5628
5659
|
<!-- cell in table body, footer -->
|
5629
5660
|
<xsl:template match="*[local-name()='td']" name="td">
|
5630
5661
|
<fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
|
@@ -5636,12 +5667,12 @@
|
|
5636
5667
|
|
5637
5668
|
<xsl:call-template name="refine_table-cell-style"/>
|
5638
5669
|
|
5670
|
+
<xsl:call-template name="setTableCellAttributes"/>
|
5671
|
+
|
5639
5672
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
5640
5673
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
5641
5674
|
</xsl:if>
|
5642
5675
|
|
5643
|
-
<xsl:call-template name="setTableCellAttributes"/>
|
5644
|
-
|
5645
5676
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
5646
5677
|
<xsl:attribute name="border">1pt solid black</xsl:attribute> <!-- border is mandatory, to determine page width -->
|
5647
5678
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
@@ -5726,6 +5757,7 @@
|
|
5726
5757
|
<!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
|
5727
5758
|
<!-- fn in text -->
|
5728
5759
|
<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">
|
5760
|
+
<xsl:param name="footnote_body_from_table">false</xsl:param>
|
5729
5761
|
|
5730
5762
|
<!-- list of unique footnotes -->
|
5731
5763
|
<xsl:variable name="p_fn_">
|
@@ -5791,7 +5823,7 @@
|
|
5791
5823
|
<xsl:copy-of select="$footnote_inline"/>
|
5792
5824
|
</xsl:when>
|
5793
5825
|
<!-- <xsl:when test="$footnotes//*[local-name() = 'fmt-fn-body'][@id = $ref_id] or normalize-space(@skip_footnote_body) = 'false'"> -->
|
5794
|
-
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
5826
|
+
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
|
5795
5827
|
|
5796
5828
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
5797
5829
|
<xsl:copy-of select="$footnote_inline"/>
|
@@ -6202,39 +6234,51 @@
|
|
6202
6234
|
<!-- fn reference in the table rendering (for instance, 'some text 1) some text' ) -->
|
6203
6235
|
<!-- fn --> <!-- in table --> <!-- for figure see <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/> -->
|
6204
6236
|
<xsl:template match="*[local-name()='fn']">
|
6205
|
-
<
|
6237
|
+
<xsl:variable name="target" select="@target"/>
|
6238
|
+
<xsl:choose>
|
6239
|
+
<!-- case for footnotes in Requirement tables (https://github.com/metanorma/metanorma-ogc/issues/791) -->
|
6240
|
+
<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]">
|
6241
|
+
<xsl:call-template name="fn">
|
6242
|
+
<xsl:with-param name="footnote_body_from_table">true</xsl:with-param>
|
6243
|
+
</xsl:call-template>
|
6244
|
+
</xsl:when>
|
6245
|
+
<xsl:otherwise>
|
6206
6246
|
|
6207
|
-
|
6247
|
+
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
6208
6248
|
|
6209
|
-
|
6210
|
-
<fo:basic-link internal-destination="{@target}" fox:alt-text="footnote {@reference}">
|
6211
|
-
<!-- <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> --> <!-- for footnotes in tables -->
|
6212
|
-
<!-- <xsl:attribute name="internal-destination">
|
6213
|
-
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
6214
|
-
</xsl:attribute>
|
6215
|
-
</xsl:if>
|
6216
|
-
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
6217
|
-
<xsl:attribute name="internal-destination">
|
6218
|
-
<xsl:value-of select="@reference"/><xsl:text>_</xsl:text>
|
6219
|
-
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
6220
|
-
</xsl:attribute>
|
6221
|
-
</xsl:if> -->
|
6222
|
-
<!-- <xsl:if test="$namespace = 'plateau'">
|
6223
|
-
<xsl:text>※</xsl:text>
|
6224
|
-
</xsl:if> -->
|
6225
|
-
<!-- <xsl:value-of select="@reference"/> -->
|
6249
|
+
<xsl:call-template name="refine_fn-reference-style"/>
|
6226
6250
|
|
6227
|
-
|
6228
|
-
|
6229
|
-
|
6230
|
-
|
6231
|
-
|
6232
|
-
|
6233
|
-
|
6234
|
-
|
6235
|
-
|
6236
|
-
|
6237
|
-
|
6251
|
+
<!-- <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> --> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
6252
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="footnote {@reference}">
|
6253
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> --> <!-- for footnotes in tables -->
|
6254
|
+
<!-- <xsl:attribute name="internal-destination">
|
6255
|
+
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
6256
|
+
</xsl:attribute>
|
6257
|
+
</xsl:if>
|
6258
|
+
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
6259
|
+
<xsl:attribute name="internal-destination">
|
6260
|
+
<xsl:value-of select="@reference"/><xsl:text>_</xsl:text>
|
6261
|
+
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
6262
|
+
</xsl:attribute>
|
6263
|
+
</xsl:if> -->
|
6264
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
6265
|
+
<xsl:text>※</xsl:text>
|
6266
|
+
</xsl:if> -->
|
6267
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
6268
|
+
|
6269
|
+
<xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
|
6270
|
+
|
6271
|
+
<!-- <xsl:if test="$namespace = 'bsi'">
|
6272
|
+
<xsl:text>)</xsl:text>
|
6273
|
+
</xsl:if> -->
|
6274
|
+
<!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
|
6275
|
+
<!-- <xsl:if test="$namespace = 'jis'">
|
6276
|
+
<fo:inline font-weight="normal">)</fo:inline>
|
6277
|
+
</xsl:if> -->
|
6278
|
+
</fo:basic-link>
|
6279
|
+
</fo:inline>
|
6280
|
+
</xsl:otherwise>
|
6281
|
+
</xsl:choose>
|
6238
6282
|
</xsl:template> <!-- fn -->
|
6239
6283
|
|
6240
6284
|
<!-- fn/text() -->
|
@@ -7510,7 +7554,7 @@
|
|
7510
7554
|
<xsl:choose>
|
7511
7555
|
<xsl:when test="ancestor::*[local-name() = 'table']"><xsl:apply-templates/></xsl:when>
|
7512
7556
|
<xsl:when test="following-sibling::*[2][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']">
|
7513
|
-
<fo:inline keep-with-next.within-line="always"><xsl:apply-templates/></fo:inline>
|
7557
|
+
<fo:inline keep-with-next.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
|
7514
7558
|
</xsl:when>
|
7515
7559
|
<xsl:otherwise>
|
7516
7560
|
<xsl:apply-templates/>
|
@@ -7518,7 +7562,7 @@
|
|
7518
7562
|
</xsl:choose>
|
7519
7563
|
</xsl:template>
|
7520
7564
|
<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">
|
7521
|
-
<fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
|
7565
|
+
<fo:inline keep-with-next.within-line="always" role="SKIP"><xsl:value-of select="."/></fo:inline>
|
7522
7566
|
</xsl:template>
|
7523
7567
|
|
7524
7568
|
<xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
|
@@ -8558,24 +8602,26 @@
|
|
8558
8602
|
<xsl:apply-templates select="." mode="mathml"/>
|
8559
8603
|
</xsl:variable>
|
8560
8604
|
|
8561
|
-
<fo:instream-foreign-object fox:alt-text="Math">
|
8605
|
+
<fo:instream-foreign-object fox:alt-text="Math" fox:actual-text="Math">
|
8562
8606
|
|
8563
8607
|
<xsl:call-template name="refine_mathml_insteam_object_style"/>
|
8564
8608
|
|
8565
|
-
|
8566
|
-
|
8567
|
-
|
8568
|
-
<xsl:
|
8569
|
-
|
8570
|
-
|
8571
|
-
<!-- <xsl:if test="$add_math_as_text = 'true'"> -->
|
8572
|
-
<xsl:if test="normalize-space($asciimath_text_) != ''">
|
8573
|
-
<!-- put Mathin Alternate Text -->
|
8574
|
-
<xsl:attribute name="fox:alt-text">
|
8575
|
-
<xsl:value-of select="$asciimath_text_"/>
|
8609
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
8610
|
+
<!-- put MathML in Actual Text -->
|
8611
|
+
<!-- DEBUG: mathml_content=<xsl:value-of select="$mathml_content"/> -->
|
8612
|
+
<xsl:attribute name="fox:actual-text">
|
8613
|
+
<xsl:value-of select="$mathml_content"/>
|
8576
8614
|
</xsl:attribute>
|
8615
|
+
|
8616
|
+
<!-- <xsl:if test="$add_math_as_text = 'true'"> -->
|
8617
|
+
<xsl:if test="normalize-space($asciimath_text_) != ''">
|
8618
|
+
<!-- put Mathin Alternate Text -->
|
8619
|
+
<xsl:attribute name="fox:alt-text">
|
8620
|
+
<xsl:value-of select="$asciimath_text_"/>
|
8621
|
+
</xsl:attribute>
|
8622
|
+
</xsl:if>
|
8623
|
+
<!-- </xsl:if> -->
|
8577
8624
|
</xsl:if>
|
8578
|
-
<!-- </xsl:if> -->
|
8579
8625
|
|
8580
8626
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
8581
8627
|
|
@@ -10313,6 +10359,13 @@
|
|
10313
10359
|
<xsl:apply-templates select="."/>
|
10314
10360
|
</xsl:template>
|
10315
10361
|
|
10362
|
+
<!-- prevent missing stem for table and figures in ToC -->
|
10363
|
+
<xsl:template match="*[local-name() = 'name' or local-name() = 'fmt-name']//*[local-name() = 'stem']" mode="contents">
|
10364
|
+
<xsl:if test="not(following-sibling::*[1][local-name() = 'fmt-stem'])">
|
10365
|
+
<xsl:apply-templates select="."/>
|
10366
|
+
</xsl:if>
|
10367
|
+
</xsl:template>
|
10368
|
+
|
10316
10369
|
<xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/>
|
10317
10370
|
|
10318
10371
|
<xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/>
|
@@ -10333,6 +10386,8 @@
|
|
10333
10386
|
<xsl:template match="*[local-name() = 'origin']" mode="contents"/>
|
10334
10387
|
<xsl:template match="*[local-name() = 'erefstack ']" mode="contents"/>
|
10335
10388
|
|
10389
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="contents" priority="3"/>
|
10390
|
+
|
10336
10391
|
<xsl:template match="*[local-name() = 'stem']" mode="bookmarks"/>
|
10337
10392
|
<xsl:template match="*[local-name() = 'fmt-stem']" mode="bookmarks">
|
10338
10393
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -10354,6 +10409,8 @@
|
|
10354
10409
|
<xsl:template match="*[local-name() = 'origin']" mode="bookmarks"/>
|
10355
10410
|
<xsl:template match="*[local-name() = 'erefstack ']" mode="bookmarks"/>
|
10356
10411
|
|
10412
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="bookmarks" priority="3"/>
|
10413
|
+
|
10357
10414
|
<!-- Bookmarks -->
|
10358
10415
|
<xsl:template name="addBookmarks">
|
10359
10416
|
<xsl:param name="contents"/>
|
@@ -10541,7 +10598,8 @@
|
|
10541
10598
|
|
10542
10599
|
<xsl:for-each select="$contents_nodes//tables/table">
|
10543
10600
|
<fo:bookmark internal-destination="{@id}">
|
10544
|
-
<fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
|
10601
|
+
<!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
|
10602
|
+
<fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
|
10545
10603
|
</fo:bookmark>
|
10546
10604
|
</xsl:for-each>
|
10547
10605
|
</fo:bookmark>
|
@@ -10550,6 +10608,26 @@
|
|
10550
10608
|
</xsl:template> <!-- insertTableBookmarks -->
|
10551
10609
|
<!-- End Bookmarks -->
|
10552
10610
|
|
10611
|
+
<!-- ============================ -->
|
10612
|
+
<!-- mode="bookmark_clean" -->
|
10613
|
+
<!-- ============================ -->
|
10614
|
+
<xsl:template match="node()" mode="bookmark_clean">
|
10615
|
+
<xsl:apply-templates select="node()" mode="bookmark_clean"/>
|
10616
|
+
</xsl:template>
|
10617
|
+
|
10618
|
+
<xsl:template match="text()" mode="bookmark_clean">
|
10619
|
+
<xsl:value-of select="."/>
|
10620
|
+
</xsl:template>
|
10621
|
+
|
10622
|
+
<xsl:template match="*[local-name() = 'math']" mode="bookmark_clean">
|
10623
|
+
<xsl:value-of select="normalize-space(.)"/>
|
10624
|
+
</xsl:template>
|
10625
|
+
|
10626
|
+
<xsl:template match="*[local-name() = 'asciimath']" mode="bookmark_clean"/>
|
10627
|
+
<!-- ============================ -->
|
10628
|
+
<!-- END: mode="bookmark_clean" -->
|
10629
|
+
<!-- ============================ -->
|
10630
|
+
|
10553
10631
|
<xsl:template name="getLangVersion">
|
10554
10632
|
<xsl:param name="lang"/>
|
10555
10633
|
<xsl:param name="doctype" select="''"/>
|
@@ -12252,21 +12330,32 @@
|
|
12252
12330
|
<!-- ========== -->
|
12253
12331
|
|
12254
12332
|
<xsl:variable name="reviews_">
|
12255
|
-
<xsl:for-each select="//*[local-name() = 'review'][@from]">
|
12333
|
+
<xsl:for-each select="//*[local-name() = 'review'][not(parent::*[local-name() = 'review-container'])][@from]">
|
12256
12334
|
<xsl:copy>
|
12257
12335
|
<xsl:copy-of select="@from"/>
|
12258
12336
|
<xsl:copy-of select="@id"/>
|
12259
12337
|
</xsl:copy>
|
12260
12338
|
</xsl:for-each>
|
12339
|
+
<xsl:for-each select="//*[local-name() = 'fmt-review-start'][@source]">
|
12340
|
+
<xsl:copy>
|
12341
|
+
<xsl:copy-of select="@source"/>
|
12342
|
+
<xsl:copy-of select="@id"/>
|
12343
|
+
</xsl:copy>
|
12344
|
+
</xsl:for-each>
|
12261
12345
|
</xsl:variable>
|
12262
12346
|
<xsl:variable name="reviews" select="xalan:nodeset($reviews_)"/>
|
12263
12347
|
|
12264
12348
|
<xsl:template name="addReviewHelper">
|
12265
|
-
|
12266
|
-
|
12267
|
-
|
12268
|
-
|
12269
|
-
<
|
12349
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
12350
|
+
<!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
|
12351
|
+
<xsl:variable name="curr_id" select="@id"/>
|
12352
|
+
<!-- <xsl:variable name="review_id" select="normalize-space(/@id)"/> -->
|
12353
|
+
<xsl:for-each select="$reviews//*[local-name() = 'review'][@from = $curr_id]"> <!-- $reviews//*[local-name() = 'fmt-review-start'][@source = $curr_id] -->
|
12354
|
+
<xsl:variable name="review_id" select="normalize-space(@id)"/>
|
12355
|
+
<xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
|
12356
|
+
<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>
|
12357
|
+
</xsl:if>
|
12358
|
+
</xsl:for-each>
|
12270
12359
|
</xsl:if>
|
12271
12360
|
<!-- <fo:block>
|
12272
12361
|
<curr_id><xsl:value-of select="$curr_id"/></curr_id>
|
@@ -12403,14 +12492,61 @@
|
|
12403
12492
|
|
12404
12493
|
</xsl:template>
|
12405
12494
|
|
12406
|
-
|
12495
|
+
<!-- document text (not figures, or tables) footnotes -->
|
12496
|
+
<xsl:variable name="reviews_container_">
|
12497
|
+
<xsl:for-each select="//*[local-name() = 'review-container']/*[local-name() = 'fmt-review-body']">
|
12498
|
+
<xsl:variable name="update_xml_step1">
|
12499
|
+
<xsl:apply-templates select="." mode="update_xml_step1"/>
|
12500
|
+
</xsl:variable>
|
12501
|
+
<xsl:apply-templates select="xalan:nodeset($update_xml_step1)" mode="update_xml_enclose_keep-together_within-line"/>
|
12502
|
+
</xsl:for-each>
|
12503
|
+
</xsl:variable>
|
12504
|
+
<xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
|
12505
|
+
|
12506
|
+
<xsl:template match="*[local-name() = 'review-container']"/>
|
12507
|
+
|
12508
|
+
<!-- for old Presentation XML (before https://github.com/metanorma/isodoc/issues/670) -->
|
12509
|
+
<xsl:template match="*[local-name() = 'review'][not(parent::*[local-name() = 'review-container'])]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
12510
|
+
<xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
|
12511
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
12512
|
+
<xsl:choose>
|
12513
|
+
<!-- if there isn't the attribute '@from', then -->
|
12514
|
+
<xsl:when test="$id_from = ''">
|
12515
|
+
<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>
|
12516
|
+
</xsl:when>
|
12517
|
+
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
12518
|
+
<xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
|
12519
|
+
<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>
|
12520
|
+
</xsl:when>
|
12521
|
+
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
12522
|
+
<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>
|
12523
|
+
</xsl:when>
|
12524
|
+
</xsl:choose>
|
12525
|
+
</xsl:if>
|
12526
|
+
</xsl:template>
|
12527
|
+
|
12528
|
+
<!-- for new Presentation XML (https://github.com/metanorma/isodoc/issues/670) -->
|
12529
|
+
<xsl:template match="*[local-name() = 'fmt-review-start']" name="fmt-review-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
12407
12530
|
<!-- comment 2019-11-29 -->
|
12408
12531
|
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
12409
12532
|
<xsl:apply-templates /> -->
|
12410
12533
|
|
12411
|
-
<xsl:variable name="id_from" select="normalize-space(current()/@
|
12534
|
+
<xsl:variable name="id_from" select="normalize-space(current()/@source)"/>
|
12412
12535
|
|
12413
|
-
<xsl:
|
12536
|
+
<xsl:variable name="source" select="normalize-space(@source)"/>
|
12537
|
+
|
12538
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
12539
|
+
<!-- <xsl:variable name="id_from" select="normalize-space(current()/@from)"/> -->
|
12540
|
+
|
12541
|
+
<!-- <xsl:if test="@source = @end"> -->
|
12542
|
+
<!-- following-sibling::node()[1][local-name() = 'bookmark'][@id = $source] and
|
12543
|
+
following-sibling::node()[2][local-name() = 'fmt-review-end'][@source = $source] -->
|
12544
|
+
<!-- <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> -->
|
12545
|
+
<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>
|
12546
|
+
<!-- </xsl:if> -->
|
12547
|
+
</xsl:if>
|
12548
|
+
|
12549
|
+
<xsl:if test="1 = 2">
|
12414
12550
|
<xsl:choose>
|
12415
12551
|
<!-- if there isn't the attribute '@from', then -->
|
12416
12552
|
<xsl:when test="$id_from = ''">
|
@@ -12418,10 +12554,10 @@
|
|
12418
12554
|
</xsl:when>
|
12419
12555
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
12420
12556
|
<xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
|
12421
|
-
<fo:block id="{
|
12557
|
+
<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>
|
12422
12558
|
</xsl:when>
|
12423
12559
|
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
12424
|
-
<fo:block id="{
|
12560
|
+
<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>
|
12425
12561
|
</xsl:when>
|
12426
12562
|
</xsl:choose>
|
12427
12563
|
</xsl:if>
|
@@ -12472,16 +12608,21 @@
|
|
12472
12608
|
<xsl:variable name="list_level">
|
12473
12609
|
<xsl:choose>
|
12474
12610
|
<xsl:when test="$list_level_ <= 3"><xsl:value-of select="$list_level_"/></xsl:when>
|
12475
|
-
<xsl:
|
12611
|
+
<xsl:when test="$ul_labels/label[@level = 3]"><xsl:value-of select="$list_level_ mod 3"/></xsl:when>
|
12612
|
+
<xsl:when test="$list_level_ mod 2 = 0">2</xsl:when>
|
12613
|
+
<xsl:otherwise><xsl:value-of select="$list_level_ mod 2"/></xsl:otherwise>
|
12476
12614
|
</xsl:choose>
|
12477
12615
|
</xsl:variable>
|
12478
12616
|
<xsl:choose>
|
12479
12617
|
<xsl:when test="$ul_labels/label[not(@level)]"> <!-- one label for all levels -->
|
12480
12618
|
<xsl:apply-templates select="$ul_labels/label[not(@level)]" mode="ul_labels"/>
|
12481
12619
|
</xsl:when>
|
12482
|
-
<xsl:when test="$list_level mod 3 = 0">
|
12620
|
+
<xsl:when test="$list_level mod 3 = 0 and $ul_labels/label[@level = 3]">
|
12483
12621
|
<xsl:apply-templates select="$ul_labels/label[@level = 3]" mode="ul_labels"/>
|
12484
12622
|
</xsl:when>
|
12623
|
+
<xsl:when test="$list_level mod 3 = 0">
|
12624
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 1]" mode="ul_labels"/>
|
12625
|
+
</xsl:when>
|
12485
12626
|
<xsl:when test="$list_level mod 2 = 0">
|
12486
12627
|
<xsl:apply-templates select="$ul_labels/label[@level = 2]" mode="ul_labels"/>
|
12487
12628
|
</xsl:when>
|
@@ -12502,9 +12643,15 @@
|
|
12502
12643
|
<xsl:when test="local-name(..) = 'ul'">
|
12503
12644
|
<xsl:choose>
|
12504
12645
|
<xsl:when test="normalize-space($processing_instruction_type) = 'simple'"/>
|
12646
|
+
<!-- https://github.com/metanorma/isodoc/issues/675 -->
|
12647
|
+
<xsl:when test="@label"><xsl:value-of select="@label"/></xsl:when>
|
12505
12648
|
<xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
|
12506
12649
|
</xsl:choose>
|
12507
12650
|
</xsl:when>
|
12651
|
+
<!-- https://github.com/metanorma/isodoc/issues/675 -->
|
12652
|
+
<xsl:when test="local-name(..) = 'ol' and @label and @full = 'true'"> <!-- @full added in the template li/fmt-name -->
|
12653
|
+
<xsl:value-of select="@label"/>
|
12654
|
+
</xsl:when>
|
12508
12655
|
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
12509
12656
|
|
12510
12657
|
<xsl:variable name="type" select="../@type"/>
|
@@ -12629,7 +12776,7 @@
|
|
12629
12776
|
|
12630
12777
|
</xsl:otherwise>
|
12631
12778
|
</xsl:choose>
|
12632
|
-
</xsl:template>
|
12779
|
+
</xsl:template> <!-- getListItemFormat -->
|
12633
12780
|
|
12634
12781
|
<xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
12635
12782
|
<xsl:param name="indent">0</xsl:param>
|
@@ -12765,6 +12912,11 @@
|
|
12765
12912
|
|
12766
12913
|
<xsl:call-template name="refine_list-item-label-style"/>
|
12767
12914
|
|
12915
|
+
<xsl:if test="local-name(..) = 'ul'">
|
12916
|
+
<xsl:variable name="li_label" select="@label"/>
|
12917
|
+
<xsl:copy-of select="$ul_labels//label[. = $li_label]/@*[not(local-name() = 'level')]"/>
|
12918
|
+
</xsl:if>
|
12919
|
+
|
12768
12920
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
12769
12921
|
<xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
12770
12922
|
<xsl:call-template name="append_add-style"/>
|
@@ -13028,10 +13180,22 @@
|
|
13028
13180
|
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'bookmark']" priority="2"/>
|
13029
13181
|
|
13030
13182
|
<xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
13031
|
-
|
13032
|
-
<
|
13033
|
-
|
13034
|
-
|
13183
|
+
<xsl:variable name="bookmark_id" select="@id"/>
|
13184
|
+
<xsl:choose>
|
13185
|
+
<!-- Example:
|
13186
|
+
<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"/>
|
13187
|
+
<bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
|
13188
|
+
<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"/> -->
|
13189
|
+
<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]">
|
13190
|
+
<!-- skip here, see the template 'fmt-review-start' -->
|
13191
|
+
</xsl:when>
|
13192
|
+
<xsl:otherwise>
|
13193
|
+
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
13194
|
+
<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>
|
13195
|
+
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
13196
|
+
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
13197
|
+
</xsl:otherwise>
|
13198
|
+
</xsl:choose>
|
13035
13199
|
</xsl:template>
|
13036
13200
|
<!-- =================== -->
|
13037
13201
|
<!-- End of Index processing -->
|
@@ -14154,6 +14318,16 @@
|
|
14154
14318
|
</xsl:choose>
|
14155
14319
|
</xsl:template>
|
14156
14320
|
|
14321
|
+
<!-- li/fmt-name -->
|
14322
|
+
<xsl:template match="*[local-name() = 'li']/*[local-name() = 'fmt-name']" priority="2" mode="update_xml_step1">
|
14323
|
+
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
14324
|
+
<xsl:attribute name="full">true</xsl:attribute>
|
14325
|
+
</xsl:template>
|
14326
|
+
<xsl:template match="*[local-name() = 'li']/*[local-name() = 'fmt-name']" priority="2" mode="update_xml_pres">
|
14327
|
+
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
14328
|
+
<xsl:attribute name="full">true</xsl:attribute>
|
14329
|
+
</xsl:template>
|
14330
|
+
|
14157
14331
|
<xsl:template match="*[local-name() = 'fmt-preferred']"/>
|
14158
14332
|
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_step1">
|
14159
14333
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -14383,6 +14557,9 @@
|
|
14383
14557
|
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_step1"/>
|
14384
14558
|
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_pres"/>
|
14385
14559
|
|
14560
|
+
<xsl:template match="*[local-name() = 'review-container']" mode="update_xml_step1"/>
|
14561
|
+
<xsl:template match="*[local-name() = 'review-container']" mode="update_xml_pres"/>
|
14562
|
+
|
14386
14563
|
<!-- END: update new Presentation XML -->
|
14387
14564
|
|
14388
14565
|
<!-- =========================================================================== -->
|
@@ -14965,6 +15142,64 @@
|
|
14965
15142
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
14966
15143
|
</xsl:template>
|
14967
15144
|
|
15145
|
+
<!-- ===================================== -->
|
15146
|
+
<!-- ===================================== -->
|
15147
|
+
<!-- Ruby text (CJK languages) rendering -->
|
15148
|
+
<!-- ===================================== -->
|
15149
|
+
<!-- ===================================== -->
|
15150
|
+
<xsl:template match="*[local-name() = 'ruby']">
|
15151
|
+
<fo:inline-container text-indent="0mm" last-line-end-indent="0mm">
|
15152
|
+
<xsl:if test="not(ancestor::*[local-name() = 'ruby'])">
|
15153
|
+
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
15154
|
+
</xsl:if>
|
15155
|
+
<xsl:variable name="rt_text" select="*[local-name() = 'rt']"/>
|
15156
|
+
<xsl:variable name="rb_text" select=".//*[local-name() = 'rb'][not(*[local-name() = 'ruby'])]"/>
|
15157
|
+
<!-- Example: width="2em" -->
|
15158
|
+
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
15159
|
+
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
15160
|
+
<xsl:variable name="text_width">
|
15161
|
+
<xsl:choose>
|
15162
|
+
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
15163
|
+
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
15164
|
+
</xsl:choose>
|
15165
|
+
</xsl:variable>
|
15166
|
+
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
15167
|
+
|
15168
|
+
<xsl:choose>
|
15169
|
+
<xsl:when test="ancestor::*[local-name() = 'ruby']">
|
15170
|
+
<xsl:apply-templates select="*[local-name() = 'rb']"/>
|
15171
|
+
<xsl:apply-templates select="*[local-name() = 'rt']"/>
|
15172
|
+
</xsl:when>
|
15173
|
+
<xsl:otherwise>
|
15174
|
+
<xsl:apply-templates select="*[local-name() = 'rt']"/>
|
15175
|
+
<xsl:apply-templates select="*[local-name() = 'rb']"/>
|
15176
|
+
</xsl:otherwise>
|
15177
|
+
</xsl:choose>
|
15178
|
+
|
15179
|
+
<xsl:apply-templates select="node()[not(local-name() = 'rt') and not(local-name() = 'rb')]"/>
|
15180
|
+
</fo:inline-container>
|
15181
|
+
</xsl:template>
|
15182
|
+
|
15183
|
+
<xsl:template match="*[local-name() = 'rb']">
|
15184
|
+
<fo:block line-height="1em" text-align="center"><xsl:apply-templates/></fo:block>
|
15185
|
+
</xsl:template>
|
15186
|
+
|
15187
|
+
<xsl:template match="*[local-name() = 'rt']">
|
15188
|
+
<fo:block font-size="0.5em" text-align="center" line-height="1.2em" space-before="-1.4em" space-before.conditionality="retain"> <!-- -->
|
15189
|
+
<xsl:if test="ancestor::*[local-name() = 'ruby'][last()]//*[local-name() = 'ruby'] or ancestor::*[local-name() = 'rb']">
|
15190
|
+
<xsl:attribute name="space-before">0em</xsl:attribute>
|
15191
|
+
</xsl:if>
|
15192
|
+
<xsl:apply-templates/>
|
15193
|
+
</fo:block>
|
15194
|
+
|
15195
|
+
</xsl:template>
|
15196
|
+
|
15197
|
+
<!-- ===================================== -->
|
15198
|
+
<!-- ===================================== -->
|
15199
|
+
<!-- END: Ruby text (CJK languages) rendering -->
|
15200
|
+
<!-- ===================================== -->
|
15201
|
+
<!-- ===================================== -->
|
15202
|
+
|
14968
15203
|
<xsl:template name="printEdition">
|
14969
15204
|
<xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
14970
15205
|
|