metanorma-csa 2.2.7 → 2.2.8

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: cb85b906d7415059437f5917d7a6819d014559424878cccabbbfadf3ffe9eb7e
4
- data.tar.gz: 914dce6c827dedb30a4e0d8f1ec4ba2d21284200b31df8a29279032e354035b3
3
+ metadata.gz: 1f026cc5f17710b4c86ca73902875e78167064ddb22c104f5ce43af45bf606f0
4
+ data.tar.gz: b47cd012fbbafaf26c67a39315d764f664830c7a51b980ccf5eb1b9ec03d93ab
5
5
  SHA512:
6
- metadata.gz: ddd10adc9ec06af2d72bd0408f313d102c2264e52ef28d7f2d2f649f05c2e0b30c19b130c3d13368a3e52a6405652936cdc19486f49ae0440005f6b5ab6839e0
7
- data.tar.gz: ffece799b10883d9b98e221e2f069897b1429541f6f7397adf5eb65d407f6f94bac59e5a3b1b40a8bdcdfb13f9af42634ecd50a9c0172c78f2f3827487c32fe7
6
+ metadata.gz: 4ddaf09ae0cad9b65114f73cd40cca31cffb3e32e008e4fbea4f2a9f6e514b98fd307c7f9f023909fd71455ee54192837a0693d6fdabd36da4414530a059ff96
7
+ data.tar.gz: bd3a734091c79751787491eccd5cb97045699db76a2c751822eb9e7a1dbe96ac306e5a3e63a206a848fbc4cb4a8e048cd22b11b63c6bec69bb3e4cb5a4a985c2
@@ -1251,6 +1251,7 @@
1251
1251
  </xsl:attribute-set>
1252
1252
 
1253
1253
  <xsl:attribute-set name="xref-style">
1254
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
1254
1255
 
1255
1256
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1256
1257
 
@@ -3254,9 +3255,13 @@
3254
3255
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
3255
3256
  </xsl:if>
3256
3257
 
3257
- <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
3258
- <xsl:value-of select="$current_fn_number_text"/>
3259
- </fo:basic-link>
3258
+ <xsl:call-template name="insert_basic_link">
3259
+ <xsl:with-param name="element">
3260
+ <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
3261
+ <xsl:value-of select="$current_fn_number_text"/>
3262
+ </fo:basic-link>
3263
+ </xsl:with-param>
3264
+ </xsl:call-template>
3260
3265
  </fo:inline>
3261
3266
  </xsl:variable>
3262
3267
 
@@ -3589,8 +3594,10 @@
3589
3594
  <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
3590
3595
  <xsl:text> </xsl:text>
3591
3596
  <xsl:apply-templates select="*[local-name()='dt']/*"/>
3592
- <xsl:text/>
3593
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
3597
+ <xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
3598
+ <xsl:text> </xsl:text>
3599
+ </xsl:if>
3600
+ <xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
3594
3601
  </fo:block>
3595
3602
 
3596
3603
  </xsl:when> <!-- END: only one component -->
@@ -4077,8 +4084,18 @@
4077
4084
  </xsl:if>
4078
4085
  </xsl:template>
4079
4086
 
4080
- <xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
4081
- <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
4087
+ <xsl:template match="*[local-name()='dd']/*" mode="inline">
4088
+ <xsl:variable name="is_inline_element_after_where">
4089
+ <xsl:if test="(local-name() = 'p') and not(preceding-sibling::node()[normalize-space() != ''])">true</xsl:if>
4090
+ </xsl:variable>
4091
+ <xsl:choose>
4092
+ <xsl:when test="$is_inline_element_after_where = 'true'">
4093
+ <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
4094
+ </xsl:when>
4095
+ <xsl:otherwise>
4096
+ <xsl:apply-templates select="."/>
4097
+ </xsl:otherwise>
4098
+ </xsl:choose>
4082
4099
  </xsl:template>
4083
4100
 
4084
4101
  <!-- virtual html table for dl/[dt and dd] for IF (Intermediate Format) -->
@@ -5508,6 +5525,79 @@
5508
5525
  <xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
