metanorma-ogc 2.3.2 → 2.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -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>
@@ -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>
@@ -6918,7 +6934,7 @@
6918
6934
  <!-- sourcecode -->
6919
6935
  <!-- =============== -->
6920
6936
 
6921
- <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']"/>
6922
6938
  <xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
6923
6939
  <xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
6924
6940
 
@@ -9008,8 +9024,8 @@
9008
9024
 
9009
9025
  <xsl:variable name="toc_level">
9010
9026
  <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
9011
- <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:-->
9012
- <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 -->
9013
9029
  <xsl:choose>
9014
9030
  <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
9015
9031
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
@@ -10001,6 +10017,7 @@
10001
10017
  <xsl:choose>
10002
10018
  <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
10003
10019
  <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
10020
+ <xsl:when test="$align = 'justified'">justify</xsl:when>
10004
10021
  <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
10005
10022
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
10006
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.2".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.2
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-30 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