metanorma-iec 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: a6c4d68dec6bd1dd70dda1e9bd2b4673166e30d104f3242c38e4e01a4b365be4
4
- data.tar.gz: 27ff7824fc1418e886e8ed9f5bfc3261e0e7ea6bc6ecd76dd09c7a992dd2b3ba
3
+ metadata.gz: 70160bac723b9ad491e466c34d6086612dcda798b6c338a18fe45c2b5cb7ec26
4
+ data.tar.gz: dc12a6fbbffbb11662bba65596695961f88287f17b3fce75f1eac922b312b1d0
5
5
  SHA512:
6
- metadata.gz: 97b54d568dac05605ff9a3f85dfdcbc98e9a1f10d5d548f8daa10f4eac08fcdec3243dc9af79aadedf4d4842aa4e500e9d6a5921649a5a7daf6db045af907946
7
- data.tar.gz: bcd122112fb9a50977e8828102a31bae0efe1f80bceab7b560beccd7a61ebb98803451105b7cc3d55d923096fd24f1596f848dca4aab9f0a69da09adc8db414d
6
+ metadata.gz: 5d6837a067d758cd74e56264d65826525ae26d3e73e240135ee1b4f0357306cae164484f82e865676c336a6bf3d9ea442b6e4c33f167d2825004985584419d47
7
+ data.tar.gz: fbe6067f77a5e1460342dc5bd0f99d7faef9b64984d12c923a56b915d51b96ceca3cfab6643277e411c0fa2eda31b1f81ae1676e72323ee0c5ac358f939f5786
@@ -2123,17 +2123,30 @@
2123
2123
  <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 -->
2124
2124
 
2125
2125
  <xsl:param name="table_if">false</xsl:param> <!-- generate extended table in IF for autolayout-algorithm -->
2126
- <xsl:param name="table_widths"/> <!-- path to xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
2126
+ <xsl:param name="table_widths"/> <!-- (debug: path to) xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
2127
2127
  <!-- Example: <tables>
2128
- <table id="table_if_tab-symdu" page-width="75"> - table id prefixed by 'table_if_' to simple search in IF
2129
- <tbody>
2130
- <tr>
2131
- <td id="tab-symdu_1_1">
2132
- <p_len>6</p_len>
2133
- <p_len>100</p_len> for 2nd paragraph
2134
- <word_len>6</word_len>
2135
- <word_len>20</word_len>
2136
- ...
2128
+ <table page-width="509103" id="table1" width_max="223561" width_min="223560">
2129
+ <column width_max="39354" width_min="39354"/>
2130
+ <column width_max="75394" width_min="75394"/>
2131
+ <column width_max="108813" width_min="108813"/>
2132
+ <tbody>
2133
+ <tr>
2134
+ <td width_max="39354" width_min="39354">
2135
+ <p_len>39354</p_len>
2136
+ <word_len>39354</word_len>
2137
+ </td>
2138
+
2139
+ OLD:
2140
+ <tables>
2141
+ <table id="table_if_tab-symdu" page-width="75"> - table id prefixed by 'table_if_' to simple search in IF
2142
+ <tbody>
2143
+ <tr>
2144
+ <td id="tab-symdu_1_1">
2145
+ <p_len>6</p_len>
2146
+ <p_len>100</p_len> for 2nd paragraph
2147
+ <word_len>6</word_len>
2148
+ <word_len>20</word_len>
2149
+ ...
2137
2150
  -->
2138
2151
 
2139
2152
  <!-- for command line debug: <xsl:variable name="table_widths_from_if" select="document($table_widths)"/> -->
@@ -2359,6 +2372,9 @@
2359
2372
  <xsl:variable name="hair_space"> </xsl:variable>
2360
2373
  <xsl:variable name="en_dash">–</xsl:variable>
2361
2374
  <xsl:variable name="em_dash">—</xsl:variable>
2375
+ <xsl:variable name="cr">&#13;</xsl:variable>
2376
+ <xsl:variable name="lf">
2377
+ </xsl:variable>
2362
2378
 
2363
2379
  <xsl:template name="getTitle">
2364
2380
  <xsl:param name="name"/>
@@ -4084,6 +4100,20 @@
4084
4100
  </xsl:for-each>
4085
4101
  </xsl:template>
4086
4102
 
