metanorma-ogc 2.3.1 → 2.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
 
3
3
  <xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/>
4
4
 
5
- <xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" use="@reference"/>
5
+ <xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure' or local-name() = 'localized-strings')] and not(ancestor::*[local-name() = 'name']))]" use="@reference"/>
6
6
 
7
7
  <xsl:variable name="debug">false</xsl:variable>
8
8
 
@@ -685,14 +685,14 @@
685
685
  BUT DON'T put any another conditions together with $namespace = '...' (such conditions will be ignored). For another conditions, please use nested xsl:if or xsl:choose -->
686
686
 
687
687
  <!--
688
- <misc-container>
688
+ <metanorma-extension>
689
689
  <presentation-metadata>
690
690
  <papersize>letter</papersize>
691
691
  </presentation-metadata>
692
- </misc-container>
692
+ </metanorma-extension>
693
693
  -->
694
694
 
695
- <xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/>
695
+ <xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/>
696
696
  <xsl:variable name="papersize_width_">
697
697
  <xsl:choose>
698
698
  <xsl:when test="$papersize = 'letter'">215.9</xsl:when>
@@ -809,7 +809,7 @@
809
809
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
810
810
 
811
811
  <xsl:variable name="title-list-tables">
812
- <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
812
+ <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
813
813
  <xsl:value-of select="$toc_table_title"/>
814
814
  <xsl:if test="normalize-space($toc_table_title) = ''">
815
815
  <xsl:call-template name="getTitle">
@@ -819,7 +819,7 @@
819
819
  </xsl:variable>
820
820
 
821
821
  <xsl:variable name="title-list-figures">
822
- <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
822
+ <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
823
823
  <xsl:value-of select="$toc_figure_title"/>
824
824
  <xsl:if test="normalize-space($toc_figure_title) = ''">
825
825
  <xsl:call-template name="getTitle">
@@ -829,7 +829,7 @@
829
829
  </xsl:variable>
830
830
 
831
831
  <xsl:variable name="title-list-recommendations">
832
- <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
832
+ <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
833
833
  <xsl:value-of select="$toc_requirement_title"/>
834
834
  <xsl:if test="normalize-space($toc_requirement_title) = ''">
835
835
  <xsl:call-template name="getTitle">
@@ -901,7 +901,7 @@
901
901
  <xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
902
902
 
903
903
  <xsl:variable name="additional_fonts_">