5509
5526
  </xsl:template>
5510
5527
 
5528
+ <!-- special case for:
5529
+ <math xmlns="http://www.w3.org/1998/Math/MathML">
5530
+ <mstyle displaystyle="true">
5531
+ <msup>
5532
+ <mi color="#00000000">C</mi>
5533
+ <mtext>R</mtext>
5534
+ </msup>
5535
+ <msubsup>
5536
+ <mtext>C</mtext>
5537
+ <mi>n</mi>
5538
+ <mi>k</mi>
5539
+ </msubsup>
5540
+ </mstyle>
5541
+ </math>
5542
+ -->
5543
+ <xsl:template match="mathml:msup/mathml:mi[. = '‌' or . = ''][not(preceding-sibling::*)][following-sibling::mathml:mtext]" mode="mathml">
5544
+ <xsl:copy>
5545
+ <xsl:copy-of select="@*"/>
5546
+ <xsl:variable name="next_mtext" select="ancestor::mathml:msup/following-sibling::*[1][self::mathml:msubsup or self::mathml:msub or self::mathml:msup]/mathml:mtext"/>
5547
+ <xsl:if test="string-length($next_mtext) != ''">
5548
+ <xsl:attribute name="color">#00000000</xsl:attribute>
5549
+ </xsl:if>
5550
+ <xsl:apply-templates/>
5551
+ <xsl:value-of select="$next_mtext"/>
5552
+ </xsl:copy>
5553
+ </xsl:template>
5554
+
5555
+ <!-- special case for:
5556
+ <msup>
5557
+ <mtext/>
5558
+ <mn>1</mn>
5559
+ </msup>
5560
+ convert to (add mspace after mtext and enclose them into mrow):
5561
+ <msup>
5562
+ <mrow>
5563
+ <mtext/>
5564
+ <mspace height="1.47ex"/>
5565
+ </mrow>
5566
+ <mn>1</mn>
5567
+ </msup>
5568
+ -->
5569
+ <xsl:template match="mathml:msup/mathml:mtext[not(preceding-sibling::*)]" mode="mathml">
5570
+ <mathml:mrow>
5571
+ <xsl:copy-of select="."/>
5572
+ <mathml:mspace height="1.47ex"/>
5573
+ </mathml:mrow>
5574
+ </xsl:template>
5575
+
5576
+ <!-- add space around vertical line -->
5577
+ <xsl:template match="mathml:mo[normalize-space(text()) = '|']" mode="mathml">
5578
+ <xsl:copy>
5579
+ <xsl:apply-templates select="@*" mode="mathml"/>
5580
+ <xsl:if test="not(@lspace)">
5581
+ <xsl:attribute name="lspace">0.4em</xsl:attribute>
5582
+ </xsl:if>
5583
+ <xsl:if test="not(@rspace)">
5584
+ <xsl:attribute name="rspace">0.4em</xsl:attribute>
5585
+ </xsl:if>
5586
+ <xsl:apply-templates mode="mathml"/>
5587
+ </xsl:copy>
5588
+ </xsl:template>
5589
+
5590
+ <!-- decrease fontsize for 'Circled Times' char -->
5591
+ <xsl:template match="mathml:mo[normalize-space(text()) = '⊗']" mode="mathml">
5592
+ <xsl:copy>
5593
+ <xsl:apply-templates select="@*" mode="mathml"/>
5594
+ <xsl:if test="not(@fontsize)">
5595
+ <xsl:attribute name="fontsize">55%</xsl:attribute>
5596
+ </xsl:if>
5597
+ <xsl:apply-templates mode="mathml"/>
5598
+ </xsl:copy>
5599
+ </xsl:template>
5600
+
5511
5601
  <!-- Examples:
5512
5602
  <stem type="AsciiMath">x = 1</stem>
5513
5603
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
@@ -5565,19 +5655,23 @@
5565
5655
  <xsl:apply-templates/>
5566
5656
  </xsl:when>
5567
5657
  <xsl:otherwise>
