metanorma-ribose 2.4.5 → 2.4.7

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: 04fec1adc64d9089a2d992cd22535e17380317916d00bbb28d5b2bb3c3ff4092
4
- data.tar.gz: 5cda790bba9445ceb0a9613207da3514dc4d7bf7071f8cc74e32a7824961558c
3
+ metadata.gz: c9e1e089e17ec27d221cfe7eedaca643dfe430b6716d31900994b0c267740bb5
4
+ data.tar.gz: 7cadee928561a22a5d4f27c8247eb04ea388eaf45d4666e941a92bcab36a387a
5
5
  SHA512:
6
- metadata.gz: 350fb4a6f97089c3e596ff7d3edfef12e1cf85a36e4f9105613b51bf324f01a9ff9e9572c03b2a28ef32df05c9749dabec3fc89324132264cd28f39ace90d21f
7
- data.tar.gz: 45d6a86de99ab2425a542ea4343e2036a833d9075df97974f08107361488ad4ad1e9855b5dc3ed71417364d91fbef9b9a467b827ebfb844d77cdc09e8c4fb9f5
6
+ metadata.gz: dc90e85caad8d54f677ed99c48b3142ab0110d5947893d78ae612f52714c522170735337b5c0ef329ca99b75bafb7e5f3c326d6b3aff6500c998ac8d63f51dec
7
+ data.tar.gz: e799a92b5dc49c5ba16f2a1e14027a72723e721c6a4ab2b173427b7b1c01b23776ea9a4fd1ad757decf2a9a6f7227f823569561cb8b0f7ae2b53547cd0afeb28
@@ -1223,17 +1223,30 @@
1223
1223
  <xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
1224
1224
 
1225
1225
  <xsl:param name="table_if">false</xsl:param> <!-- generate extended table in IF for autolayout-algorithm -->
1226
- <xsl:param name="table_widths"/> <!-- path to xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
1226
+ <xsl:param name="table_widths"/> <!-- (debug: path to) xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
1227
1227
  <!-- Example: <tables>
1228
- <table id="table_if_tab-symdu" page-width="75"> - table id prefixed by 'table_if_' to simple search in IF
1229
- <tbody>
1230
- <tr>
1231
- <td id="tab-symdu_1_1">
1232
- <p_len>6</p_len>
1233
- <p_len>100</p_len> for 2nd paragraph
1234
- <word_len>6</word_len>
1235
- <word_len>20</word_len>
1236
- ...
1228
+ <table page-width="509103" id="table1" width_max="223561" width_min="223560">
1229
+ <column width_max="39354" width_min="39354"/>
1230
+ <column width_max="75394" width_min="75394"/>
1231
+ <column width_max="108813" width_min="108813"/>
1232
+ <tbody>
1233
+ <tr>
1234
+ <td width_max="39354" width_min="39354">
1235
+ <p_len>39354</p_len>
1236
+ <word_len>39354</word_len>
1237
+ </td>
1238
+
1239
+ OLD:
1240
+ <tables>
1241
+ <table id="table_if_tab-symdu" page-width="75"> - table id prefixed by 'table_if_' to simple search in IF
1242
+ <tbody>
1243
+ <tr>
1244
+ <td id="tab-symdu_1_1">
1245
+ <p_len>6</p_len>
1246
+ <p_len>100</p_len> for 2nd paragraph
1247
+ <word_len>6</word_len>
1248
+ <word_len>20</word_len>
1249
+ ...
1237
1250
  -->
1238
1251
 
1239
1252
  <!-- for command line debug: <xsl:variable name="table_widths_from_if" select="document($table_widths)"/> -->
@@ -1453,6 +1466,9 @@
1453
1466
  <xsl:variable name="hair_space"> </xsl:variable>
1454
1467
  <xsl:variable name="en_dash">–</xsl:variable>
1455
1468
  <xsl:variable name="em_dash">—</xsl:variable>
1469
+ <xsl:variable name="cr">&#13;</xsl:variable>
1470
+ <xsl:variable name="lf">
1471
+ </xsl:variable>
1456
1472
 
