metanorma-ogc 2.6.5 → 2.6.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -512,6 +512,7 @@
512
512
 
513
513
  <fo:block>
514
514
  <xsl:call-template name="setId"/>
515
+ <xsl:call-template name="addReviewHelper"/>
515
516
  <xsl:apply-templates/>
516
517
  </fo:block>
517
518
  </xsl:template>
@@ -4349,6 +4350,11 @@
4349
4350
 
4350
4351
  <xsl:value-of select="@reference"/>
4351
4352
 
4353
+ <!-- commented https://github.com/metanorma/isodoc/issues/614 -->
4354
+ <!-- <xsl:if test="$namespace = 'itu'">
4355
+ <xsl:text>)</xsl:text>
4356
+ </xsl:if> -->
4357
+
4352
4358
  </fo:inline>
4353
4359
  <fo:inline xsl:use-attribute-sets="table-fn-body-style">
4354
4360
  <xsl:copy-of select="./node()"/>
@@ -4358,7 +4364,7 @@
4358
4364
 
4359
4365
  </xsl:if>
4360
4366
  </xsl:for-each>
4361
- </xsl:template>
4367
+ </xsl:template> <!-- table_fn_display -->
4362
4368
 
4363
4369
  <xsl:template name="create_fn">
4364
4370
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
@@ -4392,8 +4398,10 @@
4392
4398
  <!-- EMD table's footnotes rendering -->
4393
4399
  <!-- ============================ -->
4394
4400
 
4401
+ <!-- ============================ -->
4395
4402
  <!-- figure's footnotes rendering -->
4396
- <xsl:template name="fn_display_figure">
4403
+ <!-- ============================ -->
4404
+ <xsl:template name="fn_display_figure"> <!-- figure_fn_display -->
4397
4405
 
4398
4406
  <!-- current figure id -->
4399
4407
  <xsl:variable name="figure_id_">
@@ -4506,9 +4514,28 @@
4506
4514
 
4507
4515
  </fo:block>
4508
4516
  </xsl:if>
4509
-
4510
4517
  </xsl:template> <!-- fn_display_figure -->
4511
4518
 
