metanorma-ogc 2.7.3 → 2.7.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/ogc/base_convert.rb +4 -17
- data/lib/isodoc/ogc/html/htmlstyle.css +1 -1
- data/lib/isodoc/ogc/html/htmlstyle.scss +1 -1
- data/lib/isodoc/ogc/html/ogc.css +1 -1
- data/lib/isodoc/ogc/html/ogc.scss +1 -1
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +354 -82
- data/lib/isodoc/ogc/ogc.best-practice.xsl +354 -82
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +354 -82
- data/lib/isodoc/ogc/ogc.community-practice.xsl +354 -82
- data/lib/isodoc/ogc/ogc.community-standard.xsl +354 -82
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +354 -82
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +354 -82
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +354 -82
- data/lib/isodoc/ogc/ogc.other.xsl +354 -82
- data/lib/isodoc/ogc/ogc.policy.xsl +354 -82
- data/lib/isodoc/ogc/ogc.reference-model.xsl +354 -82
- data/lib/isodoc/ogc/ogc.release-notes.xsl +354 -82
- data/lib/isodoc/ogc/ogc.standard.xsl +354 -82
- data/lib/isodoc/ogc/ogc.test-suite.xsl +354 -82
- data/lib/isodoc/ogc/ogc.user-guide.xsl +354 -82
- data/lib/isodoc/ogc/ogc.white-paper.xsl +341 -68
- data/lib/isodoc/ogc/presentation_sections.rb +18 -14
- data/lib/isodoc/ogc/presentation_xml_convert.rb +18 -8
- data/lib/isodoc/ogc/sections.rb +0 -11
- data/lib/isodoc/ogc/xref.rb +9 -10
- 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/cleanup.rb +8 -18
- data/lib/metanorma/ogc/converter.rb +12 -12
- data/lib/metanorma/ogc/isodoc.rng +130 -96
- data/lib/metanorma/ogc/ogc.rng +2 -67
- data/lib/metanorma/ogc/relaton-ogc.rng +0 -16
- data/lib/metanorma/ogc/reqt.rng +7 -6
- data/lib/metanorma/ogc/validate.rb +18 -21
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +2 -2
@@ -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
|
|
@@ -4426,8 +4432,14 @@
|
|
4426
4432
|
</xsl:choose>
|
4427
4433
|
</xsl:variable>
|
4428
4434
|
|
4435
|
+
<xsl:call-template name="setNamedDestination"/>
|
4436
|
+
|
4429
4437
|
<fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
|
4430
4438
|
|
4439
|
+
<xsl:for-each select="*[local-name() = 'name']">
|
4440
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
4441
|
+
</xsl:for-each>
|
4442
|
+
|
4431
4443
|
<xsl:call-template name="refine_table-container-style">
|
4432
4444
|
<xsl:with-param name="margin-side" select="$margin-side"/>
|
4433
4445
|
</xsl:call-template>
|
@@ -4577,7 +4589,7 @@
|
|
4577
4589
|
</xsl:if>
|
4578
4590
|
|
4579
4591
|
</fo:block-container>
|
4580
|
-
</xsl:variable>
|
4592
|
+
</xsl:variable> <!-- END: variable name="table" -->
|
4581
4593
|
|
4582
4594
|
<xsl:variable name="isAdded" select="@added"/>
|
4583
4595
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -4631,11 +4643,13 @@
|
|
4631
4643
|
|
4632
4644
|
</xsl:template>
|
4633
4645
|
|
4646
|
+
<!-- table/name-->
|
4634
4647
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
4635
4648
|
<xsl:param name="continued"/>
|
4649
|
+
<xsl:param name="cols-count"/>
|
4636
4650
|
<xsl:if test="normalize-space() != ''">
|
4637
4651
|
|
4638
|
-
<fo:block xsl:use-attribute-sets="table-name-style"
|
4652
|
+
<fo:block xsl:use-attribute-sets="table-name-style">
|
4639
4653
|
|
4640
4654
|
<xsl:call-template name="refine_table-name-style">
|
4641
4655
|
<xsl:with-param name="continued" select="$continued"/>
|
@@ -4654,9 +4668,30 @@
|
|
4654
4668
|
|
4655
4669
|
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
4656
4670
|
<xsl:if test="$continued = 'true'">
|
4657
|
-
|
4658
|
-
|
4659
|
-
|
4671
|
+
|
4672
|
+
<!-- to prevent the error 'THead element may contain only TR elements' -->
|
4673
|
+
|
4674
|
+
<xsl:choose>
|
4675
|
+
<xsl:when test="string(number($cols-count)) != 'NaN'">
|
4676
|
+
<fo:table width="100%" table-layout="fixed" role="SKIP">
|
4677
|
+
<fo:table-body role="SKIP">
|
4678
|
+
<fo:table-row>
|
4679
|
+
<fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
|
4680
|
+
<fo:block text-align="right" role="SKIP">
|
4681
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
4682
|
+
</fo:block>
|
4683
|
+
</fo:table-cell>
|
4684
|
+
</fo:table-row>
|
4685
|
+
</fo:table-body>
|
4686
|
+
</fo:table>
|
4687
|
+
</xsl:when>
|
4688
|
+
<xsl:otherwise>
|
4689
|
+
<fo:block text-align="right">
|
4690
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
4691
|
+
</fo:block>
|
4692
|
+
</xsl:otherwise>
|
4693
|
+
</xsl:choose>
|
4694
|
+
|
4660
4695
|
</xsl:if>
|
4661
4696
|
<!-- </xsl:if> -->
|
4662
4697
|
|
@@ -5049,6 +5084,7 @@
|
|
5049
5084
|
|
5050
5085
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
5051
5086
|
<xsl:with-param name="continued">true</xsl:with-param>
|
5087
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5052
5088
|
</xsl:apply-templates>
|
5053
5089
|
|
5054
5090
|
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
@@ -5112,7 +5148,7 @@
|
|
5112
5148
|
|
5113
5149
|
<xsl:variable name="tableWithNotesAndFootnotes">
|
5114
5150
|
|
5115
|
-
<fo:table keep-with-previous="always">
|
5151
|
+
<fo:table keep-with-previous="always" role="SKIP">
|
5116
5152
|
<xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
|
5117
5153
|
<xsl:variable name="name" select="local-name()"/>
|
5118
5154
|
<xsl:choose>
|
@@ -5143,9 +5179,9 @@
|
|
5143
5179
|
</xsl:otherwise>
|
5144
5180
|
</xsl:choose>
|
5145
5181
|
|
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}">
|
5182
|
+
<fo:table-body role="SKIP">
|
5183
|
+
<fo:table-row role="SKIP">
|
5184
|
+
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
|
5149
5185
|
|
5150
5186
|
<xsl:call-template name="refine_table-footer-cell-style"/>
|
5151
5187
|
|
@@ -5430,8 +5466,8 @@
|
|
5430
5466
|
<xsl:for-each select="xalan:nodeset($styles__)/item">
|
5431
5467
|
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
|
5432
5468
|
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
|
5433
|
-
<xsl:if test="$key = 'color' or
|
5434
|
-
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
5469
|
+
<xsl:if test="$key = 'color' or $key = 'background-color' or $key = 'border' or $key = 'border-top' or $key = 'border-right' or $key = 'border-left' or $key = 'border-bottom' or $key = 'border-style' or $key = 'border-width' or $key = 'border-color' or $key = 'border-top-style' or $key = 'border-top-width' or $key = 'border-top-color' or $key = 'border-right-style' or $key = 'border-right-width' or $key = 'border-right-color' or $key = 'border-left-style' or $key = 'border-left-width' or $key = 'border-left-color' or $key = 'border-bottom-style' or $key = 'border-bottom-width' or $key = 'border-bottom-color'">
|
5470
|
+
<style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
|
5435
5471
|
</xsl:if>
|
5436
5472
|
</xsl:for-each>
|
5437
5473
|
</xsl:variable>
|
@@ -5495,6 +5531,7 @@
|
|
5495
5531
|
<!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
|
5496
5532
|
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example'] | *[local-name()='table']/*[local-name()='tfoot']//*[local-name()='note' or local-name() = 'example']" priority="2">
|
5497
5533
|
|
5534
|
+
<xsl:call-template name="setNamedDestination"/>
|
5498
5535
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
5499
5536
|
<xsl:copy-of select="@id"/>
|
5500
5537
|
|
@@ -5542,6 +5579,7 @@
|
|
5542
5579
|
<!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
|
5543
5580
|
<!-- fn in text -->
|
5544
5581
|
<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">
|
5582
|
+
<xsl:param name="footnote_body_from_table">false</xsl:param>
|
5545
5583
|
|
5546
5584
|
<!-- list of unique footnotes -->
|
5547
5585
|
<xsl:variable name="p_fn_">
|
@@ -5607,7 +5645,7 @@
|
|
5607
5645
|
<xsl:copy-of select="$footnote_inline"/>
|
5608
5646
|
</xsl:when>
|
5609
5647
|
<!-- <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'">
|
5648
|
+
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
|
5611
5649
|
|
5612
5650
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
5613
5651
|
<xsl:copy-of select="$footnote_inline"/>
|
@@ -6016,39 +6054,51 @@
|
|
6016
6054
|
<!-- fn reference in the table rendering (for instance, 'some text 1) some text' ) -->
|
6017
6055
|
<!-- fn --> <!-- in table --> <!-- for figure see <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/> -->
|
6018
6056
|
<xsl:template match="*[local-name()='fn']">
|
6019
|
-
<
|
6020
|
-
|
6021
|
-
|
6057
|
+
<xsl:variable name="target" select="@target"/>
|
6058
|
+
<xsl:choose>
|
6059
|
+
<!-- case for footnotes in Requirement tables (https://github.com/metanorma/metanorma-ogc/issues/791) -->
|
6060
|
+
<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]">
|
6061
|
+
<xsl:call-template name="fn">
|
6062
|
+
<xsl:with-param name="footnote_body_from_table">true</xsl:with-param>
|
6063
|
+
</xsl:call-template>
|
6064
|
+
</xsl:when>
|
6065
|
+
<xsl:otherwise>
|
6022
6066
|
|
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"/> -->
|
6067
|
+
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
6040
6068
|
|
6041
|
-
|
6069
|
+
<xsl:call-template name="refine_fn-reference-style"/>
|
6042
6070
|
|
6043
|
-
|
6044
|
-
<
|
6045
|
-
|
6046
|
-
|
6047
|
-
|
6048
|
-
|
6049
|
-
|
6050
|
-
|
6051
|
-
|
6071
|
+
<!-- <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> --> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
6072
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="footnote {@reference}">
|
6073
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> --> <!-- for footnotes in tables -->
|
6074
|
+
<!-- <xsl:attribute name="internal-destination">
|
6075
|
+
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
6076
|
+
</xsl:attribute>
|
6077
|
+
</xsl:if>
|
6078
|
+
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
6079
|
+
<xsl:attribute name="internal-destination">
|
6080
|
+
<xsl:value-of select="@reference"/><xsl:text>_</xsl:text>
|
6081
|
+
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
6082
|
+
</xsl:attribute>
|
6083
|
+
</xsl:if> -->
|
6084
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
6085
|
+
<xsl:text>※</xsl:text>
|
6086
|
+
</xsl:if> -->
|
6087
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
6088
|
+
|
6089
|
+
<xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
|
6090
|
+
|
6091
|
+
<!-- <xsl:if test="$namespace = 'bsi'">
|
6092
|
+
<xsl:text>)</xsl:text>
|
6093
|
+
</xsl:if> -->
|
6094
|
+
<!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
|
6095
|
+
<!-- <xsl:if test="$namespace = 'jis'">
|
6096
|
+
<fo:inline font-weight="normal">)</fo:inline>
|
6097
|
+
</xsl:if> -->
|
6098
|
+
</fo:basic-link>
|
6099
|
+
</fo:inline>
|
6100
|
+
</xsl:otherwise>
|
6101
|
+
</xsl:choose>
|
6052
6102
|
</xsl:template> <!-- fn -->
|
6053
6103
|
|
6054
6104
|
<!-- fn/text() -->
|
@@ -6103,6 +6153,10 @@
|
|
6103
6153
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
6104
6154
|
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
6105
6155
|
|
6156
|
+
<xsl:if test="@key = 'true' and ancestor::*[local-name() = 'figure']">
|
6157
|
+
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
6158
|
+
</xsl:if>
|
6159
|
+
|
6106
6160
|
<xsl:call-template name="setBlockSpanAll"/>
|
6107
6161
|
|
6108
6162
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -6396,7 +6450,7 @@
|
|
6396
6450
|
|
6397
6451
|
<!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
|
6398
6452
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
|
6399
|
-
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
|
6453
|
+
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always" keep-with-previous="always">
|
6400
6454
|
<xsl:call-template name="refine_figure_key_style"/>
|
6401
6455
|
<xsl:apply-templates/>
|
6402
6456
|
</fo:block>
|
@@ -6654,6 +6708,7 @@
|
|
6654
6708
|
|
6655
6709
|
<xsl:call-template name="refine_dt-cell-style"/>
|
6656
6710
|
|
6711
|
+
<xsl:call-template name="setNamedDestination"/>
|
6657
6712
|
<fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
|
6658
6713
|
|
6659
6714
|
<xsl:choose>
|
@@ -7093,7 +7148,7 @@
|
|
7093
7148
|
<!-- ================= -->
|
7094
7149
|
|
7095
7150
|
<!-- highlight text -->
|
7096
|
-
<xsl:template match="*[local-name()='hi']">
|
7151
|
+
<xsl:template match="*[local-name()='hi'] | *[local-name() = 'span'][@class = 'fmt-hi']" priority="3">
|
7097
7152
|
<fo:inline background-color="yellow">
|
7098
7153
|
<xsl:apply-templates/>
|
7099
7154
|
</fo:inline>
|
@@ -8688,6 +8743,7 @@
|
|
8688
8743
|
<!-- Appendix processing -->
|
8689
8744
|
<!-- ======================== -->
|
8690
8745
|
<xsl:template match="*[local-name()='appendix']">
|
8746
|
+
<xsl:call-template name="setNamedDestination"/>
|
8691
8747
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
8692
8748
|
<xsl:apply-templates select="*[local-name()='title']"/>
|
8693
8749
|
</fo:block>
|
@@ -8698,13 +8754,14 @@
|
|
8698
8754
|
<xsl:variable name="level">
|
8699
8755
|
<xsl:call-template name="getLevel"/>
|
8700
8756
|
</xsl:variable>
|
8701
|
-
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
8757
|
+
<fo:inline role="H{$level}"><xsl:call-template name="setIDforNamedDestination"/><xsl:apply-templates/></fo:inline>
|
8702
8758
|
</xsl:template>
|
8703
8759
|
<!-- ======================== -->
|
8704
8760
|
<!-- END Appendix processing -->
|
8705
8761
|
<!-- ======================== -->
|
8706
8762
|
|
8707
8763
|
<xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
8764
|
+
<xsl:call-template name="setNamedDestination"/>
|
8708
8765
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
8709
8766
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
8710
8767
|
</fo:block>
|
@@ -8738,6 +8795,7 @@
|
|
8738
8795
|
<xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
|
8739
8796
|
<xsl:param name="callout"/>
|
8740
8797
|
<fo:inline id="{@id}">
|
8798
|
+
<xsl:call-template name="setNamedDestination"/>
|
8741
8799
|
<!-- for first p in annotation, put <x> -->
|
8742
8800
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
8743
8801
|
<xsl:apply-templates/>
|
@@ -8784,6 +8842,7 @@
|
|
8784
8842
|
|
8785
8843
|
</xsl:if>
|
8786
8844
|
<fo:block-container margin-left="0mm" role="SKIP">
|
8845
|
+
<xsl:call-template name="setNamedDestination"/>
|
8787
8846
|
<fo:block id="{@id}">
|
8788
8847
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
|
8789
8848
|
</fo:block>
|
@@ -8829,8 +8888,13 @@
|
|
8829
8888
|
</fo:block>
|
8830
8889
|
</fo:table-cell>
|
8831
8890
|
<fo:table-cell display-align="center">
|
8891
|
+
|
8832
8892
|
<fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
|
8833
8893
|
|
8894
|
+
<xsl:for-each select="../*[local-name() = 'name']">
|
8895
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
8896
|
+
</xsl:for-each>
|
8897
|
+
|
8834
8898
|
<xsl:call-template name="refine_formula-stem-number-style"/>
|
8835
8899
|
|
8836
8900
|
<xsl:apply-templates select="../*[local-name() = 'name']"/>
|
@@ -8865,6 +8929,8 @@
|
|
8865
8929
|
|
8866
8930
|
<xsl:template match="*[local-name() = 'note']" name="note">
|
8867
8931
|
|
8932
|
+
<xsl:call-template name="setNamedDestination"/>
|
8933
|
+
|
8868
8934
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
|
8869
8935
|
|
8870
8936
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -8929,6 +8995,7 @@
|
|
8929
8995
|
</xsl:template>
|
8930
8996
|
|
8931
8997
|
<xsl:template match="*[local-name() = 'termnote']">
|
8998
|
+
<xsl:call-template name="setNamedDestination"/>
|
8932
8999
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
8933
9000
|
|
8934
9001
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -9035,12 +9102,14 @@
|
|
9035
9102
|
|
9036
9103
|
<xsl:template match="*[local-name() = 'terms']">
|
9037
9104
|
<!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
|
9105
|
+
<xsl:call-template name="setNamedDestination"/>
|
9038
9106
|
<fo:block id="{@id}">
|
9039
9107
|
<xsl:apply-templates/>
|
9040
9108
|
</fo:block>
|
9041
9109
|
</xsl:template>
|
9042
9110
|
|
9043
9111
|
<xsl:template match="*[local-name() = 'term']">
|
9112
|
+
<xsl:call-template name="setNamedDestination"/>
|
9044
9113
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
9045
9114
|
|
9046
9115
|
<xsl:apply-templates select="ogc:name"/>
|
@@ -9074,6 +9143,7 @@
|
|
9074
9143
|
<xsl:template match="*[local-name() = 'figure']" name="figure">
|
9075
9144
|
<xsl:variable name="isAdded" select="@added"/>
|
9076
9145
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
9146
|
+
<xsl:call-template name="setNamedDestination"/>
|
9077
9147
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
9078
9148
|
<xsl:call-template name="refine_figure-block-style"/>
|
9079
9149
|
|
@@ -9090,6 +9160,11 @@
|
|
9090
9160
|
</xsl:variable>
|
9091
9161
|
|
9092
9162
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
9163
|
+
|
9164
|
+
<xsl:for-each select="*[local-name() = 'name']"> <!-- set context -->
|
9165
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
9166
|
+
</xsl:for-each>
|
9167
|
+
|
9093
9168
|
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
|
9094
9169
|
</fo:block>
|
9095
9170
|
|
@@ -9122,6 +9197,7 @@
|
|
9122
9197
|
</xsl:template>
|
9123
9198
|
|
9124
9199
|
<xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
9200
|
+
<xsl:call-template name="setNamedDestination"/>
|
9125
9201
|
<fo:block id="{@id}">
|
9126
9202
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
9127
9203
|
</fo:block>
|
@@ -9135,6 +9211,7 @@
|
|
9135
9211
|
</xsl:template>
|
9136
9212
|
|
9137
9213
|
<!-- SOURCE: ... -->
|
9214
|
+
<!-- figure/source -->
|
9138
9215
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
|
9139
9216
|
|
9140
9217
|
<xsl:call-template name="termsource"/>
|
@@ -10060,6 +10137,13 @@
|
|
10060
10137
|
<xsl:apply-templates select="."/>
|
10061
10138
|
</xsl:template>
|
10062
10139
|
|
10140
|
+
<!-- prevent missing stem for table and figures in ToC -->
|
10141
|
+
<xsl:template match="*[local-name() = 'name' or local-name() = 'fmt-name']//*[local-name() = 'stem']" mode="contents">
|
10142
|
+
<xsl:if test="not(following-sibling::*[1][local-name() = 'fmt-stem'])">
|
10143
|
+
<xsl:apply-templates select="."/>
|
10144
|
+
</xsl:if>
|
10145
|
+
</xsl:template>
|
10146
|
+
|
10063
10147
|
<xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/>
|
10064
10148
|
|
10065
10149
|
<xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/>
|
@@ -10258,6 +10342,26 @@
|
|
10258
10342
|
</xsl:template> <!-- insertTableBookmarks -->
|
10259
10343
|
<!-- End Bookmarks -->
|
10260
10344
|
|
10345
|
+
<!-- ============================ -->
|
10346
|
+
<!-- mode="bookmark_clean" -->
|
10347
|
+
<!-- ============================ -->
|
10348
|
+
<xsl:template match="node()" mode="bookmark_clean">
|
10349
|
+
<xsl:apply-templates select="node()" mode="bookmark_clean"/>
|
10350
|
+
</xsl:template>
|
10351
|
+
|
10352
|
+
<xsl:template match="text()" mode="bookmark_clean">
|
10353
|
+
<xsl:value-of select="."/>
|
10354
|
+
</xsl:template>
|
10355
|
+
|
10356
|
+
<xsl:template match="*[local-name() = 'math']" mode="bookmark_clean">
|
10357
|
+
<xsl:value-of select="normalize-space(.)"/>
|
10358
|
+
</xsl:template>
|
10359
|
+
|
10360
|
+
<xsl:template match="*[local-name() = 'asciimath']" mode="bookmark_clean"/>
|
10361
|
+
<!-- ============================ -->
|
10362
|
+
<!-- END: mode="bookmark_clean" -->
|
10363
|
+
<!-- ============================ -->
|
10364
|
+
|
10261
10365
|
<xsl:template name="getLangVersion">
|
10262
10366
|
<xsl:param name="lang"/>
|
10263
10367
|
<xsl:param name="doctype" select="''"/>
|
@@ -10305,6 +10409,7 @@
|
|
10305
10409
|
<xsl:template match="title" mode="bookmark"/>
|
10306
10410
|
<xsl:template match="text()" mode="bookmark"/>
|
10307
10411
|
|
10412
|
+
<!-- figure/name -->
|
10308
10413
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']">
|
10309
10414
|
<xsl:if test="normalize-space() != ''">
|
10310
10415
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
@@ -11032,6 +11137,7 @@
|
|
11032
11137
|
<!-- permission -->
|
11033
11138
|
<!-- ========== -->
|
11034
11139
|
<xsl:template match="*[local-name() = 'permission']">
|
11140
|
+
<xsl:call-template name="setNamedDestination"/>
|
11035
11141
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
11036
11142
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
11037
11143
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
@@ -11040,12 +11146,14 @@
|
|
11040
11146
|
|
11041
11147
|
<xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
|
11042
11148
|
<xsl:if test="normalize-space() != ''">
|
11043
|
-
<fo:block xsl:use-attribute-sets="permission-name-style">
|
11044
|
-
<xsl:apply-templates/>
|
11045
11149
|
|
11046
|
-
<
|
11150
|
+
<fo:block xsl:use-attribute-sets="permission-name-style">
|
11151
|
+
<xsl:apply-templates/>
|
11152
|
+
|
11153
|
+
<xsl:text>:</xsl:text>
|
11154
|
+
|
11155
|
+
</fo:block>
|
11047
11156
|
|
11048
|
-
</fo:block>
|
11049
11157
|
</xsl:if>
|
11050
11158
|
</xsl:template>
|
11051
11159
|
|
@@ -11061,6 +11169,7 @@
|
|
11061
11169
|
<!-- requirement -->
|
11062
11170
|
<!-- ========== -->
|
11063
11171
|
<xsl:template match="*[local-name() = 'requirement']">
|
11172
|
+
<xsl:call-template name="setNamedDestination"/>
|
11064
11173
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
11065
11174
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
11066
11175
|
<xsl:apply-templates select="*[local-name()='label']"/>
|
@@ -11072,17 +11181,19 @@
|
|
11072
11181
|
|
11073
11182
|
<xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
|
11074
11183
|
<xsl:if test="normalize-space() != ''">
|
11075
|
-
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
11076
11184
|
|
11077
|
-
<xsl:
|
11078
|
-
<xsl:attribute name="background-color">white</xsl:attribute>
|
11079
|
-
</xsl:if>
|
11185
|
+
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
11080
11186
|
|
11081
|
-
|
11187
|
+
<xsl:if test="../@type = 'class'">
|
11188
|
+
<xsl:attribute name="background-color">white</xsl:attribute>
|
11189
|
+
</xsl:if>
|
11190
|
+
|
11191
|
+
<xsl:apply-templates/>
|
11082
11192
|
|
11083
|
-
|
11193
|
+
<xsl:text>:</xsl:text>
|
11194
|
+
|
11195
|
+
</fo:block>
|
11084
11196
|
|
11085
|
-
</fo:block>
|
11086
11197
|
</xsl:if>
|
11087
11198
|
</xsl:template>
|
11088
11199
|
|
@@ -11111,6 +11222,7 @@
|
|
11111
11222
|
<!-- recommendation -->
|
11112
11223
|
<!-- ========== -->
|
11113
11224
|
<xsl:template match="*[local-name() = 'recommendation']">
|
11225
|
+
<xsl:call-template name="setNamedDestination"/>
|
11114
11226
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
11115
11227
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
11116
11228
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
@@ -11119,10 +11231,12 @@
|
|
11119
11231
|
|
11120
11232
|
<xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
|
11121
11233
|
<xsl:if test="normalize-space() != ''">
|
11122
|
-
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
11123
|
-
<xsl:apply-templates/>
|
11124
11234
|
|
11125
|
-
|
11235
|
+
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
11236
|
+
<xsl:apply-templates/>
|
11237
|
+
|
11238
|
+
</fo:block>
|
11239
|
+
|
11126
11240
|
</xsl:if>
|
11127
11241
|
</xsl:template>
|
11128
11242
|
|
@@ -11201,6 +11315,7 @@
|
|
11201
11315
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
11202
11316
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
11203
11317
|
</xsl:if>
|
11318
|
+
<xsl:call-template name="setNamedDestination"/>
|
11204
11319
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
11205
11320
|
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
11206
11321
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -11324,6 +11439,7 @@
|
|
11324
11439
|
<!-- termexample -->
|
11325
11440
|
<!-- ====== -->
|
11326
11441
|
<xsl:template match="*[local-name() = 'termexample']">
|
11442
|
+
<xsl:call-template name="setNamedDestination"/>
|
11327
11443
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
11328
11444
|
<xsl:call-template name="refine_termexample-style"/>
|
11329
11445
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -11378,6 +11494,7 @@
|
|
11378
11494
|
-->
|
11379
11495
|
<xsl:template match="*[local-name() = 'example']" name="example">
|
11380
11496
|
|
11497
|
+
<xsl:call-template name="setNamedDestination"/>
|
11381
11498
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
|
11382
11499
|
|
11383
11500
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -11895,8 +12012,13 @@
|
|
11895
12012
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
11896
12013
|
|
11897
12014
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
|
12015
|
+
|
11898
12016
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
11899
12017
|
|
12018
|
+
<xsl:for-each select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"><!-- change context -->
|
12019
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
12020
|
+
</xsl:for-each>
|
12021
|
+
|
11900
12022
|
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
|
11901
12023
|
</fo:block>
|
11902
12024
|
</xsl:if>
|
@@ -12016,6 +12138,7 @@
|
|
12016
12138
|
<!-- main sections -->
|
12017
12139
|
<xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
|
12018
12140
|
|
12141
|
+
<xsl:call-template name="setNamedDestination"/>
|
12019
12142
|
<fo:block>
|
12020
12143
|
<xsl:call-template name="setId"/>
|
12021
12144
|
|
@@ -12061,6 +12184,7 @@
|
|
12061
12184
|
|
12062
12185
|
<fo:block break-after="page"/>
|
12063
12186
|
|
12187
|
+
<xsl:call-template name="setNamedDestination"/>
|
12064
12188
|
<fo:block>
|
12065
12189
|
<xsl:call-template name="setId"/>
|
12066
12190
|
<xsl:call-template name="addReviewHelper"/>
|
@@ -12089,6 +12213,7 @@
|
|
12089
12213
|
</xsl:template>
|
12090
12214
|
|
12091
12215
|
<xsl:template match="*[local-name() = 'clause'][normalize-space() != '' or *[local-name() = 'figure'] or @id]" name="template_clause"> <!-- if clause isn't empty -->
|
12216
|
+
<xsl:call-template name="setNamedDestination"/>
|
12092
12217
|
<fo:block>
|
12093
12218
|
<xsl:if test="parent::*[local-name() = 'copyright-statement']">
|
12094
12219
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
@@ -12111,6 +12236,7 @@
|
|
12111
12236
|
</xsl:template> <!-- refine_clause_style -->
|
12112
12237
|
|
12113
12238
|
<xsl:template match="*[local-name() = 'definitions']">
|
12239
|
+
<xsl:call-template name="setNamedDestination"/>
|
12114
12240
|
<fo:block id="{@id}">
|
12115
12241
|
<xsl:apply-templates/>
|
12116
12242
|
</fo:block>
|
@@ -12126,6 +12252,8 @@
|
|
12126
12252
|
<xsl:otherwise>
|
12127
12253
|
|
12128
12254
|
<fo:block break-after="page"/>
|
12255
|
+
<xsl:call-template name="setNamedDestination"/>
|
12256
|
+
|
12129
12257
|
<fo:block id="{@id}">
|
12130
12258
|
|
12131
12259
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -12197,6 +12325,7 @@
|
|
12197
12325
|
<!-- following-sibling::node()[1][local-name() = 'bookmark'][@id = $source] and
|
12198
12326
|
following-sibling::node()[2][local-name() = 'fmt-review-end'][@source = $source] -->
|
12199
12327
|
<!-- <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> -->
|
12328
|
+
<xsl:call-template name="setNamedDestination"/>
|
12200
12329
|
<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>
|
12201
12330
|
<!-- </xsl:if> -->
|
12202
12331
|
</xsl:if>
|
@@ -12296,9 +12425,15 @@
|
|
12296
12425
|
<xsl:when test="local-name(..) = 'ul'">
|
12297
12426
|
<xsl:choose>
|
12298
12427
|
<xsl:when test="normalize-space($processing_instruction_type) = 'simple'"/>
|
12428
|
+
<!-- https://github.com/metanorma/isodoc/issues/675 -->
|
12429
|
+
<xsl:when test="@label"><xsl:value-of select="@label"/></xsl:when>
|
12299
12430
|
<xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
|
12300
12431
|
</xsl:choose>
|
12301
12432
|
</xsl:when>
|
12433
|
+
<!-- https://github.com/metanorma/isodoc/issues/675 -->
|
12434
|
+
<xsl:when test="local-name(..) = 'ol' and @label and @full = 'true'"> <!-- @full added in the template li/fmt-name -->
|
12435
|
+
<xsl:value-of select="@label"/>
|
12436
|
+
</xsl:when>
|
12302
12437
|
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
12303
12438
|
|
12304
12439
|
<xsl:variable name="type" select="../@type"/>
|
@@ -12423,7 +12558,7 @@
|
|
12423
12558
|
|
12424
12559
|
</xsl:otherwise>
|
12425
12560
|
</xsl:choose>
|
12426
|
-
</xsl:template>
|
12561
|
+
</xsl:template> <!-- getListItemFormat -->
|
12427
12562
|
|
12428
12563
|
<xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
12429
12564
|
<xsl:param name="indent">0</xsl:param>
|
@@ -12555,6 +12690,11 @@
|
|
12555
12690
|
|
12556
12691
|
<xsl:call-template name="refine_list-item-label-style"/>
|
12557
12692
|
|
12693
|
+
<xsl:if test="local-name(..) = 'ul'">
|
12694
|
+
<xsl:variable name="li_label" select="@label"/>
|
12695
|
+
<xsl:copy-of select="$ul_labels//label[. = $li_label]/@*[not(local-name() = 'level')]"/>
|
12696
|
+
</xsl:if>
|
12697
|
+
|
12558
12698
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
12559
12699
|
<xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
12560
12700
|
<xsl:call-template name="append_add-style"/>
|
@@ -12901,6 +13041,7 @@
|
|
12901
13041
|
<!-- Normative references -->
|
12902
13042
|
<xsl:template match="*[local-name() = 'references'][@normative='true']" priority="2">
|
12903
13043
|
|
13044
|
+
<xsl:call-template name="setNamedDestination"/>
|
12904
13045
|
<fo:block id="{@id}">
|
12905
13046
|
<xsl:apply-templates/>
|
12906
13047
|
|
@@ -12921,6 +13062,7 @@
|
|
12921
13062
|
</xsl:if>
|
12922
13063
|
</xsl:if> -->
|
12923
13064
|
|
13065
|
+
<xsl:call-template name="setNamedDestination"/>
|
12924
13066
|
<fo:block id="{@id}"/>
|
12925
13067
|
|
12926
13068
|
<xsl:apply-templates select="*[local-name() = 'title'][@columns = 1]"/>
|
@@ -12940,6 +13082,7 @@
|
|
12940
13082
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
12941
13083
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
12942
13084
|
|
13085
|
+
<xsl:call-template name="setNamedDestination"/>
|
12943
13086
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
12944
13087
|
|
12945
13088
|
<xsl:call-template name="processBibitem"/>
|
@@ -12953,6 +13096,7 @@
|
|
12953
13096
|
<!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
|
12954
13097
|
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
12955
13098
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
13099
|
+
<xsl:call-template name="setNamedDestination"/>
|
12956
13100
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
12957
13101
|
|
12958
13102
|
<fo:list-item>
|
@@ -12982,6 +13126,7 @@
|
|
12982
13126
|
<xsl:choose>
|
12983
13127
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
12984
13128
|
<xsl:otherwise>
|
13129
|
+
<xsl:call-template name="setNamedDestination"/>
|
12985
13130
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
12986
13131
|
|
12987
13132
|
<fo:list-item-label end-indent="label-end()">
|
@@ -13376,6 +13521,7 @@
|
|
13376
13521
|
<xsl:template match="*[local-name() = 'admonition']">
|
13377
13522
|
|
13378
13523
|
<!-- text in the box -->
|
13524
|
+
<xsl:call-template name="setNamedDestination"/>
|
13379
13525
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
|
13380
13526
|
|
13381
13527
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -13638,7 +13784,7 @@
|
|
13638
13784
|
</xsl:template>
|
13639
13785
|
|
13640
13786
|
<!-- Example with 'class': <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
|
13641
|
-
<xsl:template match="*[local-name() = 'span'][@style or @class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear' or @class = 'horizontal' or @class = 'norotate' or @class = 'halffontsize']" mode="update_xml_step1" priority="2">
|
13787
|
+
<xsl:template match="*[local-name() = 'span'][@style or @class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear' or @class = 'fmt-hi' or @class = 'horizontal' or @class = 'norotate' or @class = 'halffontsize']" mode="update_xml_step1" priority="2">
|
13642
13788
|
<xsl:copy>
|
13643
13789
|
<xsl:copy-of select="@*"/>
|
13644
13790
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -13670,28 +13816,56 @@
|
|
13670
13816
|
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_step1"/>
|
13671
13817
|
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_pres"/>
|
13672
13818
|
|
13673
|
-
<xsl:template match="*[local-name() = 'fmt-stem']
|
13819
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="update_xml_step1">
|
13674
13820
|
<xsl:element name="stem" namespace="{$namespace_full}">
|
13675
13821
|
<xsl:copy-of select="@*"/>
|
13676
13822
|
<xsl:choose>
|
13677
13823
|
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
13678
|
-
<xsl:
|
13824
|
+
<xsl:choose>
|
13825
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
13826
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
13827
|
+
</xsl:when>
|
13828
|
+
<xsl:otherwise>
|
13829
|
+
<xsl:apply-templates select="*[local-name() = 'semx']/node()" mode="update_xml_step1"/>
|
13830
|
+
</xsl:otherwise>
|
13831
|
+
</xsl:choose>
|
13679
13832
|
</xsl:when>
|
13680
13833
|
<xsl:otherwise>
|
13681
|
-
<xsl:
|
13834
|
+
<xsl:choose>
|
13835
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
13836
|
+
<xsl:copy-of select="node()"/>
|
13837
|
+
</xsl:when>
|
13838
|
+
<xsl:otherwise>
|
13839
|
+
<xsl:apply-templates select="node()" mode="update_xml_step1"/>
|
13840
|
+
</xsl:otherwise>
|
13841
|
+
</xsl:choose>
|
13682
13842
|
</xsl:otherwise>
|
13683
13843
|
</xsl:choose>
|
13684
13844
|
</xsl:element>
|
13685
13845
|
</xsl:template>
|
13686
|
-
<xsl:template match="*[local-name() = 'fmt-stem']
|
13846
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="update_xml_pres">
|
13687
13847
|
<xsl:element name="stem" namespace="{$namespace_full}">
|
13688
13848
|
<xsl:copy-of select="@*"/>
|
13689
13849
|
<xsl:choose>
|
13690
13850
|
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
13691
|
-
<xsl:
|
13851
|
+
<xsl:choose>
|
13852
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
13853
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
13854
|
+
</xsl:when>
|
13855
|
+
<xsl:otherwise>
|
13856
|
+
<xsl:apply-templates select="*[local-name() = 'semx']/node()" mode="update_xml_pres"/>
|
13857
|
+
</xsl:otherwise>
|
13858
|
+
</xsl:choose>
|
13692
13859
|
</xsl:when>
|
13693
13860
|
<xsl:otherwise>
|
13694
|
-
<xsl:
|
13861
|
+
<xsl:choose>
|
13862
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
13863
|
+
<xsl:copy-of select="node()"/>
|
13864
|
+
</xsl:when>
|
13865
|
+
<xsl:otherwise>
|
13866
|
+
<xsl:apply-templates select="node()" mode="update_xml_pres"/>
|
13867
|
+
</xsl:otherwise>
|
13868
|
+
</xsl:choose>
|
13695
13869
|
</xsl:otherwise>
|
13696
13870
|
</xsl:choose>
|
13697
13871
|
</xsl:element>
|
@@ -13920,16 +14094,24 @@
|
|
13920
14094
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_step1">
|
13921
14095
|
<xsl:element name="title" namespace="{$namespace_full}">
|
13922
14096
|
<xsl:copy-of select="@*"/>
|
14097
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
14098
|
+
|
13923
14099
|
<xsl:apply-templates mode="update_xml_step1"/>
|
13924
14100
|
</xsl:element>
|
13925
14101
|
</xsl:template>
|
13926
14102
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_pres">
|
13927
14103
|
<xsl:element name="title" namespace="{$namespace_full}">
|
13928
14104
|
<xsl:copy-of select="@*"/>
|
14105
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
14106
|
+
|
13929
14107
|
<xsl:apply-templates mode="update_xml_pres"/>
|
13930
14108
|
</xsl:element>
|
13931
14109
|
</xsl:template>
|
13932
14110
|
|
14111
|
+
<xsl:template name="addNamedDestinationAttribute">
|
14112
|
+
|
14113
|
+
</xsl:template>
|
14114
|
+
|
13933
14115
|
<xsl:template match="*[local-name() = 'fmt-name']"/>
|
13934
14116
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
|
13935
14117
|
<xsl:choose>
|
@@ -13939,6 +14121,8 @@
|
|
13939
14121
|
<xsl:otherwise>
|
13940
14122
|
<xsl:element name="name" namespace="{$namespace_full}">
|
13941
14123
|
<xsl:copy-of select="@*"/>
|
14124
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
14125
|
+
|
13942
14126
|
<xsl:apply-templates mode="update_xml_step1"/>
|
13943
14127
|
</xsl:element>
|
13944
14128
|
</xsl:otherwise>
|
@@ -13952,12 +14136,24 @@
|
|
13952
14136
|
<xsl:otherwise>
|
13953
14137
|
<xsl:element name="name" namespace="{$namespace_full}">
|
13954
14138
|
<xsl:copy-of select="@*"/>
|
14139
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
14140
|
+
|
13955
14141
|
<xsl:apply-templates mode="update_xml_pres"/>
|
13956
14142
|
</xsl:element>
|
13957
14143
|
</xsl:otherwise>
|
13958
14144
|
</xsl:choose>
|
13959
14145
|
</xsl:template>
|
13960
14146
|
|
14147
|
+
<!-- li/fmt-name -->
|
14148
|
+
<xsl:template match="*[local-name() = 'li']/*[local-name() = 'fmt-name']" priority="2" mode="update_xml_step1">
|
14149
|
+
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
14150
|
+
<xsl:attribute name="full">true</xsl:attribute>
|
14151
|
+
</xsl:template>
|
14152
|
+
<xsl:template match="*[local-name() = 'li']/*[local-name() = 'fmt-name']" priority="2" mode="update_xml_pres">
|
14153
|
+
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
14154
|
+
<xsl:attribute name="full">true</xsl:attribute>
|
14155
|
+
</xsl:template>
|
14156
|
+
|
13961
14157
|
<xsl:template match="*[local-name() = 'fmt-preferred']"/>
|
13962
14158
|
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_step1">
|
13963
14159
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -14772,6 +14968,64 @@
|
|
14772
14968
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
14773
14969
|
</xsl:template>
|
14774
14970
|
|
14971
|
+
<!-- ===================================== -->
|
14972
|
+
<!-- ===================================== -->
|
14973
|
+
<!-- Ruby text (CJK languages) rendering -->
|
14974
|
+
<!-- ===================================== -->
|
14975
|
+
<!-- ===================================== -->
|
14976
|
+
<xsl:template match="*[local-name() = 'ruby']">
|
14977
|
+
<fo:inline-container text-indent="0mm" last-line-end-indent="0mm">
|
14978
|
+
<xsl:if test="not(ancestor::*[local-name() = 'ruby'])">
|
14979
|
+
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
14980
|
+
</xsl:if>
|
14981
|
+
<xsl:variable name="rt_text" select="*[local-name() = 'rt']"/>
|
14982
|
+
<xsl:variable name="rb_text" select=".//*[local-name() = 'rb'][not(*[local-name() = 'ruby'])]"/>
|
14983
|
+
<!-- Example: width="2em" -->
|
14984
|
+
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
14985
|
+
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
14986
|
+
<xsl:variable name="text_width">
|
14987
|
+
<xsl:choose>
|
14988
|
+
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
14989
|
+
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
14990
|
+
</xsl:choose>
|
14991
|
+
</xsl:variable>
|
14992
|
+
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
14993
|
+
|
14994
|
+
<xsl:choose>
|
14995
|
+
<xsl:when test="ancestor::*[local-name() = 'ruby']">
|
14996
|
+
<xsl:apply-templates select="*[local-name() = 'rb']"/>
|
14997
|
+
<xsl:apply-templates select="*[local-name() = 'rt']"/>
|
14998
|
+
</xsl:when>
|
14999
|
+
<xsl:otherwise>
|
15000
|
+
<xsl:apply-templates select="*[local-name() = 'rt']"/>
|
15001
|
+
<xsl:apply-templates select="*[local-name() = 'rb']"/>
|
15002
|
+
</xsl:otherwise>
|
15003
|
+
</xsl:choose>
|
15004
|
+
|
15005
|
+
<xsl:apply-templates select="node()[not(local-name() = 'rt') and not(local-name() = 'rb')]"/>
|
15006
|
+
</fo:inline-container>
|
15007
|
+
</xsl:template>
|
15008
|
+
|
15009
|
+
<xsl:template match="*[local-name() = 'rb']">
|
15010
|
+
<fo:block line-height="1em" text-align="center"><xsl:apply-templates/></fo:block>
|
15011
|
+
</xsl:template>
|
15012
|
+
|
15013
|
+
<xsl:template match="*[local-name() = 'rt']">
|
15014
|
+
<fo:block font-size="0.5em" text-align="center" line-height="1.2em" space-before="-1.4em" space-before.conditionality="retain"> <!-- -->
|
15015
|
+
<xsl:if test="ancestor::*[local-name() = 'ruby'][last()]//*[local-name() = 'ruby'] or ancestor::*[local-name() = 'rb']">
|
15016
|
+
<xsl:attribute name="space-before">0em</xsl:attribute>
|
15017
|
+
</xsl:if>
|
15018
|
+
<xsl:apply-templates/>
|
15019
|
+
</fo:block>
|
15020
|
+
|
15021
|
+
</xsl:template>
|
15022
|
+
|
15023
|
+
<!-- ===================================== -->
|
15024
|
+
<!-- ===================================== -->
|
15025
|
+
<!-- END: Ruby text (CJK languages) rendering -->
|
15026
|
+
<!-- ===================================== -->
|
15027
|
+
<!-- ===================================== -->
|
15028
|
+
|
14775
15029
|
<xsl:template name="printEdition">
|
14776
15030
|
<xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
14777
15031
|
|
@@ -15341,6 +15595,24 @@
|
|
15341
15595
|
</xsl:attribute>
|
15342
15596
|
</xsl:template>
|
15343
15597
|
|
15598
|
+
<xsl:template name="setIDforNamedDestination">
|
15599
|
+
<xsl:if test="@named_dest">
|
15600
|
+
<xsl:attribute name="id"><xsl:value-of select="@named_dest"/></xsl:attribute>
|
15601
|
+
</xsl:if>
|
15602
|
+
</xsl:template>
|
15603
|
+
|
15604
|
+
<xsl:template name="setNamedDestination">
|
15605
|
+
<!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
|
15606
|
+
<xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}')) = 'false'">
|
15607
|
+
<fox:destination internal-destination="{@id}"/>
|
15608
|
+
</xsl:if>
|
15609
|
+
<xsl:for-each select=". | *[local-name() = 'title'] | *[local-name() = 'name']">
|
15610
|
+
<xsl:if test="@named_dest">
|
15611
|
+
<fox:destination internal-destination="{@named_dest}"/>
|
15612
|
+
</xsl:if>
|
15613
|
+
</xsl:for-each>
|
15614
|
+
</xsl:template>
|
15615
|
+
|
15344
15616
|
<xsl:template name="add-letter-spacing">
|
15345
15617
|
<xsl:param name="text"/>
|
15346
15618
|
<xsl:param name="letter-spacing" select="'0.15'"/>
|