metanorma-bipm 2.6.4 → 2.6.5
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/bipm/bipm.brochure.xsl +184 -44
- data/lib/isodoc/bipm/bipm.guide.xsl +184 -44
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +184 -44
- data/lib/isodoc/bipm/bipm.rapport.xsl +184 -44
- data/lib/isodoc/bipm/jcgm.standard.xsl +169 -44
- data/lib/isodoc/bipm/presentation_blocks.rb +12 -0
- data/lib/metanorma/bipm/basicdoc.rng +14 -8
- data/lib/metanorma/bipm/biblio-standoc.rng +37 -7
- data/lib/metanorma/bipm/biblio.rng +30 -18
- data/lib/metanorma/bipm/bipm.rng +3 -67
- data/lib/metanorma/bipm/isodoc.rng +115 -96
- data/lib/metanorma/bipm/relaton-bipm.rng +18 -24
- data/lib/metanorma/bipm/reqt.rng +7 -6
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma.yml +7 -7
- metadata +2 -2
@@ -469,7 +469,7 @@
|
|
469
469
|
|
470
470
|
<!-- flatxml=<xsl:copy-of select="$flatxml"/> -->
|
471
471
|
|
472
|
-
<xsl:apply-templates select="xalan:nodeset($flatxml)/bipm:
|
472
|
+
<xsl:apply-templates select="xalan:nodeset($flatxml)/bipm:metanorma" mode="bipm-standard">
|
473
473
|
<xsl:with-param name="curr_docnum" select="$num"/>
|
474
474
|
</xsl:apply-templates>
|
475
475
|
|
@@ -619,6 +619,17 @@
|
|
619
619
|
|
620
620
|
<xsl:template match="*[local-name() = 'clause']/*[local-name() = 'fmt-footnote-container']" priority="3" mode="update_xml_pres"/>
|
621
621
|
|
622
|
+
<xsl:template match="*[local-name() = 'li']/*[local-name() = 'fmt-name']" priority="3" mode="update_xml_pres">
|
623
|
+
<xsl:choose>
|
624
|
+
<!-- no need li labels in BIPM brochure preface -->
|
625
|
+
<xsl:when test="ancestor::*[bipm:preface] and ancestor::bipm:clause[not(@type = 'toc')]"/>
|
626
|
+
<xsl:otherwise>
|
627
|
+
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
628
|
+
<xsl:attribute name="full">true</xsl:attribute>
|
629
|
+
</xsl:otherwise>
|
630
|
+
</xsl:choose>
|
631
|
+
</xsl:template>
|
632
|
+
|
622
633
|
<!-- ================================= -->
|
623
634
|
<!-- Flattening xml for fit notes at page sides (margins) -->
|
624
635
|
<!-- ================================= -->
|
@@ -2928,13 +2939,17 @@
|
|
2928
2939
|
<fo:list-item-label end-indent="label-end()">
|
2929
2940
|
<fo:block> <!-- debug: border="0.5pt solid green" -->
|
2930
2941
|
<fo:inline>
|
2931
|
-
|
2932
|
-
<xsl:
|
2942
|
+
<xsl:if test="@list_type = 'ul'">
|
2943
|
+
<xsl:variable name="li_label" select="@label"/>
|
2944
|
+
<xsl:copy-of select="$ul_labels//label[. = $li_label]/@*[not(local-name() = 'level')]"/>
|
2945
|
+
</xsl:if>
|
2946
|
+
|
2933
2947
|
<xsl:copy-of select="@font-size"/>
|
2934
2948
|
<xsl:copy-of select="@baseline-shift"/>
|
2935
2949
|
<xsl:if test="@list_type = 'ul' and ancestor::bipm:note_side">
|
2936
2950
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2937
2951
|
</xsl:if>
|
2952
|
+
|
2938
2953
|
<xsl:value-of select="@label"/>
|
2939
2954
|
</fo:inline>
|
2940
2955
|
</fo:block>
|
@@ -4681,6 +4696,7 @@
|
|
4681
4696
|
</xsl:template> <!-- refine_table-style -->
|
4682
4697
|
|
4683
4698
|
<xsl:attribute-set name="table-name-style">
|
4699
|
+
<xsl:attribute name="role">Caption</xsl:attribute>
|
4684
4700
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4685
4701
|
|
4686
4702
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -4694,6 +4710,9 @@
|
|
4694
4710
|
|
4695
4711
|
<xsl:template name="refine_table-name-style">
|
4696
4712
|
<xsl:param name="continued"/>
|
4713
|
+
<xsl:if test="$continued = 'true'">
|
4714
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
4715
|
+
</xsl:if>
|
4697
4716
|
|
4698
4717
|
</xsl:template> <!-- refine_table-name-style -->
|
4699
4718
|
|
@@ -6509,7 +6528,7 @@
|
|
6509
6528
|
</xsl:if>
|
6510
6529
|
|
6511
6530
|
</fo:block-container>
|
6512
|
-
</xsl:variable>
|
6531
|
+
</xsl:variable> <!-- END: variable name="table" -->
|
6513
6532
|
|
6514
6533
|
<xsl:variable name="isAdded" select="@added"/>
|
6515
6534
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -6563,6 +6582,7 @@
|
|
6563
6582
|
|
6564
6583
|
</xsl:template>
|
6565
6584
|
|
6585
|
+
<!-- table/name-->
|
6566
6586
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
6567
6587
|
<xsl:param name="continued"/>
|
6568
6588
|
<xsl:if test="normalize-space() != ''">
|
@@ -7052,7 +7072,7 @@
|
|
7052
7072
|
|
7053
7073
|
<xsl:variable name="tableWithNotesAndFootnotes">
|
7054
7074
|
|
7055
|
-
<fo:table keep-with-previous="always">
|
7075
|
+
<fo:table keep-with-previous="always" role="SKIP">
|
7056
7076
|
<xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
|
7057
7077
|
<xsl:variable name="name" select="local-name()"/>
|
7058
7078
|
<xsl:choose>
|
@@ -7083,9 +7103,9 @@
|
|
7083
7103
|
</xsl:otherwise>
|
7084
7104
|
</xsl:choose>
|
7085
7105
|
|
7086
|
-
<fo:table-body>
|
7087
|
-
<fo:table-row>
|
7088
|
-
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
7106
|
+
<fo:table-body role="SKIP">
|
7107
|
+
<fo:table-row role="SKIP">
|
7108
|
+
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
|
7089
7109
|
|
7090
7110
|
<xsl:call-template name="refine_table-footer-cell-style"/>
|
7091
7111
|
|
@@ -7512,6 +7532,7 @@
|
|
7512
7532
|
<!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
|
7513
7533
|
<!-- fn in text -->
|
7514
7534
|
<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">
|
7535
|
+
<xsl:param name="footnote_body_from_table">false</xsl:param>
|
7515
7536
|
|
7516
7537
|
<!-- list of unique footnotes -->
|
7517
7538
|
<xsl:variable name="p_fn_">
|
@@ -7577,7 +7598,7 @@
|
|
7577
7598
|
<xsl:copy-of select="$footnote_inline"/>
|
7578
7599
|
</xsl:when>
|
7579
7600
|
<!-- <xsl:when test="$footnotes//*[local-name() = 'fmt-fn-body'][@id = $ref_id] or normalize-space(@skip_footnote_body) = 'false'"> -->
|
7580
|
-
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
7601
|
+
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
|
7581
7602
|
|
7582
7603
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
7583
7604
|
<xsl:copy-of select="$footnote_inline"/>
|
@@ -7988,42 +8009,54 @@
|
|
7988
8009
|
<!-- fn reference in the table rendering (for instance, 'some text 1) some text' ) -->
|
7989
8010
|
<!-- fn --> <!-- in table --> <!-- for figure see <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/> -->
|
7990
8011
|
<xsl:template match="*[local-name()='fn']">
|
7991
|
-
<
|
8012
|
+
<xsl:variable name="target" select="@target"/>
|
8013
|
+
<xsl:choose>
|
8014
|
+
<!-- case for footnotes in Requirement tables (https://github.com/metanorma/metanorma-ogc/issues/791) -->
|
8015
|
+
<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]">
|
8016
|
+
<xsl:call-template name="fn">
|
8017
|
+
<xsl:with-param name="footnote_body_from_table">true</xsl:with-param>
|
8018
|
+
</xsl:call-template>
|
8019
|
+
</xsl:when>
|
8020
|
+
<xsl:otherwise>
|
7992
8021
|
|
7993
|
-
|
8022
|
+
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
7994
8023
|
|
7995
|
-
|
7996
|
-
<fo:basic-link internal-destination="{@target}" fox:alt-text="footnote {@reference}">
|
7997
|
-
<!-- <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> --> <!-- for footnotes in tables -->
|
7998
|
-
<!-- <xsl:attribute name="internal-destination">
|
7999
|
-
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
8000
|
-
</xsl:attribute>
|
8001
|
-
</xsl:if>
|
8002
|
-
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
8003
|
-
<xsl:attribute name="internal-destination">
|
8004
|
-
<xsl:value-of select="@reference"/><xsl:text>_</xsl:text>
|
8005
|
-
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
8006
|
-
</xsl:attribute>
|
8007
|
-
</xsl:if> -->
|
8008
|
-
<!-- <xsl:if test="$namespace = 'plateau'">
|
8009
|
-
<xsl:text>※</xsl:text>
|
8010
|
-
</xsl:if> -->
|
8011
|
-
<!-- <xsl:value-of select="@reference"/> -->
|
8012
|
-
|
8013
|
-
<fo:inline font-style="normal"> </fo:inline>
|
8014
|
-
<!-- Example: <fmt-fn-label><sup><span class="fmt-label-delim">(</span>a<span class="fmt-label-delim">)</span></sup></fmt-fn-label> -->
|
8015
|
-
<!-- to <fo:inline font-style="normal">(</fo:inline> ... -->
|
8016
|
-
<xsl:apply-templates select="*[local-name() = 'fmt-fn-label']/node()"/>
|
8024
|
+
<xsl:call-template name="refine_fn-reference-style"/>
|
8017
8025
|
|
8018
|
-
|
8019
|
-
<
|
8020
|
-
|
8021
|
-
|
8022
|
-
|
8023
|
-
|
8024
|
-
|
8025
|
-
|
8026
|
-
|
8026
|
+
<!-- <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> --> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
8027
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="footnote {@reference}">
|
8028
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> --> <!-- for footnotes in tables -->
|
8029
|
+
<!-- <xsl:attribute name="internal-destination">
|
8030
|
+
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
8031
|
+
</xsl:attribute>
|
8032
|
+
</xsl:if>
|
8033
|
+
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
8034
|
+
<xsl:attribute name="internal-destination">
|
8035
|
+
<xsl:value-of select="@reference"/><xsl:text>_</xsl:text>
|
8036
|
+
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
8037
|
+
</xsl:attribute>
|
8038
|
+
</xsl:if> -->
|
8039
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
8040
|
+
<xsl:text>※</xsl:text>
|
8041
|
+
</xsl:if> -->
|
8042
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
8043
|
+
|
8044
|
+
<fo:inline font-style="normal"> </fo:inline>
|
8045
|
+
<!-- Example: <fmt-fn-label><sup><span class="fmt-label-delim">(</span>a<span class="fmt-label-delim">)</span></sup></fmt-fn-label> -->
|
8046
|
+
<!-- to <fo:inline font-style="normal">(</fo:inline> ... -->
|
8047
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-fn-label']/node()"/>
|
8048
|
+
|
8049
|
+
<!-- <xsl:if test="$namespace = 'bsi'">
|
8050
|
+
<xsl:text>)</xsl:text>
|
8051
|
+
</xsl:if> -->
|
8052
|
+
<!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
|
8053
|
+
<!-- <xsl:if test="$namespace = 'jis'">
|
8054
|
+
<fo:inline font-weight="normal">)</fo:inline>
|
8055
|
+
</xsl:if> -->
|
8056
|
+
</fo:basic-link>
|
8057
|
+
</fo:inline>
|
8058
|
+
</xsl:otherwise>
|
8059
|
+
</xsl:choose>
|
8027
8060
|
</xsl:template> <!-- fn -->
|
8028
8061
|
|
8029
8062
|
<!-- fn/text() -->
|
@@ -12071,6 +12104,13 @@
|
|
12071
12104
|
<xsl:apply-templates select="."/>
|
12072
12105
|
</xsl:template>
|
12073
12106
|
|
12107
|
+
<!-- prevent missing stem for table and figures in ToC -->
|
12108
|
+
<xsl:template match="*[local-name() = 'name' or local-name() = 'fmt-name']//*[local-name() = 'stem']" mode="contents">
|
12109
|
+
<xsl:if test="not(following-sibling::*[1][local-name() = 'fmt-stem'])">
|
12110
|
+
<xsl:apply-templates select="."/>
|
12111
|
+
</xsl:if>
|
12112
|
+
</xsl:template>
|
12113
|
+
|
12074
12114
|
<xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/>
|
12075
12115
|
|
12076
12116
|
<xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/>
|
@@ -12294,7 +12334,8 @@
|
|
12294
12334
|
|
12295
12335
|
<xsl:for-each select="$contents_nodes//tables/table">
|
12296
12336
|
<fo:bookmark internal-destination="{@id}">
|
12297
|
-
<fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
|
12337
|
+
<!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
|
12338
|
+
<fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
|
12298
12339
|
</fo:bookmark>
|
12299
12340
|
</xsl:for-each>
|
12300
12341
|
</fo:bookmark>
|
@@ -12303,6 +12344,26 @@
|
|
12303
12344
|
</xsl:template> <!-- insertTableBookmarks -->
|
12304
12345
|
<!-- End Bookmarks -->
|
12305
12346
|
|
12347
|
+
<!-- ============================ -->
|
12348
|
+
<!-- mode="bookmark_clean" -->
|
12349
|
+
<!-- ============================ -->
|
12350
|
+
<xsl:template match="node()" mode="bookmark_clean">
|
12351
|
+
<xsl:apply-templates select="node()" mode="bookmark_clean"/>
|
12352
|
+
</xsl:template>
|
12353
|
+
|
12354
|
+
<xsl:template match="text()" mode="bookmark_clean">
|
12355
|
+
<xsl:value-of select="."/>
|
12356
|
+
</xsl:template>
|
12357
|
+
|
12358
|
+
<xsl:template match="*[local-name() = 'math']" mode="bookmark_clean">
|
12359
|
+
<xsl:value-of select="normalize-space(.)"/>
|
12360
|
+
</xsl:template>
|
12361
|
+
|
12362
|
+
<xsl:template match="*[local-name() = 'asciimath']" mode="bookmark_clean"/>
|
12363
|
+
<!-- ============================ -->
|
12364
|
+
<!-- END: mode="bookmark_clean" -->
|
12365
|
+
<!-- ============================ -->
|
12366
|
+
|
12306
12367
|
<xsl:template name="getLangVersion">
|
12307
12368
|
<xsl:param name="lang"/>
|
12308
12369
|
<xsl:param name="doctype" select="''"/>
|
@@ -14325,9 +14386,15 @@
|
|
14325
14386
|
<xsl:when test="local-name(..) = 'ul'">
|
14326
14387
|
<xsl:choose>
|
14327
14388
|
<xsl:when test="normalize-space($processing_instruction_type) = 'simple'"/>
|
14389
|
+
<!-- https://github.com/metanorma/isodoc/issues/675 -->
|
14390
|
+
<xsl:when test="@label"><xsl:value-of select="@label"/></xsl:when>
|
14328
14391
|
<xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
|
14329
14392
|
</xsl:choose>
|
14330
14393
|
</xsl:when>
|
14394
|
+
<!-- https://github.com/metanorma/isodoc/issues/675 -->
|
14395
|
+
<xsl:when test="local-name(..) = 'ol' and @label and @full = 'true'"> <!-- @full added in the template li/fmt-name -->
|
14396
|
+
<xsl:value-of select="@label"/>
|
14397
|
+
</xsl:when>
|
14331
14398
|
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
14332
14399
|
|
14333
14400
|
<xsl:variable name="type" select="../@type"/>
|
@@ -14452,7 +14519,7 @@
|
|
14452
14519
|
|
14453
14520
|
</xsl:otherwise>
|
14454
14521
|
</xsl:choose>
|
14455
|
-
</xsl:template>
|
14522
|
+
</xsl:template> <!-- getListItemFormat -->
|
14456
14523
|
|
14457
14524
|
<xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
14458
14525
|
<xsl:param name="indent">0</xsl:param>
|
@@ -14586,6 +14653,11 @@
|
|
14586
14653
|
|
14587
14654
|
<xsl:call-template name="refine_list-item-label-style"/>
|
14588
14655
|
|
14656
|
+
<xsl:if test="local-name(..) = 'ul'">
|
14657
|
+
<xsl:variable name="li_label" select="@label"/>
|
14658
|
+
<xsl:copy-of select="$ul_labels//label[. = $li_label]/@*[not(local-name() = 'level')]"/>
|
14659
|
+
</xsl:if>
|
14660
|
+
|
14589
14661
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
14590
14662
|
<xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
14591
14663
|
<xsl:call-template name="append_add-style"/>
|
@@ -15981,6 +16053,16 @@
|
|
15981
16053
|
</xsl:choose>
|
15982
16054
|
</xsl:template>
|
15983
16055
|
|
16056
|
+
<!-- li/fmt-name -->
|
16057
|
+
<xsl:template match="*[local-name() = 'li']/*[local-name() = 'fmt-name']" priority="2" mode="update_xml_step1">
|
16058
|
+
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
16059
|
+
<xsl:attribute name="full">true</xsl:attribute>
|
16060
|
+
</xsl:template>
|
16061
|
+
<xsl:template match="*[local-name() = 'li']/*[local-name() = 'fmt-name']" priority="2" mode="update_xml_pres">
|
16062
|
+
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
16063
|
+
<xsl:attribute name="full">true</xsl:attribute>
|
16064
|
+
</xsl:template>
|
16065
|
+
|
15984
16066
|
<xsl:template match="*[local-name() = 'fmt-preferred']"/>
|
15985
16067
|
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_step1">
|
15986
16068
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -16795,6 +16877,64 @@
|
|
16795
16877
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
16796
16878
|
</xsl:template>
|
16797
16879
|
|
16880
|
+
<!-- ===================================== -->
|
16881
|
+
<!-- ===================================== -->
|
16882
|
+
<!-- Ruby text (CJK languages) rendering -->
|
16883
|
+
<!-- ===================================== -->
|
16884
|
+
<!-- ===================================== -->
|
16885
|
+
<xsl:template match="*[local-name() = 'ruby']">
|
16886
|
+
<fo:inline-container text-indent="0mm" last-line-end-indent="0mm">
|
16887
|
+
<xsl:if test="not(ancestor::*[local-name() = 'ruby'])">
|
16888
|
+
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
16889
|
+
</xsl:if>
|
16890
|
+
<xsl:variable name="rt_text" select="*[local-name() = 'rt']"/>
|
16891
|
+
<xsl:variable name="rb_text" select=".//*[local-name() = 'rb'][not(*[local-name() = 'ruby'])]"/>
|
16892
|
+
<!-- Example: width="2em" -->
|
16893
|
+
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
16894
|
+
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
16895
|
+
<xsl:variable name="text_width">
|
16896
|
+
<xsl:choose>
|
16897
|
+
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
16898
|
+
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
16899
|
+
</xsl:choose>
|
16900
|
+
</xsl:variable>
|
16901
|
+
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
16902
|
+
|
16903
|
+
<xsl:choose>
|
16904
|
+
<xsl:when test="ancestor::*[local-name() = 'ruby']">
|
16905
|
+
<xsl:apply-templates select="*[local-name() = 'rb']"/>
|
16906
|
+
<xsl:apply-templates select="*[local-name() = 'rt']"/>
|
16907
|
+
</xsl:when>
|
16908
|
+
<xsl:otherwise>
|
16909
|
+
<xsl:apply-templates select="*[local-name() = 'rt']"/>
|
16910
|
+
<xsl:apply-templates select="*[local-name() = 'rb']"/>
|
16911
|
+
</xsl:otherwise>
|
16912
|
+
</xsl:choose>
|
16913
|
+
|
16914
|
+
<xsl:apply-templates select="node()[not(local-name() = 'rt') and not(local-name() = 'rb')]"/>
|
16915
|
+
</fo:inline-container>
|
16916
|
+
</xsl:template>
|
16917
|
+
|
16918
|
+
<xsl:template match="*[local-name() = 'rb']">
|
16919
|
+
<fo:block line-height="1em" text-align="center"><xsl:apply-templates/></fo:block>
|
16920
|
+
</xsl:template>
|
16921
|
+
|
16922
|
+
<xsl:template match="*[local-name() = 'rt']">
|
16923
|
+
<fo:block font-size="0.5em" text-align="center" line-height="1.2em" space-before="-1.4em" space-before.conditionality="retain"> <!-- -->
|
16924
|
+
<xsl:if test="ancestor::*[local-name() = 'ruby'][last()]//*[local-name() = 'ruby'] or ancestor::*[local-name() = 'rb']">
|
16925
|
+
<xsl:attribute name="space-before">0em</xsl:attribute>
|
16926
|
+
</xsl:if>
|
16927
|
+
<xsl:apply-templates/>
|
16928
|
+
</fo:block>
|
16929
|
+
|
16930
|
+
</xsl:template>
|
16931
|
+
|
16932
|
+
<!-- ===================================== -->
|
16933
|
+
<!-- ===================================== -->
|
16934
|
+
<!-- END: Ruby text (CJK languages) rendering -->
|
16935
|
+
<!-- ===================================== -->
|
16936
|
+
<!-- ===================================== -->
|
16937
|
+
|
16798
16938
|
<xsl:template name="printEdition">
|
16799
16939
|
<xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
16800
16940
|
|