904
- <xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[contains(local-name(), '-standard')][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
904
+ <xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[contains(local-name(), '-standard')][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
905
905
  <xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
906
906
  </xsl:for-each>
907
907
  </xsl:variable>
@@ -1429,7 +1429,7 @@
1429
1429
 
1430
1430
  <xsl:attribute-set name="note-name-style">
1431
1431
 
1432
- <xsl:attribute name="padding-right">4mm</xsl:attribute>
1432
+ <!-- <xsl:attribute name="padding-right">4mm</xsl:attribute> -->
1433
1433
 
1434
1434
  </xsl:attribute-set>
1435
1435
 
@@ -2070,10 +2070,10 @@
2070
2070
 
2071
2071
  <xsl:template name="processTablesFigures_Contents">
2072
2072
  <xsl:param name="always"/>
2073
- <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
2073
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
2074
2074
  <xsl:call-template name="processTables_Contents"/>
2075
2075
  </xsl:if>
2076
- <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
2076
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
2077
2077
  <xsl:call-template name="processFigures_Contents"/>
2078
2078
  </xsl:if>
2079
2079
  </xsl:template>
@@ -2439,6 +2439,8 @@
2439
2439
 
2440
2440
  <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
2441
2441
 
2442
+ <xsl:call-template name="setBordersTableArray"/>
2443
+
2442
2444
  </xsl:element>
2443
2445
  </xsl:variable>
2444
2446
 
@@ -2582,6 +2584,10 @@
2582
2584
 
2583
2585
  </xsl:template>
2584
2586
 
2587
+ <xsl:template name="setBordersTableArray">
2588
+
2589
+ </xsl:template>
2590
+
2585
2591
  <xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
2586
2592
  <xsl:param name="continued"/>
2587
2593
  <xsl:if test="normalize-space() != ''">
@@ -3056,6 +3062,8 @@
3056
3062
  <fo:table-row>
3057
3063
  <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
3058
3064
 
3065
+ <xsl:call-template name="setBordersTableArray"/>
3066
+
3059
3067
  <!-- fn will be processed inside 'note' processing -->
3060
3068
 
3061
3069
  <!-- for BSI (not PAS) display Notes before footnotes -->
@@ -3177,6 +3185,8 @@
3177
3185
  <xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
3178
3186
  <fo:table-row xsl:use-attribute-sets="table-header-row-style">
3179
3187
 
3188
+ <xsl:call-template name="setBordersTableArray"/>
3189
+
3180
3190
  <xsl:call-template name="setTableRowAttributes"/>
3181
3191
 
3182
3192
  <xsl:apply-templates/>
@@ -3200,6 +3210,8 @@
3200
3210
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3201
3211
  </xsl:if>
3202
3212
 
3213
+ <xsl:call-template name="setBordersTableArray"/>
3214
+
3203
3215
  <xsl:call-template name="setTableRowAttributes"/>
3204
3216
  <xsl:apply-templates/>
3205
3217
  </fo:table-row>
@@ -3219,6 +3231,8 @@
3219
3231
  <xsl:with-param name="default">center</xsl:with-param>
3220
3232
  </xsl:call-template>
3221
3233
 
3234
+ <xsl:call-template name="setBordersTableArray"/>
3235
+
3222
3236
  <xsl:if test="$lang = 'ar'">
3223
3237
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3224
3238
  </xsl:if>
@@ -3271,6 +3285,8 @@
3271
3285
 
3272
3286
  <!-- bsi -->
3273
3287
 
3288
+ <xsl:call-template name="setBordersTableArray"/>
3289
+
3274
3290
  <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
3275
3291
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3276
3292
  </xsl:if>
@@ -3325,7 +3341,7 @@
3325
3341
  </fn>
3326
3342
  -->
3327
3343
  <!-- footnotes in text (title, bibliography, main body, table's, figure's names), not for tables, figures -->
3328
- <xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" priority="2" name="fn">
3344
+ <xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))]" priority="2" name="fn">
3329
3345
 
3330
3346
  <!-- list of footnotes to calculate actual footnotes number -->
3331
3347
  <xsl:variable name="p_fn_">
@@ -3382,8 +3398,7 @@
3382
3398
  </fo:basic-link>
3383
3399
  </fo:inline>
3384
3400
  </xsl:variable>
3385
- <!-- DEBUG: p_fn=<xsl:copy-of select="$p_fn"/>
3386
- gen_id=<xsl:value-of select="$gen_id"/> -->
3401
+
3387
3402
  <xsl:choose>
3388
3403
  <xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
3389
3404
  <xsl:copy-of select="$footnote_inline"/>
@@ -3438,7 +3453,7 @@
3438
3453
  <!-- commented:
3439
3454
  .//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
3440
3455
  because 'fn' there is in biblio-tag -->
3441
- <xsl:for-each select=".//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
3456
+ <xsl:for-each select=".//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
3442
3457
  <!-- copy unique fn -->
3443
3458
  <fn gen_id="{generate-id(.)}">
3444
3459
  <xsl:copy-of select="@*"/>
@@ -5996,7 +6011,9 @@
5996
6011
 
5997
6012
  <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
5998
6013
  <xsl:if test="number($scale) &lt; 100">
5999
- <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
6014
+
6015
+ <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
6016
+
6000
6017
  </xsl:if>
6001
6018
 
6002
6019
  </xsl:if>
@@ -6917,7 +6934,7 @@
6917
6934
  <!-- sourcecode -->
6918
6935
  <!-- =============== -->
6919
6936
 