5568
- <fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
5569
- <xsl:choose>
5570
- <xsl:when test="normalize-space(.) = ''">
5571
- <xsl:call-template name="add-zero-spaces-link-java">
5572
- <xsl:with-param name="text" select="$target_text"/>
5573
- </xsl:call-template>
5574
- </xsl:when>
5575
- <xsl:otherwise>
5576
- <!-- output text from <link>text</link> -->
5577
- <xsl:apply-templates/>
5578
- </xsl:otherwise>
5579
- </xsl:choose>
5580
- </fo:basic-link>
5658
+ <xsl:call-template name="insert_basic_link">
5659
+ <xsl:with-param name="element">
5660
+ <fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
5661
+ <xsl:choose>
5662
+ <xsl:when test="normalize-space(.) = ''">
5663
+ <xsl:call-template name="add-zero-spaces-link-java">
5664
+ <xsl:with-param name="text" select="$target_text"/>
5665
+ </xsl:call-template>
5666
+ </xsl:when>
5667
+ <xsl:otherwise>
5668
+ <!-- output text from <link>text</link> -->
5669
+ <xsl:apply-templates/>
5670
+ </xsl:otherwise>
5671
+ </xsl:choose>
5672
+ </fo:basic-link>
5673
+ </xsl:with-param>
5674
+ </xsl:call-template>
5581
5675
  </xsl:otherwise>
5582
5676
  </xsl:choose>
5583
5677
  </fo:inline>
@@ -5640,12 +5734,16 @@
5640
5734
  </xsl:template>
5641
5735
 
5642
5736
  <xsl:template match="*[local-name() = 'xref']">
5643
- <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
5644
- <xsl:if test="parent::*[local-name() = 'add']">
5645
- <xsl:call-template name="append_add-style"/>
5646
- </xsl:if>
5647
- <xsl:apply-templates/>
5648
- </fo:basic-link>
5737
+ <xsl:call-template name="insert_basic_link">
5738
+ <xsl:with-param name="element">
5739
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
5740
+ <xsl:if test="parent::*[local-name() = 'add']">
5741
+ <xsl:call-template name="append_add-style"/>
5742
+ </xsl:if>
5743
+ <xsl:apply-templates/>
5744
+ </fo:basic-link>
5745
+ </xsl:with-param>
5746
+ </xsl:call-template>
5649
5747
  </xsl:template>
5650
5748
 
5651
5749
  <!-- ====== -->
@@ -6030,7 +6128,7 @@
6030
6128
  <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
6031
6129
  </xsl:when>
6032
6130
  <xsl:when test="not(starts-with(@src, 'data:'))">
6033
- <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
6131
+ <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
6034
6132
  </xsl:when>
6035
6133
  <xsl:otherwise>
6036
6134
  <xsl:value-of select="@src"/>
@@ -6052,7 +6150,7 @@
6052
6150
  </xsl:when>
6053
6151
  <xsl:when test="not(starts-with(@src, 'data:'))">
6054
6152
  <xsl:variable name="src">
6055
- <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
6153
+ <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
6056
6154
  </xsl:variable>
6057
6155
  <xsl:variable name="file" select="java:java.io.File.new(@src)"/>
6058
6156
  <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
@@ -6438,15 +6536,19 @@
6438
6536
  <xsl:param name="dest"/>
6439
6537
  <fo:block-container position="absolute" left="{$left}px" top="{$top}px" width="{$width}px" height="{$height}px">
6440
6538
  <fo:block font-size="1pt">
6441
- <fo:basic-link internal-destination="{$dest}" fox:alt-text="svg link">
6442
- <fo:inline-container inline-progression-dimension="100%">
6443
- <fo:block-container height="{$height - 1}px" width="100%">
6444
- <!-- DEBUG <xsl:if test="local-name()='polygon'">
6445
- <xsl:attribute name="background-color">magenta</xsl:attribute>
6446
- </xsl:if> -->
6447
- <fo:block> </fo:block></fo:block-container>
6448
- </fo:inline-container>
6449
- </fo:basic-link>
6539
+ <xsl:call-template name="insert_basic_link">
6540
+ <xsl:with-param name="element">
6541
+ <fo:basic-link internal-destination="{$dest}" fox:alt-text="svg link">
6542
+ <fo:inline-container inline-progression-dimension="100%">
6543
+ <fo:block-container height="{$height - 1}px" width="100%">
6544
+ <!-- DEBUG <xsl:if test="local-name()='polygon'">
6545
+ <xsl:attribute name="background-color">magenta</xsl:attribute>
6546
+ </xsl:if> -->
6547
+ <fo:block> </fo:block></fo:block-container>
6548
+ </fo:inline-container>
6549
+ </fo:basic-link>
6550
+ </xsl:with-param>
6551
+ </xsl:call-template>
6450
6552
  </fo:block>