1457
1473
  <xsl:template name="getTitle">
1458
1474
  <xsl:param name="name"/>
@@ -3204,6 +3220,20 @@
3204
3220
  </xsl:for-each>
3205
3221
  </xsl:template>
3206
3222
 
3223
+ <xsl:param name="table_only_with_id"/><!-- Example: table1, for table auto-layout algorithm -->
3224
+
3225
+ <xsl:template match="*[local-name()='table']" priority="2">
3226
+ <xsl:choose>
3227
+ <xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
3228
+ <xsl:call-template name="table"/>
3229
+ </xsl:when>
3230
+ <xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
3231
+ <xsl:otherwise>
3232
+ <xsl:call-template name="table"/>
3233
+ </xsl:otherwise>
3234
+ </xsl:choose>
3235
+ </xsl:template>
3236
+
3207
3237
  <xsl:template match="*[local-name()='table']" name="table">
3208
3238
 
3209
3239
  <xsl:variable name="table-preamble">
@@ -3213,9 +3243,11 @@
3213
3243
  <xsl:variable name="table">
3214
3244
 
3215
3245
  <xsl:variable name="simple-table">
3216
- <xsl:call-template name="getSimpleTable">
3217
- <xsl:with-param name="id" select="@id"/>
3218
- </xsl:call-template>
3246
+ <xsl:if test="$isGenerateTableIF = 'true' and $isApplyAutolayoutAlgorithm = 'true'">
3247
+ <xsl:call-template name="getSimpleTable">
3248
+ <xsl:with-param name="id" select="@id"/>
3249
+ </xsl:call-template>
3250
+ </xsl:if>
3219
3251
  </xsl:variable>
3220
3252
  <!-- <xsl:variable name="simple-table" select="xalan:nodeset($simple-table_)"/> -->
3221
3253
 
@@ -3309,9 +3341,9 @@
3309
3341
  </xsl:attribute>
3310
3342
  </xsl:for-each>
3311
3343
 
3312
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
3344
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'][not(@type = 'units')] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
3313
3345
  <xsl:if test="$isNoteOrFnExist = 'true'">
3314
- <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
3346
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute><!-- set 0pt border, because there is a separete table below for footer -->
3315
3347
  </xsl:if>
3316
3348
 
3317
3349
  <xsl:choose>
@@ -3464,9 +3496,28 @@
3464
3496
 
3465
3497
  </fo:block>
3466
3498
 
3499
+ <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
3500
+ <xsl:if test="$continued = 'true'">
3501
+ <fo:block text-align="right">
3502
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
3503
+ </fo:block>
3504
+ </xsl:if>
3505
+ <!-- </xsl:if> -->
3506
+
3467
3507
  </xsl:if>
3468
3508
  </xsl:template> <!-- table/name -->
3469
3509
 
3510
+ <!-- workaround solution for https://github.com/metanorma/metanorma-iso/issues/1151#issuecomment-2033087938 -->
3511
+ <xsl:template match="*[local-name()='table']/*[local-name() = 'note'][@type = 'units']/*[local-name() = 'p']/text()" priority="4">
3512
+ <xsl:choose>
3513
+ <xsl:when test="preceding-sibling::*[local-name() = 'br']">
3514
+ <!-- remove CR or LF at start -->
3515
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'^(&#13;&#10;|&#13;|&#10;)', '')"/>
3516
+ </xsl:when>
3517
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
3518
+ </xsl:choose>
3519
+ </xsl:template>
3520
+
3470
3521
  <!-- SOURCE: ... -->
3471
3522
  <xsl:template match="*[local-name()='table']/*[local-name() = 'source']" priority="2">
3472
3523
  <xsl:call-template name="termsource"/>
@@ -3877,7 +3928,7 @@
3877
3928
  <xsl:param name="colwidths"/>
3878
3929
  <xsl:param name="colgroup"/>
3879
3930
 
3880
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
3931
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
3881
3932
 
