metanorma-bipm 2.6.5 → 2.6.6
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 +147 -22
- data/lib/isodoc/bipm/bipm.guide.xsl +147 -22
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +147 -22
- data/lib/isodoc/bipm/bipm.rapport.xsl +147 -22
- data/lib/isodoc/bipm/jcgm.standard.xsl +174 -26
- data/lib/metanorma/bipm/converter.rb +2 -2
- data/lib/metanorma/bipm/isodoc.rng +16 -1
- data/lib/metanorma/bipm/version.rb +1 -1
- metadata +2 -2
@@ -4289,8 +4289,14 @@
|
|
4289
4289
|
</xsl:choose>
|
4290
4290
|
</xsl:variable>
|
4291
4291
|
|
4292
|
+
<xsl:call-template name="setNamedDestination"/>
|
4293
|
+
|
4292
4294
|
<fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
|
4293
4295
|
|
4296
|
+
<xsl:for-each select="*[local-name() = 'name']">
|
4297
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
4298
|
+
</xsl:for-each>
|
4299
|
+
|
4294
4300
|
<xsl:call-template name="refine_table-container-style">
|
4295
4301
|
<xsl:with-param name="margin-side" select="$margin-side"/>
|
4296
4302
|
</xsl:call-template>
|
@@ -4495,6 +4501,7 @@
|
|
4495
4501
|
<!-- table/name-->
|
4496
4502
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
4497
4503
|
<xsl:param name="continued"/>
|
4504
|
+
<xsl:param name="cols-count"/>
|
4498
4505
|
<xsl:if test="normalize-space() != ''">
|
4499
4506
|
|
4500
4507
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -4518,9 +4525,30 @@
|
|
4518
4525
|
|
4519
4526
|
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
4520
4527
|
<xsl:if test="$continued = 'true'">
|
4521
|
-
|
4522
|
-
|
4523
|
-
|
4528
|
+
|
4529
|
+
<!-- to prevent the error 'THead element may contain only TR elements' -->
|
4530
|
+
|
4531
|
+
<xsl:choose>
|
4532
|
+
<xsl:when test="string(number($cols-count)) != 'NaN'">
|
4533
|
+
<fo:table width="100%" table-layout="fixed" role="SKIP">
|
4534
|
+
<fo:table-body role="SKIP">
|
4535
|
+
<fo:table-row>
|
4536
|
+
<fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
|
4537
|
+
<fo:block text-align="right" role="SKIP">
|
4538
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
4539
|
+
</fo:block>
|
4540
|
+
</fo:table-cell>
|
4541
|
+
</fo:table-row>
|
4542
|
+
</fo:table-body>
|
4543
|
+
</fo:table>
|
4544
|
+
</xsl:when>
|
4545
|
+
<xsl:otherwise>
|
4546
|
+
<fo:block text-align="right">
|
4547
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
4548
|
+
</fo:block>
|
4549
|
+
</xsl:otherwise>
|
4550
|
+
</xsl:choose>
|
4551
|
+
|
4524
4552
|
</xsl:if>
|
4525
4553
|
<!-- </xsl:if> -->
|
4526
4554
|
|
@@ -4917,6 +4945,7 @@
|
|
4917
4945
|
|
4918
4946
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
4919
4947
|
<xsl:with-param name="continued">true</xsl:with-param>
|
4948
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
4920
4949
|
</xsl:apply-templates>
|
4921
4950
|
|
4922
4951
|
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
@@ -5095,7 +5124,10 @@
|
|
5095
5124
|
|
5096
5125
|
<!-- if there isn't 'thead' and there is a table's title -->
|
5097
5126
|
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='thead']) and ancestor::*[local-name()='table']/*[local-name()='name']">
|
5098
|
-
<fo:table-header
|
5127
|
+
<fo:table-header>
|
5128
|
+
|
5129
|
+
<xsl:attribute name="role">Caption</xsl:attribute>
|
5130
|
+
|
5099
5131
|
<xsl:call-template name="table-header-title">
|
5100
5132
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5101
5133
|
</xsl:call-template>
|
@@ -5349,8 +5381,8 @@
|
|
5349
5381
|
<xsl:for-each select="xalan:nodeset($styles__)/item">
|
5350
5382
|
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
|
5351
5383
|
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
|
5352
|
-
<xsl:if test="$key = 'color' or
|
5353
|
-
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
5384
|
+
<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'">
|
5385
|
+
<style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
|
5354
5386
|
</xsl:if>
|
5355
5387
|
</xsl:for-each>
|
5356
5388
|
</xsl:variable>
|
@@ -5414,6 +5446,7 @@
|
|
5414
5446
|
<!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
|
5415
5447
|
<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">
|
5416
5448
|
|
5449
|
+
<xsl:call-template name="setNamedDestination"/>
|
5417
5450
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
5418
5451
|
<xsl:copy-of select="@id"/>
|
5419
5452
|
|
@@ -5939,7 +5972,7 @@
|
|
5939
5972
|
<xsl:variable name="target" select="@target"/>
|
5940
5973
|
<xsl:choose>
|
5941
5974
|
<!-- case for footnotes in Requirement tables (https://github.com/metanorma/metanorma-ogc/issues/791) -->
|
5942
|
-
<xsl:when test="not(ancestor::*[local-name() = 'table'][1]
|
5975
|
+
<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]">
|
5943
5976
|
<xsl:call-template name="fn">
|
5944
5977
|
<xsl:with-param name="footnote_body_from_table">true</xsl:with-param>
|
5945
5978
|
</xsl:call-template>
|
@@ -6035,6 +6068,10 @@
|
|
6035
6068
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
6036
6069
|
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
6037
6070
|
|
6071
|
+
<xsl:if test="@key = 'true' and ancestor::*[local-name() = 'figure']">
|
6072
|
+
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
6073
|
+
</xsl:if>
|
6074
|
+
|
6038
6075
|
<xsl:call-template name="setBlockSpanAll"/>
|
6039
6076
|
|
6040
6077
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -6332,7 +6369,7 @@
|
|
6332
6369
|
|
6333
6370
|
<!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
|
6334
6371
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
|
6335
|
-
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
|
6372
|
+
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always" keep-with-previous="always">
|
6336
6373
|
<xsl:call-template name="refine_figure_key_style"/>
|
6337
6374
|
<xsl:apply-templates/>
|
6338
6375
|
</fo:block>
|
@@ -6593,6 +6630,7 @@
|
|
6593
6630
|
|
6594
6631
|
<xsl:call-template name="refine_dt-cell-style"/>
|
6595
6632
|
|
6633
|
+
<xsl:call-template name="setNamedDestination"/>
|
6596
6634
|
<fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
|
6597
6635
|
|
6598
6636
|
<xsl:choose>
|
@@ -7030,7 +7068,7 @@
|
|
7030
7068
|
<!-- ================= -->
|
7031
7069
|
|
7032
7070
|
<!-- highlight text -->
|
7033
|
-
<xsl:template match="*[local-name()='hi']">
|
7071
|
+
<xsl:template match="*[local-name()='hi'] | *[local-name() = 'span'][@class = 'fmt-hi']" priority="3">
|
7034
7072
|
<fo:inline background-color="yellow">
|
7035
7073
|
<xsl:apply-templates/>
|
7036
7074
|
</fo:inline>
|
@@ -8632,6 +8670,7 @@
|
|
8632
8670
|
<!-- Appendix processing -->
|
8633
8671
|
<!-- ======================== -->
|
8634
8672
|
<xsl:template match="*[local-name()='appendix']">
|
8673
|
+
<xsl:call-template name="setNamedDestination"/>
|
8635
8674
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
8636
8675
|
<xsl:apply-templates select="*[local-name()='title']"/>
|
8637
8676
|
</fo:block>
|
@@ -8642,13 +8681,14 @@
|
|
8642
8681
|
<xsl:variable name="level">
|
8643
8682
|
<xsl:call-template name="getLevel"/>
|
8644
8683
|
</xsl:variable>
|
8645
|
-
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
8684
|
+
<fo:inline role="H{$level}"><xsl:call-template name="setIDforNamedDestination"/><xsl:apply-templates/></fo:inline>
|
8646
8685
|
</xsl:template>
|
8647
8686
|
<!-- ======================== -->
|
8648
8687
|
<!-- END Appendix processing -->
|
8649
8688
|
<!-- ======================== -->
|
8650
8689
|
|
8651
8690
|
<xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
8691
|
+
<xsl:call-template name="setNamedDestination"/>
|
8652
8692
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
8653
8693
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
8654
8694
|
</fo:block>
|
@@ -8678,6 +8718,7 @@
|
|
8678
8718
|
<xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
|
8679
8719
|
<xsl:param name="callout"/>
|
8680
8720
|
<fo:inline id="{@id}">
|
8721
|
+
<xsl:call-template name="setNamedDestination"/>
|
8681
8722
|
<!-- for first p in annotation, put <x> -->
|
8682
8723
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
8683
8724
|
<xsl:apply-templates/>
|
@@ -8724,6 +8765,7 @@
|
|
8724
8765
|
|
8725
8766
|
</xsl:if>
|
8726
8767
|
<fo:block-container margin-left="0mm" role="SKIP">
|
8768
|
+
<xsl:call-template name="setNamedDestination"/>
|
8727
8769
|
<fo:block id="{@id}">
|
8728
8770
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
|
8729
8771
|
</fo:block>
|
@@ -8769,8 +8811,13 @@
|
|
8769
8811
|
</fo:block>
|
8770
8812
|
</fo:table-cell>
|
8771
8813
|
<fo:table-cell display-align="center">
|
8814
|
+
|
8772
8815
|
<fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
|
8773
8816
|
|
8817
|
+
<xsl:for-each select="../*[local-name() = 'name']">
|
8818
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
8819
|
+
</xsl:for-each>
|
8820
|
+
|
8774
8821
|
<xsl:call-template name="refine_formula-stem-number-style"/>
|
8775
8822
|
|
8776
8823
|
<xsl:apply-templates select="../*[local-name() = 'name']"/>
|
@@ -8805,6 +8852,8 @@
|
|
8805
8852
|
|
8806
8853
|
<xsl:template match="*[local-name() = 'note']" name="note">
|
8807
8854
|
|
8855
|
+
<xsl:call-template name="setNamedDestination"/>
|
8856
|
+
|
8808
8857
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
|
8809
8858
|
|
8810
8859
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -8869,6 +8918,7 @@
|
|
8869
8918
|
</xsl:template>
|
8870
8919
|
|
8871
8920
|
<xsl:template match="*[local-name() = 'termnote']">
|
8921
|
+
<xsl:call-template name="setNamedDestination"/>
|
8872
8922
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
8873
8923
|
|
8874
8924
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -8975,12 +9025,14 @@
|
|
8975
9025
|
|
8976
9026
|
<xsl:template match="*[local-name() = 'terms']">
|
8977
9027
|
<!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
|
9028
|
+
<xsl:call-template name="setNamedDestination"/>
|
8978
9029
|
<fo:block id="{@id}">
|
8979
9030
|
<xsl:apply-templates/>
|
8980
9031
|
</fo:block>
|
8981
9032
|
</xsl:template>
|
8982
9033
|
|
8983
9034
|
<xsl:template match="*[local-name() = 'term']">
|
9035
|
+
<xsl:call-template name="setNamedDestination"/>
|
8984
9036
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
8985
9037
|
|
8986
9038
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
|
@@ -9012,6 +9064,7 @@
|
|
9012
9064
|
<xsl:template match="*[local-name() = 'figure']" name="figure">
|
9013
9065
|
<xsl:variable name="isAdded" select="@added"/>
|
9014
9066
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
9067
|
+
<xsl:call-template name="setNamedDestination"/>
|
9015
9068
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
9016
9069
|
<xsl:call-template name="refine_figure-block-style"/>
|
9017
9070
|
|
@@ -9028,6 +9081,11 @@
|
|
9028
9081
|
</xsl:variable>
|
9029
9082
|
|
9030
9083
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
9084
|
+
|
9085
|
+
<xsl:for-each select="*[local-name() = 'name']"> <!-- set context -->
|
9086
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
9087
|
+
</xsl:for-each>
|
9088
|
+
|
9031
9089
|
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
|
9032
9090
|
</fo:block>
|
9033
9091
|
|
@@ -9060,6 +9118,7 @@
|
|
9060
9118
|
</xsl:template>
|
9061
9119
|
|
9062
9120
|
<xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
9121
|
+
<xsl:call-template name="setNamedDestination"/>
|
9063
9122
|
<fo:block id="{@id}">
|
9064
9123
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
9065
9124
|
</fo:block>
|
@@ -9073,6 +9132,7 @@
|
|
9073
9132
|
</xsl:template>
|
9074
9133
|
|
9075
9134
|
<!-- SOURCE: ... -->
|
9135
|
+
<!-- figure/source -->
|
9076
9136
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
|
9077
9137
|
|
9078
9138
|
<xsl:call-template name="termsource"/>
|
@@ -10305,6 +10365,7 @@
|
|
10305
10365
|
<xsl:template match="title" mode="bookmark"/>
|
10306
10366
|
<xsl:template match="text()" mode="bookmark"/>
|
10307
10367
|
|
10368
|
+
<!-- figure/name -->
|
10308
10369
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']">
|
10309
10370
|
<xsl:if test="normalize-space() != ''">
|
10310
10371
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
@@ -11020,6 +11081,7 @@
|
|
11020
11081
|
<!-- permission -->
|
11021
11082
|
<!-- ========== -->
|
11022
11083
|
<xsl:template match="*[local-name() = 'permission']">
|
11084
|
+
<xsl:call-template name="setNamedDestination"/>
|
11023
11085
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
11024
11086
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
11025
11087
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
@@ -11028,10 +11090,12 @@
|
|
11028
11090
|
|
11029
11091
|
<xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
|
11030
11092
|
<xsl:if test="normalize-space() != ''">
|
11031
|
-
<fo:block xsl:use-attribute-sets="permission-name-style">
|
11032
|
-
<xsl:apply-templates/>
|
11033
11093
|
|
11034
|
-
|
11094
|
+
<fo:block xsl:use-attribute-sets="permission-name-style">
|
11095
|
+
<xsl:apply-templates/>
|
11096
|
+
|
11097
|
+
</fo:block>
|
11098
|
+
|
11035
11099
|
</xsl:if>
|
11036
11100
|
</xsl:template>
|
11037
11101
|
|
@@ -11047,6 +11111,7 @@
|
|
11047
11111
|
<!-- requirement -->
|
11048
11112
|
<!-- ========== -->
|
11049
11113
|
<xsl:template match="*[local-name() = 'requirement']">
|
11114
|
+
<xsl:call-template name="setNamedDestination"/>
|
11050
11115
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
11051
11116
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
11052
11117
|
<xsl:apply-templates select="*[local-name()='label']"/>
|
@@ -11058,11 +11123,13 @@
|
|
11058
11123
|
|
11059
11124
|
<xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
|
11060
11125
|
<xsl:if test="normalize-space() != ''">
|
11061
|
-
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
11062
11126
|
|
11063
|
-
|
11127
|
+
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
11128
|
+
|
11129
|
+
<xsl:apply-templates/>
|
11130
|
+
|
11131
|
+
</fo:block>
|
11064
11132
|
|
11065
|
-
</fo:block>
|
11066
11133
|
</xsl:if>
|
11067
11134
|
</xsl:template>
|
11068
11135
|
|
@@ -11091,6 +11158,7 @@
|
|
11091
11158
|
<!-- recommendation -->
|
11092
11159
|
<!-- ========== -->
|
11093
11160
|
<xsl:template match="*[local-name() = 'recommendation']">
|
11161
|
+
<xsl:call-template name="setNamedDestination"/>
|
11094
11162
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
11095
11163
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
11096
11164
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
@@ -11099,10 +11167,12 @@
|
|
11099
11167
|
|
11100
11168
|
<xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
|
11101
11169
|
<xsl:if test="normalize-space() != ''">
|
11102
|
-
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
11103
|
-
<xsl:apply-templates/>
|
11104
11170
|
|
11105
|
-
|
11171
|
+
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
11172
|
+
<xsl:apply-templates/>
|
11173
|
+
|
11174
|
+
</fo:block>
|
11175
|
+
|
11106
11176
|
</xsl:if>
|
11107
11177
|
</xsl:template>
|
11108
11178
|
|
@@ -11181,6 +11251,7 @@
|
|
11181
11251
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
11182
11252
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
11183
11253
|
</xsl:if>
|
11254
|
+
<xsl:call-template name="setNamedDestination"/>
|
11184
11255
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
11185
11256
|
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
11186
11257
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -11290,6 +11361,7 @@
|
|
11290
11361
|
<!-- termexample -->
|
11291
11362
|
<!-- ====== -->
|
11292
11363
|
<xsl:template match="*[local-name() = 'termexample']">
|
11364
|
+
<xsl:call-template name="setNamedDestination"/>
|
11293
11365
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
11294
11366
|
<xsl:call-template name="refine_termexample-style"/>
|
11295
11367
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -11344,6 +11416,7 @@
|
|
11344
11416
|
-->
|
11345
11417
|
<xsl:template match="*[local-name() = 'example']" name="example">
|
11346
11418
|
|
11419
|
+
<xsl:call-template name="setNamedDestination"/>
|
11347
11420
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
|
11348
11421
|
|
11349
11422
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -11869,8 +11942,13 @@
|
|
11869
11942
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
11870
11943
|
|
11871
11944
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
|
11945
|
+
|
11872
11946
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
11873
11947
|
|
11948
|
+
<xsl:for-each select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"><!-- change context -->
|
11949
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
11950
|
+
</xsl:for-each>
|
11951
|
+
|
11874
11952
|
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
|
11875
11953
|
</fo:block>
|
11876
11954
|
</xsl:if>
|
@@ -11990,6 +12068,7 @@
|
|
11990
12068
|
<!-- main sections -->
|
11991
12069
|
<xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
|
11992
12070
|
|
12071
|
+
<xsl:call-template name="setNamedDestination"/>
|
11993
12072
|
<fo:block>
|
11994
12073
|
<xsl:call-template name="setId"/>
|
11995
12074
|
|
@@ -12033,6 +12112,7 @@
|
|
12033
12112
|
|
12034
12113
|
<xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
|
12035
12114
|
|
12115
|
+
<xsl:call-template name="setNamedDestination"/>
|
12036
12116
|
<fo:block>
|
12037
12117
|
<xsl:call-template name="setId"/>
|
12038
12118
|
<xsl:call-template name="addReviewHelper"/>
|
@@ -12061,6 +12141,7 @@
|
|
12061
12141
|
</xsl:template>
|
12062
12142
|
|
12063
12143
|
<xsl:template match="*[local-name() = 'clause'][normalize-space() != '' or *[local-name() = 'figure'] or @id]" name="template_clause"> <!-- if clause isn't empty -->
|
12144
|
+
<xsl:call-template name="setNamedDestination"/>
|
12064
12145
|
<fo:block>
|
12065
12146
|
<xsl:if test="parent::*[local-name() = 'copyright-statement']">
|
12066
12147
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
@@ -12087,6 +12168,7 @@
|
|
12087
12168
|
</xsl:template> <!-- refine_clause_style -->
|
12088
12169
|
|
12089
12170
|
<xsl:template match="*[local-name() = 'definitions']">
|
12171
|
+
<xsl:call-template name="setNamedDestination"/>
|
12090
12172
|
<fo:block id="{@id}">
|
12091
12173
|
<xsl:apply-templates/>
|
12092
12174
|
</fo:block>
|
@@ -12102,6 +12184,8 @@
|
|
12102
12184
|
<xsl:otherwise>
|
12103
12185
|
|
12104
12186
|
<fo:block break-after="page"/>
|
12187
|
+
<xsl:call-template name="setNamedDestination"/>
|
12188
|
+
|
12105
12189
|
<fo:block id="{@id}">
|
12106
12190
|
|
12107
12191
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -12173,6 +12257,7 @@
|
|
12173
12257
|
<!-- following-sibling::node()[1][local-name() = 'bookmark'][@id = $source] and
|
12174
12258
|
following-sibling::node()[2][local-name() = 'fmt-review-end'][@source = $source] -->
|
12175
12259
|
<!-- <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> -->
|
12260
|
+
<xsl:call-template name="setNamedDestination"/>
|
12176
12261
|
<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>
|
12177
12262
|
<!-- </xsl:if> -->
|
12178
12263
|
</xsl:if>
|
@@ -12890,6 +12975,7 @@
|
|
12890
12975
|
<!-- Normative references -->
|
12891
12976
|
<xsl:template match="*[local-name() = 'references'][@normative='true']" priority="2">
|
12892
12977
|
|
12978
|
+
<xsl:call-template name="setNamedDestination"/>
|
12893
12979
|
<fo:block id="{@id}">
|
12894
12980
|
<xsl:apply-templates/>
|
12895
12981
|
|
@@ -12910,6 +12996,7 @@
|
|
12910
12996
|
</xsl:if>
|
12911
12997
|
</xsl:if> -->
|
12912
12998
|
|
12999
|
+
<xsl:call-template name="setNamedDestination"/>
|
12913
13000
|
<fo:block id="{@id}"/>
|
12914
13001
|
|
12915
13002
|
<xsl:apply-templates select="*[local-name() = 'title'][@columns = 1]"/>
|
@@ -12929,6 +13016,7 @@
|
|
12929
13016
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
12930
13017
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
12931
13018
|
|
13019
|
+
<xsl:call-template name="setNamedDestination"/>
|
12932
13020
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
12933
13021
|
|
12934
13022
|
<xsl:call-template name="processBibitem"/>
|
@@ -12942,6 +13030,7 @@
|
|
12942
13030
|
<!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
|
12943
13031
|
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
12944
13032
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
13033
|
+
<xsl:call-template name="setNamedDestination"/>
|
12945
13034
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
12946
13035
|
|
12947
13036
|
<fo:list-item>
|
@@ -12971,6 +13060,7 @@
|
|
12971
13060
|
<xsl:choose>
|
12972
13061
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
12973
13062
|
<xsl:otherwise>
|
13063
|
+
<xsl:call-template name="setNamedDestination"/>
|
12974
13064
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
12975
13065
|
|
12976
13066
|
<fo:list-item-label end-indent="label-end()">
|
@@ -13630,7 +13720,7 @@
|
|
13630
13720
|
</xsl:template>
|
13631
13721
|
|
13632
13722
|
<!-- Example with 'class': <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
|
13633
|
-
<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">
|
13723
|
+
<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">
|
13634
13724
|
<xsl:copy>
|
13635
13725
|
<xsl:copy-of select="@*"/>
|
13636
13726
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -13662,28 +13752,56 @@
|
|
13662
13752
|
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_step1"/>
|
13663
13753
|
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_pres"/>
|
13664
13754
|
|
13665
|
-
<xsl:template match="*[local-name() = 'fmt-stem']
|
13755
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="update_xml_step1">
|
13666
13756
|
<xsl:element name="stem" namespace="{$namespace_full}">
|
13667
13757
|
<xsl:copy-of select="@*"/>
|
13668
13758
|
<xsl:choose>
|
13669
13759
|
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
13670
|
-
<xsl:
|
13760
|
+
<xsl:choose>
|
13761
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
13762
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
13763
|
+
</xsl:when>
|
13764
|
+
<xsl:otherwise>
|
13765
|
+
<xsl:apply-templates select="*[local-name() = 'semx']/node()" mode="update_xml_step1"/>
|
13766
|
+
</xsl:otherwise>
|
13767
|
+
</xsl:choose>
|
13671
13768
|
</xsl:when>
|
13672
13769
|
<xsl:otherwise>
|
13673
|
-
<xsl:
|
13770
|
+
<xsl:choose>
|
13771
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
13772
|
+
<xsl:copy-of select="node()"/>
|
13773
|
+
</xsl:when>
|
13774
|
+
<xsl:otherwise>
|
13775
|
+
<xsl:apply-templates select="node()" mode="update_xml_step1"/>
|
13776
|
+
</xsl:otherwise>
|
13777
|
+
</xsl:choose>
|
13674
13778
|
</xsl:otherwise>
|
13675
13779
|
</xsl:choose>
|
13676
13780
|
</xsl:element>
|
13677
13781
|
</xsl:template>
|
13678
|
-
<xsl:template match="*[local-name() = 'fmt-stem']
|
13782
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="update_xml_pres">
|
13679
13783
|
<xsl:element name="stem" namespace="{$namespace_full}">
|
13680
13784
|
<xsl:copy-of select="@*"/>
|
13681
13785
|
<xsl:choose>
|
13682
13786
|
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
13683
|
-
<xsl:
|
13787
|
+
<xsl:choose>
|
13788
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
13789
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
13790
|
+
</xsl:when>
|
13791
|
+
<xsl:otherwise>
|
13792
|
+
<xsl:apply-templates select="*[local-name() = 'semx']/node()" mode="update_xml_pres"/>
|
13793
|
+
</xsl:otherwise>
|
13794
|
+
</xsl:choose>
|
13684
13795
|
</xsl:when>
|
13685
13796
|
<xsl:otherwise>
|
13686
|
-
<xsl:
|
13797
|
+
<xsl:choose>
|
13798
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
13799
|
+
<xsl:copy-of select="node()"/>
|
13800
|
+
</xsl:when>
|
13801
|
+
<xsl:otherwise>
|
13802
|
+
<xsl:apply-templates select="node()" mode="update_xml_pres"/>
|
13803
|
+
</xsl:otherwise>
|
13804
|
+
</xsl:choose>
|
13687
13805
|
</xsl:otherwise>
|
13688
13806
|
</xsl:choose>
|
13689
13807
|
</xsl:element>
|
@@ -13912,16 +14030,24 @@
|
|
13912
14030
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_step1">
|
13913
14031
|
<xsl:element name="title" namespace="{$namespace_full}">
|
13914
14032
|
<xsl:copy-of select="@*"/>
|
14033
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
14034
|
+
|
13915
14035
|
<xsl:apply-templates mode="update_xml_step1"/>
|
13916
14036
|
</xsl:element>
|
13917
14037
|
</xsl:template>
|
13918
14038
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_pres">
|
13919
14039
|
<xsl:element name="title" namespace="{$namespace_full}">
|
13920
14040
|
<xsl:copy-of select="@*"/>
|
14041
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
14042
|
+
|
13921
14043
|
<xsl:apply-templates mode="update_xml_pres"/>
|
13922
14044
|
</xsl:element>
|
13923
14045
|
</xsl:template>
|
13924
14046
|
|
14047
|
+
<xsl:template name="addNamedDestinationAttribute">
|
14048
|
+
|
14049
|
+
</xsl:template>
|
14050
|
+
|
13925
14051
|
<xsl:template match="*[local-name() = 'fmt-name']"/>
|
13926
14052
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
|
13927
14053
|
<xsl:choose>
|
@@ -13931,6 +14057,8 @@
|
|
13931
14057
|
<xsl:otherwise>
|
13932
14058
|
<xsl:element name="name" namespace="{$namespace_full}">
|
13933
14059
|
<xsl:copy-of select="@*"/>
|
14060
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
14061
|
+
|
13934
14062
|
<xsl:apply-templates mode="update_xml_step1"/>
|
13935
14063
|
</xsl:element>
|
13936
14064
|
</xsl:otherwise>
|
@@ -13944,6 +14072,8 @@
|
|
13944
14072
|
<xsl:otherwise>
|
13945
14073
|
<xsl:element name="name" namespace="{$namespace_full}">
|
13946
14074
|
<xsl:copy-of select="@*"/>
|
14075
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
14076
|
+
|
13947
14077
|
<xsl:apply-templates mode="update_xml_pres"/>
|
13948
14078
|
</xsl:element>
|
13949
14079
|
</xsl:otherwise>
|
@@ -15399,6 +15529,24 @@
|
|
15399
15529
|
</xsl:attribute>
|
15400
15530
|
</xsl:template>
|
15401
15531
|
|
15532
|
+
<xsl:template name="setIDforNamedDestination">
|
15533
|
+
<xsl:if test="@named_dest">
|
15534
|
+
<xsl:attribute name="id"><xsl:value-of select="@named_dest"/></xsl:attribute>
|
15535
|
+
</xsl:if>
|
15536
|
+
</xsl:template>
|
15537
|
+
|
15538
|
+
<xsl:template name="setNamedDestination">
|
15539
|
+
<!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
|
15540
|
+
<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'">
|
15541
|
+
<fox:destination internal-destination="{@id}"/>
|
15542
|
+
</xsl:if>
|
15543
|
+
<xsl:for-each select=". | *[local-name() = 'title'] | *[local-name() = 'name']">
|
15544
|
+
<xsl:if test="@named_dest">
|
15545
|
+
<fox:destination internal-destination="{@named_dest}"/>
|
15546
|
+
</xsl:if>
|
15547
|
+
</xsl:for-each>
|
15548
|
+
</xsl:template>
|
15549
|
+
|
15402
15550
|
<xsl:template name="add-letter-spacing">
|
15403
15551
|
<xsl:param name="text"/>
|
15404
15552
|
<xsl:param name="letter-spacing" select="'0.15'"/>
|
@@ -68,12 +68,12 @@ module Metanorma
|
|
68
68
|
super
|
69
69
|
end
|
70
70
|
|
71
|
-
def
|
71
|
+
def clause_attrs_preprocess(attrs, node)
|
72
72
|
node.option?("unnumbered") and attrs[:unnumbered] = true
|
73
73
|
super
|
74
74
|
end
|
75
75
|
|
76
|
-
def
|
76
|
+
def annex_attrs_preprocess(attrs, node)
|
77
77
|
node.option?("unnumbered") and attrs[:unnumbered] = true
|
78
78
|
super
|
79
79
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
3
|
-
<!-- VERSION v2.0.
|
3
|
+
<!-- VERSION v2.0.4 -->
|
4
4
|
|
5
5
|
<!--
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
@@ -1328,6 +1328,7 @@ numbers</a:documentation>
|
|
1328
1328
|
<ref name="foreword"/>
|
1329
1329
|
<ref name="introduction"/>
|
1330
1330
|
<ref name="acknowledgements"/>
|
1331
|
+
<ref name="executivesummary"/>
|
1331
1332
|
</choice>
|
1332
1333
|
</oneOrMore>
|
1333
1334
|
</element>
|
@@ -1351,6 +1352,11 @@ numbers</a:documentation>
|
|
1351
1352
|
<ref name="Content-Section"/>
|
1352
1353
|
</element>
|
1353
1354
|
</define>
|
1355
|
+
<define name="executivesummary">
|
1356
|
+
<element name="executivesummary">
|
1357
|
+
<ref name="Content-Section"/>
|
1358
|
+
</element>
|
1359
|
+
</define>
|
1354
1360
|
<define name="indexsect">
|
1355
1361
|
<element name="indexsect">
|
1356
1362
|
<ref name="Content-Section"/>
|
@@ -1576,6 +1582,15 @@ used in document amendments</a:documentation>
|
|
1576
1582
|
<define name="annex">
|
1577
1583
|
<element name="annex">
|
1578
1584
|
<ref name="Annex-Section"/>
|
1585
|
+
<zeroOrMore>
|
1586
|
+
<ref name="annex-appendix"/>
|
1587
|
+
</zeroOrMore>
|
1588
|
+
</element>
|
1589
|
+
</define>
|
1590
|
+
<define name="annex-appendix">
|
1591
|
+
<a:documentation>Appendix, distinct subclause type for annexes (annex to annex, rather than subclause to annex)</a:documentation>
|
1592
|
+
<element name="appendix">
|
1593
|
+
<ref name="Clause-Section"/>
|
1579
1594
|
</element>
|
1580
1595
|
</define>
|
1581
1596
|
<define name="terms">
|