4103
+ <xsl:param name="table_only_with_id"/><!-- Example: table1, for table auto-layout algorithm -->
4104
+
4105
+ <xsl:template match="*[local-name()='table']" priority="2">
4106
+ <xsl:choose>
4107
+ <xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
4108
+ <xsl:call-template name="table"/>
4109
+ </xsl:when>
4110
+ <xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
4111
+ <xsl:otherwise>
4112
+ <xsl:call-template name="table"/>
4113
+ </xsl:otherwise>
4114
+ </xsl:choose>
4115
+ </xsl:template>
4116
+
4087
4117
  <xsl:template match="*[local-name()='table']" name="table">
4088
4118
 
4089
4119
  <xsl:variable name="table-preamble">
@@ -4093,9 +4123,11 @@
4093
4123
  <xsl:variable name="table">
4094
4124
 
4095
4125
  <xsl:variable name="simple-table">
4096
- <xsl:call-template name="getSimpleTable">
4097
- <xsl:with-param name="id" select="@id"/>
4098
- </xsl:call-template>
4126
+ <xsl:if test="$isGenerateTableIF = 'true' and $isApplyAutolayoutAlgorithm = 'true'">
4127
+ <xsl:call-template name="getSimpleTable">
4128
+ <xsl:with-param name="id" select="@id"/>
4129
+ </xsl:call-template>
4130
+ </xsl:if>
4099
4131
  </xsl:variable>
4100
4132
  <!-- <xsl:variable name="simple-table" select="xalan:nodeset($simple-table_)"/> -->
4101
4133
 
@@ -4191,9 +4223,9 @@
4191
4223
  </xsl:attribute>
4192
4224
  </xsl:for-each>
4193
4225
 
4194
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
4226
+ <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']"/>
4195
4227
  <xsl:if test="$isNoteOrFnExist = 'true'">
4196
- <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
4228
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute><!-- set 0pt border, because there is a separete table below for footer -->
4197
4229
  </xsl:if>
4198
4230
 
4199
4231
  <xsl:choose>
@@ -4361,9 +4393,28 @@
4361
4393
 
4362
4394
  </fo:block>
4363
4395
 
4396
+ <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
4397
+ <xsl:if test="$continued = 'true'">
4398
+ <fo:block text-align="right">
4399
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
4400
+ </fo:block>
4401
+ </xsl:if>
4402
+ <!-- </xsl:if> -->
4403
+
4364
4404
  </xsl:if>
4365
4405
  </xsl:template> <!-- table/name -->
4366
4406
 
4407
+ <!-- workaround solution for https://github.com/metanorma/metanorma-iso/issues/1151#issuecomment-2033087938 -->
4408
+ <xsl:template match="*[local-name()='table']/*[local-name() = 'note'][@type = 'units']/*[local-name() = 'p']/text()" priority="4">
4409
+ <xsl:choose>
4410
+ <xsl:when test="preceding-sibling::*[local-name() = 'br']">
4411
+ <!-- remove CR or LF at start -->
4412
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'^(&#13;&#10;|&#13;|&#10;)', '')"/>
4413
+ </xsl:when>
4414
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
4415
+ </xsl:choose>
4416
+ </xsl:template>
4417
+
4367
4418
  <!-- SOURCE: ... -->
4368
4419
  <xsl:template match="*[local-name()='table']/*[local-name() = 'source']" priority="2">
4369
4420
  <xsl:call-template name="termsource"/>
@@ -4783,7 +4834,7 @@
4783
4834
  <xsl:param name="colwidths"/>
4784
4835
  <xsl:param name="colgroup"/>
4785
4836
 
4786
- <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']"/>
4837
+ <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']"/>
4787
4838
 
4788
4839
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
4789
4840
 
@@ -4849,7 +4900,7 @@
4849
4900
 
4850
4901
  <!-- fn will be processed inside 'note' processing -->
4851
4902
 
4852
- <xsl:if test="../*[local-name()='note']">
4903
+ <xsl:if test="../*[local-name()='note'][not(@type = 'units')]">
4853
4904
  <fo:block margin-bottom="6pt" role="SKIP"> </fo:block>
4854
4905
  </xsl:if>
4855
4906
 
@@ -4859,7 +4910,7 @@
4859
4910
 
4860
4911
  <xsl:apply-templates select="../*[local-name()='p']"/>
4861
4912
  <xsl:apply-templates select="../*[local-name()='dl']"/>
4862
- <xsl:apply-templates select="../*[local-name()='note']"/>
4913
+ <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
4863
4914
  <xsl:apply-templates select="../*[local-name()='example']"/>