6920
- <xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'source-highlighter-css']"/>
6937
+ <xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
6921
6938
  <xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
6922
6939
  <xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
6923
6940
 
@@ -6938,7 +6955,7 @@
6938
6955
  </xsl:if> -->
6939
6956
 
6940
6957
  <xsl:choose>
6941
- <xsl:when test="ancestor::*[local-name() = 'table'][not(@type = 'sourcecode')]">8.5</xsl:when>
6958
+ <xsl:when test="ancestor::*[local-name() = 'table'][not(parent::*[local-name() = 'sourcecode'][@linenums = 'true'])]">8.5</xsl:when>
6942
6959
  <xsl:otherwise>9.5</xsl:otherwise>
6943
6960
  </xsl:choose>
6944
6961
 
@@ -7009,6 +7026,12 @@
7009
7026
  </xsl:attribute>
7010
7027
  </xsl:for-each>
7011
7028
 
7029
+ <!-- remove margin between rows in the table with sourcecode line numbers -->
7030
+ <xsl:if test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']">
7031
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
7032
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
7033
+ </xsl:if>
7034
+
7012
7035
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7013
7036
  </fo:block>
7014
7037
 
@@ -7057,7 +7080,7 @@
7057
7080
  </xsl:template>
7058
7081
 
7059
7082
  <!-- outer table with line numbers for sourcecode -->
7060
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']" priority="2">
7083
+ <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] | -->
7061
7084
  <fo:block>
7062
7085
  <fo:table width="100%" table-layout="fixed">
7063
7086
  <xsl:copy-of select="@id"/>
@@ -7069,16 +7092,16 @@
7069
7092
  </fo:table>
7070
7093
  </fo:block>
7071
7094
  </xsl:template>
7072
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody']" priority="2">
7095
+ <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']/*[local-name() = 'tbody']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody'] | -->
7073
7096
  <xsl:apply-templates/>
7074
7097
  </xsl:template>
7075
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']" priority="2">
7098
+ <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr'] | -->
7076
7099
  <fo:table-row>
7077
7100
  <xsl:apply-templates/>
7078
7101
  </fo:table-row>
7079
7102
  </xsl:template>
7080
7103
  <!-- first td with line numbers -->
7081
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']/*[local-name()='td'][not(preceding-sibling::*)]" priority="2">
7104
+ <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']/*[local-name()='td'][not(preceding-sibling::*)]" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
7082
7105
  <fo:table-cell>
7083
7106
  <fo:block>
7084
7107
 
@@ -7098,8 +7121,9 @@
7098
7121
  </fo:block>
7099
7122
  </fo:table-cell>
7100
7123
  </xsl:template>
7124
+
7101
7125
  <!-- second td with sourcecode -->
7102
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']/*[local-name()='td'][preceding-sibling::*]" priority="2">
7126
+ <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']/*[local-name()='td'][preceding-sibling::*]" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
7103
7127
  <fo:table-cell>
7104
7128
  <fo:block>
7105
7129
  <xsl:apply-templates/>
@@ -7337,7 +7361,25 @@
7337
7361
  <xsl:template match="*[local-name()='pre']" name="pre">
7338
7362
  <fo:block xsl:use-attribute-sets="pre-style">
7339
7363
  <xsl:copy-of select="@id"/>
7340
- <xsl:apply-templates/>
7364
+ <xsl:choose>
7365
+
7366
+ <xsl:when test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name()='td'][1][not(preceding-sibling::*)]"> <!-- pre in the first td in the table with @linenums = 'true' -->
7367
+ <xsl:if test="ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']"> <!-- is current tr isn't last -->
7368
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
7369
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
7370
+ </xsl:if>
7371
+ <fo:instream-foreign-object fox:alt-text="{.}" content-width="95%">
7372
+ <math xmlns="http://www.w3.org/1998/Math/MathML">
7373
+ <mtext><xsl:value-of select="."/></mtext>
7374
+ </math>
7375
+ </fo:instream-foreign-object>
7376
+ </xsl:when>
7377
+
7378
+ <xsl:otherwise>
7379
+ <xsl:apply-templates/>
7380
+ </xsl:otherwise>
7381
+
7382
+ </xsl:choose>
7341
7383
  </fo:block>