6451
6553
  </fo:block-container>
6452
6554
  </xsl:template>
@@ -7992,14 +8094,18 @@
7992
8094
  </xsl:template>
7993
8095
 
7994
8096
  <xsl:template match="*[local-name() = 'origin']">
7995
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
7996
- <xsl:if test="normalize-space(@citeas) = ''">
7997
- <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
7998
- </xsl:if>
7999
- <fo:inline xsl:use-attribute-sets="origin-style">
8000
- <xsl:apply-templates/>
8001
- </fo:inline>
8002
- </fo:basic-link>
8097
+ <xsl:call-template name="insert_basic_link">
8098
+ <xsl:with-param name="element">
8099
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
8100
+ <xsl:if test="normalize-space(@citeas) = ''">
8101
+ <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
8102
+ </xsl:if>
8103
+ <fo:inline xsl:use-attribute-sets="origin-style">
8104
+ <xsl:apply-templates/>
8105
+ </fo:inline>
8106
+ </fo:basic-link>
8107
+ </xsl:with-param>
8108
+ </xsl:call-template>
8003
8109
  </xsl:template>
8004
8110
 
8005
8111
  <!-- not using, see https://github.com/glossarist/iev-document/issues/23 -->
@@ -8073,9 +8179,13 @@
8073
8179
  <xsl:if test="../*[local-name() = 'author']">
8074
8180
  <xsl:text>, </xsl:text>
8075
8181
  </xsl:if>
8076
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
8077
- <xsl:apply-templates/>
8078
- </fo:basic-link>
8182
+ <xsl:call-template name="insert_basic_link">
8183
+ <xsl:with-param name="element">
8184
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
8185
+ <xsl:apply-templates/>
8186
+ </fo:basic-link>
8187
+ </xsl:with-param>
8188
+ </xsl:call-template>
8079
8189
  </xsl:template>
8080
8190
 
8081
8191
  <xsl:template match="*[local-name() = 'author']">
@@ -8124,25 +8234,29 @@
8124
8234
  <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
8125
8235
  <xsl:variable name="text" select="normalize-space()"/>
8126
8236
 
8127
- <fo:basic-link fox:alt-text="{@citeas}">
8128
- <xsl:if test="normalize-space(@citeas) = ''">
8129
- <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
8130
- </xsl:if>
8131
- <xsl:if test="@type = 'inline'">
8237
+ <xsl:call-template name="insert_basic_link">
8238
+ <xsl:with-param name="element">
8239
+ <fo:basic-link fox:alt-text="{@citeas}">
8240
+ <xsl:if test="normalize-space(@citeas) = ''">
8241
+ <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
8242
+ </xsl:if>
8243
+ <xsl:if test="@type = 'inline'">
8132
8244
 
8133
- </xsl:if>
8245
+ </xsl:if>
8134
8246
 
8135
- <xsl:choose>
8136
- <xsl:when test="$external-destination != ''"> <!-- external hyperlink -->
8137
- <xsl:attribute name="external-destination"><xsl:value-of select="$external-destination"/></xsl:attribute>
8138
- </xsl:when>
8139
- <xsl:otherwise>
8140
- <xsl:attribute name="internal-destination"><xsl:value-of select="@bibitemid"/></xsl:attribute>
8141
- </xsl:otherwise>
8142
- </xsl:choose>
8247
+ <xsl:choose>
8248
+ <xsl:when test="$external-destination != ''"> <!-- external hyperlink -->
8249
+ <xsl:attribute name="external-destination"><xsl:value-of select="$external-destination"/></xsl:attribute>
8250
+ </xsl:when>
8251
+ <xsl:otherwise>
8252
+ <xsl:attribute name="internal-destination"><xsl:value-of select="@bibitemid"/></xsl:attribute>
8253
+ </xsl:otherwise>
8254
+ </xsl:choose>
8143
8255
 
