metanorma-ieee 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce9955b8968a1534d4fc1b605ee76152571bea23ac0786a21457eef8913b1a18
4
- data.tar.gz: b0a2ba7f21ae16443fd949829d2017868fd2e846267f95ce66dffbeac0516c55
3
+ metadata.gz: 9d385541cb9e78fa0d9483068e986baf934834df10bebd3c9a17264543d82fd8
4
+ data.tar.gz: fdd0216aa35a5619165c08ef254bdaa1683057270afe086854fbbc59cb0727b3
5
5
  SHA512:
6
- metadata.gz: 3178aaf73b61959ef92471f141520518642487cb6bdf0db6851072f6ba7d2b8faae964b7944d17aef5c77300e08dd667eb342a31c42a78f1bbd1fb151d32523c
7
- data.tar.gz: c5585016209917c885b8801a099eb2efaed24d3c8b0ed0e566ee4690c3cb9867f23c6150957610cb3cd475d2ca09fc61d71336b4276580c5c92f79c159314590
6
+ metadata.gz: db131c2d66f6f4778110ddc74ec1ddd09255a7613661b16aeba2b77fc35b636ad3f2196a52acee03d3aa2affaa0d41a2cd809233b9d56a6b5206d116fa054ad6
7
+ data.tar.gz: e7bf261fc7906ba379ce7d26641dcb9e13b03fe34331b21619a47309e50c844a2a8a598a680df4cefd4d6a6c0ab57955b4d475dc0a2a031cf46dbf7f2caf55a9
@@ -3797,14 +3797,14 @@
3797
3797
  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 -->
3798
3798
 
3799
3799
  <!--
3800
- <misc-container>
3800
+ <metanorma-extension>
3801
3801
  <presentation-metadata>
3802
3802
  <papersize>letter</papersize>
3803
3803
  </presentation-metadata>
3804
- </misc-container>
3804
+ </metanorma-extension>
3805
3805
  -->
3806
3806
 
3807
- <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'])))"/>
3807
+ <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'])))"/>
3808
3808
  <xsl:variable name="papersize_width_">
3809
3809
  <xsl:choose>
3810
3810
  <xsl:when test="$papersize = 'letter'">215.9</xsl:when>
@@ -3921,7 +3921,7 @@
3921
3921
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
3922
3922
 
3923
3923
  <xsl:variable name="title-list-tables">
3924
- <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
3924
+ <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
3925
3925
  <xsl:value-of select="$toc_table_title"/>
3926
3926
  <xsl:if test="normalize-space($toc_table_title) = ''">
3927
3927
  <xsl:call-template name="getTitle">
@@ -3931,7 +3931,7 @@
3931
3931
  </xsl:variable>
3932
3932
 
3933
3933
  <xsl:variable name="title-list-figures">
3934
- <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
3934
+ <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
3935
3935
  <xsl:value-of select="$toc_figure_title"/>
3936
3936
  <xsl:if test="normalize-space($toc_figure_title) = ''">
3937
3937
  <xsl:call-template name="getTitle">
@@ -3941,7 +3941,7 @@
3941
3941
  </xsl:variable>
3942
3942
 
3943
3943
  <xsl:variable name="title-list-recommendations">
3944
- <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
3944
+ <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
3945
3945
  <xsl:value-of select="$toc_requirement_title"/>
3946
3946
  <xsl:if test="normalize-space($toc_requirement_title) = ''">
3947
3947
  <xsl:call-template name="getTitle">
@@ -4013,7 +4013,7 @@
4013
4013
  <xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
4014
4014
 
4015
4015
  <xsl:variable name="additional_fonts_">
4016
- <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']">
4016
+ <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']">
4017
4017
  <xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
4018
4018
  </xsl:for-each>
4019
4019
  </xsl:variable>
@@ -5092,10 +5092,10 @@
5092
5092
 
5093
5093
  <xsl:template name="processTablesFigures_Contents">
5094
5094
  <xsl:param name="always"/>
5095
- <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
5095
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
5096
5096
  <xsl:call-template name="processTables_Contents"/>
5097
5097
  </xsl:if>
5098
- <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
5098
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
5099
5099
  <xsl:call-template name="processFigures_Contents"/>
5100
5100
  </xsl:if>
5101
5101
  </xsl:template>
@@ -5444,6 +5444,8 @@
5444
5444
  <xsl:attribute name="border">none</xsl:attribute>
5445
5445
  </xsl:if>
5446
5446
 
5447
+ <xsl:call-template name="setBordersTableArray"/>
5448
+
5447
5449
  </xsl:element>
5448
5450
  </xsl:variable>
5449
5451
 