4864
4915
  <xsl:apply-templates select="../*[local-name()='source']"/>
4865
4916
 
@@ -4870,7 +4921,7 @@
4870
4921
 
4871
4922
  <!-- horizontal row separator -->
4872
4923
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
4873
- <xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
4924
+ <xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
4874
4925
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
4875
4926
 
4876
4927
  <xsl:call-template name="setBordersTableArray"/>
@@ -5579,7 +5630,20 @@
5579
5630
  <!-- Definition List -->
5580
5631
  <!-- ===================== -->
5581
5632
 
5582
- <xsl:template match="*[local-name()='dl']">
5633
+ <!-- for table auto-layout algorithm -->
5634
+ <xsl:template match="*[local-name()='dl']" priority="2">
5635
+ <xsl:choose>
5636
+ <xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
5637
+ <xsl:call-template name="dl"/>
5638
+ </xsl:when>
5639
+ <xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
5640
+ <xsl:otherwise>
5641
+ <xsl:call-template name="dl"/>
5642
+ </xsl:otherwise>
5643
+ </xsl:choose>
5644
+ </xsl:template>
5645
+
5646
+ <xsl:template match="*[local-name()='dl']" name="dl">
5583
5647
  <xsl:variable name="isAdded" select="@added"/>
5584
5648
  <xsl:variable name="isDeleted" select="@deleted"/>
5585
5649
  <!-- <dl><xsl:copy-of select="."/></dl> -->
@@ -7593,7 +7657,13 @@
7593
7657
  <xsl:value-of select="$language_current_2"/>
7594
7658
  </xsl:when>
7595
7659
  <xsl:otherwise>
7596
- <xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
7660
+ <xsl:variable name="language_current_3" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'])"/>
7661
+ <xsl:choose>
7662
+ <xsl:when test="$language_current_3 != ''">
7663
+ <xsl:value-of select="$language_current_3"/>
7664
+ </xsl:when>
7665
+ <xsl:otherwise>en</xsl:otherwise>
7666
+ </xsl:choose>
7597
7667
  </xsl:otherwise>
7598
7668
  </xsl:choose>
7599
7669
  </xsl:otherwise>
@@ -8459,10 +8529,11 @@
8459
8529
  </xsl:template>
8460
8530
 
8461
8531
  <xsl:template match="*[local-name() = 'image']">
8532
+ <xsl:param name="indent">0</xsl:param>
8462
8533
  <xsl:variable name="isAdded" select="../@added"/>
8463
8534
  <xsl:variable name="isDeleted" select="../@deleted"/>
8464
8535
  <xsl:choose>
8465
- <xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
8536
+ <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) -->
8466
8537
  <fo:inline padding-left="1mm" padding-right="1mm">
8467
8538
  <xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
8468
8539
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
@@ -8471,7 +8542,43 @@
8471
8542
  <xsl:variable name="src">
8472
8543
  <xsl:call-template name="image_src"/>
8473
8544
  </xsl:variable>
8474
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
8545
+
8546
+ <xsl:variable name="scale">
8547
+ <xsl:call-template name="getImageScale">
8548
+ <xsl:with-param name="indent" select="$indent"/>
8549
+ </xsl:call-template>
8550
+ </xsl:variable>
8551
+
8552
+ <!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
8553
+
8554
+ <!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
8555
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
8556
+
8557
+ <xsl:variable name="width">
8558
+ <xsl:call-template name="setImageWidth"/>
8559
+ </xsl:variable>
8560
+ <xsl:if test="$width != ''">
8561
+ <xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
8562
+ </xsl:if>
8563
+ <xsl:variable name="height">
8564
+ <xsl:call-template name="setImageHeight"/>
8565
+ </xsl:variable>
8566
+ <xsl:if test="$height != ''">
8567
+ <xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
8568
+ </xsl:if>
8569
+
8570
+ <xsl:if test="$width = '' and $height = ''">
8571
+ <xsl:if test="number($scale) &lt; 100">
8572
+ <xsl:attribute name="content-width"><xsl:value-of select="number($scale)"/>%</xsl:attribute>
8573
+ <!-- <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
8574
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8575
+ <xsl:attribute name="width">100%</xsl:attribute>
8576
+ <xsl:attribute name="scaling">uniform</xsl:attribute> -->
8577
+ </xsl:if>
8578
+ </xsl:if>
8579
+
8580
+ </fo:external-graphic>
8581
+
8475
8582
  </fo:inline>