4519
+ <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
4520
+ <!-- figure's footnote label -->
4521
+ <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'dl'][@key = 'true']/*[local-name() = 'dt']/ *[local-name() = 'p'][count(node()[normalize-space() != '']) = 1]/*[local-name() = 'sup']" priority="3">
4522
+ <xsl:variable name="key_iso">
4523
+
4524
+ </xsl:variable>
4525
+ <xsl:if test="normalize-space($key_iso) = 'true'">
4526
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
4527
+
4528
+ </xsl:if>
4529
+ <fo:inline xsl:use-attribute-sets="figure-fn-number-style"> <!-- id="{@id}" -->
4530
+ <!-- <xsl:value-of select="@reference"/> -->
4531
+ <xsl:apply-templates/>
4532
+ </fo:inline>
4533
+ </xsl:template>
4534
+
4535
+ <!-- ============================ -->
4536
+ <!-- END: figure's footnotes rendering -->
4537
+ <!-- ============================ -->
4538
+
4512
4539
  <!-- fn reference in the text rendering (for instance, 'some text 1) some text' ) -->
4513
4540
  <xsl:template match="*[local-name()='fn']">
4514
4541
  <fo:inline xsl:use-attribute-sets="fn-reference-style">
@@ -4529,6 +4556,10 @@
4529
4556
 
4530
4557
  <xsl:value-of select="@reference"/>
4531
4558
 
4559
+ <!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
4560
+ <!-- <xsl:if test="$namespace = 'jis'">
4561
+ <fo:inline font-weight="normal">)</fo:inline>
4562
+ </xsl:if> -->
4532
4563
  </fo:basic-link>
4533
4564
  </fo:inline>
4534
4565
  </xsl:template>
@@ -4655,17 +4686,22 @@
4655
4686
  </fo:block>
4656
4687
  </xsl:when> <!-- END: a few components -->
4657
4688
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
4658
- <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
4689
+ <!-- Presentation XML contains 'Key' caption, https://github.com/metanorma/isodoc/issues/607 -->
4690
+ <xsl:if test="not(preceding-sibling::*[1][local-name() = 'p' and @keep-with-next])"> <!-- for old Presentation XML -->
4659
4691
 
4660
- <xsl:call-template name="refine_figure_key_style"/>
4692
+ <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
4661
4693
 
4662
- <xsl:variable name="title-key">
4663
- <xsl:call-template name="getLocalizedString">
4664
- <xsl:with-param name="key">key</xsl:with-param>
4665
- </xsl:call-template>
4666
- </xsl:variable>
4667
- <xsl:value-of select="$title-key"/>
4668
- </fo:block>
4694
+ <xsl:call-template name="refine_figure_key_style"/>
4695
+
4696
+ <xsl:variable name="title-key">
4697
+ <xsl:call-template name="getLocalizedString">
4698
+ <xsl:with-param name="key">key</xsl:with-param>
4699
+ </xsl:call-template>
4700
+ </xsl:variable>
4701
+ <xsl:value-of select="$title-key"/>
4702
+ </fo:block>
4703
+
4704
+ </xsl:if>
4669
4705
  </xsl:when> <!-- END: definition list in a figure -->
4670
4706
  </xsl:choose>
4671
4707
 
@@ -4851,6 +4887,14 @@
4851
4887
 
4852
4888
  </xsl:template> <!-- END: dl -->
4853
4889
 
4890
+ <!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
4891
+ <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
4892
+ <fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
4893
+ <xsl:call-template name="refine_figure_key_style"/>
4894
+ <xsl:apply-templates/>
4895
+ </fo:block>
4896
+ </xsl:template>
4897
+
4854
4898
  <xsl:template name="refine_dl_formula_where_style">
4855
4899
 
4856
4900
  </xsl:template> <!-- refine_dl_formula_where_style -->
@@ -6886,6 +6930,39 @@
6886
6930
  </xsl:copy>
6887
6931
  </xsl:template>
6888
6932
 
6933
+ <xsl:template match="@*|node()" mode="mathml_linebreak">
6934
+ <xsl:copy>
6935
+ <xsl:apply-templates select="@*|node()" mode="mathml_linebreak"/>
6936
+ </xsl:copy>
6937
+ </xsl:template>
6938
+
6939
+ <!-- split math into two math -->
6940
+ <xsl:template match="mathml:mo[@linebreak] | mathml:mspace[@linebreak]" mode="mathml_linebreak">
6941
+ <xsl:variable name="math_elements_tree_">
6942
+ <xsl:for-each select="ancestor::*[ancestor-or-self::mathml:math]">
6943
+ <element pos="{position()}">
6944
+ <xsl:copy-of select="@*[local-name() != 'id']"/>
6945
+ <xsl:value-of select="name()"/>
6946
+ </element>
6947
+ </xsl:for-each>
6948
+ </xsl:variable>
6949
+
6950
+ <xsl:variable name="math_elements_tree" select="xalan:nodeset($math_elements_tree_)"/>
6951
+
6952
+ <xsl:call-template name="insertClosingElements">
6953
+ <xsl:with-param name="tree" select="$math_elements_tree"/>
6954
+ </xsl:call-template>
6955
+
6956
+ <xsl:element name="br" namespace="{$namespace_full}"/>
6957
+
6958
+ <xsl:call-template name="insertOpeningElements">
6959
+ <xsl:with-param name="tree" select="$math_elements_tree"/>
6960
+ <xsl:with-param name="xmlns">http://www.w3.org/1998/Math/MathML</xsl:with-param>
6961
+ <xsl:with-param name="add_continue">false</xsl:with-param>
6962
+ </xsl:call-template>
6963
+
6964
+ </xsl:template>
6965
+
6889
6966
  <!-- Examples:
6890
6967
  <stem type="AsciiMath">x = 1</stem>
6891
6968
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
@@ -7137,9 +7214,11 @@
7137
7214
  </xsl:template>
7138
7215
 
7139
7216
  <xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"> <!-- show in 'stem' template -->
7217
+ <!-- https://github.com/metanorma/isodoc/issues/607
7140
7218
  <xsl:if test="normalize-space() != ''">
7141
- <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
7142
- </xsl:if>
7219
+ <xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
7220
+ </xsl:if> -->
7221
+ <xsl:apply-templates/>
7143
7222
  </xsl:template>
7144
7223
 
7145
7224
  <!-- stem inside formula with name (with formula's number) -->
@@ -7295,6 +7374,17 @@
7295
7374
  </xsl:when>
7296
7375
  <xsl:otherwise>
7297
7376
 
7377
+ <!-- https://github.com/metanorma/isodoc/issues/607 -->
7378
+ <!-- <xsl:if test="$namespace = 'ieee'">
7379
+ <xsl:text>—</xsl:text> em dash &#x2014;
7380
+ </xsl:if> -->
7381
+ <!-- <xsl:if test="$namespace = 'iho' or $namespace = 'gb' or $namespace = 'm3d' or $namespace = 'unece-rec' or $namespace = 'unece' or $namespace = 'rsd'">
7382
+ <xsl:text>:</xsl:text>
7383
+ </xsl:if> -->
7384
+
7385
+ <!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp'">
7386
+ <xsl:text> – </xsl:text> en dash &#x2013;
7387
+ </xsl:if> -->
7298
7388
  </xsl:otherwise>
7299
7389
  </xsl:choose>
7300
7390
  </xsl:variable>
@@ -7313,8 +7403,16 @@
7313
7403
  </xsl:when>
7314
7404
  <xsl:otherwise>
7315
7405
 
7406
+ <!-- https://github.com/metanorma/isodoc/issues/607 -->
7407
+ <!-- <xsl:if test="$namespace = 'ieee'">
7408
+ <xsl:text>—</xsl:text> em dash &#x2014;
7409
+ </xsl:if> -->
7410
+ <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' or $namespace = 'rsd' or $namespace = 'jcgm'">
7316
7411
  <xsl:text>:</xsl:text>
7317
-
7412
+ </xsl:if> -->
7413
+ <!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'unece-rec' or $namespace = 'unece'">
7414
+ <xsl:text> – </xsl:text> en dash &#x2013;
7415
+ </xsl:if> -->
7318
7416
  </xsl:otherwise>
7319
7417
  </xsl:choose>
7320
7418
  </xsl:variable>
@@ -9502,7 +9600,7 @@
9502
9600
  <xsl:if test="normalize-space() != ''">
9503
9601
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
9504
9602
  <xsl:call-template name="refine_termexample-name-style"/>
9505
- <xsl:apply-templates/>
9603
+ <xsl:apply-templates/> <!-- commented $namespace = 'ieee', https://github.com/metanorma/isodoc/issues/614-->
9506
9604
  </fo:inline>
9507
9605
  </xsl:if>
9508
9606
  </xsl:template>
@@ -9664,7 +9762,7 @@
9664
9762
  <xsl:otherwise>
9665
9763
  <fo:inline xsl:use-attribute-sets="example-name-style">
9666
9764
  <xsl:call-template name="refine_example-name-style"/>
9667
- <xsl:apply-templates/>
9765
+ <xsl:apply-templates/> <!-- $namespace = 'ieee', see https://github.com/metanorma/isodoc/issues/614 -->
9668
9766
  </fo:inline>
9669
9767
  </xsl:otherwise>
9670
9768
  </xsl:choose>
@@ -9846,15 +9944,17 @@
9846
9944
 
9847
9945
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9848
9946
  <fo:block role="BlockQuote">
9849
- <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
9947
+ <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source') and not(local-name() = 'attribution')]"/> <!-- process all nested nodes, except author and source -->
9850
9948
  </fo:block>
9851
9949
  </fo:block-container>
9852
9950
  </fo:block-container>
9853
- <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
9951
+ <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source'] or *[local-name() = 'attribution']">
9854
9952
  <fo:block xsl:use-attribute-sets="quote-source-style">
9855
9953
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
9856
9954
  <xsl:apply-templates select="*[local-name() = 'author']"/>
9857
9955
  <xsl:apply-templates select="*[local-name() = 'source']"/>
9956
+ <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
9957
+ <xsl:apply-templates select="*[local-name() = 'attribution']/*[local-name() = 'p']/node()"/>
9858
9958
  </fo:block>
9859
9959
  </xsl:if>
9860
9960
 
@@ -9876,9 +9976,13 @@
9876
9976
  </xsl:template>
9877
9977
 
9878
9978
  <xsl:template match="*[local-name() = 'author']">
9879
- <xsl:text>— </xsl:text>
9979
+ <xsl:if test="local-name(..) = 'quote'"> <!-- for old Presentation XML, https://github.com/metanorma/isodoc/issues/607 -->
9980
+ <xsl:text>— </xsl:text>
9981
+ </xsl:if>
9880
9982
  <xsl:apply-templates/>
9881
9983
  </xsl:template>
9984
+
9985
+ <xsl:template match="*[local-name() = 'quote']//*[local-name() = 'referenceFrom']"/>
9882
9986
  <!-- ====== -->
9883
9987
  <!-- ====== -->
9884
9988
 
@@ -10069,8 +10173,12 @@
10069
10173
  </xsl:template>
10070
10174
 
10071
10175
  <xsl:template match="*[local-name() = 'domain']">
10176
+ <!-- https://github.com/metanorma/isodoc/issues/607
10072
10177
  <fo:inline xsl:use-attribute-sets="domain-style">&lt;<xsl:apply-templates/>&gt;</fo:inline>
10073
- <xsl:text> </xsl:text>
10178
+ <xsl:text> </xsl:text> -->
10179
+ <xsl:if test="not(@hidden = 'true')">
10180
+ <xsl:apply-templates/>
10181
+ </xsl:if>
10074
10182
  </xsl:template>
10075
10183
 
10076
10184
  <xsl:template match="*[local-name() = 'admitted']">
@@ -10118,6 +10226,29 @@
10118
10226
  <!-- END definition -->
10119
10227
  <!-- ========== -->
10120
10228
 
10229
+ <xsl:variable name="reviews_">
10230
+ <xsl:for-each select="//*[local-name() = 'review'][@from]">
10231
+ <xsl:copy>
10232
+ <xsl:copy-of select="@from"/>
10233
+ <xsl:copy-of select="@id"/>
10234
+ </xsl:copy>
10235
+ </xsl:for-each>
10236
+ </xsl:variable>
10237
+ <xsl:variable name="reviews" select="xalan:nodeset($reviews_)"/>
10238
+
10239
+ <xsl:template name="addReviewHelper">
10240
+ <!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
10241
+ <xsl:variable name="curr_id" select="@id"/>
10242
+ <xsl:variable name="review_id" select="normalize-space($reviews//*[local-name() = 'review'][@from = $curr_id]/@id)"/>
10243
+ <xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
10244
+ <fo:block keep-with-next="always" line-height="0.1" id="{$review_id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$review_id}" fox:alt-text="Annot___{$review_id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
10245
+ </xsl:if>
10246
+ <!-- <fo:block>
10247
+ <curr_id><xsl:value-of select="$curr_id"/></curr_id>
10248
+ <xsl:copy-of select="$reviews"/>
10249
+ </fo:block> -->
10250
+ </xsl:template>
10251
+
10121
10252
  <!-- main sections -->
10122
10253
  <xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
10123
10254
 
@@ -10126,6 +10257,8 @@
10126
10257
 
10127
10258
  <xsl:call-template name="sections_element_style"/>
10128
10259
 
10260
+ <xsl:call-template name="addReviewHelper"/>
10261
+
10129
10262
  <xsl:apply-templates/>
10130
10263
  </fo:block>
10131
10264
 
@@ -10166,6 +10299,7 @@
10166
10299
 
10167
10300
  <fo:block>
10168
10301
  <xsl:call-template name="setId"/>
10302
+ <xsl:call-template name="addReviewHelper"/>
10169
10303
  <xsl:apply-templates/>
10170
10304
  </fo:block>
10171
10305
  </xsl:template>
@@ -10202,6 +10336,8 @@
10202
10336
 
10203
10337
  <xsl:call-template name="refine_clause_style"/>
10204
10338
 
10339
+ <xsl:call-template name="addReviewHelper"/>
10340
+
10205
10341
  <xsl:apply-templates/>
10206
10342
  </fo:block>
10207
10343
  </xsl:template>
@@ -10254,6 +10390,23 @@
10254
10390
 
10255
10391
  <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
10256
10392
 
10393
+ <xsl:if test="1 = 1">
10394
+ <xsl:choose>
10395
+ <!-- if there isn't the attribute '@from', then -->
10396
+ <xsl:when test="$id_from = ''">
10397
+ <fo:block id="{@id}" font-size="1pt" role="SKIP"><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>
10398
+ </xsl:when>
10399
+ <!-- if there isn't element with id 'from', then create 'bookmark' here -->
10400
+ <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
10401
+ <fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
10402
+ </xsl:when>
10403
+ <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
10404
+ <fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
10405
+ </xsl:when>
10406
+ </xsl:choose>
10407
+ </xsl:if>
10408
+
10409
+ <xsl:if test="1 = 2">
10257
10410
  <xsl:choose>
10258
10411
  <!-- if there isn't the attribute '@from', then -->
10259
10412
  <xsl:when test="$id_from = ''">
@@ -10267,6 +10420,7 @@
10267
10420
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
10268
10421
  </xsl:when>
10269
10422
  </xsl:choose>
10423
+ </xsl:if>
10270
10424
 
10271
10425
  </xsl:template>
10272
10426
 
@@ -11632,7 +11786,7 @@
11632
11786
  <!-- remove preprocess-xslt -->
11633
11787
  <xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
11634
11788
 
11635
- <xsl:template match="*[local-name() = 'stem'] | *[local-name() = 'image'] | *[local-name() = 'sourcecode'] | *[local-name() = 'bibdata'] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
11789
+ <xsl:template match="*[local-name() = 'stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])] | *[local-name() = 'image'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'sourcecode'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'bibdata'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
11636
11790
  <xsl:copy-of select="."/>
11637
11791
  </xsl:template>
11638
11792
 
@@ -11698,6 +11852,22 @@
11698
11852
  </xsl:choose>
11699
11853
  </xsl:template>
11700
11854
 
11855
+ <xsl:variable name="regex_passthrough">.*\bpdf\b.*</xsl:variable>
11856
+ <xsl:template match="*[local-name() = 'passthrough']" mode="update_xml_step1">
11857
+ <!-- <xsl:if test="contains(@formats, ' pdf ')"> -->
11858
+ <xsl:if test="normalize-space(java:matches(java:java.lang.String.new(@formats), $regex_passthrough)) = 'true'">
11859
+ <xsl:apply-templates mode="update_xml_step1"/>
11860
+ </xsl:if>
11861
+ </xsl:template>
11862
+
11863
+ <!-- split math by element with @linebreak into maths -->
11864
+ <xsl:template match="mathml:math[.//mathml:mo[@linebreak] or .//mathml:mspace[@linebreak]]" mode="update_xml_step1">
11865
+ <xsl:variable name="maths">
11866
+ <xsl:apply-templates select="." mode="mathml_linebreak"/>
11867
+ </xsl:variable>
11868
+ <xsl:copy-of select="$maths"/>
11869
+ </xsl:template>
11870
+
11701
11871
  <!-- =========================================================================== -->
11702
11872
  <!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
11703
11873
  <!-- =========================================================================== -->
@@ -11801,6 +11971,8 @@
11801
11971
 
11802
11972
  <xsl:template name="insertOpeningElements">
11803
11973
  <xsl:param name="tree"/>
11974
+ <xsl:param name="xmlns"/>
11975
+ <xsl:param name="add_continue">true</xsl:param>
11804
11976
  <xsl:for-each select="$tree//element">
11805
11977
  <xsl:text disable-output-escaping="yes">&lt;</xsl:text>
11806
11978
  <xsl:value-of select="."/>
@@ -11811,7 +11983,8 @@
11811
11983
  <xsl:value-of select="."/>
11812
11984
  <xsl:text>"</xsl:text>
11813
11985
  </xsl:for-each>
11814
- <xsl:if test="position() = 1"> continue="true"</xsl:if>
11986
+ <xsl:if test="position() = 1 and $add_continue = 'true'"> continue="true"</xsl:if>
11987
+ <xsl:if test="position() = 1 and $xmlns != ''"> xmlns="<xsl:value-of select="$xmlns"/>"</xsl:if>
11815
11988
  <xsl:text disable-output-escaping="yes">&gt;</xsl:text>
11816
11989
  <xsl:if test="$debug = 'true'">
11817
11990
  <xsl:message>&lt;<xsl:value-of select="."/>&gt;</xsl:message>
@@ -153,7 +153,7 @@ module IsoDoc
153
153
  end
154
154
 
155
155
  def bibliography_bibitem_number_skip(bibitem)
156
- @xrefs.klass.implicit_reference(bibitem) ||
156
+ implicit_reference(bibitem) ||
157
157
  bibitem.at(ns(".//docidentifier[@type = 'metanorma-ordinal']")) ||
158
158
  bibitem["hidden"] == "true" || bibitem.parent["hidden"] == "true"
159
159
  end
@@ -207,6 +207,24 @@ module IsoDoc
207
207
  b["unnumbered"] = true
208
208
  end
209
209
 
210
+ def note_delim(_elem)
211
+ ":<tab/>"
212
+ end
213
+
214
+ def reference_name(ref)
215
+ super
216
+ ogc_draft_ref?(ref) or return
217
+ @xrefs.get[ref["id"]] =
218
+ { xref: "#{@xrefs.get[ref['id']][:xref]} (draft)" }
219
+ end
220
+
221
+ def ogc_draft_ref?(ref)
222
+ ref.at(ns("./docidentifier[@type = 'OGC']")) or return
223
+ status = ref.at(ns("./status/stage"))&.text or return
224
+ %w(approved published deprecated retired).include? status and return
225
+ true
226
+ end
227
+
210
228
  include Init
211
229
  end
212
230
  end
@@ -91,13 +91,6 @@ module IsoDoc
91
91
  end
92
92
  end
93
93
 
94
- def reference_names(ref)
95
- super
96
- return unless @klass.ogc_draft_ref?(ref)
97
-
98
- @anchors[ref["id"]] = { xref: "#{@anchors[ref['id']][:xref]} (draft)" }
99
- end
100
-
101
94
  def sequential_permission_body(id, block, label, klass, model,
102
95
  container: false)
103
96
  @anchors[block["id"]] = model.postprocess_anchor_struct(
@@ -1783,9 +1783,21 @@ that the `number` given for the series applies to the second iteration of number
1783
1783
  May be used to differentiate rendering of notes in bibliographies</a:documentation>
1784
1784
  </attribute>
1785
1785
  </optional>
1786
- <ref name="LocalizedMarkedUpString">
1786
+ <ref name="LocalizedStringAttributes">
1787
1787
  <a:documentation>The content of the note</a:documentation>
1788
1788
  </ref>
1789
+ <choice>
1790
+ <oneOrMore>
1791
+ <ref name="BasicBlockNoId">
1792
+ <a:documentation>Multiple blocks of content</a:documentation>
1793
+ </ref>
1794
+ </oneOrMore>
1795
+ <oneOrMore>
1796
+ <ref name="TextElement">
1797
+ <a:documentation>Single block of content</a:documentation>
1798
+ </ref>
1799
+ </oneOrMore>
1800
+ </choice>
1789
1801
  </element>
1790
1802
  </define>
1791
1803
  <define name="bibabstract">
@@ -17,7 +17,7 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v1.3.4 -->
20
+ <!-- VERSION v1.4.0 -->
21
21
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
@@ -326,7 +326,7 @@ normative or informative references, some split references into sections organiz
326
326
  <a:documentation>Content of note</a:documentation>
327
327
  <oneOrMore>
328
328
  <choice>
329
- <ref name="paragraph"/>
329
+ <ref name="paragraph-with-footnote"/>
330
330
  <ref name="ul"/>
331
331
  <ref name="ol"/>
332
332
  <ref name="dl"/>
@@ -412,7 +412,7 @@ normative or informative references, some split references into sections organiz
412
412
  <element name="note">
413
413
  <ref name="OptionalId"/>
414
414
  <oneOrMore>
415
- <ref name="paragraph"/>
415
+ <ref name="paragraph-with-footnote"/>
416
416
  </oneOrMore>
417
417
  </element>
418
418
  </define>
@@ -1977,7 +1977,7 @@ used in document amendments</a:documentation>
1977
1977
  <oneOrMore>
1978
1978
  <choice>
1979
1979
  <a:documentation>Content of the verbal representation of the term</a:documentation>
1980
- <ref name="paragraph"/>
1980
+ <ref name="paragraph-with-footnote"/>
1981
1981
  <ref name="dl"/>
1982
1982
  <ref name="ol"/>
1983
1983
  <ref name="ul"/>
@@ -2015,7 +2015,7 @@ used in document amendments</a:documentation>
2015
2015
  <oneOrMore>
2016
2016
  <choice>
2017
2017
  <a:documentation>Content of the term note</a:documentation>
2018
- <ref name="paragraph"/>
2018
+ <ref name="paragraph-with-footnote"/>
2019
2019
  <ref name="ul"/>
2020
2020
  <ref name="ol"/>
2021
2021
  <ref name="dl"/>
@@ -2037,7 +2037,7 @@ used in document amendments</a:documentation>
2037
2037
  <ref name="dl"/>
2038
2038
  <ref name="quote"/>
2039
2039
  <ref name="sourcecode"/>
2040
- <ref name="paragraph"/>
2040
+ <ref name="paragraph-with-footnote"/>
2041
2041
  <ref name="figure"/>
2042
2042
  </choice>
2043
2043
  </oneOrMore>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ogc
3
- VERSION = "2.6.5".freeze
3
+ VERSION = "2.6.6".freeze
4
4
  end
5
5
  end
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
27
27
 
28
28
  spec.add_dependency "iso-639"
29
- spec.add_dependency "metanorma-standoc", "~> 2.9.3"
29
+ spec.add_dependency "metanorma-standoc", "~> 2.10.0"
30
30
 
31
31
  spec.add_development_dependency "debug"
32
32
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
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.6.5
4
+ version: 2.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-28 00:00:00.000000000 Z
11
+ date: 2024-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.9.3
33
+ version: 2.10.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 2.9.3
40
+ version: 2.10.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: debug
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -252,7 +252,6 @@ files:
252
252
  - lib/isodoc/ogc/html/ogc.scss
253
253
  - lib/isodoc/ogc/html/ogc_wp.css
254
254
  - lib/isodoc/ogc/html/ogc_wp.scss
255
- - lib/isodoc/ogc/html/preprocess.xslt
256
255
  - lib/isodoc/ogc/html/rouge.css
257
256
  - lib/isodoc/ogc/html/scripts.html
258
257
  - lib/isodoc/ogc/html/word_ogc_intro.html
@@ -1,13 +0,0 @@
1
- <preprocess-xslt>
2
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:mn="https://www.metanorma.org/ns/ogc" version="1.0">
3
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
4
- <xsl:preserve-space elements="*"/>
5
- <xsl:template match="@* | node()">
6
- <xsl:copy><xsl:apply-templates select="@* | node()"/></xsl:copy>
7
- </xsl:template>
8
- <xsl:template match="mn:note/mn:name">
9
- <xsl:copy><xsl:apply-templates select="@*|node()"/><xsl:if test="normalize-space() != ''">:<mn:tab/></xsl:if></xsl:copy>
10
- </xsl:template>
11
- </xsl:stylesheet>
12
- </preprocess-xslt>
13
-