metanorma-cc 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: cd1570c8a37a6ec0bcd7e15acd14836d3541d7688eef69fb191b9bc0deb3c8b5
4
- data.tar.gz: ffd05f720ddb23f881a45a42f8a61cf5ee1337e7d5025c10160adc4cf395b084
3
+ metadata.gz: f3299d13c9781aa276adaba8c490d0f81cf57d691280b83c9d754d5029a97501
4
+ data.tar.gz: 346f32194088ee3bc07a275803ac878a45449084955983d6e8fc5d9bb54843be
5
5
  SHA512:
6
- metadata.gz: 12d79a97ae2a07b027eb5ad2c628676ca5fd6b652bea3dfe2bd7798d0b8fadece4b8e42a73a7c0ab6f915d2c894e16993547c949dbffee6b434cbc0e14ad01dd
7
- data.tar.gz: 42406628678a495a575224b602072bfa564325aeb3150241323f7d611690073c540f6a8b499e8a6e43693f792e69864128b17cdcf957cb17a99e311f945722fb
6
+ metadata.gz: d76759258e9b62a23052e485ae7115c274c716e0690b18bb0d844e4782301cbfd9c712e5207b40ae9e9dc194bd7a9c3ac3f082270fc8a914628cb71dc3dbc5ae
7
+ data.tar.gz: 299fb3687a979801b95f2afbc9db66bc4be280c561bb7cc4e9318bb4655b089c49b13a94a5594af7d10d96282388caca0167519b821e6430f99c28e30a58c2fd
@@ -593,17 +593,30 @@
593
593
  <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 -->
594
594
 
595
595
  <xsl:param name="table_if">false</xsl:param> <!-- generate extended table in IF for autolayout-algorithm -->
596
- <xsl:param name="table_widths"/> <!-- path to xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
596
+ <xsl:param name="table_widths"/> <!-- (debug: path to) xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
597
597
  <!-- Example: <tables>
598
- <table id="table_if_tab-symdu" page-width="75"> - table id prefixed by 'table_if_' to simple search in IF
599
- <tbody>
600
- <tr>
601
- <td id="tab-symdu_1_1">
602
- <p_len>6</p_len>
603
- <p_len>100</p_len> for 2nd paragraph
604
- <word_len>6</word_len>
605
- <word_len>20</word_len>
606
- ...
598
+ <table page-width="509103" id="table1" width_max="223561" width_min="223560">
599
+ <column width_max="39354" width_min="39354"/>
600
+ <column width_max="75394" width_min="75394"/>
601
+ <column width_max="108813" width_min="108813"/>
602
+ <tbody>
603
+ <tr>
604
+ <td width_max="39354" width_min="39354">
605
+ <p_len>39354</p_len>
606
+ <word_len>39354</word_len>
607
+ </td>
608
+
609
+ OLD:
610
+ <tables>
611
+ <table id="table_if_tab-symdu" page-width="75"> - table id prefixed by 'table_if_' to simple search in IF
612
+ <tbody>
613
+ <tr>
614
+ <td id="tab-symdu_1_1">
615
+ <p_len>6</p_len>
616
+ <p_len>100</p_len> for 2nd paragraph
617
+ <word_len>6</word_len>
618
+ <word_len>20</word_len>
619
+ ...
607
620
  -->
608
621
 
609
622
  <!-- for command line debug: <xsl:variable name="table_widths_from_if" select="document($table_widths)"/> -->
@@ -823,6 +836,9 @@
823
836
  <xsl:variable name="hair_space"> </xsl:variable>
824
837
  <xsl:variable name="en_dash">–</xsl:variable>
825
838
  <xsl:variable name="em_dash">—</xsl:variable>
839
+ <xsl:variable name="cr">&#13;</xsl:variable>
840
+ <xsl:variable name="lf">
841
+ </xsl:variable>
826
842
 
827
843
  <xsl:template name="getTitle">
828
844
  <xsl:param name="name"/>
@@ -2440,6 +2456,20 @@
2440
2456
  </xsl:for-each>
2441
2457
  </xsl:template>
2442
2458
 
