metanorma-ogc 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ogc/base_convert.rb +4 -2
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +317 -135
- data/lib/isodoc/ogc/ogc.best-practice.xsl +317 -135
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +317 -135
- data/lib/isodoc/ogc/ogc.community-practice.xsl +317 -135
- data/lib/isodoc/ogc/ogc.community-standard.xsl +317 -135
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +317 -135
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +317 -135
- data/lib/isodoc/ogc/ogc.other.xsl +317 -135
- data/lib/isodoc/ogc/ogc.policy.xsl +317 -135
- data/lib/isodoc/ogc/ogc.reference-model.xsl +317 -135
- data/lib/isodoc/ogc/ogc.release-notes.xsl +317 -135
- data/lib/isodoc/ogc/ogc.standard.xsl +317 -135
- data/lib/isodoc/ogc/ogc.test-suite.xsl +317 -135
- data/lib/isodoc/ogc/ogc.user-guide.xsl +317 -135
- data/lib/isodoc/ogc/ogc.white-paper.xsl +256 -133
- data/lib/isodoc/ogc/reqt.rb +2 -1
- data/lib/isodoc/ogc/xref.rb +11 -4
- data/lib/metanorma/ogc/isodoc.rng +73 -3
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +2 -2
@@ -74,36 +74,11 @@
|
|
74
74
|
|
75
75
|
<xsl:variable name="contents">
|
76
76
|
<contents>
|
77
|
-
|
78
|
-
|
79
|
-
<!-- <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/*" mode="contents"/> -->
|
80
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:abstract" mode="contents"/>
|
81
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'executivesummary']" mode="contents"/>
|
82
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'keyword']" mode="contents"/>
|
83
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:foreword" mode="contents"/>
|
84
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:introduction" mode="contents"/>
|
85
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'submitting_orgs']" mode="contents"/>
|
86
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:submitters" mode="contents"/>
|
87
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[not(@type = 'executivesummary') and not(@type = 'submitting_orgs') and not(@type = 'keyword')]" mode="contents"/>
|
88
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:acknowledgements" mode="contents"/>
|
89
|
-
|
90
|
-
|
91
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:clause[@type='scope']" mode="contents"/>
|
92
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:clause[@type='conformance']" mode="contents"/>
|
93
|
-
<!-- Normative references -->
|
94
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:bibliography/ogc:references[@normative='true']" mode="contents"/>
|
95
|
-
<!-- Terms and definitions -->
|
96
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:terms" mode="contents"/>
|
97
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:definitions" mode="contents"/>
|
98
|
-
|
99
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:clause[not(@type='scope') and not(@type='conformance')]" mode="contents"/>
|
100
|
-
|
101
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:annex" mode="contents"/>
|
102
|
-
|
103
|
-
<!-- Bibliography -->
|
104
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:bibliography/ogc:references[not(@normative='true')]" mode="contents"/>
|
105
|
-
|
77
|
+
<!-- Abstract, Keywords, Preface, Submitting Organizations, Submitters -->
|
78
|
+
<xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
|
106
79
|
|
80
|
+
<xsl:call-template name="processMainSectionsDefault_Contents"/>
|
81
|
+
<xsl:apply-templates select="//ogc:indexsect" mode="contents"/>
|
107
82
|
</contents>
|
108
83
|
</xsl:variable>
|
109
84
|
|
@@ -272,27 +247,16 @@
|
|
272
247
|
|
273
248
|
|
274
249
|
<!-- Abstract, Keywords, Preface, Submitting Organizations, Submitters -->
|
275
|
-
|
276
|
-
|
277
|
-
<fo:block break-after="page"/>
|
278
|
-
</xsl:if>
|
279
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:abstract"/>
|
280
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'executivesummary']"/>
|
281
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'keyword']"/>
|
282
|
-
<xsl:if test="/ogc:ogc-standard/ogc:preface/ogc:foreword">
|
283
|
-
<fo:block break-after="page"/>
|
284
|
-
</xsl:if>
|
285
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:foreword"/>
|
286
|
-
<xsl:if test="/ogc:ogc-standard/ogc:preface/ogc:introduction">
|
287
|
-
<fo:block break-after="page"/>
|
288
|
-
</xsl:if>
|
289
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:introduction"/>
|
290
|
-
|
291
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'submitting_orgs']"/>
|
292
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:submitters"/>
|
293
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[not(@type = 'executivesummary') and not(@type = 'submitting_orgs') and not(@type = 'keyword')]"/>
|
294
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:acknowledgements"/>
|
250
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
251
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
295
252
|
|
253
|
+
<xsl:if test="local-name() = 'abstract' or local-name() = 'foreword' or local-name() = 'introduction'">
|
254
|
+
<fo:block break-after="page"/>
|
255
|
+
</xsl:if>
|
256
|
+
|
257
|
+
<xsl:apply-templates select="."/>
|
258
|
+
</xsl:for-each>
|
259
|
+
|
296
260
|
</fo:flow>
|
297
261
|
</fo:page-sequence>
|
298
262
|
|
@@ -306,23 +270,7 @@
|
|
306
270
|
|
307
271
|
<fo:block line-height="125%">
|
308
272
|
|
309
|
-
<xsl:
|
310
|
-
|
311
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:clause[@type='conformance']"/>
|
312
|
-
|
313
|
-
<!-- Normative references -->
|
314
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:bibliography/ogc:references[@normative='true']"/>
|
315
|
-
|
316
|
-
<!-- Terms and definitions -->
|
317
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:terms"/>
|
318
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:definitions"/>
|
319
|
-
|
320
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:sections/ogc:clause[not(@type='scope') and not(@type='conformance')]"/>
|
321
|
-
|
322
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:annex"/>
|
323
|
-
|
324
|
-
<!-- Bibliography -->
|
325
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:bibliography/ogc:references[not(@normative='true')]"/>
|
273
|
+
<xsl:call-template name="processMainSectionsDefault"/>
|
326
274
|
|
327
275
|
</fo:block>
|
328
276
|
</fo:flow>
|
@@ -449,14 +397,6 @@
|
|
449
397
|
</fo:block>
|
450
398
|
</xsl:template>
|
451
399
|
|
452
|
-
<xsl:template match="ogc:ogc-standard/ogc:preface/*" mode="preface">
|
453
|
-
<xsl:if test="local-name() = 'introduction' or local-name() = 'abstract' or local-name() = 'foreword'">
|
454
|
-
<fo:block break-after="page"/>
|
455
|
-
</xsl:if>
|
456
|
-
<xsl:apply-templates select="current()"/>
|
457
|
-
</xsl:template>
|
458
|
-
|
459
|
-
|
460
400
|
|
461
401
|
<!-- ====== -->
|
462
402
|
<!-- title -->
|
@@ -716,6 +656,10 @@
|
|
716
656
|
<xsl:text>Édition </xsl:text>
|
717
657
|
</title-edition>
|
718
658
|
|
659
|
+
<title-edition lang="ru">
|
660
|
+
<xsl:text>Издание </xsl:text>
|
661
|
+
</title-edition>
|
662
|
+
|
719
663
|
<!-- These titles of Table of contents renders different than determined in localized-strings -->
|
720
664
|
<title-toc lang="en">
|
721
665
|
|
@@ -744,7 +688,11 @@
|
|
744
688
|
|
745
689
|
|
746
690
|
|
747
|
-
</title-part>
|
691
|
+
</title-part>
|
692
|
+
<title-part lang="ru">
|
693
|
+
|
694
|
+
|
695
|
+
</title-part>
|
748
696
|
<title-part lang="zh">第 # 部分:</title-part>
|
749
697
|
|
750
698
|
<title-subpart lang="en">Sub-part #</title-subpart>
|
@@ -760,6 +708,7 @@
|
|
760
708
|
|
761
709
|
<title-summary lang="en">Summary</title-summary>
|
762
710
|
|
711
|
+
<title-continued lang="ru">(продолжение)</title-continued>
|
763
712
|
<title-continued lang="en">(continued)</title-continued>
|
764
713
|
<title-continued lang="fr">(continué)</title-continued>
|
765
714
|
|
@@ -1596,13 +1545,19 @@
|
|
1596
1545
|
</xsl:attribute-set><xsl:variable name="color-added-text">
|
1597
1546
|
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
1598
1547
|
</xsl:variable><xsl:attribute-set name="add-style">
|
1599
|
-
|
1600
|
-
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
|
1605
|
-
|
1548
|
+
|
1549
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
1550
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1551
|
+
<!-- <xsl:attribute name="color">black</xsl:attribute>
|
1552
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
1553
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
1554
|
+
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
1555
|
+
|
1556
|
+
</xsl:attribute-set><xsl:variable name="add-style">
|
1557
|
+
<add-style xsl:use-attribute-sets="add-style"/>
|
1558
|
+
</xsl:variable><xsl:template name="append_add-style">
|
1559
|
+
<xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
|
1560
|
+
</xsl:template><xsl:variable name="color-deleted-text">
|
1606
1561
|
<xsl:text>red</xsl:text>
|
1607
1562
|
</xsl:variable><xsl:attribute-set name="del-style">
|
1608
1563
|
<xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
@@ -2045,14 +2000,42 @@
|
|
2045
2000
|
|
2046
2001
|
|
2047
2002
|
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
|
2003
|
+
<xsl:variable name="nodes_preface_">
|
2004
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
2005
|
+
<node id="{@id}"/>
|
2006
|
+
</xsl:for-each>
|
2007
|
+
</xsl:variable>
|
2008
|
+
<xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
|
2009
|
+
|
2048
2010
|
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
2049
2011
|
<xsl:sort select="@displayorder" data-type="number"/>
|
2012
|
+
|
2013
|
+
<!-- process Section's title -->
|
2014
|
+
<xsl:variable name="preceding-sibling_id" select="$nodes_preface/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
|
2015
|
+
<xsl:if test="$preceding-sibling_id != ''">
|
2016
|
+
<xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="contents_no_displayorder"/>
|
2017
|
+
</xsl:if>
|
2018
|
+
|
2050
2019
|
<xsl:apply-templates select="." mode="contents"/>
|
2051
2020
|
</xsl:for-each>
|
2052
2021
|
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
2053
2022
|
|
2023
|
+
<xsl:variable name="nodes_sections_">
|
2024
|
+
<xsl:for-each select="/*/*[local-name()='sections']/*">
|
2025
|
+
<node id="{@id}"/>
|
2026
|
+
</xsl:for-each>
|
2027
|
+
</xsl:variable>
|
2028
|
+
<xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
|
2029
|
+
|
2054
2030
|
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
|
2055
2031
|
<xsl:sort select="@displayorder" data-type="number"/>
|
2032
|
+
|
2033
|
+
<!-- process Section's title -->
|
2034
|
+
<xsl:variable name="preceding-sibling_id" select="$nodes_sections/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
|
2035
|
+
<xsl:if test="$preceding-sibling_id != ''">
|
2036
|
+
<xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="contents_no_displayorder"/>
|
2037
|
+
</xsl:if>
|
2038
|
+
|
2056
2039
|
<xsl:apply-templates select="." mode="contents"/>
|
2057
2040
|
</xsl:for-each>
|
2058
2041
|
|
@@ -2232,7 +2215,7 @@
|
|
2232
2215
|
</xsl:call-template>
|
2233
2216
|
</xsl:if>
|
2234
2217
|
</xsl:variable>
|
2235
|
-
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2218
|
+
<!-- DEBUG colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2236
2219
|
|
2237
2220
|
|
2238
2221
|
<xsl:variable name="margin-side">
|
@@ -2496,7 +2479,7 @@
|
|
2496
2479
|
<!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
|
2497
2480
|
<!-- 2009 thinspace -->
|
2498
2481
|
<!-- <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/> -->
|
2499
|
-
<xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '
|
2482
|
+
<xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
|
2500
2483
|
</xsl:call-template>
|
2501
2484
|
</xsl:variable>
|
2502
2485
|
<xsl:variable name="max_length">
|
@@ -4131,6 +4114,9 @@
|
|
4131
4114
|
</fo:inline>
|
4132
4115
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
4133
4116
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
4117
|
+
<xsl:if test="parent::*[local-name() = 'add']">
|
4118
|
+
<xsl:call-template name="append_add-style"/>
|
4119
|
+
</xsl:if>
|
4134
4120
|
<xsl:apply-templates/>
|
4135
4121
|
</fo:basic-link>
|
4136
4122
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
@@ -4232,6 +4218,13 @@
|
|
4232
4218
|
|
4233
4219
|
|
4234
4220
|
|
4221
|
+
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
4222
|
+
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
4223
|
+
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
4224
|
+
<xsl:call-template name="append_add-style"/>
|
4225
|
+
</xsl:if>
|
4226
|
+
|
4227
|
+
|
4235
4228
|
<!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
|
4236
4229
|
<xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
4237
4230
|
<xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
@@ -4270,6 +4263,12 @@
|
|
4270
4263
|
|
4271
4264
|
|
4272
4265
|
|
4266
|
+
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
4267
|
+
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
4268
|
+
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
4269
|
+
<xsl:call-template name="append_add-style"/>
|
4270
|
+
</xsl:if>
|
4271
|
+
|
4273
4272
|
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
4274
4273
|
|
4275
4274
|
</fo:inline>
|
@@ -4321,6 +4320,7 @@
|
|
4321
4320
|
</fo:block>
|
4322
4321
|
</xsl:template><xsl:template match="*[local-name() = 'term']">
|
4323
4322
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
4323
|
+
|
4324
4324
|
|
4325
4325
|
|
4326
4326
|
|
@@ -4757,7 +4757,11 @@
|
|
4757
4757
|
<xsl:value-of select="."/>
|
4758
4758
|
</xsl:template><xsl:template match="node()" mode="contents">
|
4759
4759
|
<xsl:apply-templates mode="contents"/>
|
4760
|
-
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = '
|
4760
|
+
</xsl:template><xsl:template match="*[local-name() = 'preface' or local-name() = 'sections']/*[local-name() = 'p'][@type = 'section-title' and not(@displayorder)]" priority="3" mode="contents"/><xsl:template match="*[local-name() = 'p'][@type = 'section-title' and not(@displayorder)]" mode="contents_no_displayorder">
|
4761
|
+
<xsl:call-template name="contents_section-title"/>
|
4762
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'section-title']" mode="contents_in_clause">
|
4763
|
+
<xsl:call-template name="contents_section-title"/>
|
4764
|
+
</xsl:template><xsl:template match="*[local-name() = 'clause']/*[local-name() = 'p'][@type = 'section-title' and (@depth != ../*[local-name() = 'title']/@depth or ../*[local-name() = 'title']/@depth = 1)]" priority="3" mode="contents"/><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="2" name="contents_section-title" mode="contents">
|
4761
4765
|
<xsl:variable name="level">
|
4762
4766
|
<xsl:call-template name="getLevel">
|
4763
4767
|
<xsl:with-param name="depth" select="@depth"/>
|
@@ -6115,7 +6119,7 @@
|
|
6115
6119
|
|
6116
6120
|
|
6117
6121
|
|
6118
|
-
|
6122
|
+
|
6119
6123
|
<xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
|
6120
6124
|
</fo:list-block>
|
6121
6125
|
<!-- <xsl:for-each select="./iho:note">
|
@@ -6133,6 +6137,11 @@
|
|
6133
6137
|
|
6134
6138
|
|
6135
6139
|
|
6140
|
+
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
6141
|
+
<xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
6142
|
+
<xsl:call-template name="append_add-style"/>
|
6143
|
+
</xsl:if>
|
6144
|
+
|
6136
6145
|
<xsl:call-template name="getListItemFormat"/>
|
6137
6146
|
</fo:block>
|
6138
6147
|
</fo:list-item-label>
|
@@ -7337,53 +7346,153 @@
|
|
7337
7346
|
<xsl:param name="first"/>
|
7338
7347
|
<xsl:if test="$number != ''">
|
7339
7348
|
<xsl:variable name="words">
|
7340
|
-
|
7341
|
-
<
|
7342
|
-
|
7343
|
-
|
7344
|
-
|
7345
|
-
|
7346
|
-
|
7347
|
-
|
7348
|
-
|
7349
|
-
|
7350
|
-
|
7351
|
-
|
7352
|
-
|
7353
|
-
|
7354
|
-
|
7355
|
-
|
7356
|
-
|
7357
|
-
|
7358
|
-
|
7359
|
-
|
7360
|
-
|
7361
|
-
|
7362
|
-
|
7363
|
-
|
7364
|
-
|
7365
|
-
|
7366
|
-
|
7367
|
-
|
7368
|
-
|
7369
|
-
|
7370
|
-
|
7371
|
-
|
7372
|
-
|
7373
|
-
|
7374
|
-
|
7375
|
-
|
7376
|
-
|
7377
|
-
|
7378
|
-
|
7379
|
-
|
7380
|
-
|
7381
|
-
|
7382
|
-
|
7383
|
-
|
7384
|
-
|
7385
|
-
|
7386
|
-
|
7349
|
+
<words>
|
7350
|
+
<xsl:choose>
|
7351
|
+
<xsl:when test="$lang = 'fr'"> <!-- https://en.wiktionary.org/wiki/Appendix:French_numbers -->
|
7352
|
+
<word cardinal="1">Une-</word>
|
7353
|
+
<word ordinal="1">Première </word>
|
7354
|
+
<word cardinal="2">Deux-</word>
|
7355
|
+
<word ordinal="2">Seconde </word>
|
7356
|
+
<word cardinal="3">Trois-</word>
|
7357
|
+
<word ordinal="3">Tierce </word>
|
7358
|
+
<word cardinal="4">Quatre-</word>
|
7359
|
+
<word ordinal="4">Quatrième </word>
|
7360
|
+
<word cardinal="5">Cinq-</word>
|
7361
|
+
<word ordinal="5">Cinquième </word>
|
7362
|
+
<word cardinal="6">Six-</word>
|
7363
|
+
<word ordinal="6">Sixième </word>
|
7364
|
+
<word cardinal="7">Sept-</word>
|
7365
|
+
<word ordinal="7">Septième </word>
|
7366
|
+
<word cardinal="8">Huit-</word>
|
7367
|
+
<word ordinal="8">Huitième </word>
|
7368
|
+
<word cardinal="9">Neuf-</word>
|
7369
|
+
<word ordinal="9">Neuvième </word>
|
7370
|
+
<word ordinal="10">Dixième </word>
|
7371
|
+
<word ordinal="11">Onzième </word>
|
7372
|
+
<word ordinal="12">Douzième </word>
|
7373
|
+
<word ordinal="13">Treizième </word>
|
7374
|
+
<word ordinal="14">Quatorzième </word>
|
7375
|
+
<word ordinal="15">Quinzième </word>
|
7376
|
+
<word ordinal="16">Seizième </word>
|
7377
|
+
<word ordinal="17">Dix-septième </word>
|
7378
|
+
<word ordinal="18">Dix-huitième </word>
|
7379
|
+
<word ordinal="19">Dix-neuvième </word>
|
7380
|
+
<word cardinal="20">Vingt-</word>
|
7381
|
+
<word ordinal="20">Vingtième </word>
|
7382
|
+
<word cardinal="30">Trente-</word>
|
7383
|
+
<word ordinal="30">Trentième </word>
|
7384
|
+
<word cardinal="40">Quarante-</word>
|
7385
|
+
<word ordinal="40">Quarantième </word>
|
7386
|
+
<word cardinal="50">Cinquante-</word>
|
7387
|
+
<word ordinal="50">Cinquantième </word>
|
7388
|
+
<word cardinal="60">Soixante-</word>
|
7389
|
+
<word ordinal="60">Soixantième </word>
|
7390
|
+
<word cardinal="70">Septante-</word>
|
7391
|
+
<word ordinal="70">Septantième </word>
|
7392
|
+
<word cardinal="80">Huitante-</word>
|
7393
|
+
<word ordinal="80">Huitantième </word>
|
7394
|
+
<word cardinal="90">Nonante-</word>
|
7395
|
+
<word ordinal="90">Nonantième </word>
|
7396
|
+
<word cardinal="100">Cent-</word>
|
7397
|
+
<word ordinal="100">Centième </word>
|
7398
|
+
</xsl:when>
|
7399
|
+
<xsl:when test="$lang = 'ru'">
|
7400
|
+
<word cardinal="1">Одна-</word>
|
7401
|
+
<word ordinal="1">Первое </word>
|
7402
|
+
<word cardinal="2">Две-</word>
|
7403
|
+
<word ordinal="2">Второе </word>
|
7404
|
+
<word cardinal="3">Три-</word>
|
7405
|
+
<word ordinal="3">Третье </word>
|
7406
|
+
<word cardinal="4">Четыре-</word>
|
7407
|
+
<word ordinal="4">Четвертое </word>
|
7408
|
+
<word cardinal="5">Пять-</word>
|
7409
|
+
<word ordinal="5">Пятое </word>
|
7410
|
+
<word cardinal="6">Шесть-</word>
|
7411
|
+
<word ordinal="6">Шестое </word>
|
7412
|
+
<word cardinal="7">Семь-</word>
|
7413
|
+
<word ordinal="7">Седьмое </word>
|
7414
|
+
<word cardinal="8">Восемь-</word>
|
7415
|
+
<word ordinal="8">Восьмое </word>
|
7416
|
+
<word cardinal="9">Девять-</word>
|
7417
|
+
<word ordinal="9">Девятое </word>
|
7418
|
+
<word ordinal="10">Десятое </word>
|
7419
|
+
<word ordinal="11">Одиннадцатое </word>
|
7420
|
+
<word ordinal="12">Двенадцатое </word>
|
7421
|
+
<word ordinal="13">Тринадцатое </word>
|
7422
|
+
<word ordinal="14">Четырнадцатое </word>
|
7423
|
+
<word ordinal="15">Пятнадцатое </word>
|
7424
|
+
<word ordinal="16">Шестнадцатое </word>
|
7425
|
+
<word ordinal="17">Семнадцатое </word>
|
7426
|
+
<word ordinal="18">Восемнадцатое </word>
|
7427
|
+
<word ordinal="19">Девятнадцатое </word>
|
7428
|
+
<word cardinal="20">Двадцать-</word>
|
7429
|
+
<word ordinal="20">Двадцатое </word>
|
7430
|
+
<word cardinal="30">Тридцать-</word>
|
7431
|
+
<word ordinal="30">Тридцатое </word>
|
7432
|
+
<word cardinal="40">Сорок-</word>
|
7433
|
+
<word ordinal="40">Сороковое </word>
|
7434
|
+
<word cardinal="50">Пятьдесят-</word>
|
7435
|
+
<word ordinal="50">Пятидесятое </word>
|
7436
|
+
<word cardinal="60">Шестьдесят-</word>
|
7437
|
+
<word ordinal="60">Шестидесятое </word>
|
7438
|
+
<word cardinal="70">Семьдесят-</word>
|
7439
|
+
<word ordinal="70">Семидесятое </word>
|
7440
|
+
<word cardinal="80">Восемьдесят-</word>
|
7441
|
+
<word ordinal="80">Восьмидесятое </word>
|
7442
|
+
<word cardinal="90">Девяносто-</word>
|
7443
|
+
<word ordinal="90">Девяностое </word>
|
7444
|
+
<word cardinal="100">Сто-</word>
|
7445
|
+
<word ordinal="100">Сотое </word>
|
7446
|
+
</xsl:when>
|
7447
|
+
<xsl:otherwise> <!-- default english -->
|
7448
|
+
<word cardinal="1">One-</word>
|
7449
|
+
<word ordinal="1">First </word>
|
7450
|
+
<word cardinal="2">Two-</word>
|
7451
|
+
<word ordinal="2">Second </word>
|
7452
|
+
<word cardinal="3">Three-</word>
|
7453
|
+
<word ordinal="3">Third </word>
|
7454
|
+
<word cardinal="4">Four-</word>
|
7455
|
+
<word ordinal="4">Fourth </word>
|
7456
|
+
<word cardinal="5">Five-</word>
|
7457
|
+
<word ordinal="5">Fifth </word>
|
7458
|
+
<word cardinal="6">Six-</word>
|
7459
|
+
<word ordinal="6">Sixth </word>
|
7460
|
+
<word cardinal="7">Seven-</word>
|
7461
|
+
<word ordinal="7">Seventh </word>
|
7462
|
+
<word cardinal="8">Eight-</word>
|
7463
|
+
<word ordinal="8">Eighth </word>
|
7464
|
+
<word cardinal="9">Nine-</word>
|
7465
|
+
<word ordinal="9">Ninth </word>
|
7466
|
+
<word ordinal="10">Tenth </word>
|
7467
|
+
<word ordinal="11">Eleventh </word>
|
7468
|
+
<word ordinal="12">Twelfth </word>
|
7469
|
+
<word ordinal="13">Thirteenth </word>
|
7470
|
+
<word ordinal="14">Fourteenth </word>
|
7471
|
+
<word ordinal="15">Fifteenth </word>
|
7472
|
+
<word ordinal="16">Sixteenth </word>
|
7473
|
+
<word ordinal="17">Seventeenth </word>
|
7474
|
+
<word ordinal="18">Eighteenth </word>
|
7475
|
+
<word ordinal="19">Nineteenth </word>
|
7476
|
+
<word cardinal="20">Twenty-</word>
|
7477
|
+
<word ordinal="20">Twentieth </word>
|
7478
|
+
<word cardinal="30">Thirty-</word>
|
7479
|
+
<word ordinal="30">Thirtieth </word>
|
7480
|
+
<word cardinal="40">Forty-</word>
|
7481
|
+
<word ordinal="40">Fortieth </word>
|
7482
|
+
<word cardinal="50">Fifty-</word>
|
7483
|
+
<word ordinal="50">Fiftieth </word>
|
7484
|
+
<word cardinal="60">Sixty-</word>
|
7485
|
+
<word ordinal="60">Sixtieth </word>
|
7486
|
+
<word cardinal="70">Seventy-</word>
|
7487
|
+
<word ordinal="70">Seventieth </word>
|
7488
|
+
<word cardinal="80">Eighty-</word>
|
7489
|
+
<word ordinal="80">Eightieth </word>
|
7490
|
+
<word cardinal="90">Ninety-</word>
|
7491
|
+
<word ordinal="90">Ninetieth </word>
|
7492
|
+
<word cardinal="100">Hundred-</word>
|
7493
|
+
<word ordinal="100">Hundredth </word>
|
7494
|
+
</xsl:otherwise>
|
7495
|
+
</xsl:choose>
|
7387
7496
|
</words>
|
7388
7497
|
</xsl:variable>
|
7389
7498
|
|
@@ -7457,4 +7566,18 @@
|
|
7457
7566
|
<xsl:otherwise>_</xsl:otherwise>
|
7458
7567
|
</xsl:choose>
|
7459
7568
|
</xsl:attribute>
|
7569
|
+
</xsl:template><xsl:template name="substring-after-last">
|
7570
|
+
<xsl:param name="value"/>
|
7571
|
+
<xsl:param name="delimiter"/>
|
7572
|
+
<xsl:choose>
|
7573
|
+
<xsl:when test="contains($value, $delimiter)">
|
7574
|
+
<xsl:call-template name="substring-after-last">
|
7575
|
+
<xsl:with-param name="value" select="substring-after($value, $delimiter)"/>
|
7576
|
+
<xsl:with-param name="delimiter" select="$delimiter"/>
|
7577
|
+
</xsl:call-template>
|
7578
|
+
</xsl:when>
|
7579
|
+
<xsl:otherwise>
|
7580
|
+
<xsl:value-of select="$value"/>
|
7581
|
+
</xsl:otherwise>
|
7582
|
+
</xsl:choose>
|
7460
7583
|
</xsl:template></xsl:stylesheet>
|
data/lib/isodoc/ogc/reqt.rb
CHANGED
@@ -48,6 +48,7 @@ module IsoDoc
|
|
48
48
|
label.xpath(ns(".//concept")).each { |f| concept1(f) }
|
49
49
|
b = out.add_child("<tr><td colspan='2'><p></p></td></tr>")
|
50
50
|
p = b.at(ns(".//p"))
|
51
|
+
p["class"] = "RecommendationLabel"
|
51
52
|
p << label.children.to_xml
|
52
53
|
end
|
53
54
|
|
@@ -103,7 +104,7 @@ module IsoDoc
|
|
103
104
|
def recommendation_attr_keyvalue(node, key, value)
|
104
105
|
tag = node&.at(ns("./#{key}"))&.remove
|
105
106
|
value = node.at(ns("./#{value}"))&.remove
|
106
|
-
tag && value or return nil
|
107
|
+
(tag && value) or return nil
|
107
108
|
node.remove
|
108
109
|
[tag.text.capitalize, value.children]
|
109
110
|
end
|
data/lib/isodoc/ogc/xref.rb
CHANGED
@@ -23,7 +23,7 @@ module IsoDoc
|
|
23
23
|
id = c.increment(t).print
|
24
24
|
@anchors[t["id"]] = anchor_struct(id, t, label, klass,
|
25
25
|
t["unnumbered"])
|
26
|
-
|
26
|
+
reqt_suffix_label(t)
|
27
27
|
permission_parts(t, label, klass)
|
28
28
|
sequential_permission_children(t, id)
|
29
29
|
end
|
@@ -41,6 +41,13 @@ module IsoDoc
|
|
41
41
|
"conformanceclass" => "@type = 'conformanceclass'" }
|
42
42
|
end
|
43
43
|
|
44
|
+
def reqt_suffix_label(reqt)
|
45
|
+
if l = reqt.at(ns("./label"))&.text
|
46
|
+
@reqtlabels[l] = reqt["id"]
|
47
|
+
@anchors[reqt["id"]][:xref] += ": <tt>#{l}</tt>"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
44
51
|
def permission_parts(block, label, klass)
|
45
52
|
block.xpath(ns("./component[@class = 'part']"))
|
46
53
|
.each_with_index do |c, i|
|
@@ -116,7 +123,7 @@ module IsoDoc
|
|
116
123
|
lbl = "#{num}#{hiersep}#{c.increment(t).print}"
|
117
124
|
@anchors[t["id"]] = anchor_struct(lbl, t, label, klass,
|
118
125
|
t["unnumbered"])
|
119
|
-
|
126
|
+
reqt_suffix_label(t)
|
120
127
|
permission_parts(t, label, klass)
|
121
128
|
sequential_permission_children(t, lbl)
|
122
129
|
end
|
@@ -175,7 +182,7 @@ module IsoDoc
|
|
175
182
|
@prefacenum += 1
|
176
183
|
pref = preface_number(@prefacenum, 1)
|
177
184
|
@anchors[clause["id"]] =
|
178
|
-
{ label: pref,
|
185
|
+
{ label: pref,
|
179
186
|
level: 1, xref: preface_clause_name(clause), type: "clause" }
|
180
187
|
clause.xpath(ns(SUBCLAUSES)).each_with_index do |c, i|
|
181
188
|
preface_names_numbered1(c, "#{pref}.#{preface_number(i + 1, 2)}", 2)
|
@@ -185,7 +192,7 @@ module IsoDoc
|
|
185
192
|
def preface_names_numbered1(clause, num, level)
|
186
193
|
@anchors[clause["id"]] =
|
187
194
|
{ label: num, level: level, xref: l10n("#{@labels['clause']} #{num}"),
|
188
|
-
type: "clause" }
|
195
|
+
type: "clause", elem: @labels["clause"] }
|
189
196
|
clause.xpath(ns(SUBCLAUSES)).each_with_index do |c, i|
|
190
197
|
lbl = "#{num}.#{preface_number(i + 1, level + 1)}"
|
191
198
|
preface_names_numbered1(c, lbl, level + 1)
|