metanorma-ogc 2.3.13 → 2.3.14
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/html/htmlstyle.css +9 -5
- data/lib/isodoc/ogc/html/htmlstyle.scss +2 -2
- data/lib/isodoc/ogc/i18n-en.yaml +11 -0
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +83 -46
- data/lib/isodoc/ogc/ogc.best-practice.xsl +83 -46
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +83 -46
- data/lib/isodoc/ogc/ogc.community-practice.xsl +83 -46
- data/lib/isodoc/ogc/ogc.community-standard.xsl +83 -46
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +83 -46
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +83 -46
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +83 -46
- data/lib/isodoc/ogc/ogc.other.xsl +83 -46
- data/lib/isodoc/ogc/ogc.policy.xsl +83 -46
- data/lib/isodoc/ogc/ogc.reference-model.xsl +83 -46
- data/lib/isodoc/ogc/ogc.release-notes.xsl +83 -46
- data/lib/isodoc/ogc/ogc.standard.xsl +83 -46
- data/lib/isodoc/ogc/ogc.test-suite.xsl +83 -46
- data/lib/isodoc/ogc/ogc.user-guide.xsl +83 -46
- data/lib/isodoc/ogc/ogc.white-paper.xsl +47 -43
- data/lib/isodoc/ogc/presentation_xml_convert.rb +23 -18
- data/lib/isodoc/ogc/xref.rb +17 -6
- data/lib/metanorma/ogc/converter.rb +6 -2
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +2 -2
@@ -306,7 +306,12 @@
|
|
306
306
|
<fo:block line-height="140%">
|
307
307
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:bibdata/ogc:edition[normalize-space(@language) = '']"/>
|
308
308
|
<fo:block>
|
309
|
-
<fo:inline font-weight="bold">
|
309
|
+
<fo:inline font-weight="bold">
|
310
|
+
<!-- Submission Date: -->
|
311
|
+
<xsl:call-template name="getLocalizedString">
|
312
|
+
<xsl:with-param name="key">submission_date</xsl:with-param>
|
313
|
+
</xsl:call-template><xsl:text>: </xsl:text>
|
314
|
+
</fo:inline>
|
310
315
|
<xsl:choose>
|
311
316
|
<xsl:when test="/ogc:ogc-standard/ogc:bibdata/ogc:date[@type = 'received']/ogc:on">
|
312
317
|
<xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:date[@type = 'received']/ogc:on"/>
|
@@ -315,7 +320,12 @@
|
|
315
320
|
</xsl:choose>
|
316
321
|
</fo:block>
|
317
322
|
<fo:block>
|
318
|
-
<fo:inline font-weight="bold">
|
323
|
+
<fo:inline font-weight="bold">
|
324
|
+
<!-- Approval Date: -->
|
325
|
+
<xsl:call-template name="getLocalizedString">
|
326
|
+
<xsl:with-param name="key">approval_date</xsl:with-param>
|
327
|
+
</xsl:call-template><xsl:text>: </xsl:text>
|
328
|
+
</fo:inline>
|
319
329
|
<xsl:choose>
|
320
330
|
<xsl:when test="/ogc:ogc-standard/ogc:bibdata/ogc:date[@type = 'issued']/ogc:on">
|
321
331
|
<xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:date[@type = 'issued']/ogc:on"/>
|
@@ -324,14 +334,24 @@
|
|
324
334
|
</xsl:choose>
|
325
335
|
</fo:block>
|
326
336
|
<fo:block>
|
327
|
-
<fo:inline font-weight="bold">
|
337
|
+
<fo:inline font-weight="bold">
|
338
|
+
<!-- Publication Date: -->
|
339
|
+
<xsl:call-template name="getLocalizedString">
|
340
|
+
<xsl:with-param name="key">publication_date</xsl:with-param>
|
341
|
+
</xsl:call-template><xsl:text>: </xsl:text>
|
342
|
+
</fo:inline>
|
328
343
|
<xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:date[@type = 'published']/ogc:on"/>
|
329
344
|
</fo:block>
|
330
345
|
|
331
346
|
<fo:block margin-bottom="12pt">
|
332
347
|
<xsl:if test="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='author']/ogc:person/ogc:name/ogc:completename">
|
333
348
|
<fo:block>
|
334
|
-
<fo:inline font-weight="bold">
|
349
|
+
<fo:inline font-weight="bold">
|
350
|
+
<!-- Author: -->
|
351
|
+
<xsl:call-template name="getLocalizedString">
|
352
|
+
<xsl:with-param name="key">author</xsl:with-param>
|
353
|
+
</xsl:call-template><xsl:text>: </xsl:text>
|
354
|
+
</fo:inline>
|
335
355
|
<xsl:for-each select="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='author']/ogc:person/ogc:name/ogc:completename">
|
336
356
|
<xsl:value-of select="."/>
|
337
357
|
<xsl:if test="position() != last()">, </xsl:if>
|
@@ -340,7 +360,12 @@
|
|
340
360
|
</xsl:if>
|
341
361
|
<xsl:if test="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='editor']/ogc:person/ogc:name/ogc:completename">
|
342
362
|
<fo:block>
|
343
|
-
<fo:inline font-weight="bold">
|
363
|
+
<fo:inline font-weight="bold">
|
364
|
+
<!-- Editor: -->
|
365
|
+
<xsl:call-template name="getLocalizedString">
|
366
|
+
<xsl:with-param name="key">editor</xsl:with-param>
|
367
|
+
</xsl:call-template><xsl:text>: </xsl:text>
|
368
|
+
</fo:inline>
|
344
369
|
<xsl:for-each select="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='editor']/ogc:person/ogc:name/ogc:completename">
|
345
370
|
<xsl:value-of select="."/>
|
346
371
|
<xsl:if test="position() != last()">, </xsl:if>
|
@@ -349,7 +374,12 @@
|
|
349
374
|
</xsl:if>
|
350
375
|
<xsl:if test="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='contributor']/ogc:person/ogc:name/ogc:completename">
|
351
376
|
<fo:block>
|
352
|
-
<fo:inline font-weight="bold">
|
377
|
+
<fo:inline font-weight="bold">
|
378
|
+
<!-- Contributor: -->
|
379
|
+
<xsl:call-template name="getLocalizedString">
|
380
|
+
<xsl:with-param name="key">contributor</xsl:with-param>
|
381
|
+
</xsl:call-template><xsl:text>: </xsl:text>
|
382
|
+
</fo:inline>
|
353
383
|
<xsl:for-each select="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='contributor']/ogc:person/ogc:name/ogc:completename">
|
354
384
|
<xsl:value-of select="."/>
|
355
385
|
<xsl:if test="position() != last()">, </xsl:if>
|
@@ -689,7 +719,10 @@
|
|
689
719
|
<!-- add zero-width space (#x200B) before character '(' if preceding and following are word chars -->
|
690
720
|
<xsl:variable name="content3" select="java:replaceAll(java:java.lang.String.new($content2), '(\w)(\()(\w)', '$1$2$3')"/>
|
691
721
|
|
692
|
-
|
722
|
+
<!-- replace sequence #x200B to one ​ -->
|
723
|
+
<xsl:variable name="content4" select="java:replaceAll(java:java.lang.String.new($content3), '\u200b{2,}', '')"/>
|
724
|
+
|
725
|
+
<xsl:value-of select="translate($content4, $thin_space, ' ')"/>
|
693
726
|
</xsl:template>
|
694
727
|
|
695
728
|
<xsl:template match="node()" mode="sections">
|
@@ -1613,21 +1646,32 @@
|
|
1613
1646
|
<xsl:variable name="titles_">
|
1614
1647
|
|
1615
1648
|
<!-- These titles of Table of contents renders different than determined in localized-strings -->
|
1616
|
-
<title-toc lang="en">
|
1617
|
-
|
1649
|
+
<!-- <title-toc lang="en">
|
1650
|
+
<xsl:if test="$namespace = 'csd' or $namespace = 'ieee' or $namespace = 'iho' or $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'unece-rec'">
|
1618
1651
|
<xsl:text>Contents</xsl:text>
|
1619
|
-
|
1620
|
-
|
1621
|
-
|
1652
|
+
</xsl:if>
|
1653
|
+
<xsl:if test="$namespace = 'csa' or $namespace = 'm3d' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper'">
|
1654
|
+
<xsl:text>Table of Contents</xsl:text>
|
1655
|
+
</xsl:if>
|
1656
|
+
<xsl:if test="$namespace = 'gb'">
|
1657
|
+
<xsl:text>Table of contents</xsl:text>
|
1658
|
+
</xsl:if>
|
1659
|
+
</title-toc> -->
|
1660
|
+
<title-toc lang="en">Table of contents</title-toc>
|
1661
|
+
<!-- <title-toc lang="fr">
|
1622
1662
|
<xsl:text>Sommaire</xsl:text>
|
1623
|
-
</title-toc>
|
1624
|
-
<title-toc lang="zh">
|
1625
|
-
|
1663
|
+
</title-toc> -->
|
1664
|
+
<!-- <title-toc lang="zh">
|
1665
|
+
<xsl:choose>
|
1666
|
+
<xsl:when test="$namespace = 'gb'">
|
1667
|
+
<xsl:text>目次</xsl:text>
|
1668
|
+
</xsl:when>
|
1669
|
+
<xsl:otherwise>
|
1626
1670
|
<xsl:text>Contents</xsl:text>
|
1627
|
-
|
1628
|
-
|
1629
|
-
|
1630
|
-
<title-
|
1671
|
+
</xsl:otherwise>
|
1672
|
+
</xsl:choose>
|
1673
|
+
</title-toc> -->
|
1674
|
+
<title-toc lang="zh">目次</title-toc>
|
1631
1675
|
|
1632
1676
|
<title-part lang="en">
|
1633
1677
|
|
@@ -1643,20 +1687,6 @@
|
|
1643
1687
|
<title-subpart lang="en">Sub-part #</title-subpart>
|
1644
1688
|
<title-subpart lang="fr">Partie de sub #</title-subpart>
|
1645
1689
|
|
1646
|
-
<title-list-tables lang="en">List of Tables</title-list-tables>
|
1647
|
-
|
1648
|
-
<title-list-figures lang="en">List of Figures</title-list-figures>
|
1649
|
-
|
1650
|
-
<title-table-figures lang="en">Table of Figures</title-table-figures>
|
1651
|
-
|
1652
|
-
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
1653
|
-
|
1654
|
-
<title-summary lang="en">Summary</title-summary>
|
1655
|
-
|
1656
|
-
<title-continued lang="ru">(продолжение)</title-continued>
|
1657
|
-
<title-continued lang="en">(continued)</title-continued>
|
1658
|
-
<title-continued lang="fr">(continué)</title-continued>
|
1659
|
-
|
1660
1690
|
</xsl:variable>
|
1661
1691
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
1662
1692
|
|
@@ -1664,8 +1694,8 @@
|
|
1664
1694
|
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
1665
1695
|
<xsl:value-of select="$toc_table_title"/>
|
1666
1696
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
1667
|
-
<xsl:call-template name="
|
1668
|
-
<xsl:with-param name="
|
1697
|
+
<xsl:call-template name="getLocalizedString">
|
1698
|
+
<xsl:with-param name="key">toc_tables</xsl:with-param>
|
1669
1699
|
</xsl:call-template>
|
1670
1700
|
</xsl:if>
|
1671
1701
|
</xsl:variable>
|
@@ -1674,8 +1704,8 @@
|
|
1674
1704
|
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
1675
1705
|
<xsl:value-of select="$toc_figure_title"/>
|
1676
1706
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
1677
|
-
<xsl:call-template name="
|
1678
|
-
<xsl:with-param name="
|
1707
|
+
<xsl:call-template name="getLocalizedString">
|
1708
|
+
<xsl:with-param name="key">toc_figures</xsl:with-param>
|
1679
1709
|
</xsl:call-template>
|
1680
1710
|
</xsl:if>
|
1681
1711
|
</xsl:variable>
|
@@ -1684,8 +1714,8 @@
|
|
1684
1714
|
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
1685
1715
|
<xsl:value-of select="$toc_requirement_title"/>
|
1686
1716
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
1687
|
-
<xsl:call-template name="
|
1688
|
-
<xsl:with-param name="
|
1717
|
+
<xsl:call-template name="getLocalizedString">
|
1718
|
+
<xsl:with-param name="key">toc_recommendations</xsl:with-param>
|
1689
1719
|
</xsl:call-template>
|
1690
1720
|
</xsl:if>
|
1691
1721
|
</xsl:variable>
|
@@ -5627,7 +5657,7 @@
|
|
5627
5657
|
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
|
5628
5658
|
<xsl:template match="*[local-name()='tt']/text()" priority="2">
|
5629
5659
|
<xsl:choose>
|
5630
|
-
<xsl:when test="java:replaceAll(java:java.lang.String.new(.),
|
5660
|
+
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), $regex_url_start, '$2') != ''">
|
5631
5661
|
<!-- url -->
|
5632
5662
|
<xsl:call-template name="add-zero-spaces-link-java"/>
|
5633
5663
|
</xsl:when>
|
@@ -6089,10 +6119,13 @@
|
|
6089
6119
|
</xsl:choose>
|
6090
6120
|
</xsl:variable>
|
6091
6121
|
|
6122
|
+
<!-- replace sequence #x200B to one ​ -->
|
6123
|
+
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b{2,}', '')"/>
|
6124
|
+
|
6092
6125
|
<!-- replace sequence #x200B and space TO space -->
|
6093
|
-
<xsl:variable name="
|
6126
|
+
<xsl:variable name="text11" select="java:replaceAll(java:java.lang.String.new($text10), '\u200b ', ' ')"/>
|
6094
6127
|
|
6095
|
-
<xsl:value-of select="$
|
6128
|
+
<xsl:value-of select="$text11"/>
|
6096
6129
|
</xsl:template>
|
6097
6130
|
|
6098
6131
|
<xsl:template name="add-zero-spaces-link-java">
|
@@ -6102,8 +6135,12 @@
|
|
6102
6135
|
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
|
6103
6136
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
|
6104
6137
|
<xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1')"/>
|
6138
|
+
|
6139
|
+
<!-- replace sequence #x200B to one ​ -->
|
6140
|
+
<xsl:variable name="url2" select="java:replaceAll(java:java.lang.String.new($url), '\u200b{2,}', '')"/>
|
6141
|
+
|
6105
6142
|
<!-- remove zero-width space at the end -->
|
6106
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($
|
6143
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url2), '$', '')"/>
|
6107
6144
|
</xsl:template>
|
6108
6145
|
|
6109
6146
|
<!-- add zero space after dash character (for table's entries) -->
|
@@ -7370,7 +7407,7 @@
|
|
7370
7407
|
|
7371
7408
|
<xsl:call-template name="refine_note_block_style"/>
|
7372
7409
|
|
7373
|
-
<fo:inline xsl:use-attribute-sets="note-name-style">
|
7410
|
+
<fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
|
7374
7411
|
|
7375
7412
|
<xsl:call-template name="refine_note-name-style"/>
|
7376
7413
|
|
@@ -7407,12 +7444,12 @@
|
|
7407
7444
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
7408
7445
|
<xsl:choose>
|
7409
7446
|
<xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
|
7410
|
-
<fo:inline xsl:use-attribute-sets="note-p-style">
|
7447
|
+
<fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
|
7411
7448
|
<xsl:apply-templates/>
|
7412
7449
|
</fo:inline>
|
7413
7450
|
</xsl:when>
|
7414
7451
|
<xsl:otherwise>
|
7415
|
-
<fo:block xsl:use-attribute-sets="note-p-style">
|
7452
|
+
<fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
|
7416
7453
|
<xsl:apply-templates/>
|
7417
7454
|
</fo:block>
|
7418
7455
|
</xsl:otherwise>
|
@@ -268,8 +268,8 @@
|
|
268
268
|
<fo:block font-size="11pt" margin-top="8pt"> </fo:block>
|
269
269
|
<fo:block xsl:use-attribute-sets="title-toc-style">
|
270
270
|
<!-- <xsl:text>Table of Figures</xsl:text> -->
|
271
|
-
<xsl:call-template name="
|
272
|
-
<xsl:with-param name="
|
271
|
+
<xsl:call-template name="getLocalizedString">
|
272
|
+
<xsl:with-param name="key">table_of_figures</xsl:with-param>
|
273
273
|
</xsl:call-template>
|
274
274
|
</fo:block>
|
275
275
|
<xsl:for-each select="//ogc:figure[@id and ogc:name] | //ogc:table[@id and ogc:name]">
|
@@ -781,21 +781,32 @@
|
|
781
781
|
<xsl:variable name="titles_">
|
782
782
|
|
783
783
|
<!-- These titles of Table of contents renders different than determined in localized-strings -->
|
784
|
-
<title-toc lang="en">
|
785
|
-
|
784
|
+
<!-- <title-toc lang="en">
|
785
|
+
<xsl:if test="$namespace = 'csd' or $namespace = 'ieee' or $namespace = 'iho' or $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'unece-rec'">
|
786
|
+
<xsl:text>Contents</xsl:text>
|
787
|
+
</xsl:if>
|
788
|
+
<xsl:if test="$namespace = 'csa' or $namespace = 'm3d' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper'">
|
786
789
|
<xsl:text>Table of Contents</xsl:text>
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
+
</xsl:if>
|
791
|
+
<xsl:if test="$namespace = 'gb'">
|
792
|
+
<xsl:text>Table of contents</xsl:text>
|
793
|
+
</xsl:if>
|
794
|
+
</title-toc> -->
|
795
|
+
<title-toc lang="en">Table of contents</title-toc>
|
796
|
+
<!-- <title-toc lang="fr">
|
790
797
|
<xsl:text>Sommaire</xsl:text>
|
791
|
-
</title-toc>
|
792
|
-
<title-toc lang="zh">
|
793
|
-
|
798
|
+
</title-toc> -->
|
799
|
+
<!-- <title-toc lang="zh">
|
800
|
+
<xsl:choose>
|
801
|
+
<xsl:when test="$namespace = 'gb'">
|
802
|
+
<xsl:text>目次</xsl:text>
|
803
|
+
</xsl:when>
|
804
|
+
<xsl:otherwise>
|
794
805
|
<xsl:text>Contents</xsl:text>
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
<title-
|
806
|
+
</xsl:otherwise>
|
807
|
+
</xsl:choose>
|
808
|
+
</title-toc> -->
|
809
|
+
<title-toc lang="zh">目次</title-toc>
|
799
810
|
|
800
811
|
<title-part lang="en">
|
801
812
|
|
@@ -811,20 +822,6 @@
|
|
811
822
|
<title-subpart lang="en">Sub-part #</title-subpart>
|
812
823
|
<title-subpart lang="fr">Partie de sub #</title-subpart>
|
813
824
|
|
814
|
-
<title-list-tables lang="en">List of Tables</title-list-tables>
|
815
|
-
|
816
|
-
<title-list-figures lang="en">List of Figures</title-list-figures>
|
817
|
-
|
818
|
-
<title-table-figures lang="en">Table of Figures</title-table-figures>
|
819
|
-
|
820
|
-
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
821
|
-
|
822
|
-
<title-summary lang="en">Summary</title-summary>
|
823
|
-
|
824
|
-
<title-continued lang="ru">(продолжение)</title-continued>
|
825
|
-
<title-continued lang="en">(continued)</title-continued>
|
826
|
-
<title-continued lang="fr">(continué)</title-continued>
|
827
|
-
|
828
825
|
</xsl:variable>
|
829
826
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
830
827
|
|
@@ -832,8 +829,8 @@
|
|
832
829
|
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
833
830
|
<xsl:value-of select="$toc_table_title"/>
|
834
831
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
835
|
-
<xsl:call-template name="
|
836
|
-
<xsl:with-param name="
|
832
|
+
<xsl:call-template name="getLocalizedString">
|
833
|
+
<xsl:with-param name="key">toc_tables</xsl:with-param>
|
837
834
|
</xsl:call-template>
|
838
835
|
</xsl:if>
|
839
836
|
</xsl:variable>
|
@@ -842,8 +839,8 @@
|
|
842
839
|
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
843
840
|
<xsl:value-of select="$toc_figure_title"/>
|
844
841
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
845
|
-
<xsl:call-template name="
|
846
|
-
<xsl:with-param name="
|
842
|
+
<xsl:call-template name="getLocalizedString">
|
843
|
+
<xsl:with-param name="key">toc_figures</xsl:with-param>
|
847
844
|
</xsl:call-template>
|
848
845
|
</xsl:if>
|
849
846
|
</xsl:variable>
|
@@ -852,8 +849,8 @@
|
|
852
849
|
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
853
850
|
<xsl:value-of select="$toc_requirement_title"/>
|
854
851
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
855
|
-
<xsl:call-template name="
|
856
|
-
<xsl:with-param name="
|
852
|
+
<xsl:call-template name="getLocalizedString">
|
853
|
+
<xsl:with-param name="key">toc_recommendations</xsl:with-param>
|
857
854
|
</xsl:call-template>
|
858
855
|
</xsl:if>
|
859
856
|
</xsl:variable>
|
@@ -4760,7 +4757,7 @@
|
|
4760
4757
|
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
|
4761
4758
|
<xsl:template match="*[local-name()='tt']/text()" priority="2">
|
4762
4759
|
<xsl:choose>
|
4763
|
-
<xsl:when test="java:replaceAll(java:java.lang.String.new(.),
|
4760
|
+
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), $regex_url_start, '$2') != ''">
|
4764
4761
|
<!-- url -->
|
4765
4762
|
<xsl:call-template name="add-zero-spaces-link-java"/>
|
4766
4763
|
</xsl:when>
|
@@ -5222,10 +5219,13 @@
|
|
5222
5219
|
</xsl:choose>
|
5223
5220
|
</xsl:variable>
|
5224
5221
|
|
5222
|
+
<!-- replace sequence #x200B to one ​ -->
|
5223
|
+
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b{2,}', '')"/>
|
5224
|
+
|
5225
5225
|
<!-- replace sequence #x200B and space TO space -->
|
5226
|
-
<xsl:variable name="
|
5226
|
+
<xsl:variable name="text11" select="java:replaceAll(java:java.lang.String.new($text10), '\u200b ', ' ')"/>
|
5227
5227
|
|
5228
|
-
<xsl:value-of select="$
|
5228
|
+
<xsl:value-of select="$text11"/>
|
5229
5229
|
</xsl:template>
|
5230
5230
|
|
5231
5231
|
<xsl:template name="add-zero-spaces-link-java">
|
@@ -5235,8 +5235,12 @@
|
|
5235
5235
|
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
|
5236
5236
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
|
5237
5237
|
<xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1')"/>
|
5238
|
+
|
5239
|
+
<!-- replace sequence #x200B to one ​ -->
|
5240
|
+
<xsl:variable name="url2" select="java:replaceAll(java:java.lang.String.new($url), '\u200b{2,}', '')"/>
|
5241
|
+
|
5238
5242
|
<!-- remove zero-width space at the end -->
|
5239
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($
|
5243
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url2), '$', '')"/>
|
5240
5244
|
</xsl:template>
|
5241
5245
|
|
5242
5246
|
<!-- add zero space after dash character (for table's entries) -->
|
@@ -6499,7 +6503,7 @@
|
|
6499
6503
|
|
6500
6504
|
<xsl:call-template name="refine_note_block_style"/>
|
6501
6505
|
|
6502
|
-
<fo:inline xsl:use-attribute-sets="note-name-style">
|
6506
|
+
<fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
|
6503
6507
|
|
6504
6508
|
<xsl:call-template name="refine_note-name-style"/>
|
6505
6509
|
|
@@ -6536,12 +6540,12 @@
|
|
6536
6540
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
6537
6541
|
<xsl:choose>
|
6538
6542
|
<xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
|
6539
|
-
<fo:inline xsl:use-attribute-sets="note-p-style">
|
6543
|
+
<fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
|
6540
6544
|
<xsl:apply-templates/>
|
6541
6545
|
</fo:inline>
|
6542
6546
|
</xsl:when>
|
6543
6547
|
<xsl:otherwise>
|
6544
|
-
<fo:block xsl:use-attribute-sets="note-p-style">
|
6548
|
+
<fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
|
6545
6549
|
<xsl:apply-templates/>
|
6546
6550
|
</fo:block>
|
6547
6551
|
</xsl:otherwise>
|
@@ -7468,8 +7472,8 @@
|
|
7468
7472
|
<xsl:if test="$list_of_tables_figures//table_figure">
|
7469
7473
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
7470
7474
|
<fo:bookmark-title>
|
7471
|
-
<xsl:call-template name="
|
7472
|
-
<xsl:with-param name="
|
7475
|
+
<xsl:call-template name="getLocalizedString">
|
7476
|
+
<xsl:with-param name="key">table_of_figures</xsl:with-param>
|
7473
7477
|
</xsl:call-template>
|
7474
7478
|
</fo:bookmark-title>
|
7475
7479
|
<xsl:for-each select="$list_of_tables_figures//table_figure">
|
@@ -62,8 +62,7 @@ module IsoDoc
|
|
62
62
|
def insert_submitting_orgs(docxml)
|
63
63
|
orgs = docxml.xpath(ns(submittingorgs_path))
|
64
64
|
.each_with_object([]) { |org, m| m << org.text }
|
65
|
-
|
66
|
-
|
65
|
+
orgs.empty? and return
|
67
66
|
if a = submit_orgs_append_pt(docxml)
|
68
67
|
a.next = submitting_orgs_clause(orgs)
|
69
68
|
else
|
@@ -76,8 +75,7 @@ module IsoDoc
|
|
76
75
|
<<~SUBMITTING
|
77
76
|
<clause id="_#{UUIDTools::UUID.random_create}" type="submitting_orgs">
|
78
77
|
<title>Submitting Organizations</title>
|
79
|
-
<p>The following organizations submitted this Document to the
|
80
|
-
Open Geospatial Consortium (OGC):</p>
|
78
|
+
<p>The following organizations submitted this Document to the Open Geospatial Consortium (OGC):</p>
|
81
79
|
<ul>#{orgs.map { |m| "<li>#{m}</li>" }.join("\n")}</ul>
|
82
80
|
</clause>
|
83
81
|
SUBMITTING
|
@@ -87,8 +85,7 @@ module IsoDoc
|
|
87
85
|
<<~KEYWORDS
|
88
86
|
<clause id="_#{UUIDTools::UUID.random_create}" type="keywords">
|
89
87
|
<title>Keywords</title>
|
90
|
-
<p>The following are keywords to be used by search engines and
|
91
|
-
document catalogues.</p>
|
88
|
+
<p>The following are keywords to be used by search engines and document catalogues.</p>
|
92
89
|
<p>#{kwords.join(', ')}</p></clause>
|
93
90
|
KEYWORDS
|
94
91
|
end
|
@@ -123,9 +120,7 @@ module IsoDoc
|
|
123
120
|
super
|
124
121
|
docxml.xpath(ns("//foreword | //preface/abstract | " \
|
125
122
|
"//submitters | //introduction | //acknowledgements"))
|
126
|
-
.each
|
127
|
-
clause1(f)
|
128
|
-
end
|
123
|
+
.each { |f| clause1(f) }
|
129
124
|
end
|
130
125
|
|
131
126
|
def clause1(elem)
|
@@ -159,16 +154,14 @@ module IsoDoc
|
|
159
154
|
end
|
160
155
|
|
161
156
|
def rename_doctype(doctype, date)
|
162
|
-
|
163
|
-
|
157
|
+
(doctype&.text == "white-paper" && date) or return
|
164
158
|
Date.iso8601(date.text) >= Date.iso8601("2021-12-16") and
|
165
159
|
doctype.children = "technical-paper"
|
166
160
|
end
|
167
161
|
|
168
162
|
def ol_depth(node)
|
169
|
-
|
170
|
-
node.at(".//ancestor::xmlns:ol[@class = 'steps']")
|
171
|
-
|
163
|
+
node["class"] == "steps" ||
|
164
|
+
node.at(".//ancestor::xmlns:ol[@class = 'steps']") or return super
|
172
165
|
idx = node.xpath("./ancestor-or-self::xmlns:ol[@class = 'steps']").size
|
173
166
|
%i(arabic alphabet roman alphabet_upper roman_upper)[(idx - 1) % 5]
|
174
167
|
end
|
@@ -200,21 +193,33 @@ module IsoDoc
|
|
200
193
|
xml.children = "#{f}#{xml.xpath(ns(keep)).to_xml}"
|
201
194
|
end
|
202
195
|
|
196
|
+
SECT_TERMS = "//sections/terms | //sections/clause[descendant::terms]"
|
197
|
+
.freeze
|
198
|
+
|
203
199
|
def display_order(docxml)
|
204
200
|
i = 0
|
205
201
|
i = display_order_xpath(docxml, "//preface/*", i)
|
206
202
|
i = display_order_at(docxml, "//clause[@type = 'scope']", i)
|
207
203
|
i = display_order_at(docxml, "//clause[@type = 'conformance']", i)
|
208
204
|
i = display_order_at(docxml, @xrefs.klass.norm_ref_xpath, i)
|
209
|
-
i =
|
210
|
-
"//sections/clause[descendant::terms]", i)
|
211
|
-
i = display_order_at(docxml, "//sections/definitions", i)
|
212
|
-
i = display_order_xpath(docxml, @xrefs.klass.middle_clause(docxml), i)
|
205
|
+
i = display_order_clauses(docxml, i)
|
213
206
|
i = display_order_xpath(docxml, "//annex", i)
|
214
207
|
i = display_order_xpath(docxml, @xrefs.klass.bibliography_xpath, i)
|
215
208
|
display_order_xpath(docxml, "//indexsect", i)
|
216
209
|
end
|
217
210
|
|
211
|
+
def display_order_clauses(docxml, idx)
|
212
|
+
if docxml.at(ns("//bibdata/ext/doctype"))&.text == "engineering-report"
|
213
|
+
xpath = "#{SECT_TERMS} | //sections/definitions | " +
|
214
|
+
@xrefs.klass.middle_clause(docxml)
|
215
|
+
return display_order_xpath(docxml, xpath, idx)
|
216
|
+
end
|
217
|
+
idx = display_order_at(docxml, SECT_TERMS, idx)
|
218
|
+
idx = display_order_at(docxml, "//sections/definitions", idx)
|
219
|
+
display_order_xpath(docxml, @xrefs.klass.middle_clause(docxml),
|
220
|
+
idx)
|
221
|
+
end
|
222
|
+
|
218
223
|
def norm_ref_entry_code(_ordinal, _idents, _ids, _standard, _datefn, _bib)
|
219
224
|
""
|
220
225
|
end
|
data/lib/isodoc/ogc/xref.rb
CHANGED
@@ -11,12 +11,23 @@ module IsoDoc
|
|
11
11
|
n = section_names(doc.at(ns("//clause[@type = 'scope']")), n, 1)
|
12
12
|
n = section_names(doc.at(ns("//clause[@type = 'conformance']")), n, 1)
|
13
13
|
n = section_names(doc.at(ns(@klass.norm_ref_xpath)), n, 1)
|
14
|
-
n
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
14
|
+
initial_anchor_names_middle(doc, n,
|
15
|
+
doc.at(ns("//bibdata/ext/doctype"))&.text)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
TERMS_SECT = "//sections/terms | //sections/clause[descendant::terms]"
|
20
|
+
.freeze
|
21
|
+
|
22
|
+
def initial_anchor_names_middle(doc, num, doctype)
|
23
|
+
if doctype == "engineering-report"
|
24
|
+
doc.xpath(ns(@klass.middle_clause(doc)) +
|
25
|
+
" | #{ns(TERMS_SECT)} | " + ns("//sections/definitions"))
|
26
|
+
.each_with_index { |c, _i| section_names(c, num, 1) }
|
27
|
+
else
|
28
|
+
num = section_names(doc.at(ns(TERMS_SECT)), num, 1)
|
29
|
+
num = section_names(doc.at(ns("//sections/definitions")), num, 1)
|
30
|
+
clause_names(doc, num)
|
20
31
|
end
|
21
32
|
end
|
22
33
|
|
@@ -88,7 +88,8 @@ module Metanorma
|
|
88
88
|
|
89
89
|
def clause_parse(attrs, xml, node)
|
90
90
|
case node.attr("heading")&.downcase || node.title.downcase
|
91
|
-
when "submitters"
|
91
|
+
when "submitters", "contributors"
|
92
|
+
return submitters_parse(attrs, xml, node)
|
92
93
|
when "conformance" then attrs = attrs.merge(type: "conformance")
|
93
94
|
when "security considerations"
|
94
95
|
attrs = attrs.merge(type: "security")
|
@@ -99,8 +100,11 @@ module Metanorma
|
|
99
100
|
end
|
100
101
|
|
101
102
|
def submitters_parse(attrs, xml, node)
|
103
|
+
title = @i18n.submitters
|
104
|
+
doctype(node) == "engineering-report" and
|
105
|
+
title = @i18n.contributors_clause
|
102
106
|
xml.submitters **attr_code(attrs) do |xml_section|
|
103
|
-
xml_section.title
|
107
|
+
xml_section.title title
|
104
108
|
xml_section << node.content
|
105
109
|
end
|
106
110
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-ogc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: iso-639
|