metanorma-ogc 1.5.5 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +4 -32
- data/.gitignore +11 -0
- data/Gemfile +0 -2
- data/lib/isodoc/ogc/biblio.rb +7 -6
- data/lib/isodoc/ogc/html/htmlstyle.css +22 -17
- data/lib/isodoc/ogc/html/htmlstyle.scss +9 -3
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +164 -139
- data/lib/isodoc/ogc/ogc.best-practice.xsl +164 -139
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +164 -139
- data/lib/isodoc/ogc/ogc.community-practice.xsl +164 -139
- data/lib/isodoc/ogc/ogc.community-standard.xsl +164 -139
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +164 -139
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +164 -139
- data/lib/isodoc/ogc/ogc.other.xsl +164 -139
- data/lib/isodoc/ogc/ogc.policy.xsl +164 -139
- data/lib/isodoc/ogc/ogc.reference-model.xsl +164 -139
- data/lib/isodoc/ogc/ogc.release-notes.xsl +164 -139
- data/lib/isodoc/ogc/ogc.standard.xsl +164 -139
- data/lib/isodoc/ogc/ogc.test-suite.xsl +164 -139
- data/lib/isodoc/ogc/ogc.user-guide.xsl +164 -139
- data/lib/isodoc/ogc/ogc.white-paper.xsl +168 -140
- data/lib/isodoc/ogc/presentation_xml_convert.rb +6 -3
- data/lib/{asciidoctor → metanorma}/ogc/basicdoc.rng +0 -0
- data/lib/{asciidoctor → metanorma}/ogc/biblio.rng +0 -0
- data/lib/{asciidoctor → metanorma}/ogc/boilerplate.xml +0 -0
- data/lib/{asciidoctor → metanorma}/ogc/cleanup.rb +13 -1
- data/lib/{asciidoctor → metanorma}/ogc/converter.rb +12 -2
- data/lib/{asciidoctor → metanorma}/ogc/front.rb +2 -2
- data/lib/{asciidoctor → metanorma}/ogc/isodoc.rng +29 -0
- data/lib/{asciidoctor → metanorma}/ogc/ogc.rng +0 -0
- data/lib/{asciidoctor → metanorma}/ogc/reqt.rng +0 -0
- data/lib/{asciidoctor → metanorma}/ogc/validate.rb +1 -1
- data/lib/metanorma/ogc/version.rb +1 -1
- data/lib/metanorma/ogc.rb +1 -0
- data/lib/metanorma-ogc.rb +0 -1
- data/metanorma-ogc.gemspec +1 -1
- metadata +14 -15
- data/lib/asciidoctor/ogc.rb +0 -6
@@ -241,7 +241,9 @@
|
|
241
241
|
<fo:block-container line-height="1.08" font-family="Lato">
|
242
242
|
<fo:block role="TOC">
|
243
243
|
<fo:block xsl:use-attribute-sets="title-toc-style" role="H1">
|
244
|
-
<xsl:
|
244
|
+
<xsl:call-template name="getTitle">
|
245
|
+
<xsl:with-param name="name" select="'title-toc'"/>
|
246
|
+
</xsl:call-template>
|
245
247
|
</fo:block>
|
246
248
|
<xsl:variable name="margin-left">3.9</xsl:variable>
|
247
249
|
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
|
@@ -820,7 +822,6 @@
|
|
820
822
|
</fo:list-block>
|
821
823
|
</xsl:template>
|
822
824
|
|
823
|
-
<xsl:template match="ogc:references[not(@normative='true')]/ogc:bibitem" mode="contents"/>
|
824
825
|
|
825
826
|
<xsl:template match="ogc:bibitem/ogc:title">
|
826
827
|
<fo:inline font-style="italic">
|
@@ -950,13 +951,6 @@
|
|
950
951
|
|
951
952
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
|
952
953
|
|
953
|
-
<title-annex lang="en">Annex </title-annex>
|
954
|
-
<title-annex lang="fr">Annexe </title-annex>
|
955
|
-
|
956
|
-
<title-annex lang="zh">Annex </title-annex>
|
957
|
-
|
958
|
-
|
959
|
-
|
960
954
|
<title-edition lang="en">
|
961
955
|
|
962
956
|
|
@@ -970,11 +964,12 @@
|
|
970
964
|
|
971
965
|
</title-edition>
|
972
966
|
|
973
|
-
|
967
|
+
|
968
|
+
<!-- These titles of Table of contents renders different than determined in localized-strings -->
|
974
969
|
<title-toc lang="en">
|
975
970
|
|
976
|
-
<xsl:text>Contents</xsl:text>
|
977
971
|
|
972
|
+
<xsl:text>Table of Contents</xsl:text>
|
978
973
|
|
979
974
|
|
980
975
|
</title-toc>
|
@@ -982,21 +977,11 @@
|
|
982
977
|
|
983
978
|
<xsl:text>Sommaire</xsl:text>
|
984
979
|
|
985
|
-
|
986
|
-
</title-toc>
|
980
|
+
</title-toc>
|
987
981
|
|
988
982
|
<title-toc lang="zh">Contents</title-toc>
|
989
983
|
|
990
984
|
|
991
|
-
|
992
|
-
<title-page lang="en">Page</title-page>
|
993
|
-
<title-page lang="fr">Page</title-page>
|
994
|
-
|
995
|
-
<title-key lang="en">Key</title-key>
|
996
|
-
<title-key lang="fr">Légende</title-key>
|
997
|
-
|
998
|
-
<title-where lang="en">where</title-where>
|
999
|
-
<title-where lang="fr">où</title-where>
|
1000
985
|
|
1001
986
|
<title-descriptors lang="en">Descriptors</title-descriptors>
|
1002
987
|
|
@@ -1019,25 +1004,6 @@
|
|
1019
1004
|
|
1020
1005
|
</title-subpart>
|
1021
1006
|
|
1022
|
-
<title-modified lang="en">modified</title-modified>
|
1023
|
-
<title-modified lang="fr">modifiée</title-modified>
|
1024
|
-
|
1025
|
-
<title-modified lang="zh">modified</title-modified>
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
<title-source lang="en">
|
1030
|
-
|
1031
|
-
<xsl:text>SOURCE</xsl:text>
|
1032
|
-
|
1033
|
-
|
1034
|
-
</title-source>
|
1035
|
-
|
1036
|
-
<title-keywords lang="en">Keywords</title-keywords>
|
1037
|
-
|
1038
|
-
<title-deprecated lang="en">DEPRECATED</title-deprecated>
|
1039
|
-
<title-deprecated lang="fr">DEPRECATED</title-deprecated>
|
1040
|
-
|
1041
1007
|
<title-list-tables lang="en">List of Tables</title-list-tables>
|
1042
1008
|
|
1043
1009
|
<title-list-figures lang="en">List of Figures</title-list-figures>
|
@@ -1046,37 +1012,8 @@
|
|
1046
1012
|
|
1047
1013
|
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
1048
1014
|
|
1049
|
-
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
1050
|
-
|
1051
|
-
<title-abstract lang="en">Abstract</title-abstract>
|
1052
|
-
|
1053
1015
|
<title-summary lang="en">Summary</title-summary>
|
1054
1016
|
|
1055
|
-
<title-in lang="en">in </title-in>
|
1056
|
-
|
1057
|
-
<title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
|
1058
|
-
<title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
|
1059
|
-
|
1060
|
-
<title-completion-date lang="en">Completion date for this manuscript</title-completion-date>
|
1061
|
-
<title-completion-date lang="zh">本稿完成日期</title-completion-date>
|
1062
|
-
|
1063
|
-
<title-issuance-date lang="en">Issuance Date: #</title-issuance-date>
|
1064
|
-
<title-issuance-date lang="zh"># 发布</title-issuance-date>
|
1065
|
-
|
1066
|
-
<title-implementation-date lang="en">Implementation Date: #</title-implementation-date>
|
1067
|
-
<title-implementation-date lang="zh"># 实施</title-implementation-date>
|
1068
|
-
|
1069
|
-
<title-obligation-normative lang="en">normative</title-obligation-normative>
|
1070
|
-
<title-obligation-normative lang="zh">规范性附录</title-obligation-normative>
|
1071
|
-
|
1072
|
-
<title-caution lang="en">CAUTION</title-caution>
|
1073
|
-
<title-caution lang="zh">注意</title-caution>
|
1074
|
-
|
1075
|
-
<title-warning lang="en">WARNING</title-warning>
|
1076
|
-
<title-warning lang="zh">警告</title-warning>
|
1077
|
-
|
1078
|
-
<title-amendment lang="en">AMENDMENT</title-amendment>
|
1079
|
-
|
1080
1017
|
<title-continued lang="en">(continued)</title-continued>
|
1081
1018
|
<title-continued lang="fr">(continué)</title-continued>
|
1082
1019
|
|
@@ -1222,6 +1159,7 @@
|
|
1222
1159
|
|
1223
1160
|
|
1224
1161
|
|
1162
|
+
|
1225
1163
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1226
1164
|
<xsl:attribute name="margin-left">12.5mm</xsl:attribute>
|
1227
1165
|
<xsl:attribute name="margin-right">12.5mm</xsl:attribute>
|
@@ -1234,7 +1172,9 @@
|
|
1234
1172
|
|
1235
1173
|
|
1236
1174
|
|
1175
|
+
|
1237
1176
|
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
1177
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1238
1178
|
|
1239
1179
|
|
1240
1180
|
|
@@ -1251,7 +1191,6 @@
|
|
1251
1191
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1252
1192
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1253
1193
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1254
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1255
1194
|
|
1256
1195
|
|
1257
1196
|
|
@@ -1268,6 +1207,7 @@
|
|
1268
1207
|
|
1269
1208
|
|
1270
1209
|
|
1210
|
+
|
1271
1211
|
|
1272
1212
|
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
1273
1213
|
|
@@ -1647,7 +1587,7 @@
|
|
1647
1587
|
|
1648
1588
|
|
1649
1589
|
|
1650
|
-
</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:template name="OLD_processPrefaceSectionsDefault_Contents">
|
1590
|
+
</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="OLD_processPrefaceSectionsDefault_Contents">
|
1651
1591
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1652
1592
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1653
1593
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
@@ -2952,12 +2892,9 @@
|
|
2952
2892
|
<fo:block margin-bottom="12pt" text-align="left">
|
2953
2893
|
|
2954
2894
|
<xsl:variable name="title-where">
|
2955
|
-
|
2956
|
-
|
2957
|
-
|
2958
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2959
|
-
</xsl:call-template>
|
2960
|
-
|
2895
|
+
<xsl:call-template name="getLocalizedString">
|
2896
|
+
<xsl:with-param name="key">where</xsl:with-param>
|
2897
|
+
</xsl:call-template>
|
2961
2898
|
</xsl:variable>
|
2962
2899
|
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2963
2900
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
@@ -2973,12 +2910,9 @@
|
|
2973
2910
|
|
2974
2911
|
|
2975
2912
|
<xsl:variable name="title-where">
|
2976
|
-
|
2977
|
-
|
2978
|
-
|
2979
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2980
|
-
</xsl:call-template>
|
2981
|
-
|
2913
|
+
<xsl:call-template name="getLocalizedString">
|
2914
|
+
<xsl:with-param name="key">where</xsl:with-param>
|
2915
|
+
</xsl:call-template>
|
2982
2916
|
</xsl:variable>
|
2983
2917
|
<xsl:value-of select="$title-where"/>
|
2984
2918
|
</fo:block>
|
@@ -2990,12 +2924,9 @@
|
|
2990
2924
|
|
2991
2925
|
|
2992
2926
|
<xsl:variable name="title-key">
|
2993
|
-
|
2994
|
-
|
2995
|
-
|
2996
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
2997
|
-
</xsl:call-template>
|
2998
|
-
|
2927
|
+
<xsl:call-template name="getLocalizedString">
|
2928
|
+
<xsl:with-param name="key">key</xsl:with-param>
|
2929
|
+
</xsl:call-template>
|
2999
2930
|
</xsl:variable>
|
3000
2931
|
<xsl:value-of select="$title-key"/>
|
3001
2932
|
</fo:block>
|
@@ -3326,6 +3257,15 @@
|
|
3326
3257
|
</fo:inline>
|
3327
3258
|
</xsl:template><xsl:template match="*[local-name()='add']">
|
3328
3259
|
<xsl:choose>
|
3260
|
+
<xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
|
3261
|
+
<fo:inline>
|
3262
|
+
<xsl:call-template name="insertTag">
|
3263
|
+
<xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
|
3264
|
+
<xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
|
3265
|
+
<xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
|
3266
|
+
</xsl:call-template>
|
3267
|
+
</fo:inline>
|
3268
|
+
</xsl:when>
|
3329
3269
|
<xsl:when test="@amendment">
|
3330
3270
|
<fo:inline>
|
3331
3271
|
<xsl:call-template name="insertTag">
|
@@ -3360,7 +3300,6 @@
|
|
3360
3300
|
</fo:inline>
|
3361
3301
|
</xsl:otherwise>
|
3362
3302
|
</xsl:choose>
|
3363
|
-
|
3364
3303
|
</xsl:template><xsl:template name="insertTag">
|
3365
3304
|
<xsl:param name="type"/>
|
3366
3305
|
<xsl:param name="kind"/>
|
@@ -3376,14 +3315,14 @@
|
|
3376
3315
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
3377
3316
|
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
3378
3317
|
<g>
|
3379
|
-
<xsl:if test="$type = 'closing'">
|
3318
|
+
<xsl:if test="$type = 'closing' or $type = 'end'">
|
3380
3319
|
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
3381
3320
|
</xsl:if>
|
3382
3321
|
<polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
|
3383
3322
|
<line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
|
3384
3323
|
</g>
|
3385
3324
|
<text font-family="Arial" x="15" y="57" font-size="40pt">
|
3386
|
-
<xsl:if test="$type = 'closing'">
|
3325
|
+
<xsl:if test="$type = 'closing' or $type = 'end'">
|
3387
3326
|
<xsl:attribute name="x">25</xsl:attribute>
|
3388
3327
|
</xsl:if>
|
3389
3328
|
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
@@ -3876,9 +3815,9 @@
|
|
3876
3815
|
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
3877
3816
|
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
3878
3817
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
3879
|
-
<xsl:apply-templates select="*[local-name()='name']"
|
3818
|
+
<xsl:apply-templates select="*[local-name()='name']"/>
|
3880
3819
|
</fo:block>
|
3881
|
-
<xsl:apply-templates/>
|
3820
|
+
<xsl:apply-templates select="node()[not(local-name()='name')]"/>
|
3882
3821
|
</xsl:template><xsl:template match="*[local-name() = 'callout']">
|
3883
3822
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}"><<xsl:apply-templates/>></fo:basic-link>
|
3884
3823
|
</xsl:template><xsl:template match="*[local-name() = 'annotation']">
|
@@ -4477,11 +4416,58 @@
|
|
4477
4416
|
<xsl:value-of select="."/>
|
4478
4417
|
</xsl:template><xsl:template match="node()" mode="contents">
|
4479
4418
|
<xsl:apply-templates mode="contents"/>
|
4419
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="2" mode="contents">
|
4420
|
+
<xsl:variable name="level">
|
4421
|
+
<xsl:call-template name="getLevel">
|
4422
|
+
<xsl:with-param name="depth" select="@depth"/>
|
4423
|
+
</xsl:call-template>
|
4424
|
+
</xsl:variable>
|
4425
|
+
|
4426
|
+
<xsl:variable name="section">
|
4427
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
4428
|
+
</xsl:variable>
|
4429
|
+
|
4430
|
+
<xsl:variable name="type">floating-title</xsl:variable>
|
4431
|
+
|
4432
|
+
<xsl:variable name="display">
|
4433
|
+
<xsl:choose>
|
4434
|
+
<xsl:when test="normalize-space(@id) = ''">false</xsl:when>
|
4435
|
+
<xsl:when test="$level <= $toc_level">true</xsl:when>
|
4436
|
+
<xsl:otherwise>false</xsl:otherwise>
|
4437
|
+
</xsl:choose>
|
4438
|
+
</xsl:variable>
|
4439
|
+
|
4440
|
+
<xsl:variable name="skip">false</xsl:variable>
|
4441
|
+
|
4442
|
+
<xsl:if test="$skip = 'false'">
|
4443
|
+
|
4444
|
+
<xsl:variable name="title">
|
4445
|
+
<xsl:choose>
|
4446
|
+
<xsl:when test="*[local-name() = 'tab']">
|
4447
|
+
<xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
4448
|
+
</xsl:when>
|
4449
|
+
<xsl:otherwise>
|
4450
|
+
<xsl:copy-of select="node()"/>
|
4451
|
+
</xsl:otherwise>
|
4452
|
+
</xsl:choose>
|
4453
|
+
</xsl:variable>
|
4454
|
+
|
4455
|
+
<xsl:variable name="root">
|
4456
|
+
<xsl:if test="ancestor-or-self::*[local-name() = 'preface']">preface</xsl:if>
|
4457
|
+
<xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
|
4458
|
+
</xsl:variable>
|
4459
|
+
|
4460
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
|
4461
|
+
<title>
|
4462
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
4463
|
+
</title>
|
4464
|
+
</item>
|
4465
|
+
</xsl:if>
|
4480
4466
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
4481
4467
|
<xsl:apply-templates mode="bookmarks"/>
|
4482
4468
|
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
4483
4469
|
<xsl:apply-templates select="."/>
|
4484
|
-
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
4470
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
4485
4471
|
<xsl:apply-templates mode="bookmarks"/>
|
4486
4472
|
</xsl:template><xsl:template name="addBookmarks">
|
4487
4473
|
<xsl:param name="contents"/>
|
@@ -4685,7 +4671,10 @@
|
|
4685
4671
|
</fo:block>
|
4686
4672
|
</xsl:if>
|
4687
4673
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']"/><xsl:template match="*[local-name() = 'title']" mode="contents_item">
|
4688
|
-
<xsl:
|
4674
|
+
<xsl:param name="mode">bookmarks</xsl:param>
|
4675
|
+
<xsl:apply-templates mode="contents_item">
|
4676
|
+
<xsl:with-param name="mode" select="$mode"/>
|
4677
|
+
</xsl:apply-templates>
|
4689
4678
|
<!-- <xsl:text> </xsl:text> -->
|
4690
4679
|
</xsl:template><xsl:template name="getSection">
|
4691
4680
|
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
@@ -4758,6 +4747,18 @@
|
|
4758
4747
|
<xsl:copy-of select="."/>
|
4759
4748
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
4760
4749
|
<xsl:text> </xsl:text>
|
4750
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']" mode="contents_item">
|
4751
|
+
<xsl:param name="mode">bookmarks</xsl:param>
|
4752
|
+
<xsl:apply-templates mode="contents_item">
|
4753
|
+
<xsl:with-param name="mode" select="$mode"/>
|
4754
|
+
</xsl:apply-templates>
|
4755
|
+
</xsl:template><xsl:template match="*[local-name() = 'add'][starts-with(text(), $ace_tag)]" mode="contents_item">
|
4756
|
+
<xsl:param name="mode">bookmarks</xsl:param>
|
4757
|
+
<xsl:if test="$mode = 'contents'">
|
4758
|
+
<xsl:copy>
|
4759
|
+
<xsl:apply-templates mode="contents_item"/>
|
4760
|
+
</xsl:copy>
|
4761
|
+
</xsl:if>
|
4761
4762
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
4762
4763
|
|
4763
4764
|
<fo:block-container margin-left="0mm">
|
@@ -5104,42 +5105,48 @@
|
|
5104
5105
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
5105
5106
|
|
5106
5107
|
|
5107
|
-
<xsl:
|
5108
|
-
|
5109
|
-
<xsl:variable name="element">
|
5108
|
+
<xsl:variable name="fo_element">
|
5109
|
+
<xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
|
5110
5110
|
block
|
5111
5111
|
|
5112
|
-
|
5112
|
+
|
5113
5113
|
</xsl:variable>
|
5114
5114
|
|
5115
|
+
<!-- display 'EXAMPLE' -->
|
5116
|
+
<xsl:apply-templates select="*[local-name()='name']">
|
5117
|
+
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5118
|
+
</xsl:apply-templates>
|
5119
|
+
|
5115
5120
|
<xsl:choose>
|
5116
|
-
<xsl:when test="contains(normalize-space($
|
5117
|
-
<fo:block xsl:use-attribute-sets="example-body-style">
|
5118
|
-
<
|
5119
|
-
|
5121
|
+
<xsl:when test="contains(normalize-space($fo_element), 'block')">
|
5122
|
+
<fo:block-container xsl:use-attribute-sets="example-body-style">
|
5123
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
5124
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]">
|
5125
|
+
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5126
|
+
</xsl:apply-templates>
|
5127
|
+
</fo:block-container>
|
5128
|
+
</fo:block-container>
|
5120
5129
|
</xsl:when>
|
5121
5130
|
<xsl:otherwise>
|
5122
5131
|
<fo:inline>
|
5123
|
-
<xsl:apply-templates
|
5132
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]">
|
5133
|
+
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5134
|
+
</xsl:apply-templates>
|
5124
5135
|
</fo:inline>
|
5125
5136
|
</xsl:otherwise>
|
5126
5137
|
</xsl:choose>
|
5127
5138
|
|
5128
5139
|
</fo:block>
|
5129
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"
|
5130
|
-
|
5131
|
-
|
5132
|
-
block
|
5133
|
-
|
5134
|
-
<xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
|
5135
|
-
</xsl:variable>
|
5140
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
|
5141
|
+
<xsl:param name="fo_element">block</xsl:param>
|
5142
|
+
|
5136
5143
|
<xsl:choose>
|
5137
5144
|
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
5138
5145
|
<fo:inline>
|
5139
5146
|
<xsl:apply-templates/>
|
5140
5147
|
</fo:inline>
|
5141
5148
|
</xsl:when>
|
5142
|
-
<xsl:when test="contains(normalize-space($
|
5149
|
+
<xsl:when test="contains(normalize-space($fo_element), 'block')">
|
5143
5150
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
5144
5151
|
<xsl:apply-templates/>
|
5145
5152
|
</fo:block>
|
@@ -5152,14 +5159,15 @@
|
|
5152
5159
|
</xsl:choose>
|
5153
5160
|
|
5154
5161
|
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
5162
|
+
<xsl:param name="fo_element">block</xsl:param>
|
5163
|
+
|
5155
5164
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
5156
5165
|
<xsl:variable name="element">
|
5157
|
-
block
|
5158
|
-
|
5159
5166
|
|
5167
|
+
<xsl:value-of select="$fo_element"/>
|
5160
5168
|
</xsl:variable>
|
5161
5169
|
<xsl:choose>
|
5162
|
-
<xsl:when test="normalize-space($element)
|
5170
|
+
<xsl:when test="starts-with(normalize-space($element), 'block')">
|
5163
5171
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
5164
5172
|
|
5165
5173
|
<xsl:apply-templates/>
|
@@ -5227,12 +5235,9 @@
|
|
5227
5235
|
</fo:basic-link>
|
5228
5236
|
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
5229
5237
|
<xsl:variable name="title-modified">
|
5230
|
-
|
5231
|
-
|
5232
|
-
|
5233
|
-
<xsl:with-param name="name" select="'title-modified'"/>
|
5234
|
-
</xsl:call-template>
|
5235
|
-
|
5238
|
+
<xsl:call-template name="getLocalizedString">
|
5239
|
+
<xsl:with-param name="key">modified</xsl:with-param>
|
5240
|
+
</xsl:call-template>
|
5236
5241
|
</xsl:variable>
|
5237
5242
|
|
5238
5243
|
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
@@ -5428,12 +5433,9 @@
|
|
5428
5433
|
</fo:block>
|
5429
5434
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
5430
5435
|
<xsl:variable name="title-deprecated">
|
5431
|
-
|
5432
|
-
<xsl:
|
5433
|
-
|
5434
|
-
</xsl:call-template>
|
5435
|
-
|
5436
|
-
|
5436
|
+
<xsl:call-template name="getLocalizedString">
|
5437
|
+
<xsl:with-param name="key">deprecated</xsl:with-param>
|
5438
|
+
</xsl:call-template>
|
5437
5439
|
</xsl:variable>
|
5438
5440
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
5439
5441
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
@@ -5442,6 +5444,8 @@
|
|
5442
5444
|
<xsl:if test="*[local-name() = 'strong']">
|
5443
5445
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
5444
5446
|
</xsl:if>
|
5447
|
+
</xsl:template><xsl:template match="*[local-name() = 'preferred']/text()[contains(., ';')] | *[local-name() = 'preferred']/*[local-name() = 'strong']/text()[contains(., ';')]">
|
5448
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
|
5445
5449
|
</xsl:template><xsl:template match="*[local-name() = 'definition']">
|
5446
5450
|
<fo:block xsl:use-attribute-sets="definition-style">
|
5447
5451
|
<xsl:apply-templates/>
|
@@ -5768,6 +5772,26 @@
|
|
5768
5772
|
|
5769
5773
|
|
5770
5774
|
|
5775
|
+
|
5776
|
+
|
5777
|
+
|
5778
|
+
|
5779
|
+
|
5780
|
+
|
5781
|
+
|
5782
|
+
|
5783
|
+
|
5784
|
+
|
5785
|
+
|
5786
|
+
|
5787
|
+
|
5788
|
+
|
5789
|
+
<!-- end MPFD bibitem processing -->
|
5790
|
+
|
5791
|
+
<!-- start M3D bibitem processing -->
|
5792
|
+
|
5793
|
+
|
5794
|
+
|
5771
5795
|
<!-- start OGC bibtem processing -->
|
5772
5796
|
<xsl:choose>
|
5773
5797
|
<xsl:when test="*[local-name() = 'formattedref']">
|
@@ -5909,14 +5933,8 @@
|
|
5909
5933
|
<!-- end OGC bibitem processing-->
|
5910
5934
|
|
5911
5935
|
|
5912
|
-
|
5913
|
-
|
5914
|
-
|
5915
|
-
|
5916
|
-
|
5917
|
-
|
5918
5936
|
</xsl:template><xsl:template name="processBibitemDocId">
|
5919
|
-
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
5937
|
+
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'metanorma-ordinal' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
5920
5938
|
<xsl:choose>
|
5921
5939
|
<xsl:when test="normalize-space($_doc_ident) != ''">
|
5922
5940
|
<!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
@@ -5930,7 +5948,7 @@
|
|
5930
5948
|
<xsl:if test="$type != ''">
|
5931
5949
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
5932
5950
|
</xsl:if> -->
|
5933
|
-
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
5951
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma') and not(@type = 'metanorma-ordinal')]"/>
|
5934
5952
|
</xsl:otherwise>
|
5935
5953
|
</xsl:choose>
|
5936
5954
|
</xsl:template><xsl:template name="processPersonalAuthor">
|
@@ -6036,8 +6054,12 @@
|
|
6036
6054
|
<fo:block> </fo:block>
|
6037
6055
|
</fo:block-container>
|
6038
6056
|
</xsl:template><xsl:variable name="toc_level">
|
6057
|
+
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
6058
|
+
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
|
6059
|
+
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
|
6039
6060
|
<xsl:choose>
|
6040
|
-
<xsl:when test="
|
6061
|
+
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
6062
|
+
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
6041
6063
|
<xsl:otherwise><!-- default value -->
|
6042
6064
|
|
6043
6065
|
|
@@ -6139,7 +6161,7 @@
|
|
6139
6161
|
</td>
|
6140
6162
|
</xsl:for-each>
|
6141
6163
|
<td>333</td> <!-- page number, just for fill -->
|
6142
|
-
</xsl:template><xsl:template match="*[local-name() = 'variant-title']
|
6164
|
+
</xsl:template><xsl:template match="*[local-name() = 'variant-title']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
6143
6165
|
<fo:inline padding-right="5mm"> </fo:inline>
|
6144
6166
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
6145
6167
|
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
@@ -6511,9 +6533,15 @@
|
|
6511
6533
|
</xsl:template><xsl:template name="getLocalizedString">
|
6512
6534
|
<xsl:param name="key"/>
|
6513
6535
|
<xsl:param name="formatted">false</xsl:param>
|
6536
|
+
<xsl:param name="lang"/>
|
6514
6537
|
|
6515
6538
|
<xsl:variable name="curr_lang">
|
6516
|
-
<xsl:
|
6539
|
+
<xsl:choose>
|
6540
|
+
<xsl:when test="$lang != ''"><xsl:value-of select="$lang"/></xsl:when>
|
6541
|
+
<xsl:otherwise>
|
6542
|
+
<xsl:call-template name="getLang"/>
|
6543
|
+
</xsl:otherwise>
|
6544
|
+
</xsl:choose>
|
6517
6545
|
</xsl:variable>
|
6518
6546
|
|
6519
6547
|
<xsl:variable name="data_value">
|
@@ -213,9 +213,7 @@ module IsoDoc
|
|
213
213
|
end
|
214
214
|
|
215
215
|
def ol(docxml)
|
216
|
-
docxml.xpath(ns("//ol")).each
|
217
|
-
ol1(f)
|
218
|
-
end
|
216
|
+
docxml.xpath(ns("//ol")).each { |f| ol1(f) }
|
219
217
|
end
|
220
218
|
|
221
219
|
def ol1(elem)
|
@@ -234,6 +232,11 @@ module IsoDoc
|
|
234
232
|
"#{elem.children.to_xml.strip}]")
|
235
233
|
end
|
236
234
|
|
235
|
+
def bibliography_bibitem_number_skip(bibitem)
|
236
|
+
@xrefs.klass.implicit_reference(bibitem) ||
|
237
|
+
bibitem.at(ns(".//docidentifier[@type = 'metanorma-ordinal']"))
|
238
|
+
end
|
239
|
+
|
237
240
|
include Init
|
238
241
|
end
|
239
242
|
end
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module Metanorma
|
2
2
|
module Ogc
|
3
3
|
class Converter < Standoc::Converter
|
4
4
|
def sections_cleanup(xml)
|
@@ -199,6 +199,18 @@ module Asciidoctor
|
|
199
199
|
end
|
200
200
|
super
|
201
201
|
end
|
202
|
+
|
203
|
+
def obligations_cleanup_inherit(xml)
|
204
|
+
xml.xpath("//annex").each do |r|
|
205
|
+
r["obligation"] = "informative" unless r["obligation"]
|
206
|
+
end
|
207
|
+
xml.xpath("//clause[not(ancestor::boilerplate)]").each do |r|
|
208
|
+
r["obligation"] = "normative" unless r["obligation"]
|
209
|
+
end
|
210
|
+
xml.xpath(::Metanorma::Standoc::Utils::SUBCLAUSE_XPATH).each do |r|
|
211
|
+
o = r&.at("./ancestor::*/@obligation")&.text and r["obligation"] = o
|
212
|
+
end
|
213
|
+
end
|
202
214
|
end
|
203
215
|
end
|
204
216
|
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
require "asciidoctor"
|
2
|
-
require "
|
2
|
+
require "metanorma/standoc/converter"
|
3
3
|
require "fileutils"
|
4
4
|
require_relative "front"
|
5
5
|
require_relative "validate"
|
6
6
|
require_relative "cleanup"
|
7
7
|
|
8
|
-
module
|
8
|
+
module Metanorma
|
9
9
|
module Ogc
|
10
10
|
# A {Converter} implementation that generates RSD output, and a document
|
11
11
|
# schema encapsulation of the document for validation
|
@@ -134,6 +134,16 @@ module Asciidoctor
|
|
134
134
|
super
|
135
135
|
end
|
136
136
|
|
137
|
+
def set_obligation(attrs, node)
|
138
|
+
if node.attr("style") == "appendix" && node.level == 1
|
139
|
+
attrs[:obligation] = if node.attributes.has_key?("obligation")
|
140
|
+
node.attr("obligation")
|
141
|
+
else "informative"
|
142
|
+
end
|
143
|
+
else super
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
137
147
|
def presentation_xml_converter(node)
|
138
148
|
IsoDoc::Ogc::PresentationXMLConvert.new(html_extract_attributes(node))
|
139
149
|
end
|