8144
- <xsl:apply-templates/>
8145
- </fo:basic-link>
8256
+ <xsl:apply-templates/>
8257
+ </fo:basic-link>
8258
+ </xsl:with-param>
8259
+ </xsl:call-template>
8146
8260
 
8147
8261
  </fo:inline>
8148
8262
  </xsl:when>
@@ -8386,7 +8500,10 @@
8386
8500
  <xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/>
8387
8501
 
8388
8502
  <xsl:template name="setULLabel">
8389
- <xsl:variable name="list_level_" select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
8503
+ <xsl:variable name="list_level__">
8504
+ <xsl:value-of select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
8505
+ </xsl:variable>
8506
+ <xsl:variable name="list_level_" select="number($list_level__)"/>
8390
8507
  <xsl:variable name="list_level">
8391
8508
  <xsl:choose>
8392
8509
  <xsl:when test="$list_level_ &lt;= 3"><xsl:value-of select="$list_level_"/></xsl:when>
@@ -8519,9 +8636,11 @@
8519
8636
  </fo:block-container>
8520
8637
  </xsl:when>
8521
8638
  <xsl:otherwise>
8522
- <fo:block>
8523
- <xsl:apply-templates select="." mode="list"/>
8524
- </fo:block>
8639
+
8640
+ <fo:block>
8641
+ <xsl:apply-templates select="." mode="list"/>
8642
+ </fo:block>
8643
+
8525
8644
  </xsl:otherwise>
8526
8645
  </xsl:choose>
8527
8646
  </xsl:template>
@@ -9187,24 +9306,32 @@
9187
9306
  <xsl:for-each select="*[local-name() = 'tab']">
9188
9307
  <xsl:variable name="current_id" select="generate-id()"/>
9189
9308
  <fo:table-cell>
9190
- <fo:block>
9191
- <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
9192
- <xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
9193
- <xsl:choose>
9194
- <xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
9195
- <xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
9196
- </xsl:choose>
9197
- </xsl:for-each>
9198
- </fo:basic-link>
9309
+ <fo:block line-height-shift-adjustment="disregard-shifts">
9310
+ <xsl:call-template name="insert_basic_link">
9311
+ <xsl:with-param name="element">
9312
+ <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
9313
+ <xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
9314
+ <xsl:choose>
9315
+ <xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
9316
+ <xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
9317
+ </xsl:choose>
9318
+ </xsl:for-each>
9319
+ </fo:basic-link>
9320
+ </xsl:with-param>
9321
+ </xsl:call-template>
9199
9322
  </fo:block>
9200
9323
  </fo:table-cell>
9201
9324
  </xsl:for-each>
9202
9325
  <!-- last column - for page numbers -->
9203
9326
  <fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
9204
9327
  <fo:block>
9205
- <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
9206
- <fo:page-number-citation ref-id="{$target}"/>
9207
- </fo:basic-link>
9328
+ <xsl:call-template name="insert_basic_link">
9329
+ <xsl:with-param name="element">
9330
+ <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
9331
+ <fo:page-number-citation ref-id="{$target}"/>
9332
+ </fo:basic-link>
9333
+ </xsl:with-param>
9334
+ </xsl:call-template>
9208
9335
  </fo:block>
9209
9336
  </fo:table-cell>
9210
9337
  </xsl:template>
@@ -9246,6 +9373,27 @@
9246
9373
  <!-- End Table of Contents (ToC) processing -->
9247
9374
  <!-- =================== -->
9248
9375
 