3882
3933
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
3883
3934
 
@@ -3949,7 +4000,7 @@
3949
4000
 
3950
4001
  <xsl:apply-templates select="../*[local-name()='p']"/>
3951
4002
  <xsl:apply-templates select="../*[local-name()='dl']"/>
3952
- <xsl:apply-templates select="../*[local-name()='note']"/>
4003
+ <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
3953
4004
  <xsl:apply-templates select="../*[local-name()='example']"/>
3954
4005
  <xsl:apply-templates select="../*[local-name()='source']"/>
3955
4006
 
@@ -3959,7 +4010,7 @@
3959
4010
 
3960
4011
  <!-- horizontal row separator -->
3961
4012
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
3962
- <xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
4013
+ <xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
3963
4014
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
3964
4015
 
3965
4016
  <xsl:call-template name="setBordersTableArray"/>
@@ -4624,7 +4675,20 @@
4624
4675
  <!-- Definition List -->
4625
4676
  <!-- ===================== -->
4626
4677
 
4627
- <xsl:template match="*[local-name()='dl']">
4678
+ <!-- for table auto-layout algorithm -->
4679
+ <xsl:template match="*[local-name()='dl']" priority="2">
4680
+ <xsl:choose>
4681
+ <xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
4682
+ <xsl:call-template name="dl"/>
4683
+ </xsl:when>
4684
+ <xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
4685
+ <xsl:otherwise>
4686
+ <xsl:call-template name="dl"/>
4687
+ </xsl:otherwise>
4688
+ </xsl:choose>
4689
+ </xsl:template>
4690
+
4691
+ <xsl:template match="*[local-name()='dl']" name="dl">
4628
4692
  <xsl:variable name="isAdded" select="@added"/>
4629
4693
  <xsl:variable name="isDeleted" select="@deleted"/>
4630
4694
  <!-- <dl><xsl:copy-of select="."/></dl> -->
@@ -6566,7 +6630,13 @@
6566
6630
  <xsl:value-of select="$language_current_2"/>
6567
6631
  </xsl:when>
6568
6632
  <xsl:otherwise>
6569
- <xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
6633
+ <xsl:variable name="language_current_3" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'])"/>
6634
+ <xsl:choose>
6635
+ <xsl:when test="$language_current_3 != ''">
6636
+ <xsl:value-of select="$language_current_3"/>
6637
+ </xsl:when>
6638
+ <xsl:otherwise>en</xsl:otherwise>
6639
+ </xsl:choose>
6570
6640
  </xsl:otherwise>
6571
6641
  </xsl:choose>
6572
6642
  </xsl:otherwise>
@@ -7433,10 +7503,11 @@
7433
7503
  </xsl:template>
7434
7504
 
7435
7505
  <xsl:template match="*[local-name() = 'image']">
7506
+ <xsl:param name="indent">0</xsl:param>
7436
7507
  <xsl:variable name="isAdded" select="../@added"/>
7437
7508
  <xsl:variable name="isDeleted" select="../@deleted"/>
7438
7509
  <xsl:choose>
7439
- <xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
7510
+ <xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']"> <!-- inline image ( 'image:path' in adoc, with one colon after image) -->
7440
7511
  <fo:inline padding-left="1mm" padding-right="1mm">
7441
7512
  <xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
7442
7513
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
@@ -7445,7 +7516,43 @@
7445
7516
  <xsl:variable name="src">
7446
7517
  <xsl:call-template name="image_src"/>
7447
7518
  </xsl:variable>