@@ -5568,6 +5570,10 @@
5568
5570
 
5569
5571
  </xsl:template>
5570
5572
 
5573
+ <xsl:template name="setBordersTableArray">
5574
+
5575
+ </xsl:template>
5576
+
5571
5577
  <xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
5572
5578
  <xsl:param name="continued"/>
5573
5579
  <xsl:if test="normalize-space() != ''">
@@ -6050,6 +6056,8 @@
6050
6056
  <fo:table-row>
6051
6057
  <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
6052
6058
 
6059
+ <xsl:call-template name="setBordersTableArray"/>
6060
+
6053
6061
  <!-- fn will be processed inside 'note' processing -->
6054
6062
 
6055
6063
  <!-- for BSI (not PAS) display Notes before footnotes -->
@@ -6213,6 +6221,8 @@
6213
6221
  <xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
6214
6222
  <fo:table-row xsl:use-attribute-sets="table-header-row-style">
6215
6223
 
6224
+ <xsl:call-template name="setBordersTableArray"/>
6225
+
6216
6226
  <xsl:if test="position() = last()">
6217
6227
  <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
6218
6228
  </xsl:if>
@@ -6247,6 +6257,8 @@
6247
6257
  <xsl:attribute name="min-height">0mm</xsl:attribute>
6248
6258
  </xsl:if>
6249
6259
 
6260
+ <xsl:call-template name="setBordersTableArray"/>
6261
+
6250
6262
  <xsl:call-template name="setTableRowAttributes"/>
6251
6263
  <xsl:apply-templates/>
6252
6264
  </fo:table-row>
@@ -6266,6 +6278,8 @@
6266
6278
  <xsl:with-param name="default">center</xsl:with-param>
6267
6279
  </xsl:call-template>
6268
6280
 
6281
+ <xsl:call-template name="setBordersTableArray"/>
6282
+
6269
6283
  <xsl:if test="$lang = 'ar'">
6270
6284
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
6271
6285
  </xsl:if>
@@ -6325,6 +6339,8 @@
6325
6339
  <xsl:attribute name="border">none</xsl:attribute>
6326
6340
  </xsl:if>
6327
6341
 
6342
+ <xsl:call-template name="setBordersTableArray"/>
6343
+
6328
6344
  <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
6329
6345
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
6330
6346
  </xsl:if>
@@ -9989,7 +10005,7 @@
9989
10005
  <!-- sourcecode -->
9990
10006
  <!-- =============== -->
9991
10007
 
9992
- <xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'source-highlighter-css']"/>
10008
+ <xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
9993
10009
  <xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
9994
10010
  <xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
9995
10011
 
@@ -12066,8 +12082,8 @@
12066
12082
 
12067
12083
  <xsl:variable name="toc_level">
12068
12084
  <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
12069
- <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:-->
12070
- <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 -->
12085
+ <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:-->
12086
+ <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 -->
12071
12087
  <xsl:choose>
12072
12088
  <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
12073
12089
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
@@ -13195,6 +13211,7 @@
13195
13211
  <xsl:choose>
13196
13212
  <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
13197
13213
  <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
13214
+ <xsl:when test="$align = 'justified'">justify</xsl:when>
13198
13215
  <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
13199
13216
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
13200
13217
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
@@ -3797,14 +3797,14 @@
3797
3797
  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 -->
3798
3798
 
3799
3799
  <!--
3800
- <misc-container>
3800
+ <metanorma-extension>
3801
3801
  <presentation-metadata>
3802
3802
  <papersize>letter</papersize>
3803
3803
  </presentation-metadata>
3804
- </misc-container>
3804
+ </metanorma-extension>
3805
3805
  -->
3806
3806
 
3807
- <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'])))"/>
3807
+ <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'])))"/>
3808
3808
  <xsl:variable name="papersize_width_">
3809
3809
  <xsl:choose>
3810
3810
  <xsl:when test="$papersize = 'letter'">215.9</xsl:when>
@@ -3921,7 +3921,7 @@
3921
3921
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
3922
3922
 
3923
3923
  <xsl:variable name="title-list-tables">
3924
- <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
3924
+ <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
3925
3925
  <xsl:value-of select="$toc_table_title"/>
3926
3926
  <xsl:if test="normalize-space($toc_table_title) = ''">
3927
3927
  <xsl:call-template name="getTitle">
@@ -3931,7 +3931,7 @@
3931
3931
  </xsl:variable>
3932
3932
 
3933
3933
  <xsl:variable name="title-list-figures">
3934
- <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
3934
+ <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
3935
3935
  <xsl:value-of select="$toc_figure_title"/>
3936
3936
  <xsl:if test="normalize-space($toc_figure_title) = ''">
3937
3937
  <xsl:call-template name="getTitle">
@@ -3941,7 +3941,7 @@
3941
3941
  </xsl:variable>
3942
3942
 
3943
3943
  <xsl:variable name="title-list-recommendations">
3944
- <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
3944
+ <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
3945
3945
  <xsl:value-of select="$toc_requirement_title"/>
3946
3946
  <xsl:if test="normalize-space($toc_requirement_title) = ''">
3947
3947
  <xsl:call-template name="getTitle">
@@ -4013,7 +4013,7 @@
4013
4013
  <xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
4014
4014
 
4015
4015
  <xsl:variable name="additional_fonts_">
4016
- <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']">
4016
+ <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']">
4017
4017
  <xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
4018
4018
  </xsl:for-each>
4019
4019
  </xsl:variable>
@@ -5092,10 +5092,10 @@
5092
5092
 
5093
5093
  <xsl:template name="processTablesFigures_Contents">
5094
5094
  <xsl:param name="always"/>
5095
- <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
5095
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
5096
5096
  <xsl:call-template name="processTables_Contents"/>
5097
5097
  </xsl:if>
5098
- <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
5098
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
5099
5099
  <xsl:call-template name="processFigures_Contents"/>
5100
5100
  </xsl:if>
5101
5101
  </xsl:template>
@@ -5444,6 +5444,8 @@
5444
5444
  <xsl:attribute name="border">none</xsl:attribute>
5445
5445
  </xsl:if>
5446
5446
 
5447
+ <xsl:call-template name="setBordersTableArray"/>
5448
+
5447
5449
  </xsl:element>
5448
5450
  </xsl:variable>
5449
5451
 
@@ -5568,6 +5570,10 @@
5568
5570
 
5569
5571
  </xsl:template>
5570
5572
 
5573
+ <xsl:template name="setBordersTableArray">
5574
+
5575
+ </xsl:template>
5576
+
5571
5577
  <xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
5572
5578
  <xsl:param name="continued"/>
5573
5579
  <xsl:if test="normalize-space() != ''">
@@ -6050,6 +6056,8 @@
6050
6056
  <fo:table-row>
6051
6057
  <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
6052
6058
 
6059
+ <xsl:call-template name="setBordersTableArray"/>
6060
+
6053
6061
  <!-- fn will be processed inside 'note' processing -->
6054
6062
 
6055
6063
  <!-- for BSI (not PAS) display Notes before footnotes -->
@@ -6213,6 +6221,8 @@
6213
6221
  <xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
6214
6222
  <fo:table-row xsl:use-attribute-sets="table-header-row-style">
6215
6223
 
6224
+ <xsl:call-template name="setBordersTableArray"/>
6225
+
6216
6226
  <xsl:if test="position() = last()">
6217
6227
  <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
6218
6228
  </xsl:if>
@@ -6247,6 +6257,8 @@
6247
6257
  <xsl:attribute name="min-height">0mm</xsl:attribute>
6248
6258
  </xsl:if>
6249
6259
 
6260
+ <xsl:call-template name="setBordersTableArray"/>
6261
+
6250
6262
  <xsl:call-template name="setTableRowAttributes"/>
6251
6263
  <xsl:apply-templates/>
6252
6264
  </fo:table-row>
@@ -6266,6 +6278,8 @@
6266
6278
  <xsl:with-param name="default">center</xsl:with-param>
6267
6279
  </xsl:call-template>
6268
6280
 
6281
+ <xsl:call-template name="setBordersTableArray"/>
6282
+
6269
6283
  <xsl:if test="$lang = 'ar'">
6270
6284
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
6271
6285
  </xsl:if>
@@ -6325,6 +6339,8 @@
6325
6339
  <xsl:attribute name="border">none</xsl:attribute>
6326
6340
  </xsl:if>
6327
6341
 
6342
+ <xsl:call-template name="setBordersTableArray"/>
6343
+
6328
6344
  <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
6329
6345
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
6330
6346
  </xsl:if>
@@ -9989,7 +10005,7 @@
9989
10005
  <!-- sourcecode -->
9990
10006
  <!-- =============== -->
9991
10007
 
9992
- <xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'source-highlighter-css']"/>
10008
+ <xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
9993
10009
  <xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
9994
10010
  <xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
9995
10011
 
@@ -12066,8 +12082,8 @@
12066
12082
 
12067
12083
  <xsl:variable name="toc_level">
12068
12084
  <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
12069
- <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:-->
12070
- <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 -->
12085
+ <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:-->
12086
+ <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 -->
12071
12087
  <xsl:choose>
