metanorma-itu 2.6.4 → 2.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/itu/itu.implementers-guide.xsl +178 -32
- data/lib/isodoc/itu/itu.in-force.xsl +178 -32
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +178 -32
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +178 -32
- data/lib/isodoc/itu/itu.recommendation.xsl +178 -32
- data/lib/isodoc/itu/itu.resolution.xsl +178 -32
- data/lib/isodoc/itu/itu.service-publication.xsl +178 -32
- data/lib/isodoc/itu/itu.technical-paper.xsl +178 -32
- data/lib/isodoc/itu/itu.technical-report.xsl +178 -32
- data/lib/metanorma/itu/boilerplate.adoc +9 -0
- data/lib/metanorma/itu/front_id.rb +1 -1
- data/lib/metanorma/itu/isodoc.rng +16 -1
- data/lib/metanorma/itu/itu.rng +0 -14
- data/lib/metanorma/itu/validate.rb +2 -3
- data/lib/metanorma/itu/version.rb +1 -1
- metadata +2 -2
@@ -733,11 +733,11 @@
|
|
733
733
|
</fo:block>
|
734
734
|
</xsl:if>
|
735
735
|
|
736
|
-
<xsl:if test="/itu:metanorma/itu:boilerplate/itu:legal-statement/itu:clause[@id
|
736
|
+
<xsl:if test="/itu:metanorma/itu:boilerplate/itu:legal-statement/itu:clause[starts-with(@id, 'draft-warning')]">
|
737
737
|
<fo:block-container margin-left="1mm" margin-right="1mm" border="0.7mm solid black" margin-top="5mm">
|
738
738
|
<fo:block-container margin-left="1mm" margin-right="1mm">
|
739
739
|
<fo:block padding-top="3mm">
|
740
|
-
<xsl:apply-templates select="/itu:metanorma/itu:boilerplate/itu:legal-statement/itu:clause[@id
|
740
|
+
<xsl:apply-templates select="/itu:metanorma/itu:boilerplate/itu:legal-statement/itu:clause[starts-with(@id, 'draft-warning')]" mode="caution"/>
|
741
741
|
</fo:block>
|
742
742
|
</fo:block-container>
|
743
743
|
</fo:block-container>
|
@@ -1354,10 +1354,10 @@
|
|
1354
1354
|
<fo:block-container>
|
1355
1355
|
<xsl:call-template name="setWritingMode"/>
|
1356
1356
|
<xsl:choose>
|
1357
|
-
<xsl:when test="/itu:metanorma/itu:boilerplate/itu:legal-statement/itu:clause[@id
|
1357
|
+
<xsl:when test="/itu:metanorma/itu:boilerplate/itu:legal-statement/itu:clause[starts-with(@id, 'draft-warning')]">
|
1358
1358
|
<xsl:attribute name="border">0.7mm solid black</xsl:attribute>
|
1359
1359
|
<fo:block font-family="Times New Roman" padding-top="3mm" margin-left="1mm" margin-right="1mm">
|
1360
|
-
<xsl:apply-templates select="/itu:metanorma/itu:boilerplate/itu:legal-statement/itu:clause[@id
|
1360
|
+
<xsl:apply-templates select="/itu:metanorma/itu:boilerplate/itu:legal-statement/itu:clause[starts-with(@id, 'draft-warning')]" mode="caution"/>
|
1361
1361
|
</fo:block>
|
1362
1362
|
</xsl:when>
|
1363
1363
|
<xsl:otherwise>
|
@@ -1375,7 +1375,7 @@
|
|
1375
1375
|
<fo:block-container>
|
1376
1376
|
<xsl:call-template name="setWritingMode"/>
|
1377
1377
|
<fo:block font-size="16pt" margin-top="3pt">
|
1378
|
-
<xsl:if test="/itu:metanorma/itu:boilerplate/itu:legal-statement/itu:clause[@id
|
1378
|
+
<xsl:if test="/itu:metanorma/itu:boilerplate/itu:legal-statement/itu:clause[starts-with(@id, 'draft-warning')]">
|
1379
1379
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1380
1380
|
<xsl:if test="$doctype = 'recommendation-supplement'">
|
1381
1381
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -2160,7 +2160,7 @@
|
|
2160
2160
|
<!-- ============================= -->
|
2161
2161
|
<!-- ============================= -->
|
2162
2162
|
|
2163
|
-
<xsl:template match="itu:clause[@id
|
2163
|
+
<xsl:template match="itu:clause[starts-with(@id, 'draft-warning')]/itu:title" mode="caution">
|
2164
2164
|
<fo:block font-size="16pt" font-style="italic" font-weight="bold" text-align="center" space-after="6pt" role="H1">
|
2165
2165
|
<xsl:if test="$lang = 'ar'"> <!-- to prevent rendering `###` due the missing Arabic glyphs in the italic font (Times New Roman) -->
|
2166
2166
|
<xsl:attribute name="font-style">normal</xsl:attribute>
|
@@ -2170,7 +2170,7 @@
|
|
2170
2170
|
</fo:block>
|
2171
2171
|
</xsl:template>
|
2172
2172
|
|
2173
|
-
<xsl:template match="itu:clause[@id
|
2173
|
+
<xsl:template match="itu:clause[starts-with(@id, 'draft-warning')]/itu:p" mode="caution">
|
2174
2174
|
<fo:block font-size="12pt" text-align="justify">
|
2175
2175
|
<xsl:apply-templates/>
|
2176
2176
|
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
@@ -5405,8 +5405,14 @@
|
|
5405
5405
|
</xsl:choose>
|
5406
5406
|
</xsl:variable>
|
5407
5407
|
|
5408
|
+
<xsl:call-template name="setNamedDestination"/>
|
5409
|
+
|
5408
5410
|
<fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
|
5409
5411
|
|
5412
|
+
<xsl:for-each select="*[local-name() = 'name']">
|
5413
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
5414
|
+
</xsl:for-each>
|
5415
|
+
|
5410
5416
|
<xsl:call-template name="refine_table-container-style">
|
5411
5417
|
<xsl:with-param name="margin-side" select="$margin-side"/>
|
5412
5418
|
</xsl:call-template>
|
@@ -5611,6 +5617,7 @@
|
|
5611
5617
|
<!-- table/name-->
|
5612
5618
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
5613
5619
|
<xsl:param name="continued"/>
|
5620
|
+
<xsl:param name="cols-count"/>
|
5614
5621
|
<xsl:if test="normalize-space() != ''">
|
5615
5622
|
|
5616
5623
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -5632,9 +5639,30 @@
|
|
5632
5639
|
|
5633
5640
|
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
5634
5641
|
<xsl:if test="$continued = 'true'">
|
5635
|
-
|
5636
|
-
|
5637
|
-
|
5642
|
+
|
5643
|
+
<!-- to prevent the error 'THead element may contain only TR elements' -->
|
5644
|
+
|
5645
|
+
<xsl:choose>
|
5646
|
+
<xsl:when test="string(number($cols-count)) != 'NaN'">
|
5647
|
+
<fo:table width="100%" table-layout="fixed" role="SKIP">
|
5648
|
+
<fo:table-body role="SKIP">
|
5649
|
+
<fo:table-row>
|
5650
|
+
<fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
|
5651
|
+
<fo:block text-align="right" role="SKIP">
|
5652
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
5653
|
+
</fo:block>
|
5654
|
+
</fo:table-cell>
|
5655
|
+
</fo:table-row>
|
5656
|
+
</fo:table-body>
|
5657
|
+
</fo:table>
|
5658
|
+
</xsl:when>
|
5659
|
+
<xsl:otherwise>
|
5660
|
+
<fo:block text-align="right">
|
5661
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
5662
|
+
</fo:block>
|
5663
|
+
</xsl:otherwise>
|
5664
|
+
</xsl:choose>
|
5665
|
+
|
5638
5666
|
</xsl:if>
|
5639
5667
|
<!-- </xsl:if> -->
|
5640
5668
|
|
@@ -6027,6 +6055,7 @@
|
|
6027
6055
|
|
6028
6056
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
6029
6057
|
<xsl:with-param name="continued">true</xsl:with-param>
|
6058
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
6030
6059
|
</xsl:apply-templates>
|
6031
6060
|
|
6032
6061
|
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
@@ -6425,8 +6454,8 @@
|
|
6425
6454
|
<xsl:for-each select="xalan:nodeset($styles__)/item">
|
6426
6455
|
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
|
6427
6456
|
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
|
6428
|
-
<xsl:if test="$key = 'color' or
|
6429
|
-
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
6457
|
+
<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'">
|
6458
|
+
<style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
|
6430
6459
|
</xsl:if>
|
6431
6460
|
</xsl:for-each>
|
6432
6461
|
</xsl:variable>
|
@@ -6490,6 +6519,7 @@
|
|
6490
6519
|
<!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
|
6491
6520
|
<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">
|
6492
6521
|
|
6522
|
+
<xsl:call-template name="setNamedDestination"/>
|
6493
6523
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
6494
6524
|
<xsl:copy-of select="@id"/>
|
6495
6525
|
|
@@ -7017,7 +7047,7 @@
|
|
7017
7047
|
<xsl:variable name="target" select="@target"/>
|
7018
7048
|
<xsl:choose>
|
7019
7049
|
<!-- case for footnotes in Requirement tables (https://github.com/metanorma/metanorma-ogc/issues/791) -->
|
7020
|
-
<xsl:when test="not(ancestor::*[local-name() = 'table'][1]
|
7050
|
+
<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]">
|
7021
7051
|
<xsl:call-template name="fn">
|
7022
7052
|
<xsl:with-param name="footnote_body_from_table">true</xsl:with-param>
|
7023
7053
|
</xsl:call-template>
|
@@ -7147,6 +7177,10 @@
|
|
7147
7177
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
7148
7178
|
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
7149
7179
|
|
7180
|
+
<xsl:if test="@key = 'true' and ancestor::*[local-name() = 'figure']">
|
7181
|
+
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
7182
|
+
</xsl:if>
|
7183
|
+
|
7150
7184
|
<xsl:call-template name="setBlockSpanAll"/>
|
7151
7185
|
|
7152
7186
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -7440,7 +7474,7 @@
|
|
7440
7474
|
|
7441
7475
|
<!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
|
7442
7476
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
|
7443
|
-
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
|
7477
|
+
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always" keep-with-previous="always">
|
7444
7478
|
<xsl:call-template name="refine_figure_key_style"/>
|
7445
7479
|
<xsl:apply-templates/>
|
7446
7480
|
</fo:block>
|
@@ -7697,6 +7731,7 @@
|
|
7697
7731
|
|
7698
7732
|
<xsl:call-template name="refine_dt-cell-style"/>
|
7699
7733
|
|
7734
|
+
<xsl:call-template name="setNamedDestination"/>
|
7700
7735
|
<fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
|
7701
7736
|
|
7702
7737
|
<xsl:choose>
|
@@ -8137,7 +8172,7 @@
|
|
8137
8172
|
<!-- ================= -->
|
8138
8173
|
|
8139
8174
|
<!-- highlight text -->
|
8140
|
-
<xsl:template match="*[local-name()='hi']">
|
8175
|
+
<xsl:template match="*[local-name()='hi'] | *[local-name() = 'span'][@class = 'fmt-hi']" priority="3">
|
8141
8176
|
<fo:inline background-color="yellow">
|
8142
8177
|
<xsl:apply-templates/>
|
8143
8178
|
</fo:inline>
|
@@ -9732,6 +9767,7 @@
|
|
9732
9767
|
<!-- Appendix processing -->
|
9733
9768
|
<!-- ======================== -->
|
9734
9769
|
<xsl:template match="*[local-name()='appendix']">
|
9770
|
+
<xsl:call-template name="setNamedDestination"/>
|
9735
9771
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
9736
9772
|
<xsl:apply-templates select="*[local-name()='title']"/>
|
9737
9773
|
</fo:block>
|
@@ -9742,13 +9778,14 @@
|
|
9742
9778
|
<xsl:variable name="level">
|
9743
9779
|
<xsl:call-template name="getLevel"/>
|
9744
9780
|
</xsl:variable>
|
9745
|
-
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
9781
|
+
<fo:inline role="H{$level}"><xsl:call-template name="setIDforNamedDestination"/><xsl:apply-templates/></fo:inline>
|
9746
9782
|
</xsl:template>
|
9747
9783
|
<!-- ======================== -->
|
9748
9784
|
<!-- END Appendix processing -->
|
9749
9785
|
<!-- ======================== -->
|
9750
9786
|
|
9751
9787
|
<xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
9788
|
+
<xsl:call-template name="setNamedDestination"/>
|
9752
9789
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
9753
9790
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
9754
9791
|
</fo:block>
|
@@ -9778,6 +9815,7 @@
|
|
9778
9815
|
<xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
|
9779
9816
|
<xsl:param name="callout"/>
|
9780
9817
|
<fo:inline id="{@id}">
|
9818
|
+
<xsl:call-template name="setNamedDestination"/>
|
9781
9819
|
<!-- for first p in annotation, put <x> -->
|
9782
9820
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
9783
9821
|
<xsl:apply-templates/>
|
@@ -9824,6 +9862,7 @@
|
|
9824
9862
|
|
9825
9863
|
</xsl:if>
|
9826
9864
|
<fo:block-container margin-left="0mm" role="SKIP">
|
9865
|
+
<xsl:call-template name="setNamedDestination"/>
|
9827
9866
|
<fo:block id="{@id}">
|
9828
9867
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
|
9829
9868
|
</fo:block>
|
@@ -9869,8 +9908,13 @@
|
|
9869
9908
|
</fo:block>
|
9870
9909
|
</fo:table-cell>
|
9871
9910
|
<fo:table-cell display-align="center">
|
9911
|
+
|
9872
9912
|
<fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
|
9873
9913
|
|
9914
|
+
<xsl:for-each select="../*[local-name() = 'name']">
|
9915
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
9916
|
+
</xsl:for-each>
|
9917
|
+
|
9874
9918
|
<xsl:call-template name="refine_formula-stem-number-style"/>
|
9875
9919
|
|
9876
9920
|
<xsl:apply-templates select="../*[local-name() = 'name']"/>
|
@@ -9905,6 +9949,8 @@
|
|
9905
9949
|
|
9906
9950
|
<xsl:template match="*[local-name() = 'note']" name="note">
|
9907
9951
|
|
9952
|
+
<xsl:call-template name="setNamedDestination"/>
|
9953
|
+
|
9908
9954
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
|
9909
9955
|
|
9910
9956
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -9973,6 +10019,7 @@
|
|
9973
10019
|
</xsl:template>
|
9974
10020
|
|
9975
10021
|
<xsl:template match="*[local-name() = 'termnote']">
|
10022
|
+
<xsl:call-template name="setNamedDestination"/>
|
9976
10023
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
9977
10024
|
|
9978
10025
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -10079,12 +10126,14 @@
|
|
10079
10126
|
|
10080
10127
|
<xsl:template match="*[local-name() = 'terms']">
|
10081
10128
|
<!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
|
10129
|
+
<xsl:call-template name="setNamedDestination"/>
|
10082
10130
|
<fo:block id="{@id}">
|
10083
10131
|
<xsl:apply-templates/>
|
10084
10132
|
</fo:block>
|
10085
10133
|
</xsl:template>
|
10086
10134
|
|
10087
10135
|
<xsl:template match="*[local-name() = 'term']">
|
10136
|
+
<xsl:call-template name="setNamedDestination"/>
|
10088
10137
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
10089
10138
|
|
10090
10139
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
|
@@ -10116,6 +10165,7 @@
|
|
10116
10165
|
<xsl:template match="*[local-name() = 'figure']" name="figure">
|
10117
10166
|
<xsl:variable name="isAdded" select="@added"/>
|
10118
10167
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
10168
|
+
<xsl:call-template name="setNamedDestination"/>
|
10119
10169
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
10120
10170
|
<xsl:call-template name="refine_figure-block-style"/>
|
10121
10171
|
|
@@ -10132,6 +10182,11 @@
|
|
10132
10182
|
</xsl:variable>
|
10133
10183
|
|
10134
10184
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
10185
|
+
|
10186
|
+
<xsl:for-each select="*[local-name() = 'name']"> <!-- set context -->
|
10187
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
10188
|
+
</xsl:for-each>
|
10189
|
+
|
10135
10190
|
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
|
10136
10191
|
</fo:block>
|
10137
10192
|
|
@@ -10164,6 +10219,7 @@
|
|
10164
10219
|
</xsl:template>
|
10165
10220
|
|
10166
10221
|
<xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
10222
|
+
<xsl:call-template name="setNamedDestination"/>
|
10167
10223
|
<fo:block id="{@id}">
|
10168
10224
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
10169
10225
|
</fo:block>
|
@@ -10177,6 +10233,7 @@
|
|
10177
10233
|
</xsl:template>
|
10178
10234
|
|
10179
10235
|
<!-- SOURCE: ... -->
|
10236
|
+
<!-- figure/source -->
|
10180
10237
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
|
10181
10238
|
|
10182
10239
|
<xsl:call-template name="termsource"/>
|
@@ -11409,6 +11466,7 @@
|
|
11409
11466
|
<xsl:template match="title" mode="bookmark"/>
|
11410
11467
|
<xsl:template match="text()" mode="bookmark"/>
|
11411
11468
|
|
11469
|
+
<!-- figure/name -->
|
11412
11470
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']">
|
11413
11471
|
<xsl:if test="normalize-space() != ''">
|
11414
11472
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
@@ -12125,6 +12183,7 @@
|
|
12125
12183
|
<!-- permission -->
|
12126
12184
|
<!-- ========== -->
|
12127
12185
|
<xsl:template match="*[local-name() = 'permission']">
|
12186
|
+
<xsl:call-template name="setNamedDestination"/>
|
12128
12187
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
12129
12188
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
12130
12189
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
@@ -12133,10 +12192,12 @@
|
|
12133
12192
|
|
12134
12193
|
<xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
|
12135
12194
|
<xsl:if test="normalize-space() != ''">
|
12136
|
-
<fo:block xsl:use-attribute-sets="permission-name-style">
|
12137
|
-
<xsl:apply-templates/>
|
12138
12195
|
|
12139
|
-
|
12196
|
+
<fo:block xsl:use-attribute-sets="permission-name-style">
|
12197
|
+
<xsl:apply-templates/>
|
12198
|
+
|
12199
|
+
</fo:block>
|
12200
|
+
|
12140
12201
|
</xsl:if>
|
12141
12202
|
</xsl:template>
|
12142
12203
|
|
@@ -12152,6 +12213,7 @@
|
|
12152
12213
|
<!-- requirement -->
|
12153
12214
|
<!-- ========== -->
|
12154
12215
|
<xsl:template match="*[local-name() = 'requirement']">
|
12216
|
+
<xsl:call-template name="setNamedDestination"/>
|
12155
12217
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
12156
12218
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
12157
12219
|
<xsl:apply-templates select="*[local-name()='label']"/>
|
@@ -12163,11 +12225,13 @@
|
|
12163
12225
|
|
12164
12226
|
<xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
|
12165
12227
|
<xsl:if test="normalize-space() != ''">
|
12166
|
-
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
12167
12228
|
|
12168
|
-
|
12229
|
+
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
12230
|
+
|
12231
|
+
<xsl:apply-templates/>
|
12232
|
+
|
12233
|
+
</fo:block>
|
12169
12234
|
|
12170
|
-
</fo:block>
|
12171
12235
|
</xsl:if>
|
12172
12236
|
</xsl:template>
|
12173
12237
|
|
@@ -12196,6 +12260,7 @@
|
|
12196
12260
|
<!-- recommendation -->
|
12197
12261
|
<!-- ========== -->
|
12198
12262
|
<xsl:template match="*[local-name() = 'recommendation']">
|
12263
|
+
<xsl:call-template name="setNamedDestination"/>
|
12199
12264
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
12200
12265
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
12201
12266
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
@@ -12204,10 +12269,12 @@
|
|
12204
12269
|
|
12205
12270
|
<xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
|
12206
12271
|
<xsl:if test="normalize-space() != ''">
|
12207
|
-
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
12208
|
-
<xsl:apply-templates/>
|
12209
12272
|
|
12210
|
-
|
12273
|
+
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
12274
|
+
<xsl:apply-templates/>
|
12275
|
+
|
12276
|
+
</fo:block>
|
12277
|
+
|
12211
12278
|
</xsl:if>
|
12212
12279
|
</xsl:template>
|
12213
12280
|
|
@@ -12286,6 +12353,7 @@
|
|
12286
12353
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
12287
12354
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
12288
12355
|
</xsl:if>
|
12356
|
+
<xsl:call-template name="setNamedDestination"/>
|
12289
12357
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
12290
12358
|
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
12291
12359
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -12395,6 +12463,7 @@
|
|
12395
12463
|
<!-- termexample -->
|
12396
12464
|
<!-- ====== -->
|
12397
12465
|
<xsl:template match="*[local-name() = 'termexample']">
|
12466
|
+
<xsl:call-template name="setNamedDestination"/>
|
12398
12467
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
12399
12468
|
<xsl:call-template name="refine_termexample-style"/>
|
12400
12469
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -12449,6 +12518,7 @@
|
|
12449
12518
|
-->
|
12450
12519
|
<xsl:template match="*[local-name() = 'example']" name="example">
|
12451
12520
|
|
12521
|
+
<xsl:call-template name="setNamedDestination"/>
|
12452
12522
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
|
12453
12523
|
|
12454
12524
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -12966,8 +13036,13 @@
|
|
12966
13036
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
12967
13037
|
|
12968
13038
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
|
13039
|
+
|
12969
13040
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
12970
13041
|
|
13042
|
+
<xsl:for-each select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"><!-- change context -->
|
13043
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
13044
|
+
</xsl:for-each>
|
13045
|
+
|
12971
13046
|
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
|
12972
13047
|
</fo:block>
|
12973
13048
|
</xsl:if>
|
@@ -13087,6 +13162,7 @@
|
|
13087
13162
|
<!-- main sections -->
|
13088
13163
|
<xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
|
13089
13164
|
|
13165
|
+
<xsl:call-template name="setNamedDestination"/>
|
13090
13166
|
<fo:block>
|
13091
13167
|
<xsl:call-template name="setId"/>
|
13092
13168
|
|
@@ -13134,6 +13210,7 @@
|
|
13134
13210
|
|
13135
13211
|
<fo:block break-after="page"/>
|
13136
13212
|
|
13213
|
+
<xsl:call-template name="setNamedDestination"/>
|
13137
13214
|
<fo:block>
|
13138
13215
|
<xsl:call-template name="setId"/>
|
13139
13216
|
<xsl:call-template name="addReviewHelper"/>
|
@@ -13162,6 +13239,7 @@
|
|
13162
13239
|
</xsl:template>
|
13163
13240
|
|
13164
13241
|
<xsl:template match="*[local-name() = 'clause'][normalize-space() != '' or *[local-name() = 'figure'] or @id]" name="template_clause"> <!-- if clause isn't empty -->
|
13242
|
+
<xsl:call-template name="setNamedDestination"/>
|
13165
13243
|
<fo:block>
|
13166
13244
|
<xsl:if test="parent::*[local-name() = 'copyright-statement']">
|
13167
13245
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
@@ -13188,6 +13266,7 @@
|
|
13188
13266
|
</xsl:template> <!-- refine_clause_style -->
|
13189
13267
|
|
13190
13268
|
<xsl:template match="*[local-name() = 'definitions']">
|
13269
|
+
<xsl:call-template name="setNamedDestination"/>
|
13191
13270
|
<fo:block id="{@id}">
|
13192
13271
|
<xsl:apply-templates/>
|
13193
13272
|
</fo:block>
|
@@ -13203,6 +13282,8 @@
|
|
13203
13282
|
<xsl:otherwise>
|
13204
13283
|
|
13205
13284
|
<fo:block break-after="page"/>
|
13285
|
+
<xsl:call-template name="setNamedDestination"/>
|
13286
|
+
|
13206
13287
|
<fo:block id="{@id}">
|
13207
13288
|
|
13208
13289
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -13274,6 +13355,7 @@
|
|
13274
13355
|
<!-- following-sibling::node()[1][local-name() = 'bookmark'][@id = $source] and
|
13275
13356
|
following-sibling::node()[2][local-name() = 'fmt-review-end'][@source = $source] -->
|
13276
13357
|
<!-- <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> -->
|
13358
|
+
<xsl:call-template name="setNamedDestination"/>
|
13277
13359
|
<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>
|
13278
13360
|
<!-- </xsl:if> -->
|
13279
13361
|
</xsl:if>
|
@@ -13991,6 +14073,7 @@
|
|
13991
14073
|
<!-- Normative references -->
|
13992
14074
|
<xsl:template match="*[local-name() = 'references'][@normative='true']" priority="2">
|
13993
14075
|
|
14076
|
+
<xsl:call-template name="setNamedDestination"/>
|
13994
14077
|
<fo:block id="{@id}">
|
13995
14078
|
<xsl:apply-templates/>
|
13996
14079
|
|
@@ -14011,6 +14094,7 @@
|
|
14011
14094
|
</xsl:if>
|
14012
14095
|
</xsl:if> -->
|
14013
14096
|
|
14097
|
+
<xsl:call-template name="setNamedDestination"/>
|
14014
14098
|
<fo:block id="{@id}"/>
|
14015
14099
|
|
14016
14100
|
<xsl:apply-templates select="*[local-name() = 'title'][@columns = 1]"/>
|
@@ -14033,6 +14117,7 @@
|
|
14033
14117
|
<xsl:choose>
|
14034
14118
|
<xsl:when test="$skip = 'true'"><!-- skip bibitem --></xsl:when>
|
14035
14119
|
<xsl:otherwise>
|
14120
|
+
<xsl:call-template name="setNamedDestination"/>
|
14036
14121
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
14037
14122
|
<xsl:call-template name="processBibitem"/>
|
14038
14123
|
</fo:block>
|
@@ -14048,6 +14133,7 @@
|
|
14048
14133
|
<xsl:choose>
|
14049
14134
|
<xsl:when test="$skip = 'true'"><!-- skip bibitem --></xsl:when>
|
14050
14135
|
<xsl:otherwise>
|
14136
|
+
<xsl:call-template name="setNamedDestination"/>
|
14051
14137
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
|
14052
14138
|
<xsl:call-template name="processBibitem"/>
|
14053
14139
|
</fo:block>
|
@@ -14060,6 +14146,7 @@
|
|
14060
14146
|
<xsl:choose>
|
14061
14147
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
14062
14148
|
<xsl:otherwise>
|
14149
|
+
<xsl:call-template name="setNamedDestination"/>
|
14063
14150
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
14064
14151
|
|
14065
14152
|
<fo:list-item-label end-indent="label-end()">
|
@@ -14504,6 +14591,7 @@
|
|
14504
14591
|
<xsl:template match="*[local-name() = 'admonition']">
|
14505
14592
|
|
14506
14593
|
<!-- text in the box -->
|
14594
|
+
<xsl:call-template name="setNamedDestination"/>
|
14507
14595
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
|
14508
14596
|
|
14509
14597
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -14760,7 +14848,7 @@
|
|
14760
14848
|
</xsl:template>
|
14761
14849
|
|
14762
14850
|
<!-- Example with 'class': <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
|
14763
|
-
<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">
|
14851
|
+
<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">
|
14764
14852
|
<xsl:copy>
|
14765
14853
|
<xsl:copy-of select="@*"/>
|
14766
14854
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -14792,28 +14880,56 @@
|
|
14792
14880
|
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_step1"/>
|
14793
14881
|
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_pres"/>
|
14794
14882
|
|
14795
|
-
<xsl:template match="*[local-name() = 'fmt-stem']
|
14883
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="update_xml_step1">
|
14796
14884
|
<xsl:element name="stem" namespace="{$namespace_full}">
|
14797
14885
|
<xsl:copy-of select="@*"/>
|
14798
14886
|
<xsl:choose>
|
14799
14887
|
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
14800
|
-
<xsl:
|
14888
|
+
<xsl:choose>
|
14889
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
14890
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
14891
|
+
</xsl:when>
|
14892
|
+
<xsl:otherwise>
|
14893
|
+
<xsl:apply-templates select="*[local-name() = 'semx']/node()" mode="update_xml_step1"/>
|
14894
|
+
</xsl:otherwise>
|
14895
|
+
</xsl:choose>
|
14801
14896
|
</xsl:when>
|
14802
14897
|
<xsl:otherwise>
|
14803
|
-
<xsl:
|
14898
|
+
<xsl:choose>
|
14899
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
14900
|
+
<xsl:copy-of select="node()"/>
|
14901
|
+
</xsl:when>
|
14902
|
+
<xsl:otherwise>
|
14903
|
+
<xsl:apply-templates select="node()" mode="update_xml_step1"/>
|
14904
|
+
</xsl:otherwise>
|
14905
|
+
</xsl:choose>
|
14804
14906
|
</xsl:otherwise>
|
14805
14907
|
</xsl:choose>
|
14806
14908
|
</xsl:element>
|
14807
14909
|
</xsl:template>
|
14808
|
-
<xsl:template match="*[local-name() = 'fmt-stem']
|
14910
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="update_xml_pres">
|
14809
14911
|
<xsl:element name="stem" namespace="{$namespace_full}">
|
14810
14912
|
<xsl:copy-of select="@*"/>
|
14811
14913
|
<xsl:choose>
|
14812
14914
|
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
14813
|
-
<xsl:
|
14915
|
+
<xsl:choose>
|
14916
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
14917
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
14918
|
+
</xsl:when>
|
14919
|
+
<xsl:otherwise>
|
14920
|
+
<xsl:apply-templates select="*[local-name() = 'semx']/node()" mode="update_xml_pres"/>
|
14921
|
+
</xsl:otherwise>
|
14922
|
+
</xsl:choose>
|
14814
14923
|
</xsl:when>
|
14815
14924
|
<xsl:otherwise>
|
14816
|
-
<xsl:
|
14925
|
+
<xsl:choose>
|
14926
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
14927
|
+
<xsl:copy-of select="node()"/>
|
14928
|
+
</xsl:when>
|
14929
|
+
<xsl:otherwise>
|
14930
|
+
<xsl:apply-templates select="node()" mode="update_xml_pres"/>
|
14931
|
+
</xsl:otherwise>
|
14932
|
+
</xsl:choose>
|
14817
14933
|
</xsl:otherwise>
|
14818
14934
|
</xsl:choose>
|
14819
14935
|
</xsl:element>
|
@@ -15042,16 +15158,24 @@
|
|
15042
15158
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_step1">
|
15043
15159
|
<xsl:element name="title" namespace="{$namespace_full}">
|
15044
15160
|
<xsl:copy-of select="@*"/>
|
15161
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
15162
|
+
|
15045
15163
|
<xsl:apply-templates mode="update_xml_step1"/>
|
15046
15164
|
</xsl:element>
|
15047
15165
|
</xsl:template>
|
15048
15166
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_pres">
|
15049
15167
|
<xsl:element name="title" namespace="{$namespace_full}">
|
15050
15168
|
<xsl:copy-of select="@*"/>
|
15169
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
15170
|
+
|
15051
15171
|
<xsl:apply-templates mode="update_xml_pres"/>
|
15052
15172
|
</xsl:element>
|
15053
15173
|
</xsl:template>
|
15054
15174
|
|
15175
|
+
<xsl:template name="addNamedDestinationAttribute">
|
15176
|
+
|
15177
|
+
</xsl:template>
|
15178
|
+
|
15055
15179
|
<xsl:template match="*[local-name() = 'fmt-name']"/>
|
15056
15180
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
|
15057
15181
|
<xsl:choose>
|
@@ -15061,6 +15185,8 @@
|
|
15061
15185
|
<xsl:otherwise>
|
15062
15186
|
<xsl:element name="name" namespace="{$namespace_full}">
|
15063
15187
|
<xsl:copy-of select="@*"/>
|
15188
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
15189
|
+
|
15064
15190
|
<xsl:apply-templates mode="update_xml_step1"/>
|
15065
15191
|
</xsl:element>
|
15066
15192
|
</xsl:otherwise>
|
@@ -15074,6 +15200,8 @@
|
|
15074
15200
|
<xsl:otherwise>
|
15075
15201
|
<xsl:element name="name" namespace="{$namespace_full}">
|
15076
15202
|
<xsl:copy-of select="@*"/>
|
15203
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
15204
|
+
|
15077
15205
|
<xsl:apply-templates mode="update_xml_pres"/>
|
15078
15206
|
</xsl:element>
|
15079
15207
|
</xsl:otherwise>
|
@@ -16531,6 +16659,24 @@
|
|
16531
16659
|
</xsl:attribute>
|
16532
16660
|
</xsl:template>
|
16533
16661
|
|
16662
|
+
<xsl:template name="setIDforNamedDestination">
|
16663
|
+
<xsl:if test="@named_dest">
|
16664
|
+
<xsl:attribute name="id"><xsl:value-of select="@named_dest"/></xsl:attribute>
|
16665
|
+
</xsl:if>
|
16666
|
+
</xsl:template>
|
16667
|
+
|
16668
|
+
<xsl:template name="setNamedDestination">
|
16669
|
+
<!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
|
16670
|
+
<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'">
|
16671
|
+
<fox:destination internal-destination="{@id}"/>
|
16672
|
+
</xsl:if>
|
16673
|
+
<xsl:for-each select=". | *[local-name() = 'title'] | *[local-name() = 'name']">
|
16674
|
+
<xsl:if test="@named_dest">
|
16675
|
+
<fox:destination internal-destination="{@named_dest}"/>
|
16676
|
+
</xsl:if>
|
16677
|
+
</xsl:for-each>
|
16678
|
+
</xsl:template>
|
16679
|
+
|
16534
16680
|
<xsl:template name="add-letter-spacing">
|
16535
16681
|
<xsl:param name="text"/>
|
16536
16682
|
<xsl:param name="letter-spacing" select="'0.15'"/>
|