7448
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
7519
+
7520
+ <xsl:variable name="scale">
7521
+ <xsl:call-template name="getImageScale">
7522
+ <xsl:with-param name="indent" select="$indent"/>
7523
+ </xsl:call-template>
7524
+ </xsl:variable>
7525
+
7526
+ <!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
7527
+
7528
+ <!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
7529
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
7530
+
7531
+ <xsl:variable name="width">
7532
+ <xsl:call-template name="setImageWidth"/>
7533
+ </xsl:variable>
7534
+ <xsl:if test="$width != ''">
7535
+ <xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
7536
+ </xsl:if>
7537
+ <xsl:variable name="height">
7538
+ <xsl:call-template name="setImageHeight"/>
7539
+ </xsl:variable>
7540
+ <xsl:if test="$height != ''">
7541
+ <xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
7542
+ </xsl:if>
7543
+
7544
+ <xsl:if test="$width = '' and $height = ''">
7545
+ <xsl:if test="number($scale) &lt; 100">
7546
+ <xsl:attribute name="content-width"><xsl:value-of select="number($scale)"/>%</xsl:attribute>
7547
+ <!-- <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
7548
+ <xsl:attribute name="content-height">100%</xsl:attribute>
7549
+ <xsl:attribute name="width">100%</xsl:attribute>
7550
+ <xsl:attribute name="scaling">uniform</xsl:attribute> -->
7551
+ </xsl:if>
7552
+ </xsl:if>
7553
+
7554
+ </fo:external-graphic>
7555
+
7449
7556
  </fo:inline>
7450
7557
  </xsl:when>
7451
7558
  <xsl:otherwise>
@@ -7466,25 +7573,23 @@
7466
7573
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
7467
7574
  <xsl:attribute name="scaling">uniform</xsl:attribute>
7468
7575
 
7469
- <xsl:apply-templates select="." mode="cross_image"/>
7576
+ <xsl:apply-templates select="." mode="cross_image"/>
7470
7577
 
7471
7578
  </fo:instream-foreign-object>
7472
7579
  </xsl:when>
7473
7580
  <xsl:otherwise>
7581
+ <!-- <fo:block>debug block image:
7582
+ <xsl:variable name="scale">
7583
+ <xsl:call-template name="getImageScale">
7584
+ <xsl:with-param name="indent" select="$indent"/>
7585
+ </xsl:call-template>
7586
+ </xsl:variable>
7587
+ <xsl:value-of select="concat('scale=', $scale,', indent=', $indent)"/>
7588
+ </fo:block> -->
7474
7589
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
7475
- <xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
7476
-
7477
- <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
7478
- <xsl:attribute name="width">
7479
- <xsl:value-of select="@width"/>
7480
- </xsl:attribute>
7481
- </xsl:if>
7590
+ <xsl:if test="not(@mimetype = 'image/svg+xml') and (../*[local-name() = 'name'] or parent::*[local-name() = 'figure'][@unnumbered = 'true']) and not(ancestor::*[local-name() = 'table'])">
7482
7591
 
7483
- <xsl:if test="@height != '' and @height != 'auto'">
7484
- <xsl:attribute name="height">
7485
- <xsl:value-of select="@height"/>
7486
- </xsl:attribute>
7487
- </xsl:if>
7592
+ <xsl:call-template name="setImageWidthHeight"/>
7488
7593
 
7489
7594
  <xsl:choose>
7490
7595
  <xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
@@ -7492,24 +7597,18 @@
7492
7597
  </xsl:when>
7493
7598
  <xsl:otherwise>
7494
7599
 
7495
- <xsl:variable name="img_src">
7496
- <xsl:choose>
7497
- <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
7498
- <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
7499
- </xsl:choose>
7600
+ <xsl:variable name="scale">
7601
+ <xsl:call-template name="getImageScale">
7602
+ <xsl:with-param name="indent" select="$indent"/>
7603
+ </xsl:call-template>
7500
7604
  </xsl:variable>
7501
7605
 
7502
- <xsl:variable name="image_width_effective">
7503
-
7504
- <xsl:value-of select="$width_effective"/>
7505
-
7606
+ <xsl:variable name="scaleRatio">
7607
+ 1
7506
7608
  </xsl:variable>
7507
7609
 
7508
- <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
7509
7610
  <xsl:if test="number($scale) &lt; 100">
7510
-
7511
- <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
7512
-
7611
+ <xsl:attribute name="content-width"><xsl:value-of select="number($scale) * number($scaleRatio)"/>%</xsl:attribute>
7513
7612
  </xsl:if>
7514
7613
  </xsl:otherwise>
7515
7614
  </xsl:choose>
@@ -7525,6 +7624,62 @@
7525
7624
  </xsl:choose>
7526
7625
  </xsl:template>
7527
7626
 
7627
+ <xsl:template name="setImageWidth">
7628
+ <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
7629
+ <xsl:value-of select="@width"/>
7630
+ </xsl:if>
7631
+ </xsl:template>
7632
+ <xsl:template name="setImageHeight">
7633
+ <xsl:if test="@height != '' and @height != 'auto'">
7634
+ <xsl:value-of select="@height"/>
7635
+ </xsl:if>
7636
+ </xsl:template>
7637
+ <xsl:template name="setImageWidthHeight">
7638
+ <xsl:variable name="width">
7639
+ <xsl:call-template name="setImageWidth"/>
7640
+ </xsl:variable>
7641
+ <xsl:if test="$width != ''">
7642
+ <xsl:attribute name="width">
7643
+ <xsl:value-of select="$width"/>
7644
+ </xsl:attribute>
7645
+ </xsl:if>
7646
+ <xsl:variable name="height">
7647
+ <xsl:call-template name="setImageHeight"/>
7648
+ </xsl:variable>
7649
+ <xsl:if test="$height != ''">
7650
+ <xsl:attribute name="height">
7651
+ <xsl:value-of select="$height"/>
7652
+ </xsl:attribute>
7653
+ </xsl:if>
7654
+ </xsl:template>
7655
+
7656
+ <xsl:template name="getImageScale">
7657
+ <xsl:param name="indent"/>
7658
+ <xsl:variable name="indent_left">
7659
+ <xsl:choose>
7660
+ <xsl:when test="$indent != ''"><xsl:value-of select="$indent"/></xsl:when>
7661
+ <xsl:otherwise>0</xsl:otherwise>
7662
+ </xsl:choose>
7663
+ </xsl:variable>
7664
+ <xsl:variable name="img_src">
7665
+ <xsl:choose>
7666
+ <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
7667
+ <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
7668
+ </xsl:choose>
7669
+ </xsl:variable>
7670
+
7671
+ <xsl:variable name="image_width_effective">
7672
+
7673
+ <xsl:value-of select="$width_effective - number($indent_left)"/>
7674
+
7675
+ </xsl:variable>
7676
+ <!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
7677
+ <xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
7678
+ <xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
7679
+ <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
7680
+ <xsl:value-of select="$scale"/>
7681
+ </xsl:template>
7682
+
7528
7683
  <xsl:template name="image_src">
7529
7684
  <xsl:choose>
7530
7685
  <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
@@ -10207,6 +10362,7 @@
10207
10362
  </xsl:template>
10208
10363
 
10209
10364
  <xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
10365
+ <xsl:param name="indent">0</xsl:param>
10210
10366
  <xsl:choose>
10211
10367
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
10212
10368
  <fo:block-container role="SKIP">
@@ -10221,7 +10377,9 @@
10221
10377
 
10222
10378
  <fo:block-container margin-left="0mm" role="SKIP">
10223
10379
  <fo:block>
10224
- <xsl:apply-templates select="." mode="list"/>
10380
+ <xsl:apply-templates select="." mode="list">
10381
+ <xsl:with-param name="indent" select="$indent"/>
10382
+ </xsl:apply-templates>
10225
10383
  </fo:block>
10226
10384
  </fo:block-container>
10227
10385
  </fo:block-container>
@@ -10229,7 +10387,9 @@
10229
10387
  <xsl:otherwise>
10230
10388
 
10231
10389
  <fo:block role="SKIP">
10232
- <xsl:apply-templates select="." mode="list"/>
10390
+ <xsl:apply-templates select="." mode="list">
10391
+ <xsl:with-param name="indent" select="$indent"/>
10392
+ </xsl:apply-templates>
10233
10393
  </fo:block>
10234
10394
 
10235
10395
  </xsl:otherwise>
@@ -10314,6 +10474,13 @@
10314
10474
  </xsl:template>
10315
10475
 
10316
10476
  <xsl:template match="*[local-name()='li']">
10477
+ <xsl:param name="indent">0</xsl:param>
10478
+ <!-- <fo:list-item xsl:use-attribute-sets="list-item-style">
10479
+ <fo:list-item-label end-indent="label-end()"><fo:block>x</fo:block></fo:list-item-label>
10480
+ <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
10481
+ <fo:block>debug li indent=<xsl:value-of select="$indent"/></fo:block>
10482
+ </fo:list-item-body>
10483
+ </fo:list-item> -->
10317
10484
  <fo:list-item xsl:use-attribute-sets="list-item-style">
10318
10485
  <xsl:copy-of select="@id"/>
10319
10486
 
@@ -10338,7 +10505,9 @@
10338
10505
 
10339
10506
  <xsl:call-template name="refine_list-item-body-style"/>
10340
10507
 
10341
- <xsl:apply-templates/>
10508
+ <xsl:apply-templates>
10509
+ <xsl:with-param name="indent" select="$indent"/>
10510
+ </xsl:apply-templates>
10342
10511
 
10343
10512
  <!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
10344
10513
 
@@ -12495,6 +12664,4 @@
12495
12664
  </xsl:if>
12496
12665
  </xsl:template>
12497
12666
 
12498
- <!-- update -->
12499
-
12500
12667
  </xsl:stylesheet>
@@ -95,7 +95,7 @@
95
95
  <text/>
96
96
  </element>
97
97
  </define>
98
- <define name="LocalizedString1">
98
+ <define name="LocalizedStringAttrs">
99
99
  <optional>
100
100
  <!-- multiple languages and scripts possible: comma delimit them if so -->
101
101
  <attribute name="language"/>
@@ -106,6 +106,10 @@
106
106
  <optional>
107
107
  <attribute name="script"/>
108
108
  </optional>
109
+ </define>
110
+ <define name="LocalizedString1">
111
+ <!-- multiple languages and scripts possible: comma delimit them if so -->
112
+ <ref name="LocalizedStringAttrs"/>
109
113
  <text/>
110
114
  </define>
111
115
  <define name="LocalizedString">
@@ -142,16 +146,8 @@
142
146
  <ref name="LocalizedStringOrXsAny"/>
143
147
  </define>
144
148
  <define name="LocalizedStringOrXsAny1">
145
- <optional>
146
- <!-- multiple languages and scripts possible: comma delimit them if so -->
147
- <attribute name="language"/>
148
- </optional>
149
- <optional>
150
- <attribute name="locale"/>
151
- </optional>
152
- <optional>
153
- <attribute name="script"/>
154
- </optional>
149
+ <!-- multiple languages and scripts possible: comma delimit them if so -->
150
+ <ref name="LocalizedStringAttrs"/>
155
151
  <oneOrMore>
156
152
  <choice>
157
153
  <text/>
@@ -208,6 +204,7 @@
208
204
  </define>
209
205
  <define name="roledescription">
210
206
  <element name="description">
207
+ <ref name="LocalizedStringAttrs"/>
211
208
  <oneOrMore>
212
209
  <ref name="TextElement"/>
213
210
  </oneOrMore>
@@ -335,6 +332,7 @@
335
332
  </define>
336
333
  <define name="affiliationdescription">
337
334
  <element name="description">
335
+ <ref name="LocalizedStringAttrs"/>
338
336
  <oneOrMore>
339
337
  <ref name="TextElement"/>
340
338
  </oneOrMore>
@@ -948,6 +946,7 @@
948
946
  <optional>
949
947
  <attribute name="type"/>
950
948
  </optional>
949
+ <ref name="LocalizedStringAttrs"/>
951
950
  <zeroOrMore>
952
951
  <ref name="TextElement"/>
953
952
  </zeroOrMore>
@@ -1041,15 +1040,7 @@
1041
1040
  <data type="boolean"/>