12072
12088
  <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
12073
12089
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
@@ -13195,6 +13211,7 @@
13195
13211
  <xsl:choose>
13196
13212
  <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
13197
13213
  <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
13214
+ <xsl:when test="$align = 'justified'">justify</xsl:when>
13198
13215
  <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
13199
13216
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
13200
13217
  <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>
@@ -2,8 +2,8 @@ module Metanorma
2
2
  module IEEE
3
3
  class Converter < Standoc::Converter
4
4
  BIBLIO =
5
- "//bibliography/references[@normative = 'false'][not(@hidden)] | "\
6
- "//bibliography/clause[.//references[@normative = 'false']] | "\
5
+ "//bibliography/references[@normative = 'false'][not(@hidden)] | " \
6
+ "//bibliography/clause[.//references[@normative = 'false']] | " \
7
7
  "//annex//references[@normative = 'false'][not(@hidden)]".freeze
8
8
 
9
9
  def boilerplate_cleanup(xmldoc)
@@ -21,39 +21,43 @@ module Metanorma
21
21
  end
22
22
 
23
23
  def sort_biblio(bib)
24
+ @c = HTMLEntities.new
25
+ @i = IsoDoc::IEEE::PresentationXMLConvert
26
+ .new({ lang: @lang, script: @script, locale: @locale })
27
+ @i.i18n_init(@lang, @script, @locale)
24
28
  bib.sort do |a, b|
25
29
  sort_biblio_key(a) <=> sort_biblio_key(b)
26
30
  end
27
31
  end
28
32
 
29
- OTHERIDS = "@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or "\
30
- "@type = 'ISBN'".freeze
31
-
32
33
  # Alphabetic by rendering: author surname or designation, followed by title
33
34
  def sort_biblio_key(bib)
34
35
  name = designator_or_name(bib)
35
36
  title = bib.at("./title[@type = 'main']")&.text ||
36
37
  bib.at("./title")&.text || bib.at("./formattedref")&.text
37
38
  title.gsub!(/[[:punct:]]/, "")
38
- "#{name}. #{title}"
39
+ @c.decode("#{name} #{title}").strip.downcase
39
40
  end
40
41
 
41
42
  def designator_or_name(bib)
42
43
  case bib["type"]
43
- when "standard", "techreport"
44
- n = bib.at("./docidentifier[@primary]") ||
45
- bib.at("./docidentifier[not(#{OTHERIDS})]")
46
- n&.text || "ZZZZ"
44
+ when "standard", "techreport" then designator_docid(bib)
47
45
  else
48
46
  bib1 = bib.dup
49
47
  bib1.add_namespace(nil, self.class::XML_NAMESPACE)
50
- i = IsoDoc::IEEE::PresentationXMLConvert
51
- .new({ lang: @lang, script: @script, locale: @locale })
52
- i.i18n_init(@lang, @script, @locale)
53
- i.creatornames(bib1)
48
+ n = @i.creatornames(bib1)
49
+ n.nil? && bib["type"].nil? and n = designator_docid(bib)
50
+ n
54
51
  end
55
52
  end
56
53
 
54
+ def designator_docid(bib)
55
+ n = bib.at("./docidentifier[@primary]") ||
56
+ bib.at("./docidentifier[not(#{skip_docid})]")
57
+ n or return "ZZZZ"
58
+ @isodoc.docid_prefix(n["type"], n.children.to_xml)
59
+ end
60
+
57
61
  def normref_cleanup(xmldoc)
58
62
  super
59
63
  normref_reorder(xmldoc)
@@ -93,7 +97,7 @@ module Metanorma
93
97
 
94
98
  def biblio_renumber(xmldoc)
95
99
  i = 0
96
- xmldoc.xpath("//references[not(@normative = 'true')]"\
100
+ xmldoc.xpath("//references[not(@normative = 'true')]" \
97
101
  "[not(@hidden = 'true')]").each do |r|
98
102
  r.xpath("./bibitem[not(@hidden = 'true')]").each do |b|
99
103
  i += 1
@@ -103,7 +107,7 @@ module Metanorma
103
107
  end
104
108
 
105
109
  def biblio_renumber1(bib, idx)
106
- docid = bib.at("./docidentifier[@type = 'metanorma' or "\
110
+ docid = bib.at("./docidentifier[@type = 'metanorma' or " \
107
111
  "@type = 'metanorma-ordinal']")
108
112
  if /^\[?\d+\]?$/.match?(docid&.text)
109
113
  docid.children = "[B#{idx}]"
@@ -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 IEEE
3
- VERSION = "1.0.3".freeze
3
+ VERSION = "1.0.4".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ieee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
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-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc