metanorma-ogc 2.7.3 → 2.7.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/ogc/base_convert.rb +2 -1
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +179 -53
- data/lib/isodoc/ogc/ogc.best-practice.xsl +179 -53
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +179 -53
- data/lib/isodoc/ogc/ogc.community-practice.xsl +179 -53
- data/lib/isodoc/ogc/ogc.community-standard.xsl +179 -53
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +179 -53
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +179 -53
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +179 -53
- data/lib/isodoc/ogc/ogc.other.xsl +179 -53
- data/lib/isodoc/ogc/ogc.policy.xsl +179 -53
- data/lib/isodoc/ogc/ogc.reference-model.xsl +179 -53
- data/lib/isodoc/ogc/ogc.release-notes.xsl +179 -53
- data/lib/isodoc/ogc/ogc.standard.xsl +179 -53
- data/lib/isodoc/ogc/ogc.test-suite.xsl +179 -53
- data/lib/isodoc/ogc/ogc.user-guide.xsl +179 -53
- data/lib/isodoc/ogc/ogc.white-paper.xsl +162 -38
- data/lib/isodoc/ogc/presentation_xml_convert.rb +18 -8
- data/lib/metanorma/ogc/basicdoc.rng +14 -8
- data/lib/metanorma/ogc/biblio-standoc.rng +37 -7
- data/lib/metanorma/ogc/biblio.rng +30 -18
- data/lib/metanorma/ogc/isodoc.rng +115 -96
- data/lib/metanorma/ogc/ogc.rng +0 -32
- data/lib/metanorma/ogc/relaton-ogc.rng +0 -16
- data/lib/metanorma/ogc/reqt.rng +7 -6
- data/lib/metanorma/ogc/validate.rb +15 -18
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7403c0f5f090aa0485388069e1a229e745977bf781fc4bc8943883e736275080
|
4
|
+
data.tar.gz: 56ec1ec4ab4ecd8e982b0278bc60ff3f7c165426a227a1a8418d1992ba54fb77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f273f2d1b5062e3bffdd14decd29b6ddee5d89d9d83799d6cf50702dc25a7125c08e2f87deea6e43ea5cd5fd14ef19c19664f2362b0a5ff9044e0c12d6b52a9b
|
7
|
+
data.tar.gz: 9265fa7811f9e82c5ec1740df9baaaaa32751888393ec6d23ca3bc96747625c6a8661060eba224e496b55e325bc11445d1e10e508e184efde619cef79c613067
|
@@ -831,8 +831,8 @@
|
|
831
831
|
|
832
832
|
<xsl:template name="insertListOf_Title">
|
833
833
|
<xsl:param name="title"/>
|
834
|
-
<fo:block-container margin-left="-18mm" keep-with-next="always" margin-bottom="10pt" space-before="36pt">
|
835
|
-
<fo:block-container margin-left="0mm">
|
834
|
+
<fo:block-container margin-left="-18mm" keep-with-next="always" margin-bottom="10pt" space-before="36pt" role="SKIP">
|
835
|
+
<fo:block-container margin-left="0mm" role="H2">
|
836
836
|
<xsl:call-template name="insertSectionTitle">
|
837
837
|
<xsl:with-param name="title" select="$title"/>
|
838
838
|
</xsl:call-template>
|
@@ -946,7 +946,7 @@
|
|
946
946
|
<xsl:call-template name="insertListOf_Title">
|
947
947
|
<xsl:with-param name="title" select="$title-list-tables"/>
|
948
948
|
</xsl:call-template>
|
949
|
-
<fo:block-container line-height="130%">
|
949
|
+
<fo:block-container line-height="130%" role="TOC">
|
950
950
|
<xsl:for-each select="$contents//tables/table">
|
951
951
|
<xsl:call-template name="insertListOf_Item"/>
|
952
952
|
</xsl:for-each>
|
@@ -958,7 +958,7 @@
|
|
958
958
|
<xsl:call-template name="insertListOf_Title">
|
959
959
|
<xsl:with-param name="title" select="$title-list-figures"/>
|
960
960
|
</xsl:call-template>
|
961
|
-
<fo:block-container line-height="130%">
|
961
|
+
<fo:block-container line-height="130%" role="TOC">
|
962
962
|
<xsl:for-each select="$contents//figures/figure">
|
963
963
|
<xsl:call-template name="insertListOf_Item"/>
|
964
964
|
</xsl:for-each>
|
@@ -970,7 +970,7 @@
|
|
970
970
|
<xsl:call-template name="insertListOf_Title">
|
971
971
|
<xsl:with-param name="title" select="$title-list-recommendations"/>
|
972
972
|
</xsl:call-template>
|
973
|
-
<fo:block-container line-height="130%">
|
973
|
+
<fo:block-container line-height="130%" role="TOC">
|
974
974
|
<xsl:for-each select="xalan:nodeset($toc_recommendations)/*[normalize-space(@id) != '']">
|
975
975
|
<fo:block text-align-last="justify" margin-top="6pt" role="TOCI">
|
976
976
|
<fo:basic-link internal-destination="{@id}">
|
@@ -1012,9 +1012,7 @@
|
|
1012
1012
|
<xsl:with-param name="letter-spacing" select="1.1"/>
|
1013
1013
|
</xsl:call-template>
|
1014
1014
|
</fo:block>
|
1015
|
-
<
|
1016
|
-
<fo:block margin-top="4pt"> </fo:block>
|
1017
|
-
</fo:block-container>
|
1015
|
+
<xsl:call-template name="insertBigHorizontalLine"/>
|
1018
1016
|
</fo:block>
|
1019
1017
|
</fo:block-container>
|
1020
1018
|
</fo:block-container>
|
@@ -1346,8 +1344,8 @@
|
|
1346
1344
|
|
1347
1345
|
<xsl:choose>
|
1348
1346
|
<xsl:when test="$level = 1">
|
1349
|
-
<fo:block-container margin-left="-22mm">
|
1350
|
-
<fo:block-container margin-left="0mm">
|
1347
|
+
<fo:block-container margin-left="-22mm" role="SKIP">
|
1348
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
1351
1349
|
<fo:block margin-bottom="10pt" space-before="36pt" keep-with-next="always" role="H{$level}">
|
1352
1350
|
<fo:table table-layout="fixed" width="100%">
|
1353
1351
|
<fo:table-column column-width="22mm"/>
|
@@ -1824,9 +1822,7 @@
|
|
1824
1822
|
</xsl:call-template> -->
|
1825
1823
|
</fo:block>
|
1826
1824
|
|
1827
|
-
<
|
1828
|
-
<fo:block margin-top="4pt"> </fo:block>
|
1829
|
-
</fo:block-container>
|
1825
|
+
<xsl:call-template name="insertBigHorizontalLine"/>
|
1830
1826
|
</xsl:template>
|
1831
1827
|
|
1832
1828
|
<xsl:template match="text()" mode="titlebig">
|
@@ -1952,8 +1948,14 @@
|
|
1952
1948
|
</xsl:template>
|
1953
1949
|
|
1954
1950
|
<xsl:template name="insertShortHorizontalLine">
|
1955
|
-
<fo:block-container width="12.7mm" border-top="1pt solid {$color_design}" margin-top="3mm">
|
1956
|
-
<fo:block font-size="1pt"> </fo:block>
|
1951
|
+
<fo:block-container width="12.7mm" border-top="1pt solid {$color_design}" margin-top="3mm" role="SKIP">
|
1952
|
+
<fo:block font-size="1pt" role="SKIP"><fo:wrapper role="artifact"> </fo:wrapper></fo:block>
|
1953
|
+
</fo:block-container>
|
1954
|
+
</xsl:template>
|
1955
|
+
|
1956
|
+
<xsl:template name="insertBigHorizontalLine">
|
1957
|
+
<fo:block-container width="22.5mm" border-bottom="2pt solid {$color_design}" role="SKIP">
|
1958
|
+
<fo:block margin-top="4pt" role="SKIP"><fo:wrapper role="artifact"> </fo:wrapper></fo:block>
|
1957
1959
|
</fo:block-container>
|
1958
1960
|
</xsl:template>
|
1959
1961
|
|
@@ -2702,6 +2704,7 @@
|
|
2702
2704
|
</xsl:template> <!-- refine_table-style -->
|
2703
2705
|
|
2704
2706
|
<xsl:attribute-set name="table-name-style">
|
2707
|
+
<xsl:attribute name="role">Caption</xsl:attribute>
|
2705
2708
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2706
2709
|
|
2707
2710
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
@@ -2714,6 +2717,9 @@
|
|
2714
2717
|
|
2715
2718
|
<xsl:template name="refine_table-name-style">
|
2716
2719
|
<xsl:param name="continued"/>
|
2720
|
+
<xsl:if test="$continued = 'true'">
|
2721
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
2722
|
+
</xsl:if>
|
2717
2723
|
|
2718
2724
|
</xsl:template> <!-- refine_table-name-style -->
|
2719
2725
|
|
@@ -4577,7 +4583,7 @@
|
|
4577
4583
|
</xsl:if>
|
4578
4584
|
|
4579
4585
|
</fo:block-container>
|
4580
|
-
</xsl:variable>
|
4586
|
+
</xsl:variable> <!-- END: variable name="table" -->
|
4581
4587
|
|
4582
4588
|
<xsl:variable name="isAdded" select="@added"/>
|
4583
4589
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -4631,11 +4637,12 @@
|
|
4631
4637
|
|
4632
4638
|
</xsl:template>
|
4633
4639
|
|
4640
|
+
<!-- table/name-->
|
4634
4641
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
4635
4642
|
<xsl:param name="continued"/>
|
4636
4643
|
<xsl:if test="normalize-space() != ''">
|
4637
4644
|
|
4638
|
-
<fo:block xsl:use-attribute-sets="table-name-style"
|
4645
|
+
<fo:block xsl:use-attribute-sets="table-name-style">
|
4639
4646
|
|
4640
4647
|
<xsl:call-template name="refine_table-name-style">
|
4641
4648
|
<xsl:with-param name="continued" select="$continued"/>
|
@@ -5112,7 +5119,7 @@
|
|
5112
5119
|
|
5113
5120
|
<xsl:variable name="tableWithNotesAndFootnotes">
|
5114
5121
|
|
5115
|
-
<fo:table keep-with-previous="always">
|
5122
|
+
<fo:table keep-with-previous="always" role="SKIP">
|
5116
5123
|
<xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
|
5117
5124
|
<xsl:variable name="name" select="local-name()"/>
|
5118
5125
|
<xsl:choose>
|
@@ -5143,9 +5150,9 @@
|
|
5143
5150
|
</xsl:otherwise>
|
5144
5151
|
</xsl:choose>
|
5145
5152
|
|
5146
|
-
<fo:table-body>
|
5147
|
-
<fo:table-row>
|
5148
|
-
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
5153
|
+
<fo:table-body role="SKIP">
|
5154
|
+
<fo:table-row role="SKIP">
|
5155
|
+
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
|
5149
5156
|
|
5150
5157
|
<xsl:call-template name="refine_table-footer-cell-style"/>
|
5151
5158
|
|
@@ -5542,6 +5549,7 @@
|
|
5542
5549
|
<!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
|
5543
5550
|
<!-- fn in text -->
|
5544
5551
|
<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">
|
5552
|
+
<xsl:param name="footnote_body_from_table">false</xsl:param>
|
5545
5553
|
|
5546
5554
|
<!-- list of unique footnotes -->
|
5547
5555
|
<xsl:variable name="p_fn_">
|
@@ -5607,7 +5615,7 @@
|
|
5607
5615
|
<xsl:copy-of select="$footnote_inline"/>
|
5608
5616
|
</xsl:when>
|
5609
5617
|
<!-- <xsl:when test="$footnotes//*[local-name() = 'fmt-fn-body'][@id = $ref_id] or normalize-space(@skip_footnote_body) = 'false'"> -->
|
5610
|
-
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
5618
|
+
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
|
5611
5619
|
|
5612
5620
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
5613
5621
|
<xsl:copy-of select="$footnote_inline"/>
|
@@ -6016,39 +6024,51 @@
|
|
6016
6024
|
<!-- fn reference in the table rendering (for instance, 'some text 1) some text' ) -->
|
6017
6025
|
<!-- fn --> <!-- in table --> <!-- for figure see <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/> -->
|
6018
6026
|
<xsl:template match="*[local-name()='fn']">
|
6019
|
-
<
|
6020
|
-
|
6021
|
-
|
6027
|
+
<xsl:variable name="target" select="@target"/>
|
6028
|
+
<xsl:choose>
|
6029
|
+
<!-- case for footnotes in Requirement tables (https://github.com/metanorma/metanorma-ogc/issues/791) -->
|
6030
|
+
<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]">
|
6031
|
+
<xsl:call-template name="fn">
|
6032
|
+
<xsl:with-param name="footnote_body_from_table">true</xsl:with-param>
|
6033
|
+
</xsl:call-template>
|
6034
|
+
</xsl:when>
|
6035
|
+
<xsl:otherwise>
|
6022
6036
|
|
6023
|
-
|
6024
|
-
<fo:basic-link internal-destination="{@target}" fox:alt-text="footnote {@reference}">
|
6025
|
-
<!-- <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> --> <!-- for footnotes in tables -->
|
6026
|
-
<!-- <xsl:attribute name="internal-destination">
|
6027
|
-
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
6028
|
-
</xsl:attribute>
|
6029
|
-
</xsl:if>
|
6030
|
-
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
6031
|
-
<xsl:attribute name="internal-destination">
|
6032
|
-
<xsl:value-of select="@reference"/><xsl:text>_</xsl:text>
|
6033
|
-
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
6034
|
-
</xsl:attribute>
|
6035
|
-
</xsl:if> -->
|
6036
|
-
<!-- <xsl:if test="$namespace = 'plateau'">
|
6037
|
-
<xsl:text>※</xsl:text>
|
6038
|
-
</xsl:if> -->
|
6039
|
-
<!-- <xsl:value-of select="@reference"/> -->
|
6037
|
+
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
6040
6038
|
|
6041
|
-
|
6039
|
+
<xsl:call-template name="refine_fn-reference-style"/>
|
6042
6040
|
|
6043
|
-
|
6044
|
-
<
|
6045
|
-
|
6046
|
-
|
6047
|
-
|
6048
|
-
|
6049
|
-
|
6050
|
-
|
6051
|
-
|
6041
|
+
<!-- <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> --> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
6042
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="footnote {@reference}">
|
6043
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> --> <!-- for footnotes in tables -->
|
6044
|
+
<!-- <xsl:attribute name="internal-destination">
|
6045
|
+
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
6046
|
+
</xsl:attribute>
|
6047
|
+
</xsl:if>
|
6048
|
+
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
6049
|
+
<xsl:attribute name="internal-destination">
|
6050
|
+
<xsl:value-of select="@reference"/><xsl:text>_</xsl:text>
|
6051
|
+
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
6052
|
+
</xsl:attribute>
|
6053
|
+
</xsl:if> -->
|
6054
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
6055
|
+
<xsl:text>※</xsl:text>
|
6056
|
+
</xsl:if> -->
|
6057
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
6058
|
+
|
6059
|
+
<xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
|
6060
|
+
|
6061
|
+
<!-- <xsl:if test="$namespace = 'bsi'">
|
6062
|
+
<xsl:text>)</xsl:text>
|
6063
|
+
</xsl:if> -->
|
6064
|
+
<!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
|
6065
|
+
<!-- <xsl:if test="$namespace = 'jis'">
|
6066
|
+
<fo:inline font-weight="normal">)</fo:inline>
|
6067
|
+
</xsl:if> -->
|
6068
|
+
</fo:basic-link>
|
6069
|
+
</fo:inline>
|
6070
|
+
</xsl:otherwise>
|
6071
|
+
</xsl:choose>
|
6052
6072
|
</xsl:template> <!-- fn -->
|
6053
6073
|
|
6054
6074
|
<!-- fn/text() -->
|
@@ -10060,6 +10080,13 @@
|
|
10060
10080
|
<xsl:apply-templates select="."/>
|
10061
10081
|
</xsl:template>
|
10062
10082
|
|
10083
|
+
<!-- prevent missing stem for table and figures in ToC -->
|
10084
|
+
<xsl:template match="*[local-name() = 'name' or local-name() = 'fmt-name']//*[local-name() = 'stem']" mode="contents">
|
10085
|
+
<xsl:if test="not(following-sibling::*[1][local-name() = 'fmt-stem'])">
|
10086
|
+
<xsl:apply-templates select="."/>
|
10087
|
+
</xsl:if>
|
10088
|
+
</xsl:template>
|
10089
|
+
|
10063
10090
|
<xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/>
|
10064
10091
|
|
10065
10092
|
<xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/>
|
@@ -10258,6 +10285,26 @@
|
|
10258
10285
|
</xsl:template> <!-- insertTableBookmarks -->
|
10259
10286
|
<!-- End Bookmarks -->
|
10260
10287
|
|
10288
|
+
<!-- ============================ -->
|
10289
|
+
<!-- mode="bookmark_clean" -->
|
10290
|
+
<!-- ============================ -->
|
10291
|
+
<xsl:template match="node()" mode="bookmark_clean">
|
10292
|
+
<xsl:apply-templates select="node()" mode="bookmark_clean"/>
|
10293
|
+
</xsl:template>
|
10294
|
+
|
10295
|
+
<xsl:template match="text()" mode="bookmark_clean">
|
10296
|
+
<xsl:value-of select="."/>
|
10297
|
+
</xsl:template>
|
10298
|
+
|
10299
|
+
<xsl:template match="*[local-name() = 'math']" mode="bookmark_clean">
|
10300
|
+
<xsl:value-of select="normalize-space(.)"/>
|
10301
|
+
</xsl:template>
|
10302
|
+
|
10303
|
+
<xsl:template match="*[local-name() = 'asciimath']" mode="bookmark_clean"/>
|
10304
|
+
<!-- ============================ -->
|
10305
|
+
<!-- END: mode="bookmark_clean" -->
|
10306
|
+
<!-- ============================ -->
|
10307
|
+
|
10261
10308
|
<xsl:template name="getLangVersion">
|
10262
10309
|
<xsl:param name="lang"/>
|
10263
10310
|
<xsl:param name="doctype" select="''"/>
|
@@ -12296,9 +12343,15 @@
|
|
12296
12343
|
<xsl:when test="local-name(..) = 'ul'">
|
12297
12344
|
<xsl:choose>
|
12298
12345
|
<xsl:when test="normalize-space($processing_instruction_type) = 'simple'"/>
|
12346
|
+
<!-- https://github.com/metanorma/isodoc/issues/675 -->
|
12347
|
+
<xsl:when test="@label"><xsl:value-of select="@label"/></xsl:when>
|
12299
12348
|
<xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
|
12300
12349
|
</xsl:choose>
|
12301
12350
|
</xsl:when>
|
12351
|
+
<!-- https://github.com/metanorma/isodoc/issues/675 -->
|
12352
|
+
<xsl:when test="local-name(..) = 'ol' and @label and @full = 'true'"> <!-- @full added in the template li/fmt-name -->
|
12353
|
+
<xsl:value-of select="@label"/>
|
12354
|
+
</xsl:when>
|
12302
12355
|
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
12303
12356
|
|
12304
12357
|
<xsl:variable name="type" select="../@type"/>
|
@@ -12423,7 +12476,7 @@
|
|
12423
12476
|
|
12424
12477
|
</xsl:otherwise>
|
12425
12478
|
</xsl:choose>
|
12426
|
-
</xsl:template>
|
12479
|
+
</xsl:template> <!-- getListItemFormat -->
|
12427
12480
|
|
12428
12481
|
<xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
12429
12482
|
<xsl:param name="indent">0</xsl:param>
|
@@ -12555,6 +12608,11 @@
|
|
12555
12608
|
|
12556
12609
|
<xsl:call-template name="refine_list-item-label-style"/>
|
12557
12610
|
|
12611
|
+
<xsl:if test="local-name(..) = 'ul'">
|
12612
|
+
<xsl:variable name="li_label" select="@label"/>
|
12613
|
+
<xsl:copy-of select="$ul_labels//label[. = $li_label]/@*[not(local-name() = 'level')]"/>
|
12614
|
+
</xsl:if>
|
12615
|
+
|
12558
12616
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
12559
12617
|
<xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
12560
12618
|
<xsl:call-template name="append_add-style"/>
|
@@ -13958,6 +14016,16 @@
|
|
13958
14016
|
</xsl:choose>
|
13959
14017
|
</xsl:template>
|
13960
14018
|
|
14019
|
+
<!-- li/fmt-name -->
|
14020
|
+
<xsl:template match="*[local-name() = 'li']/*[local-name() = 'fmt-name']" priority="2" mode="update_xml_step1">
|
14021
|
+
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
14022
|
+
<xsl:attribute name="full">true</xsl:attribute>
|
14023
|
+
</xsl:template>
|
14024
|
+
<xsl:template match="*[local-name() = 'li']/*[local-name() = 'fmt-name']" priority="2" mode="update_xml_pres">
|
14025
|
+
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
14026
|
+
<xsl:attribute name="full">true</xsl:attribute>
|
14027
|
+
</xsl:template>
|
14028
|
+
|
13961
14029
|
<xsl:template match="*[local-name() = 'fmt-preferred']"/>
|
13962
14030
|
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_step1">
|
13963
14031
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -14772,6 +14840,64 @@
|
|
14772
14840
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
14773
14841
|
</xsl:template>
|
14774
14842
|
|
14843
|
+
<!-- ===================================== -->
|
14844
|
+
<!-- ===================================== -->
|
14845
|
+
<!-- Ruby text (CJK languages) rendering -->
|
14846
|
+
<!-- ===================================== -->
|
14847
|
+
<!-- ===================================== -->
|
14848
|
+
<xsl:template match="*[local-name() = 'ruby']">
|
14849
|
+
<fo:inline-container text-indent="0mm" last-line-end-indent="0mm">
|
14850
|
+
<xsl:if test="not(ancestor::*[local-name() = 'ruby'])">
|
14851
|
+
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
14852
|
+
</xsl:if>
|
14853
|
+
<xsl:variable name="rt_text" select="*[local-name() = 'rt']"/>
|
14854
|
+
<xsl:variable name="rb_text" select=".//*[local-name() = 'rb'][not(*[local-name() = 'ruby'])]"/>
|
14855
|
+
<!-- Example: width="2em" -->
|
14856
|
+
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
14857
|
+
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
14858
|
+
<xsl:variable name="text_width">
|
14859
|
+
<xsl:choose>
|
14860
|
+
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
14861
|
+
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
14862
|
+
</xsl:choose>
|
14863
|
+
</xsl:variable>
|
14864
|
+
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
14865
|
+
|
14866
|
+
<xsl:choose>
|
14867
|
+
<xsl:when test="ancestor::*[local-name() = 'ruby']">
|
14868
|
+
<xsl:apply-templates select="*[local-name() = 'rb']"/>
|
14869
|
+
<xsl:apply-templates select="*[local-name() = 'rt']"/>
|
14870
|
+
</xsl:when>
|
14871
|
+
<xsl:otherwise>
|
14872
|
+
<xsl:apply-templates select="*[local-name() = 'rt']"/>
|
14873
|
+
<xsl:apply-templates select="*[local-name() = 'rb']"/>
|
14874
|
+
</xsl:otherwise>
|
14875
|
+
</xsl:choose>
|
14876
|
+
|
14877
|
+
<xsl:apply-templates select="node()[not(local-name() = 'rt') and not(local-name() = 'rb')]"/>
|
14878
|
+
</fo:inline-container>
|
14879
|
+
</xsl:template>
|
14880
|
+
|
14881
|
+
<xsl:template match="*[local-name() = 'rb']">
|
14882
|
+
<fo:block line-height="1em" text-align="center"><xsl:apply-templates/></fo:block>
|
14883
|
+
</xsl:template>
|
14884
|
+
|
14885
|
+
<xsl:template match="*[local-name() = 'rt']">
|
14886
|
+
<fo:block font-size="0.5em" text-align="center" line-height="1.2em" space-before="-1.4em" space-before.conditionality="retain"> <!-- -->
|
14887
|
+
<xsl:if test="ancestor::*[local-name() = 'ruby'][last()]//*[local-name() = 'ruby'] or ancestor::*[local-name() = 'rb']">
|
14888
|
+
<xsl:attribute name="space-before">0em</xsl:attribute>
|
14889
|
+
</xsl:if>
|
14890
|
+
<xsl:apply-templates/>
|
14891
|
+
</fo:block>
|
14892
|
+
|
14893
|
+
</xsl:template>
|
14894
|
+
|
14895
|
+
<!-- ===================================== -->
|
14896
|
+
<!-- ===================================== -->
|
14897
|
+
<!-- END: Ruby text (CJK languages) rendering -->
|
14898
|
+
<!-- ===================================== -->
|
14899
|
+
<!-- ===================================== -->
|
14900
|
+
|
14775
14901
|
<xsl:template name="printEdition">
|
14776
14902
|
<xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
14777
14903
|
|