9376
+ <!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
9377
+ <xsl:template name="insert_basic_link">
9378
+ <xsl:param name="element"/>
9379
+ <xsl:variable name="element_node" select="xalan:nodeset($element)"/>
9380
+ <xsl:variable name="external-destination" select="normalize-space(count($element_node/fo:basic-link/@external-destination[. != '']) = 1)"/>
9381
+ <xsl:variable name="internal-destination" select="normalize-space(count($element_node/fo:basic-link/@internal-destination[. != '']) = 1)"/>
9382
+ <xsl:choose>
9383
+ <xsl:when test="$external-destination = 'true' or $internal-destination = 'true'">
9384
+ <xsl:copy-of select="$element_node"/>
9385
+ </xsl:when>
9386
+ <xsl:otherwise>
9387
+ <fo:inline>
9388
+ <xsl:for-each select="$element_node/fo:basic-link/@*[local-name() != 'external-destination' and local-name() != 'internal-destination' and local-name() != 'alt-text']">
9389
+ <xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
9390
+ </xsl:for-each>
9391
+ <xsl:copy-of select="$element_node/fo:basic-link/node()"/>
9392
+ </fo:inline>
9393
+ </xsl:otherwise>
9394
+ </xsl:choose>
9395
+ </xsl:template>
9396
+
9249
9397
  <xsl:template match="*[local-name() = 'variant-title']"/> <!-- [@type = 'sub'] -->
9250
9398
  <xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
9251
9399
  <fo:inline padding-right="5mm"> </fo:inline>
@@ -1,5 +1,4 @@
1
1
  <nav>
2
- <h1 id="content">Contents</h1>
3
2
  <div id="toc"></div>
4
3
 
5
4
  </nav>
@@ -9,6 +9,3 @@
9
9
 
10
10
  </div>
11
11
 
12
- <p class="zzContents" style='margin-top:0cm'><span lang="EN-GB">Contents</span></p>
13
-
14
- WORDTOC
@@ -1,6 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <grammar ns="https://www.metanorma.org/ns/csa" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <grammar ns='https://www.metanorma.org/ns/csa' xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
3
  <!--
4
+ VERSION v1.2.1
4
5
  Currently we inherit from a namespaced grammar, isostandard. Until we inherit from isodoc,
5
6
  we cannot have a new default namespace: we will end up with a grammar with two different
6
7
  namespaces, one for isostandard and one for csand additions. And we do not want that.
@@ -59,13 +60,7 @@
59
60
  </include>
60
61
  <define name="csand-standard">
61
62
  <element name="csa-standard">
62
- <attribute name="version"/>
63
- <attribute name="type">
64
- <choice>
65
- <value>semantic</value>
66
- <value>presentation</value>
67
- </choice>
68
- </attribute>
63
+ <ref name="Root-Attributes"/>
69
64
  <ref name="bibdata"/>
70
65
  <zeroOrMore>
71
66
  <ref name="termdocsource"/>
@@ -17,6 +17,7 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
+ <!-- VERSION v1.2.1 -->
20
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">
21
22
  <include href="reqt.rng"/>
22
23
  <include href="basicdoc.rng">
@@ -1349,15 +1350,19 @@
1349
1350
  </choice>
1350
1351
  </element>
1351
1352
  </define>
1353
+ <define name="Root-Attributes">
1354
+ <attribute name="version"/>
1355
+ <attribute name="schema-version"/>
1356
+ <attribute name="type">
1357
+ <choice>
1358
+ <value>semantic</value>
1359
+ <value>presentation</value>
1360
+ </choice>
1361
+ </attribute>
1362
+ </define>
1352
1363
  <define name="standard-document">
1353
1364
  <element name="standard-document">
1354
- <attribute name="version"/>
1355
- <attribute name="type">
1356
- <choice>
1357
- <value>semantic</value>
1358
- <value>presentation</value>
1359
- </choice>
1360
- </attribute>
1365
+ <ref name="Root-Attributes"/>
1361
1366
  <ref name="bibdata"/>
1362
1367
  <optional>
1363
1368
  <ref name="misccontainer"/>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Csa
3
- VERSION = "2.2.7".freeze
3
+ VERSION = "2.2.8".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-csa
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.7
4
+ version: 2.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-10 00:00:00.000000000 Z
11
+ date: 2023-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic