metanorma-ogc 2.7.4 → 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 -18
- 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 +176 -30
- data/lib/isodoc/ogc/ogc.best-practice.xsl +176 -30
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +176 -30
- data/lib/isodoc/ogc/ogc.community-practice.xsl +176 -30
- data/lib/isodoc/ogc/ogc.community-standard.xsl +176 -30
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +176 -30
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +176 -30
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +176 -30
- data/lib/isodoc/ogc/ogc.other.xsl +176 -30
- data/lib/isodoc/ogc/ogc.policy.xsl +176 -30
- data/lib/isodoc/ogc/ogc.reference-model.xsl +176 -30
- data/lib/isodoc/ogc/ogc.release-notes.xsl +176 -30
- data/lib/isodoc/ogc/ogc.standard.xsl +176 -30
- data/lib/isodoc/ogc/ogc.test-suite.xsl +176 -30
- data/lib/isodoc/ogc/ogc.user-guide.xsl +176 -30
- data/lib/isodoc/ogc/ogc.white-paper.xsl +180 -31
- data/lib/isodoc/ogc/presentation_sections.rb +18 -14
- data/lib/isodoc/ogc/sections.rb +0 -11
- data/lib/isodoc/ogc/xref.rb +9 -10
- data/lib/metanorma/ogc/cleanup.rb +8 -18
- data/lib/metanorma/ogc/converter.rb +12 -12
- data/lib/metanorma/ogc/isodoc.rng +16 -1
- data/lib/metanorma/ogc/ogc.rng +2 -35
- data/lib/metanorma/ogc/validate.rb +3 -3
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +2 -2
@@ -4432,8 +4432,14 @@
|
|
4432
4432
|
</xsl:choose>
|
4433
4433
|
</xsl:variable>
|
4434
4434
|
|
4435
|
+
<xsl:call-template name="setNamedDestination"/>
|
4436
|
+
|
4435
4437
|
<fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
|
4436
4438
|
|
4439
|
+
<xsl:for-each select="*[local-name() = 'name']">
|
4440
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
4441
|
+
</xsl:for-each>
|
4442
|
+
|
4437
4443
|
<xsl:call-template name="refine_table-container-style">
|
4438
4444
|
<xsl:with-param name="margin-side" select="$margin-side"/>
|
4439
4445
|
</xsl:call-template>
|
@@ -4640,6 +4646,7 @@
|
|
4640
4646
|
<!-- table/name-->
|
4641
4647
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
4642
4648
|
<xsl:param name="continued"/>
|
4649
|
+
<xsl:param name="cols-count"/>
|
4643
4650
|
<xsl:if test="normalize-space() != ''">
|
4644
4651
|
|
4645
4652
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -4661,9 +4668,30 @@
|
|
4661
4668
|
|
4662
4669
|
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
4663
4670
|
<xsl:if test="$continued = 'true'">
|
4664
|
-
|
4665
|
-
|
4666
|
-
|
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
|
+
|
4667
4695
|
</xsl:if>
|
4668
4696
|
<!-- </xsl:if> -->
|
4669
4697
|
|
@@ -5056,6 +5084,7 @@
|
|
5056
5084
|
|
5057
5085
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
5058
5086
|
<xsl:with-param name="continued">true</xsl:with-param>
|
5087
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5059
5088
|
</xsl:apply-templates>
|
5060
5089
|
|
5061
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 -->
|
@@ -5437,8 +5466,8 @@
|
|
5437
5466
|
<xsl:for-each select="xalan:nodeset($styles__)/item">
|
5438
5467
|
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
|
5439
5468
|
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
|
5440
|
-
<xsl:if test="$key = 'color' or
|
5441
|
-
<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>
|
5442
5471
|
</xsl:if>
|
5443
5472
|
</xsl:for-each>
|
5444
5473
|
</xsl:variable>
|
@@ -5502,6 +5531,7 @@
|
|
5502
5531
|
<!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
|
5503
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">
|
5504
5533
|
|
5534
|
+
<xsl:call-template name="setNamedDestination"/>
|
5505
5535
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
5506
5536
|
<xsl:copy-of select="@id"/>
|
5507
5537
|
|
@@ -6027,7 +6057,7 @@
|
|
6027
6057
|
<xsl:variable name="target" select="@target"/>
|
6028
6058
|
<xsl:choose>
|
6029
6059
|
<!-- case for footnotes in Requirement tables (https://github.com/metanorma/metanorma-ogc/issues/791) -->
|
6030
|
-
<xsl:when test="not(ancestor::*[local-name() = 'table'][1]
|
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]">
|
6031
6061
|
<xsl:call-template name="fn">
|
6032
6062
|
<xsl:with-param name="footnote_body_from_table">true</xsl:with-param>
|
6033
6063
|
</xsl:call-template>
|
@@ -6123,6 +6153,10 @@
|
|
6123
6153
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
6124
6154
|
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
6125
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
|
+
|
6126
6160
|
<xsl:call-template name="setBlockSpanAll"/>
|
6127
6161
|
|
6128
6162
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -6416,7 +6450,7 @@
|
|
6416
6450
|
|
6417
6451
|
<!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
|
6418
6452
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
|
6419
|
-
<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">
|
6420
6454
|
<xsl:call-template name="refine_figure_key_style"/>
|
6421
6455
|
<xsl:apply-templates/>
|
6422
6456
|
</fo:block>
|
@@ -6674,6 +6708,7 @@
|
|
6674
6708
|
|
6675
6709
|
<xsl:call-template name="refine_dt-cell-style"/>
|
6676
6710
|
|
6711
|
+
<xsl:call-template name="setNamedDestination"/>
|
6677
6712
|
<fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
|
6678
6713
|
|
6679
6714
|
<xsl:choose>
|
@@ -7113,7 +7148,7 @@
|
|
7113
7148
|
<!-- ================= -->
|
7114
7149
|
|
7115
7150
|
<!-- highlight text -->
|
7116
|
-
<xsl:template match="*[local-name()='hi']">
|
7151
|
+
<xsl:template match="*[local-name()='hi'] | *[local-name() = 'span'][@class = 'fmt-hi']" priority="3">
|
7117
7152
|
<fo:inline background-color="yellow">
|
7118
7153
|
<xsl:apply-templates/>
|
7119
7154
|
</fo:inline>
|
@@ -8708,6 +8743,7 @@
|
|
8708
8743
|
<!-- Appendix processing -->
|
8709
8744
|
<!-- ======================== -->
|
8710
8745
|
<xsl:template match="*[local-name()='appendix']">
|
8746
|
+
<xsl:call-template name="setNamedDestination"/>
|
8711
8747
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
8712
8748
|
<xsl:apply-templates select="*[local-name()='title']"/>
|
8713
8749
|
</fo:block>
|
@@ -8718,13 +8754,14 @@
|
|
8718
8754
|
<xsl:variable name="level">
|
8719
8755
|
<xsl:call-template name="getLevel"/>
|
8720
8756
|
</xsl:variable>
|
8721
|
-
<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>
|
8722
8758
|
</xsl:template>
|
8723
8759
|
<!-- ======================== -->
|
8724
8760
|
<!-- END Appendix processing -->
|
8725
8761
|
<!-- ======================== -->
|
8726
8762
|
|
8727
8763
|
<xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
8764
|
+
<xsl:call-template name="setNamedDestination"/>
|
8728
8765
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
8729
8766
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
8730
8767
|
</fo:block>
|
@@ -8758,6 +8795,7 @@
|
|
8758
8795
|
<xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
|
8759
8796
|
<xsl:param name="callout"/>
|
8760
8797
|
<fo:inline id="{@id}">
|
8798
|
+
<xsl:call-template name="setNamedDestination"/>
|
8761
8799
|
<!-- for first p in annotation, put <x> -->
|
8762
8800
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
8763
8801
|
<xsl:apply-templates/>
|
@@ -8804,6 +8842,7 @@
|
|
8804
8842
|
|
8805
8843
|
</xsl:if>
|
8806
8844
|
<fo:block-container margin-left="0mm" role="SKIP">
|
8845
|
+
<xsl:call-template name="setNamedDestination"/>
|
8807
8846
|
<fo:block id="{@id}">
|
8808
8847
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
|
8809
8848
|
</fo:block>
|
@@ -8849,8 +8888,13 @@
|
|
8849
8888
|
</fo:block>
|
8850
8889
|
</fo:table-cell>
|
8851
8890
|
<fo:table-cell display-align="center">
|
8891
|
+
|
8852
8892
|
<fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
|
8853
8893
|
|
8894
|
+
<xsl:for-each select="../*[local-name() = 'name']">
|
8895
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
8896
|
+
</xsl:for-each>
|
8897
|
+
|
8854
8898
|
<xsl:call-template name="refine_formula-stem-number-style"/>
|
8855
8899
|
|
8856
8900
|
<xsl:apply-templates select="../*[local-name() = 'name']"/>
|
@@ -8885,6 +8929,8 @@
|
|
8885
8929
|
|
8886
8930
|
<xsl:template match="*[local-name() = 'note']" name="note">
|
8887
8931
|
|
8932
|
+
<xsl:call-template name="setNamedDestination"/>
|
8933
|
+
|
8888
8934
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
|
8889
8935
|
|
8890
8936
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -8949,6 +8995,7 @@
|
|
8949
8995
|
</xsl:template>
|
8950
8996
|
|
8951
8997
|
<xsl:template match="*[local-name() = 'termnote']">
|
8998
|
+
<xsl:call-template name="setNamedDestination"/>
|
8952
8999
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
8953
9000
|
|
8954
9001
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -9055,12 +9102,14 @@
|
|
9055
9102
|
|
9056
9103
|
<xsl:template match="*[local-name() = 'terms']">
|
9057
9104
|
<!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
|
9105
|
+
<xsl:call-template name="setNamedDestination"/>
|
9058
9106
|
<fo:block id="{@id}">
|
9059
9107
|
<xsl:apply-templates/>
|
9060
9108
|
</fo:block>
|
9061
9109
|
</xsl:template>
|
9062
9110
|
|
9063
9111
|
<xsl:template match="*[local-name() = 'term']">
|
9112
|
+
<xsl:call-template name="setNamedDestination"/>
|
9064
9113
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
9065
9114
|
|
9066
9115
|
<xsl:apply-templates select="ogc:name"/>
|
@@ -9094,6 +9143,7 @@
|
|
9094
9143
|
<xsl:template match="*[local-name() = 'figure']" name="figure">
|
9095
9144
|
<xsl:variable name="isAdded" select="@added"/>
|
9096
9145
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
9146
|
+
<xsl:call-template name="setNamedDestination"/>
|
9097
9147
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
9098
9148
|
<xsl:call-template name="refine_figure-block-style"/>
|
9099
9149
|
|
@@ -9110,6 +9160,11 @@
|
|
9110
9160
|
</xsl:variable>
|
9111
9161
|
|
9112
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
|
+
|
9113
9168
|
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
|
9114
9169
|
</fo:block>
|
9115
9170
|
|
@@ -9142,6 +9197,7 @@
|
|
9142
9197
|
</xsl:template>
|
9143
9198
|
|
9144
9199
|
<xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
9200
|
+
<xsl:call-template name="setNamedDestination"/>
|
9145
9201
|
<fo:block id="{@id}">
|
9146
9202
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
9147
9203
|
</fo:block>
|
@@ -9155,6 +9211,7 @@
|
|
9155
9211
|
</xsl:template>
|
9156
9212
|
|
9157
9213
|
<!-- SOURCE: ... -->
|
9214
|
+
<!-- figure/source -->
|
9158
9215
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
|
9159
9216
|
|
9160
9217
|
<xsl:call-template name="termsource"/>
|
@@ -10352,6 +10409,7 @@
|
|
10352
10409
|
<xsl:template match="title" mode="bookmark"/>
|
10353
10410
|
<xsl:template match="text()" mode="bookmark"/>
|
10354
10411
|
|
10412
|
+
<!-- figure/name -->
|
10355
10413
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']">
|
10356
10414
|
<xsl:if test="normalize-space() != ''">
|
10357
10415
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
@@ -11079,6 +11137,7 @@
|
|
11079
11137
|
<!-- permission -->
|
11080
11138
|
<!-- ========== -->
|
11081
11139
|
<xsl:template match="*[local-name() = 'permission']">
|
11140
|
+
<xsl:call-template name="setNamedDestination"/>
|
11082
11141
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
11083
11142
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
11084
11143
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
@@ -11087,12 +11146,14 @@
|
|
11087
11146
|
|
11088
11147
|
<xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
|
11089
11148
|
<xsl:if test="normalize-space() != ''">
|
11090
|
-
<fo:block xsl:use-attribute-sets="permission-name-style">
|
11091
|
-
<xsl:apply-templates/>
|
11092
11149
|
|
11093
|
-
<
|
11150
|
+
<fo:block xsl:use-attribute-sets="permission-name-style">
|
11151
|
+
<xsl:apply-templates/>
|
11152
|
+
|
11153
|
+
<xsl:text>:</xsl:text>
|
11154
|
+
|
11155
|
+
</fo:block>
|
11094
11156
|
|
11095
|
-
</fo:block>
|
11096
11157
|
</xsl:if>
|
11097
11158
|
</xsl:template>
|
11098
11159
|
|
@@ -11108,6 +11169,7 @@
|
|
11108
11169
|
<!-- requirement -->
|
11109
11170
|
<!-- ========== -->
|
11110
11171
|
<xsl:template match="*[local-name() = 'requirement']">
|
11172
|
+
<xsl:call-template name="setNamedDestination"/>
|
11111
11173
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
11112
11174
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
11113
11175
|
<xsl:apply-templates select="*[local-name()='label']"/>
|
@@ -11119,17 +11181,19 @@
|
|
11119
11181
|
|
11120
11182
|
<xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
|
11121
11183
|
<xsl:if test="normalize-space() != ''">
|
11122
|
-
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
11123
11184
|
|
11124
|
-
<xsl:
|
11125
|
-
<xsl:attribute name="background-color">white</xsl:attribute>
|
11126
|
-
</xsl:if>
|
11185
|
+
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
11127
11186
|
|
11128
|
-
|
11187
|
+
<xsl:if test="../@type = 'class'">
|
11188
|
+
<xsl:attribute name="background-color">white</xsl:attribute>
|
11189
|
+
</xsl:if>
|
11129
11190
|
|
11130
|
-
|
11191
|
+
<xsl:apply-templates/>
|
11192
|
+
|
11193
|
+
<xsl:text>:</xsl:text>
|
11194
|
+
|
11195
|
+
</fo:block>
|
11131
11196
|
|
11132
|
-
</fo:block>
|
11133
11197
|
</xsl:if>
|
11134
11198
|
</xsl:template>
|
11135
11199
|
|
@@ -11158,6 +11222,7 @@
|
|
11158
11222
|
<!-- recommendation -->
|
11159
11223
|
<!-- ========== -->
|
11160
11224
|
<xsl:template match="*[local-name() = 'recommendation']">
|
11225
|
+
<xsl:call-template name="setNamedDestination"/>
|
11161
11226
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
11162
11227
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
11163
11228
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
@@ -11166,10 +11231,12 @@
|
|
11166
11231
|
|
11167
11232
|
<xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
|
11168
11233
|
<xsl:if test="normalize-space() != ''">
|
11169
|
-
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
11170
|
-
<xsl:apply-templates/>
|
11171
11234
|
|
11172
|
-
|
11235
|
+
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
11236
|
+
<xsl:apply-templates/>
|
11237
|
+
|
11238
|
+
</fo:block>
|
11239
|
+
|
11173
11240
|
</xsl:if>
|
11174
11241
|
</xsl:template>
|
11175
11242
|
|
@@ -11248,6 +11315,7 @@
|
|
11248
11315
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
11249
11316
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
11250
11317
|
</xsl:if>
|
11318
|
+
<xsl:call-template name="setNamedDestination"/>
|
11251
11319
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
11252
11320
|
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
11253
11321
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -11371,6 +11439,7 @@
|
|
11371
11439
|
<!-- termexample -->
|
11372
11440
|
<!-- ====== -->
|
11373
11441
|
<xsl:template match="*[local-name() = 'termexample']">
|
11442
|
+
<xsl:call-template name="setNamedDestination"/>
|
11374
11443
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
11375
11444
|
<xsl:call-template name="refine_termexample-style"/>
|
11376
11445
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -11425,6 +11494,7 @@
|
|
11425
11494
|
-->
|
11426
11495
|
<xsl:template match="*[local-name() = 'example']" name="example">
|
11427
11496
|
|
11497
|
+
<xsl:call-template name="setNamedDestination"/>
|
11428
11498
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
|
11429
11499
|
|
11430
11500
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -11942,8 +12012,13 @@
|
|
11942
12012
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
11943
12013
|
|
11944
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
|
+
|
11945
12016
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
11946
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
|
+
|
11947
12022
|
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
|
11948
12023
|
</fo:block>
|
11949
12024
|
</xsl:if>
|
@@ -12063,6 +12138,7 @@
|
|
12063
12138
|
<!-- main sections -->
|
12064
12139
|
<xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
|
12065
12140
|
|
12141
|
+
<xsl:call-template name="setNamedDestination"/>
|
12066
12142
|
<fo:block>
|
12067
12143
|
<xsl:call-template name="setId"/>
|
12068
12144
|
|
@@ -12108,6 +12184,7 @@
|
|
12108
12184
|
|
12109
12185
|
<fo:block break-after="page"/>
|
12110
12186
|
|
12187
|
+
<xsl:call-template name="setNamedDestination"/>
|
12111
12188
|
<fo:block>
|
12112
12189
|
<xsl:call-template name="setId"/>
|
12113
12190
|
<xsl:call-template name="addReviewHelper"/>
|
@@ -12136,6 +12213,7 @@
|
|
12136
12213
|
</xsl:template>
|
12137
12214
|
|
12138
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"/>
|
12139
12217
|
<fo:block>
|
12140
12218
|
<xsl:if test="parent::*[local-name() = 'copyright-statement']">
|
12141
12219
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
@@ -12158,6 +12236,7 @@
|
|
12158
12236
|
</xsl:template> <!-- refine_clause_style -->
|
12159
12237
|
|
12160
12238
|
<xsl:template match="*[local-name() = 'definitions']">
|
12239
|
+
<xsl:call-template name="setNamedDestination"/>
|
12161
12240
|
<fo:block id="{@id}">
|
12162
12241
|
<xsl:apply-templates/>
|
12163
12242
|
</fo:block>
|
@@ -12173,6 +12252,8 @@
|
|
12173
12252
|
<xsl:otherwise>
|
12174
12253
|
|
12175
12254
|
<fo:block break-after="page"/>
|
12255
|
+
<xsl:call-template name="setNamedDestination"/>
|
12256
|
+
|
12176
12257
|
<fo:block id="{@id}">
|
12177
12258
|
|
12178
12259
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -12244,6 +12325,7 @@
|
|
12244
12325
|
<!-- following-sibling::node()[1][local-name() = 'bookmark'][@id = $source] and
|
12245
12326
|
following-sibling::node()[2][local-name() = 'fmt-review-end'][@source = $source] -->
|
12246
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"/>
|
12247
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>
|
12248
12330
|
<!-- </xsl:if> -->
|
12249
12331
|
</xsl:if>
|
@@ -12959,6 +13041,7 @@
|
|
12959
13041
|
<!-- Normative references -->
|
12960
13042
|
<xsl:template match="*[local-name() = 'references'][@normative='true']" priority="2">
|
12961
13043
|
|
13044
|
+
<xsl:call-template name="setNamedDestination"/>
|
12962
13045
|
<fo:block id="{@id}">
|
12963
13046
|
<xsl:apply-templates/>
|
12964
13047
|
|
@@ -12979,6 +13062,7 @@
|
|
12979
13062
|
</xsl:if>
|
12980
13063
|
</xsl:if> -->
|
12981
13064
|
|
13065
|
+
<xsl:call-template name="setNamedDestination"/>
|
12982
13066
|
<fo:block id="{@id}"/>
|
12983
13067
|
|
12984
13068
|
<xsl:apply-templates select="*[local-name() = 'title'][@columns = 1]"/>
|
@@ -12998,6 +13082,7 @@
|
|
12998
13082
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
12999
13083
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
13000
13084
|
|
13085
|
+
<xsl:call-template name="setNamedDestination"/>
|
13001
13086
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
13002
13087
|
|
13003
13088
|
<xsl:call-template name="processBibitem"/>
|
@@ -13011,6 +13096,7 @@
|
|
13011
13096
|
<!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
|
13012
13097
|
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
13013
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"/>
|
13014
13100
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
13015
13101
|
|
13016
13102
|
<fo:list-item>
|
@@ -13040,6 +13126,7 @@
|
|
13040
13126
|
<xsl:choose>
|
13041
13127
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
13042
13128
|
<xsl:otherwise>
|
13129
|
+
<xsl:call-template name="setNamedDestination"/>
|
13043
13130
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
13044
13131
|
|
13045
13132
|
<fo:list-item-label end-indent="label-end()">
|
@@ -13434,6 +13521,7 @@
|
|
13434
13521
|
<xsl:template match="*[local-name() = 'admonition']">
|
13435
13522
|
|
13436
13523
|
<!-- text in the box -->
|
13524
|
+
<xsl:call-template name="setNamedDestination"/>
|
13437
13525
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
|
13438
13526
|
|
13439
13527
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -13696,7 +13784,7 @@
|
|
13696
13784
|
</xsl:template>
|
13697
13785
|
|
13698
13786
|
<!-- Example with 'class': <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
|
13699
|
-
<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">
|
13700
13788
|
<xsl:copy>
|
13701
13789
|
<xsl:copy-of select="@*"/>
|
13702
13790
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -13728,28 +13816,56 @@
|
|
13728
13816
|
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_step1"/>
|
13729
13817
|
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_pres"/>
|
13730
13818
|
|
13731
|
-
<xsl:template match="*[local-name() = 'fmt-stem']
|
13819
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="update_xml_step1">
|
13732
13820
|
<xsl:element name="stem" namespace="{$namespace_full}">
|
13733
13821
|
<xsl:copy-of select="@*"/>
|
13734
13822
|
<xsl:choose>
|
13735
13823
|
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
13736
|
-
<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>
|
13737
13832
|
</xsl:when>
|
13738
13833
|
<xsl:otherwise>
|
13739
|
-
<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>
|
13740
13842
|
</xsl:otherwise>
|
13741
13843
|
</xsl:choose>
|
13742
13844
|
</xsl:element>
|
13743
13845
|
</xsl:template>
|
13744
|
-
<xsl:template match="*[local-name() = 'fmt-stem']
|
13846
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="update_xml_pres">
|
13745
13847
|
<xsl:element name="stem" namespace="{$namespace_full}">
|
13746
13848
|
<xsl:copy-of select="@*"/>
|
13747
13849
|
<xsl:choose>
|
13748
13850
|
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
13749
|
-
<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>
|
13750
13859
|
</xsl:when>
|
13751
13860
|
<xsl:otherwise>
|
13752
|
-
<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>
|
13753
13869
|
</xsl:otherwise>
|
13754
13870
|
</xsl:choose>
|
13755
13871
|
</xsl:element>
|
@@ -13978,16 +14094,24 @@
|
|
13978
14094
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_step1">
|
13979
14095
|
<xsl:element name="title" namespace="{$namespace_full}">
|
13980
14096
|
<xsl:copy-of select="@*"/>
|
14097
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
14098
|
+
|
13981
14099
|
<xsl:apply-templates mode="update_xml_step1"/>
|
13982
14100
|
</xsl:element>
|
13983
14101
|
</xsl:template>
|
13984
14102
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_pres">
|
13985
14103
|
<xsl:element name="title" namespace="{$namespace_full}">
|
13986
14104
|
<xsl:copy-of select="@*"/>
|
14105
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
14106
|
+
|
13987
14107
|
<xsl:apply-templates mode="update_xml_pres"/>
|
13988
14108
|
</xsl:element>
|
13989
14109
|
</xsl:template>
|
13990
14110
|
|
14111
|
+
<xsl:template name="addNamedDestinationAttribute">
|
14112
|
+
|
14113
|
+
</xsl:template>
|
14114
|
+
|
13991
14115
|
<xsl:template match="*[local-name() = 'fmt-name']"/>
|
13992
14116
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
|
13993
14117
|
<xsl:choose>
|
@@ -13997,6 +14121,8 @@
|
|
13997
14121
|
<xsl:otherwise>
|
13998
14122
|
<xsl:element name="name" namespace="{$namespace_full}">
|
13999
14123
|
<xsl:copy-of select="@*"/>
|
14124
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
14125
|
+
|
14000
14126
|
<xsl:apply-templates mode="update_xml_step1"/>
|
14001
14127
|
</xsl:element>
|
14002
14128
|
</xsl:otherwise>
|
@@ -14010,6 +14136,8 @@
|
|
14010
14136
|
<xsl:otherwise>
|
14011
14137
|
<xsl:element name="name" namespace="{$namespace_full}">
|
14012
14138
|
<xsl:copy-of select="@*"/>
|
14139
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
14140
|
+
|
14013
14141
|
<xsl:apply-templates mode="update_xml_pres"/>
|
14014
14142
|
</xsl:element>
|
14015
14143
|
</xsl:otherwise>
|
@@ -15467,6 +15595,24 @@
|
|
15467
15595
|
</xsl:attribute>
|
15468
15596
|
</xsl:template>
|
15469
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
|
+
|
15470
15616
|
<xsl:template name="add-letter-spacing">
|
15471
15617
|
<xsl:param name="text"/>
|
15472
15618
|
<xsl:param name="letter-spacing" select="'0.15'"/>
|