8476
8583
  </xsl:when>
8477
8584
  <xsl:otherwise>
@@ -8492,25 +8599,23 @@
8492
8599
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
8493
8600
  <xsl:attribute name="scaling">uniform</xsl:attribute>
8494
8601
 
8495
- <xsl:apply-templates select="." mode="cross_image"/>
8602
+ <xsl:apply-templates select="." mode="cross_image"/>
8496
8603
 
8497
8604
  </fo:instream-foreign-object>
8498
8605
  </xsl:when>
8499
8606
  <xsl:otherwise>
8607
+ <!-- <fo:block>debug block image:
8608
+ <xsl:variable name="scale">
8609
+ <xsl:call-template name="getImageScale">
8610
+ <xsl:with-param name="indent" select="$indent"/>
8611
+ </xsl:call-template>
8612
+ </xsl:variable>
8613
+ <xsl:value-of select="concat('scale=', $scale,', indent=', $indent)"/>
8614
+ </fo:block> -->
8500
8615
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
8501
- <xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
8502
-
8503
- <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
8504
- <xsl:attribute name="width">
8505
- <xsl:value-of select="@width"/>
8506
- </xsl:attribute>
8507
- </xsl:if>
8616
+ <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'])">
8508
8617
 
8509
- <xsl:if test="@height != '' and @height != 'auto'">
8510
- <xsl:attribute name="height">
8511
- <xsl:value-of select="@height"/>
8512
- </xsl:attribute>
8513
- </xsl:if>
8618
+ <xsl:call-template name="setImageWidthHeight"/>
8514
8619
 
8515
8620
  <xsl:choose>
8516
8621
  <xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
@@ -8518,24 +8623,18 @@
8518
8623
  </xsl:when>
8519
8624
  <xsl:otherwise>
8520
8625
 
8521
- <xsl:variable name="img_src">
8522
- <xsl:choose>
8523
- <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
8524
- <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
8525
- </xsl:choose>
8626
+ <xsl:variable name="scale">
8627
+ <xsl:call-template name="getImageScale">
8628
+ <xsl:with-param name="indent" select="$indent"/>
8629
+ </xsl:call-template>
8526
8630
  </xsl:variable>
8527
8631
 
8528
- <xsl:variable name="image_width_effective">
8529
-
8530
- <xsl:value-of select="$width_effective"/>
8531
-
8632
+ <xsl:variable name="scaleRatio">
8633
+ 1
8532
8634
  </xsl:variable>
8533
8635
 
8534
- <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
8535
8636
  <xsl:if test="number($scale) &lt; 100">
8536
-
8537
- <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
8538
-
8637
+ <xsl:attribute name="content-width"><xsl:value-of select="number($scale) * number($scaleRatio)"/>%</xsl:attribute>
8539
8638
  </xsl:if>
8540
8639
  </xsl:otherwise>
8541
8640
  </xsl:choose>
@@ -8551,6 +8650,62 @@
8551
8650
  </xsl:choose>
8552
8651
  </xsl:template>
8553
8652
 
8653
+ <xsl:template name="setImageWidth">
8654
+ <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
8655
+ <xsl:value-of select="@width"/>
8656
+ </xsl:if>
8657
+ </xsl:template>
8658
+ <xsl:template name="setImageHeight">
8659
+ <xsl:if test="@height != '' and @height != 'auto'">
8660
+ <xsl:value-of select="@height"/>
8661
+ </xsl:if>
8662
+ </xsl:template>
8663
+ <xsl:template name="setImageWidthHeight">
8664
+ <xsl:variable name="width">
8665
+ <xsl:call-template name="setImageWidth"/>
8666
+ </xsl:variable>
8667
+ <xsl:if test="$width != ''">
8668
+ <xsl:attribute name="width">
8669
+ <xsl:value-of select="$width"/>
8670
+ </xsl:attribute>
8671
+ </xsl:if>
8672
+ <xsl:variable name="height">
8673
+ <xsl:call-template name="setImageHeight"/>
8674
+ </xsl:variable>
8675
+ <xsl:if test="$height != ''">
8676
+ <xsl:attribute name="height">
8677
+ <xsl:value-of select="$height"/>
8678
+ </xsl:attribute>
8679
+ </xsl:if>
8680
+ </xsl:template>
8681
+
8682
+ <xsl:template name="getImageScale">
8683
+ <xsl:param name="indent"/>
8684
+ <xsl:variable name="indent_left">
8685
+ <xsl:choose>
8686
+ <xsl:when test="$indent != ''"><xsl:value-of select="$indent"/></xsl:when>
8687
+ <xsl:otherwise>0</xsl:otherwise>
8688
+ </xsl:choose>
8689
+ </xsl:variable>
8690
+ <xsl:variable name="img_src">
8691
+ <xsl:choose>
8692
+ <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
8693
+ <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
8694
+ </xsl:choose>
8695
+ </xsl:variable>
8696
+
8697
+ <xsl:variable name="image_width_effective">
8698
+
8699
+ <xsl:value-of select="$width_effective - number($indent_left)"/>
8700
+
8701
+ </xsl:variable>
8702
+ <!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
8703
+ <xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
8704
+ <xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
8705
+ <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
8706
+ <xsl:value-of select="$scale"/>
8707
+ </xsl:template>
8708
+
8554
8709
  <xsl:template name="image_src">
8555
8710
  <xsl:choose>
8556
8711
  <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
@@ -11245,6 +11400,7 @@
11245
11400
  </xsl:template>
11246
11401
 
11247
11402
  <xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
11403
+ <xsl:param name="indent">0</xsl:param>
11248
11404
  <xsl:choose>
11249
11405
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
11250
11406
  <fo:block-container role="SKIP">
@@ -11259,7 +11415,9 @@
11259
11415
 
11260
11416
  <fo:block-container margin-left="0mm" role="SKIP">
11261
11417
  <fo:block>
11262
- <xsl:apply-templates select="." mode="list"/>
11418
+ <xsl:apply-templates select="." mode="list">
11419
+ <xsl:with-param name="indent" select="$indent"/>
11420
+ </xsl:apply-templates>
11263
11421
  </fo:block>
11264
11422
  </fo:block-container>
11265
11423
  </fo:block-container>
@@ -11267,7 +11425,9 @@
11267
11425
  <xsl:otherwise>
11268
11426
 
11269
11427
  <fo:block role="SKIP">
11270
- <xsl:apply-templates select="." mode="list"/>
11428
+ <xsl:apply-templates select="." mode="list">
11429
+ <xsl:with-param name="indent" select="$indent"/>
11430
+ </xsl:apply-templates>
11271
11431
  </fo:block>
11272
11432
 
11273
11433
  </xsl:otherwise>
@@ -11356,6 +11516,13 @@
11356
11516
  </xsl:template>
11357
11517
 
11358
11518
  <xsl:template match="*[local-name()='li']">
11519
+ <xsl:param name="indent">0</xsl:param>
11520
+ <!-- <fo:list-item xsl:use-attribute-sets="list-item-style">
11521
+ <fo:list-item-label end-indent="label-end()"><fo:block>x</fo:block></fo:list-item-label>
11522
+ <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
11523
+ <fo:block>debug li indent=<xsl:value-of select="$indent"/></fo:block>
11524
+ </fo:list-item-body>
11525
+ </fo:list-item> -->
11359
11526
  <fo:list-item xsl:use-attribute-sets="list-item-style">
11360
11527
  <xsl:copy-of select="@id"/>
11361
11528
 
@@ -11380,7 +11547,9 @@
11380
11547
 
11381
11548
  <xsl:call-template name="refine_list-item-body-style"/>
11382
11549
 
11383
- <xsl:apply-templates/>
11550
+ <xsl:apply-templates>
11551
+ <xsl:with-param name="indent" select="$indent"/>
11552
+ </xsl:apply-templates>
11384
11553
 
11385
11554
  <!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
11386
11555
 
@@ -13545,6 +13714,4 @@
13545
13714
  </xsl:if>
13546
13715
  </xsl:template>
13547
13716
 
13548
- <!-- update -->
13549
-
13550
13717
  </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,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "2.4.5".freeze
3
+ VERSION = "2.4.7".freeze
4
4
  end
5
5
  end
6
6
 
@@ -31,8 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
32
32
 
33
33
  spec.add_dependency "metanorma-iso", "~> 2.7.3"
34
- spec.add_dependency "pubid-iec"
35
- spec.add_dependency "ruby-jing"
34
+ spec.add_dependency "pubid"
36
35
 
37
36
  spec.add_development_dependency "debug"
38
37
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iec
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: bin
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-iso
@@ -25,21 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: 2.7.3
27
27
  - !ruby/object:Gem::Dependency
28
- name: pubid-iec
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: ruby-jing
28
+ name: pubid
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - ">="