7342
7384
  </xsl:template>
7343
7385
  <!-- =============== -->
@@ -8044,6 +8086,7 @@
8044
8086
  <xsl:variable name="padding">
8045
8087
 
8046
8088
  <xsl:choose>
8089
+ <xsl:when test="ancestor::*[local-name() = 'note'] and ancestor::*[local-name() = 'name']">4</xsl:when>
8047
8090
  <xsl:when test="$depth &gt;= 5"/>
8048
8091
  <xsl:when test="$depth &gt;= 4">5</xsl:when>
8049
8092
  <xsl:when test="$depth &gt;= 3 and ancestor::ogc:terms">3</xsl:when>
@@ -8981,8 +9024,8 @@
8981
9024
 
8982
9025
  <xsl:variable name="toc_level">
8983
9026
  <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
8984
- <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:-->
8985
- <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 -->
9027
+ <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[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:-->
9028
+ <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
8986
9029
  <xsl:choose>
8987
9030
  <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
8988
9031
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
@@ -9974,6 +10017,7 @@
9974
10017
  <xsl:choose>
9975
10018
  <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
9976
10019
  <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
10020
+ <xsl:when test="$align = 'justified'">justify</xsl:when>
9977
10021
  <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
9978
10022
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
9979
10023
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
@@ -1316,7 +1316,7 @@
1316
1316
  <value>commentaryOf</value>
1317
1317
  <value>hasCommentary</value>
1318
1318
  <value>related</value>
1319
- <value>complements</value>
1319
+ <value>hasComplement</value>
1320
1320
  <value>complementOf</value>
1321
1321
  <value>obsoletes</value>
1322
1322
  <value>obsoletedBy</value>
@@ -145,14 +145,12 @@ module Metanorma
145
145
 
146
146
  PUBLISHER = "./contributor[role/@type = 'publisher']/organization".freeze
147
147
 
148
- OTHERIDS = "@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or " \
149
- "@type = 'ISBN'".freeze
150
-
151
148
  def pub_class(bib)
152
149
  return 1 if bib.at("#{PUBLISHER}[abbreviation = 'OGC']")
153
150
  return 1 if bib.at("#{PUBLISHER}[name = 'Open Geospatial " \
154
151
  "Consortium']")
155
- return 2 if bib.at("./docidentifier[@type][not(#{OTHERIDS})]")
152
+ return 2 if bib.at("./docidentifier[@type][not(#{skip_docid} or " \
153
+ "@type = 'metanorma')]")
156
154
 
157
155
  3
158
156
  end
@@ -195,7 +193,7 @@ module Metanorma
195
193
 
196
194
  def sort_biblio_ids_key(bib)
197
195
  id = bib.at("./docidentifier[@primary]") ||
198
- bib.at("./docidentifier[not(#{OTHERIDS})]")
196
+ bib.at("./docidentifier[not(#{skip_docid} or @type = 'metanorma')]")
199
197
  metaid = bib.at("./docidentifier[@type = 'metanorma']")&.text
200
198
  /\d-(?<partid>\d+)/ =~ id&.text
201
199
  { id: id&.text,
@@ -1580,7 +1580,7 @@
1580
1580
  </element>
1581
1581
  </define>
1582
1582
  <define name="misccontainer">
1583
- <element name="misc-container">
1583
+ <element name="metanorma-extension">
1584
1584
  <oneOrMore>
1585
1585
  <ref name="AnyElement"/>
1586
1586
  </oneOrMore>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ogc
3
- VERSION = "2.3.1".freeze
3
+ VERSION = "2.3.3".freeze
4
4
  end
5
5
  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.1
4
+ version: 2.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-19 00:00:00.000000000 Z
11
+ date: 2023-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639