2459
+ <xsl:param name="table_only_with_id"/><!-- Example: table1, for table auto-layout algorithm -->
2460
+
2461
+ <xsl:template match="*[local-name()='table']" priority="2">
2462
+ <xsl:choose>
2463
+ <xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
2464
+ <xsl:call-template name="table"/>
2465
+ </xsl:when>
2466
+ <xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
2467
+ <xsl:otherwise>
2468
+ <xsl:call-template name="table"/>
2469
+ </xsl:otherwise>
2470
+ </xsl:choose>
2471
+ </xsl:template>
2472
+
2443
2473
  <xsl:template match="*[local-name()='table']" name="table">
2444
2474
 
2445
2475
  <xsl:variable name="table-preamble">
@@ -2449,9 +2479,11 @@
2449
2479
  <xsl:variable name="table">
2450
2480
 
2451
2481
  <xsl:variable name="simple-table">
2452
- <xsl:call-template name="getSimpleTable">
2453
- <xsl:with-param name="id" select="@id"/>
2454
- </xsl:call-template>
2482
+ <xsl:if test="$isGenerateTableIF = 'true' and $isApplyAutolayoutAlgorithm = 'true'">
2483
+ <xsl:call-template name="getSimpleTable">
2484
+ <xsl:with-param name="id" select="@id"/>
2485
+ </xsl:call-template>
2486
+ </xsl:if>
2455
2487
  </xsl:variable>
2456
2488
  <!-- <xsl:variable name="simple-table" select="xalan:nodeset($simple-table_)"/> -->
2457
2489
 
@@ -2547,9 +2579,9 @@
2547
2579
  </xsl:attribute>
2548
2580
  </xsl:for-each>
2549
2581
 
2550
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
2582
+ <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']"/>
2551
2583
  <xsl:if test="$isNoteOrFnExist = 'true'">
2552
- <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
2584
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute><!-- set 0pt border, because there is a separete table below for footer -->
2553
2585
  </xsl:if>
2554
2586
 
2555
2587
  <xsl:choose>
@@ -2702,9 +2734,28 @@
2702
2734
 
2703
2735
  </fo:block>
2704
2736
 
2737
+ <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
2738
+ <xsl:if test="$continued = 'true'">
2739
+ <fo:block text-align="right">
2740
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
2741
+ </fo:block>
2742
+ </xsl:if>
2743
+ <!-- </xsl:if> -->
2744
+
2705
2745
  </xsl:if>
2706
2746
  </xsl:template> <!-- table/name -->
2707
2747
 
2748
+ <!-- workaround solution for https://github.com/metanorma/metanorma-iso/issues/1151#issuecomment-2033087938 -->
2749
+ <xsl:template match="*[local-name()='table']/*[local-name() = 'note'][@type = 'units']/*[local-name() = 'p']/text()" priority="4">
2750
+ <xsl:choose>
2751
+ <xsl:when test="preceding-sibling::*[local-name() = 'br']">
2752
+ <!-- remove CR or LF at start -->
2753
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'^(&#13;&#10;|&#13;|&#10;)', '')"/>
2754
+ </xsl:when>
2755
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
2756
+ </xsl:choose>
2757
+ </xsl:template>
2758
+
2708
2759
  <!-- SOURCE: ... -->
2709
2760
  <xsl:template match="*[local-name()='table']/*[local-name() = 'source']" priority="2">
2710
2761
  <xsl:call-template name="termsource"/>
@@ -3115,7 +3166,7 @@
3115
3166
  <xsl:param name="colwidths"/>
3116
3167
  <xsl:param name="colgroup"/>
3117
3168
 
3118
- <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']"/>
3169
+ <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']"/>
3119
3170
 
3120
3171
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
3121
3172
 
@@ -3187,7 +3238,7 @@
3187
3238
 
3188
3239
  <xsl:apply-templates select="../*[local-name()='p']"/>
3189
3240
  <xsl:apply-templates select="../*[local-name()='dl']"/>
3190
- <xsl:apply-templates select="../*[local-name()='note']"/>
3241
+ <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
3191
3242
  <xsl:apply-templates select="../*[local-name()='example']"/>
3192
3243
  <xsl:apply-templates select="../*[local-name()='source']"/>
3193
3244
 
@@ -3197,7 +3248,7 @@
3197
3248
 
3198
3249
  <!-- horizontal row separator -->
3199
3250
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
3200
- <xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
3251
+ <xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
3201
3252
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
3202
3253
 
3203
3254
  <xsl:call-template name="setBordersTableArray"/>
@@ -3862,7 +3913,20 @@
3862
3913
  <!-- Definition List -->
3863
3914
  <!-- ===================== -->
3864
3915
 
3865
- <xsl:template match="*[local-name()='dl']">
3916
+ <!-- for table auto-layout algorithm -->
3917
+ <xsl:template match="*[local-name()='dl']" priority="2">
3918
+ <xsl:choose>
3919
+ <xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
3920
+ <xsl:call-template name="dl"/>
3921
+ </xsl:when>
3922
+ <xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
3923
+ <xsl:otherwise>
3924
+ <xsl:call-template name="dl"/>
3925
+ </xsl:otherwise>
3926
+ </xsl:choose>
3927
+ </xsl:template>
3928
+
3929
+ <xsl:template match="*[local-name()='dl']" name="dl">
3866
3930
  <xsl:variable name="isAdded" select="@added"/>
3867
3931
  <xsl:variable name="isDeleted" select="@deleted"/>
3868
3932
  <!-- <dl><xsl:copy-of select="."/></dl> -->
@@ -5794,7 +5858,13 @@
5794
5858
  <xsl:value-of select="$language_current_2"/>
5795
5859
  </xsl:when>
5796
5860
  <xsl:otherwise>
5797
- <xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
5861
+ <xsl:variable name="language_current_3" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'])"/>
5862
+ <xsl:choose>
5863
+ <xsl:when test="$language_current_3 != ''">
5864
+ <xsl:value-of select="$language_current_3"/>
5865
+ </xsl:when>
5866
+ <xsl:otherwise>en</xsl:otherwise>
5867
+ </xsl:choose>
5798
5868
  </xsl:otherwise>
5799
5869
  </xsl:choose>
5800
5870
  </xsl:otherwise>
@@ -6656,10 +6726,11 @@
6656
6726
  </xsl:template>
6657
6727
 
6658
6728
  <xsl:template match="*[local-name() = 'image']">
6729
+ <xsl:param name="indent">0</xsl:param>
6659
6730
  <xsl:variable name="isAdded" select="../@added"/>
6660
6731
  <xsl:variable name="isDeleted" select="../@deleted"/>
6661
6732
  <xsl:choose>
6662
- <xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
6733
+ <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) -->
6663
6734
  <fo:inline padding-left="1mm" padding-right="1mm">
6664
6735
  <xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
6665
6736
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
@@ -6668,7 +6739,43 @@
6668
6739
  <xsl:variable name="src">
6669
6740
  <xsl:call-template name="image_src"/>
6670
6741
  </xsl:variable>
6671
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
6742
+
6743
+ <xsl:variable name="scale">
6744
+ <xsl:call-template name="getImageScale">
6745
+ <xsl:with-param name="indent" select="$indent"/>
6746
+ </xsl:call-template>
6747
+ </xsl:variable>
6748
+
6749
+ <!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
6750
+
6751
+ <!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
6752
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
6753
+
6754
+ <xsl:variable name="width">
6755
+ <xsl:call-template name="setImageWidth"/>
6756
+ </xsl:variable>
6757
+ <xsl:if test="$width != ''">
6758
+ <xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
6759
+ </xsl:if>
6760
+ <xsl:variable name="height">
6761
+ <xsl:call-template name="setImageHeight"/>
6762
+ </xsl:variable>
6763
+ <xsl:if test="$height != ''">
6764
+ <xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
6765
+ </xsl:if>
6766
+
6767
+ <xsl:if test="$width = '' and $height = ''">
6768
+ <xsl:if test="number($scale) &lt; 100">
6769
+ <xsl:attribute name="content-width"><xsl:value-of select="number($scale)"/>%</xsl:attribute>
6770
+ <!-- <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
6771
+ <xsl:attribute name="content-height">100%</xsl:attribute>
6772
+ <xsl:attribute name="width">100%</xsl:attribute>
6773
+ <xsl:attribute name="scaling">uniform</xsl:attribute> -->
6774
+ </xsl:if>
6775
+ </xsl:if>
6776
+
6777
+ </fo:external-graphic>
6778
+
6672
6779
  </fo:inline>
6673
6780
  </xsl:when>
6674
6781
  <xsl:otherwise>
@@ -6689,25 +6796,23 @@
6689
6796
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
6690
6797
  <xsl:attribute name="scaling">uniform</xsl:attribute>
6691
6798
 
6692
- <xsl:apply-templates select="." mode="cross_image"/>
6799
+ <xsl:apply-templates select="." mode="cross_image"/>
6693
6800
 
6694
6801
  </fo:instream-foreign-object>
6695
6802
  </xsl:when>
6696
6803
  <xsl:otherwise>
6804
+ <!-- <fo:block>debug block image:
6805
+ <xsl:variable name="scale">
6806
+ <xsl:call-template name="getImageScale">
6807
+ <xsl:with-param name="indent" select="$indent"/>
6808
+ </xsl:call-template>
6809
+ </xsl:variable>
6810
+ <xsl:value-of select="concat('scale=', $scale,', indent=', $indent)"/>
6811
+ </fo:block> -->
6697
6812
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
6698
- <xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
6699
-
6700
- <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
6701
- <xsl:attribute name="width">
6702
- <xsl:value-of select="@width"/>
6703
- </xsl:attribute>
6704
- </xsl:if>
6813
+ <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'])">
6705
6814
 
6706
- <xsl:if test="@height != '' and @height != 'auto'">
6707
- <xsl:attribute name="height">
6708
- <xsl:value-of select="@height"/>
6709
- </xsl:attribute>
6710
- </xsl:if>
6815
+ <xsl:call-template name="setImageWidthHeight"/>
6711
6816
 
6712
6817
  <xsl:choose>
6713
6818
  <xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
@@ -6715,24 +6820,18 @@
6715
6820
  </xsl:when>
6716
6821
  <xsl:otherwise>
6717
6822
 
6718
- <xsl:variable name="img_src">
6719
- <xsl:choose>
6720
- <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
6721
- <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
6722
- </xsl:choose>
6823
+ <xsl:variable name="scale">
6824
+ <xsl:call-template name="getImageScale">
6825
+ <xsl:with-param name="indent" select="$indent"/>
6826
+ </xsl:call-template>
6723
6827
  </xsl:variable>
6724
6828
 
6725
- <xsl:variable name="image_width_effective">
6726
-
6727
- <xsl:value-of select="$width_effective"/>
6728
-
6829
+ <xsl:variable name="scaleRatio">
6830
+ 1
6729
6831
  </xsl:variable>
6730
6832
 
6731
- <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
6732
6833
  <xsl:if test="number($scale) &lt; 100">
6733
-
6734
- <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
6735
-
6834
+ <xsl:attribute name="content-width"><xsl:value-of select="number($scale) * number($scaleRatio)"/>%</xsl:attribute>
6736
6835
  </xsl:if>
6737
6836
  </xsl:otherwise>
6738
6837
  </xsl:choose>
@@ -6748,6 +6847,62 @@
6748
6847
  </xsl:choose>
6749
6848
  </xsl:template>
6750
6849
 
6850
+ <xsl:template name="setImageWidth">
6851
+ <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
6852
+ <xsl:value-of select="@width"/>
6853
+ </xsl:if>
6854
+ </xsl:template>
6855
+ <xsl:template name="setImageHeight">
6856
+ <xsl:if test="@height != '' and @height != 'auto'">
6857
+ <xsl:value-of select="@height"/>
6858
+ </xsl:if>
6859
+ </xsl:template>
6860
+ <xsl:template name="setImageWidthHeight">
6861
+ <xsl:variable name="width">
6862
+ <xsl:call-template name="setImageWidth"/>
6863
+ </xsl:variable>
6864
+ <xsl:if test="$width != ''">
6865
+ <xsl:attribute name="width">
6866
+ <xsl:value-of select="$width"/>
6867
+ </xsl:attribute>
6868
+ </xsl:if>
6869
+ <xsl:variable name="height">
6870
+ <xsl:call-template name="setImageHeight"/>
6871
+ </xsl:variable>
6872
+ <xsl:if test="$height != ''">
6873
+ <xsl:attribute name="height">
6874
+ <xsl:value-of select="$height"/>
6875
+ </xsl:attribute>
6876
+ </xsl:if>
6877
+ </xsl:template>
6878
+
6879
+ <xsl:template name="getImageScale">
6880
+ <xsl:param name="indent"/>
6881
+ <xsl:variable name="indent_left">
6882
+ <xsl:choose>
6883
+ <xsl:when test="$indent != ''"><xsl:value-of select="$indent"/></xsl:when>
6884
+ <xsl:otherwise>0</xsl:otherwise>
6885
+ </xsl:choose>
6886
+ </xsl:variable>
6887
+ <xsl:variable name="img_src">
6888
+ <xsl:choose>
6889
+ <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
6890
+ <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
6891
+ </xsl:choose>
6892
+ </xsl:variable>
6893
+
6894
+ <xsl:variable name="image_width_effective">
6895
+
6896
+ <xsl:value-of select="$width_effective - number($indent_left)"/>
6897
+
6898
+ </xsl:variable>
6899
+ <!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
6900
+ <xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
6901
+ <xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
6902
+ <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
6903
+ <xsl:value-of select="$scale"/>
6904
+ </xsl:template>
6905
+
6751
6906
  <xsl:template name="image_src">
6752
6907
  <xsl:choose>
6753
6908
  <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
@@ -9432,6 +9587,7 @@
9432
9587
  </xsl:template>
9433
9588
 
9434
9589
  <xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
9590
+ <xsl:param name="indent">0</xsl:param>
9435
9591
  <xsl:choose>
9436
9592
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
9437
9593
  <fo:block-container role="SKIP">
@@ -9446,7 +9602,9 @@
9446
9602
 
9447
9603
  <fo:block-container margin-left="0mm" role="SKIP">
9448
9604
  <fo:block>
9449
- <xsl:apply-templates select="." mode="list"/>
9605
+ <xsl:apply-templates select="." mode="list">
9606
+ <xsl:with-param name="indent" select="$indent"/>
9607
+ </xsl:apply-templates>
9450
9608
  </fo:block>
9451
9609
  </fo:block-container>
9452
9610
  </fo:block-container>
@@ -9454,7 +9612,9 @@
9454
9612
  <xsl:otherwise>
9455
9613
 
9456
9614
  <fo:block role="SKIP">
9457
- <xsl:apply-templates select="." mode="list"/>
9615
+ <xsl:apply-templates select="." mode="list">
9616
+ <xsl:with-param name="indent" select="$indent"/>
9617
+ </xsl:apply-templates>
9458
9618
  </fo:block>
9459
9619
 
9460
9620
  </xsl:otherwise>
@@ -9539,6 +9699,13 @@
9539
9699
  </xsl:template>
9540
9700
 
9541
9701
  <xsl:template match="*[local-name()='li']">
9702
+ <xsl:param name="indent">0</xsl:param>
9703
+ <!-- <fo:list-item xsl:use-attribute-sets="list-item-style">
9704
+ <fo:list-item-label end-indent="label-end()"><fo:block>x</fo:block></fo:list-item-label>
9705
+ <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
9706
+ <fo:block>debug li indent=<xsl:value-of select="$indent"/></fo:block>
9707
+ </fo:list-item-body>
9708
+ </fo:list-item> -->
9542
9709
  <fo:list-item xsl:use-attribute-sets="list-item-style">
9543
9710
  <xsl:copy-of select="@id"/>
9544
9711
 
@@ -9563,7 +9730,9 @@
9563
9730
 
9564
9731
  <xsl:call-template name="refine_list-item-body-style"/>
9565
9732
 
9566
- <xsl:apply-templates/>
9733
+ <xsl:apply-templates>
9734
+ <xsl:with-param name="indent" select="$indent"/>
9735
+ </xsl:apply-templates>
9567
9736
 
9568
9737
  <!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
9569
9738
 
@@ -11728,6 +11897,4 @@
11728
11897
  </xsl:if>
11729
11898
  </xsl:template>
11730
11899
 
11731
- <!-- update -->
11732
-
11733
11900
  </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 CC
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-cc
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