metanorma-ogc 2.3.1 → 2.3.2

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
 
@@ -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
 
@@ -3325,7 +3325,7 @@
3325
3325
  </fn>
3326
3326
  -->
3327
3327
  <!-- 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">
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">
3329
3329
 
3330
3330
  <!-- list of footnotes to calculate actual footnotes number -->
3331
3331
  <xsl:variable name="p_fn_">
@@ -3382,8 +3382,7 @@
3382
3382
  </fo:basic-link>
3383
3383
  </fo:inline>
3384
3384
  </xsl:variable>
3385
- <!-- DEBUG: p_fn=<xsl:copy-of select="$p_fn"/>
3386
- gen_id=<xsl:value-of select="$gen_id"/> -->
3385
+
3387
3386
  <xsl:choose>
3388
3387
  <xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
3389
3388
  <xsl:copy-of select="$footnote_inline"/>
@@ -3438,7 +3437,7 @@
3438
3437
  <!-- commented:
3439
3438
  .//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
3440
3439
  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])]">
3440
+ <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
3441
  <!-- copy unique fn -->
3443
3442
  <fn gen_id="{generate-id(.)}">
3444
3443
  <xsl:copy-of select="@*"/>
@@ -5996,7 +5995,9 @@
5996
5995
 
5997
5996
  <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
5998
5997
  <xsl:if test="number($scale) &lt; 100">
5999
- <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
5998
+
5999
+ <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
6000
+
6000
6001
  </xsl:if>
6001
6002
 
6002
6003
  </xsl:if>
@@ -6938,7 +6939,7 @@
6938
6939
  </xsl:if> -->
6939
6940
 
6940
6941
  <xsl:choose>
6941
- <xsl:when test="ancestor::*[local-name() = 'table'][not(@type = 'sourcecode')]">8.5</xsl:when>
6942
+ <xsl:when test="ancestor::*[local-name() = 'table'][not(parent::*[local-name() = 'sourcecode'][@linenums = 'true'])]">8.5</xsl:when>
6942
6943
  <xsl:otherwise>9.5</xsl:otherwise>
6943
6944
  </xsl:choose>
6944
6945
 
@@ -7009,6 +7010,12 @@
7009
7010
  </xsl:attribute>
7010
7011
  </xsl:for-each>
7011
7012
 
7013
+ <!-- remove margin between rows in the table with sourcecode line numbers -->
7014
+ <xsl:if test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']">
7015
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
7016
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
7017
+ </xsl:if>
7018
+
7012
7019
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7013
7020
  </fo:block>
7014
7021
 
@@ -7057,7 +7064,7 @@
7057
7064
  </xsl:template>
7058
7065
 
7059
7066
  <!-- outer table with line numbers for sourcecode -->
7060
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']" priority="2">
7067
+ <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] | -->
7061
7068
  <fo:block>
7062
7069
  <fo:table width="100%" table-layout="fixed">
7063
7070
  <xsl:copy-of select="@id"/>
@@ -7069,16 +7076,16 @@
7069
7076
  </fo:table>
7070
7077
  </fo:block>
7071
7078
  </xsl:template>
7072
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody']" priority="2">
7079
+ <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
7080
  <xsl:apply-templates/>
7074
7081
  </xsl:template>
7075
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']" priority="2">
7082
+ <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
7083
  <fo:table-row>
7077
7084
  <xsl:apply-templates/>
7078
7085
  </fo:table-row>
7079
7086
  </xsl:template>
7080
7087
  <!-- 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">
7088
+ <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
7089
  <fo:table-cell>
7083
7090
  <fo:block>
7084
7091
 
@@ -7098,8 +7105,9 @@
7098
7105
  </fo:block>
7099
7106
  </fo:table-cell>
7100
7107
  </xsl:template>
7108
+
7101
7109
  <!-- second td with sourcecode -->
7102
- <xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']/*[local-name()='td'][preceding-sibling::*]" priority="2">
7110
+ <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
7111
  <fo:table-cell>
7104
7112
  <fo:block>
7105
7113
  <xsl:apply-templates/>
@@ -7337,7 +7345,25 @@
7337
7345
  <xsl:template match="*[local-name()='pre']" name="pre">
7338
7346
  <fo:block xsl:use-attribute-sets="pre-style">
7339
7347
  <xsl:copy-of select="@id"/>
7340
- <xsl:apply-templates/>
7348
+ <xsl:choose>
7349
+
7350
+ <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' -->
7351
+ <xsl:if test="ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']"> <!-- is current tr isn't last -->
7352
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
7353
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
7354
+ </xsl:if>
7355
+ <fo:instream-foreign-object fox:alt-text="{.}" content-width="95%">
7356
+ <math xmlns="http://www.w3.org/1998/Math/MathML">
7357
+ <mtext><xsl:value-of select="."/></mtext>
7358
+ </math>
7359
+ </fo:instream-foreign-object>
7360
+ </xsl:when>
7361
+
7362
+ <xsl:otherwise>
7363
+ <xsl:apply-templates/>
7364
+ </xsl:otherwise>
7365
+
7366
+ </xsl:choose>
7341
7367
  </fo:block>
7342
7368
  </xsl:template>
7343
7369
  <!-- =============== -->
@@ -8044,6 +8070,7 @@
8044
8070
  <xsl:variable name="padding">
8045
8071
 
8046
8072
  <xsl:choose>
8073
+ <xsl:when test="ancestor::*[local-name() = 'note'] and ancestor::*[local-name() = 'name']">4</xsl:when>
8047
8074
  <xsl:when test="$depth &gt;= 5"/>
8048
8075
  <xsl:when test="$depth &gt;= 4">5</xsl:when>
8049
8076
  <xsl:when test="$depth &gt;= 3 and ancestor::ogc:terms">3</xsl:when>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ogc
3
- VERSION = "2.3.1".freeze
3
+ VERSION = "2.3.2".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.2
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: 2022-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639