1042
1041
  </attribute>
1043
1042
  </optional>
1044
- <optional>
1045
- <attribute name="language"/>
1046
- </optional>
1047
- <optional>
1048
- <attribute name="locale"/>
1049
- </optional>
1050
- <optional>
1051
- <attribute name="script"/>
1052
- </optional>
1043
+ <ref name="LocalizedStringAttrs"/>
1053
1044
  <oneOrMore>
1054
1045
  <ref name="TextElement"/>
1055
1046
  </oneOrMore>
@@ -1277,6 +1268,7 @@
1277
1268
  <optional>
1278
1269
  <attribute name="type"/>
1279
1270
  </optional>
1271
+ <ref name="LocalizedStringAttrs"/>
1280
1272
  <oneOrMore>
1281
1273
  <ref name="TextElement"/>
1282
1274
  </oneOrMore>
@@ -1284,9 +1276,15 @@
1284
1276
  </define>
1285
1277
  <define name="bibabstract">
1286
1278
  <element name="abstract">
1287
- <oneOrMore>
1288
- <ref name="TextElement"/>
1289
- </oneOrMore>
1279
+ <ref name="LocalizedStringAttrs"/>
1280
+ <choice>
1281
+ <oneOrMore>
1282
+ <ref name="BasicBlock"/>
1283
+ </oneOrMore>
1284
+ <oneOrMore>
1285
+ <ref name="TextElement"/>
1286
+ </oneOrMore>
1287
+ </choice>
1290
1288
  </element>
1291
1289
  </define>
1292
1290
  <define name="copyright">
@@ -1391,6 +1389,7 @@
1391
1389
  </attribute>
1392
1390
  <optional>
1393
1391
  <element name="description">
1392
+ <ref name="LocalizedStringAttrs"/>
1394
1393
  <oneOrMore>
1395
1394
  <ref name="TextElement"/>
1396
1395
  </oneOrMore>
@@ -17,7 +17,7 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v1.3.0 -->
20
+ <!-- VERSION v1.3.1 -->
21
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">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
@@ -1346,38 +1346,41 @@
1346
1346
  </oneOrMore>
1347
1347
  </element>
1348
1348
  </define>
1349
+ <define name="Section-Attributes">
1350
+ <optional>
1351
+ <attribute name="id">
1352
+ <data type="ID"/>
1353
+ </attribute>
1354
+ </optional>
1355
+ <optional>
1356
+ <attribute name="language"/>
1357
+ </optional>
1358
+ <optional>
1359
+ <attribute name="script"/>
1360
+ </optional>
1361
+ <optional>
1362
+ <attribute name="inline-header">
1363
+ <data type="boolean"/>
1364
+ </attribute>
1365
+ </optional>
1366
+ <optional>
1367
+ <attribute name="number"/>
1368
+ </optional>
1369
+ <optional>
1370
+ <attribute name="branch-number"/>
1371
+ </optional>
1372
+ <optional>
1373
+ <attribute name="obligation">
1374
+ <choice>
1375
+ <value>normative</value>
1376
+ <value>informative</value>
1377
+ </choice>
1378
+ </attribute>
1379
+ </optional>
1380
+ </define>
1349
1381
  <define name="reference-clause">
1350
1382
  <element name="clause">
1351
- <optional>
1352
- <attribute name="id">
1353
- <data type="ID"/>
1354
- </attribute>
1355
- </optional>
1356
- <optional>
1357
- <attribute name="language"/>
1358
- </optional>
1359
- <optional>
1360
- <attribute name="script"/>
1361
- </optional>
1362
- <optional>
1363
- <attribute name="inline-header">
1364
- <data type="boolean"/>
1365
- </attribute>
1366
- </optional>
1367
- <optional>
1368
- <attribute name="number"/>
1369
- </optional>
1370
- <optional>
1371
- <attribute name="branch-number"/>
1372
- </optional>
1373
- <optional>
1374
- <attribute name="obligation">
1375
- <choice>
1376
- <value>normative</value>
1377
- <value>informative</value>
1378
- </choice>
1379
- </attribute>
1380
- </optional>
1383
+ <ref name="Section-Attributes"/>
1381
1384
  <optional>
1382
1385
  <ref name="section-title"/>
1383
1386
  </optional>
@@ -1566,36 +1569,7 @@
1566
1569
  </element>
1567
1570
  </define>
1568
1571
  <define name="Content-Section">
1569
- <optional>
1570
- <attribute name="id">
1571
- <data type="ID"/>
1572
- </attribute>
1573
- </optional>
1574
- <optional>
1575
- <attribute name="language"/>
1576
- </optional>
1577
- <optional>
1578
- <attribute name="script"/>
1579
- </optional>
1580
- <optional>
1581
- <attribute name="inline-header">
1582
- <data type="boolean"/>
1583
- </attribute>
1584
- </optional>
1585
- <optional>
1586
- <attribute name="obligation">
1587
- <choice>
1588
- <value>normative</value>
1589
- <value>informative</value>
1590
- </choice>
1591
- </attribute>
1592
- </optional>
1593
- <optional>
1594
- <attribute name="number"/>
1595
- </optional>
1596
- <optional>
1597
- <attribute name="branch-number"/>
1598
- </optional>
1572
+ <ref name="Section-Attributes"/>
1599
1573
  <optional>
1600
1574
  <attribute name="type"/>
1601
1575
  </optional>
@@ -1617,39 +1591,10 @@
1617
1591
  </element>
1618
1592
  </define>
1619
1593
  <define name="Clause-Section">
1620
- <optional>
1621
- <attribute name="id">
1622
- <data type="ID"/>
1623
- </attribute>
1624
- </optional>
1625
- <optional>
1626
- <attribute name="language"/>
1627
- </optional>
1628
- <optional>
1629
- <attribute name="script"/>
1630
- </optional>
1631
- <optional>
1632
- <attribute name="inline-header">
1633
- <data type="boolean"/>
1634
- </attribute>
1635
- </optional>
1636
- <optional>
1637
- <attribute name="obligation">
1638
- <choice>
1639
- <value>normative</value>
1640
- <value>informative</value>
1641
- </choice>
1642
- </attribute>
1643
- </optional>
1594
+ <ref name="Section-Attributes"/>
1644
1595
  <optional>
1645
1596
  <attribute name="type"/>
1646
1597
  </optional>
1647
- <optional>
1648
- <attribute name="number"/>
1649
- </optional>
1650
- <optional>
1651
- <attribute name="branch-number"/>
1652
- </optional>
1653
1598
  <optional>
1654
1599
  <ref name="section-title"/>
1655
1600
  </optional>
@@ -1730,34 +1675,10 @@
1730
1675
  </define>
1731
1676
  <define name="terms">
1732
1677
  <element name="terms">
1733
- <optional>
1734
- <attribute name="id">
1735
- <data type="ID"/>
1736
- </attribute>
1737
- </optional>
1738
- <optional>
1739
- <attribute name="language"/>
1740
- </optional>
1741
- <optional>
1742
- <attribute name="script"/>
1743
- </optional>
1678
+ <ref name="Section-Attributes"/>
1744
1679
  <optional>
1745
1680
  <attribute name="type"/>
1746
1681
  </optional>
1747
- <optional>
1748
- <attribute name="number"/>
1749
- </optional>
1750
- <optional>
1751
- <attribute name="branch-number"/>
1752
- </optional>
1753
- <optional>
1754
- <attribute name="obligation">
1755
- <choice>
1756
- <value>normative</value>
1757
- <value>informative</value>
1758
- </choice>
1759
- </attribute>
1760
- </optional>
1761
1682
  <optional>
1762
1683
  <ref name="section-title"/>
1763
1684
  </optional>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ribose
3
- VERSION = "2.4.5".freeze
3
+ VERSION = "2.4.7".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ribose
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.5
4
+ version: 2.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-25 00:00:00.000000000 Z
11
+ date: 2024-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic