metanorma-cc 2.1.12 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c0a3a076ac239dae426f5d4533cdec584903265dec65a586859c81ee8c8cd7c2
4
- data.tar.gz: bd6c76442ca4e6fb057706f471b0b93423ed25ddec0985633da38a3fc40baca9
3
+ metadata.gz: 3b5b027d48021b7071f3e61fa85371fc3d2afb2db750b461001ae8f4d2c16606
4
+ data.tar.gz: f12d7befa0dc6583c25bf35372df0d2f2fe0e6caeabbd152fd95454ba2307307
5
5
  SHA512:
6
- metadata.gz: 0c952e3c62a9f92e920617705ddfda775ba82cdcdbe67ee4b3febdef5edd73df8bad5be7875aea169c5f24dc2fd0a82f2570afa829a043c63365fad567fa9090
7
- data.tar.gz: 9af922db601ed277c3b3db860a79cb397d772af0ffab69f30917a86b4fd4207fc0aab8d54a50ef27891cd2186a2ff957dc22225f62af92e9c0fd2c5f560df4b6
6
+ metadata.gz: 605251c6eb61d7ec93b0bfb533b0d2211c4a6207228d2d2325e4f41be6c88c50cb1424285a1f7eefd95b87763e05178146db278f3e1287cc5b1239ef3a99222a
7
+ data.tar.gz: 78258e44feebed56e7dbcd5326950225f3e0c0b4e92583895182f7e82699611c4955d914ae60fad0b2176ad908f0f04858679b20cee61a6452cec4f310226b3f
data/.gitignore CHANGED
@@ -3,6 +3,5 @@
3
3
  .rubocop-https--*
4
4
 
5
5
  /.rspec_status
6
- /Gemfile.devel
7
6
  /Gemfile.lock
8
7
  /coverage/
@@ -556,6 +556,8 @@
556
556
  </fo:static-content>
557
557
  </xsl:template>
558
558
 
559
+ <xsl:strip-space elements="csd:xref"/>
560
+
559
561
  <!-- external parameters -->
560
562
 
561
563
  <xsl:param name="svg_images"/> <!-- svg images array -->
@@ -1920,17 +1922,22 @@
1920
1922
  </xsl:for-each>
1921
1923
  </xsl:template>
1922
1924
 
1925
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
1923
1926
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
1924
1927
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
1925
1928
  <xsl:template match="text()" name="text">
1926
1929
 
1927
- <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
1928
- <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
1929
- <xsl:call-template name="replace_fo_inline_tags">
1930
- <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
1931
- <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
1932
- <xsl:with-param name="text" select="$text"/>
1933
- </xsl:call-template>
1930
+ <xsl:choose>
1931
+ <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
1932
+ <xsl:otherwise>
1933
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
1934
+ <xsl:call-template name="replace_fo_inline_tags">
1935
+ <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
1936
+ <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
1937
+ <xsl:with-param name="text" select="$text"/>
1938
+ </xsl:call-template>
1939
+ </xsl:otherwise>
1940
+ </xsl:choose>
1934
1941
 
1935
1942
  </xsl:template>
1936
1943
 
@@ -2303,7 +2310,7 @@
2303
2310
 
2304
2311
  <!-- centered table when table name is centered (see table-name-style) -->
2305
2312
 
2306
- <fo:table table-layout="fixed" width="100%">
2313
+ <fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style">
2307
2314
  <fo:table-column column-width="proportional-column-width(1)"/>
2308
2315
  <fo:table-column column-width="{@width}"/>
2309
2316
  <fo:table-column column-width="proportional-column-width(1)"/>
@@ -2956,7 +2963,7 @@
2956
2963
  <xsl:template match="*[local-name()='tr']">
2957
2964
  <fo:table-row xsl:use-attribute-sets="table-body-row-style">
2958
2965
 
2959
- <xsl:if test="*[local-name() = 'th']">
2966
+ <xsl:if test="count(*) = count(*[local-name() = 'th'])"> <!-- row contains 'th' only -->
2960
2967
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2961
2968
  </xsl:if>
2962
2969
 
@@ -3118,6 +3125,10 @@
3118
3125
  <xsl:variable name="footnote_inline">
3119
3126
  <fo:inline xsl:use-attribute-sets="fn-num-style">
3120
3127
 
3128
+ <xsl:if test="following-sibling::*[1][local-name() = 'fn']">
3129
+ <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
3130
+ </xsl:if>
3131
+
3121
3132
  <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
3122
3133
  <xsl:value-of select="$current_fn_number_text"/>
3123
3134
  </fo:basic-link>
@@ -3915,7 +3926,8 @@
3915
3926
  <xsl:copy-of select="node()"/>
3916
3927
  </td>
3917
3928
  <td>
3918
- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
3929
+ <!-- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/> -->
3930
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]" mode="dl_if"/>
3919
3931
  <!-- get paragraphs from nested 'dl' -->
3920
3932
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
3921
3933
  </td>
@@ -3923,6 +3935,53 @@
3923
3935
  </xsl:template>
3924
3936
  <xsl:template match="*[local-name()='dd']" mode="dl_if"/>
3925
3937
 
3938
+ <xsl:template match="*" mode="dl_if">
3939
+ <xsl:copy-of select="."/>
3940
+ </xsl:template>
3941
+
3942
+ <xsl:template match="*[local-name() = 'p']" mode="dl_if">
3943
+ <xsl:param name="indent"/>
3944
+ <p>
3945
+ <xsl:copy-of select="@*"/>
3946
+ <xsl:value-of select="$indent"/>
3947
+ <xsl:copy-of select="node()"/>
3948
+ </p>
3949
+
3950
+ </xsl:template>
3951
+
3952
+ <xsl:template match="*[local-name() = 'ul' or local-name() = 'ol']" mode="dl_if">
3953
+ <xsl:variable name="list_rendered_">
3954
+ <xsl:apply-templates select="."/>
3955
+ </xsl:variable>
3956
+ <xsl:variable name="list_rendered" select="xalan:nodeset($list_rendered_)"/>
3957
+
3958
+ <xsl:variable name="indent">
3959
+ <xsl:for-each select="($list_rendered//fo:block[not(.//fo:block)])[1]">
3960
+ <xsl:apply-templates select="ancestor::*[@provisional-distance-between-starts]/@provisional-distance-between-starts" mode="dl_if"/>
3961
+ </xsl:for-each>
3962
+ </xsl:variable>
3963
+
3964
+ <xsl:apply-templates mode="dl_if">
3965
+ <xsl:with-param name="indent" select="$indent"/>
3966
+ </xsl:apply-templates>
3967
+ </xsl:template>
3968
+
3969
+ <xsl:template match="*[local-name() = 'li']" mode="dl_if">
3970
+ <xsl:param name="indent"/>
3971
+ <xsl:apply-templates mode="dl_if">
3972
+ <xsl:with-param name="indent" select="$indent"/>
3973
+ </xsl:apply-templates>
3974
+ </xsl:template>
3975
+
3976
+ <xsl:template match="@provisional-distance-between-starts" mode="dl_if">
3977
+ <xsl:variable name="value" select="round(substring-before(.,'mm'))"/>
3978
+ <!-- emulate left indent for list item -->
3979
+ <xsl:call-template name="repeat">
3980
+ <xsl:with-param name="char" select="'x'"/>
3981
+ <xsl:with-param name="count" select="$value"/>
3982
+ </xsl:call-template>
3983
+ </xsl:template>
3984
+
3926
3985
  <xsl:template match="*[local-name()='dl']" mode="dl_if_nested">
3927
3986
  <xsl:for-each select="*[local-name() = 'dt']">
3928
3987
  <p>
@@ -4221,6 +4280,23 @@
4221
4280
  <xsl:apply-templates/>
4222
4281
  </xsl:template>
4223
4282
 
4283
+ <!-- Don't break standard's numbers -->
4284
+ <!-- Example : <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
4285
+ <xsl:template match="*[local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']" priority="2">
4286
+ <xsl:choose>
4287
+ <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:apply-templates/></xsl:when>
4288
+ <xsl:when test="following-sibling::*[2][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']">
4289
+ <fo:inline keep-with-next.within-line="always"><xsl:apply-templates/></fo:inline>
4290
+ </xsl:when>
4291
+ <xsl:otherwise>
4292
+ <xsl:apply-templates/>
4293
+ </xsl:otherwise>
4294
+ </xsl:choose>
4295
+ </xsl:template>
4296
+ <xsl:template match="text()[not(ancestor::*[local-name() = 'table']) and preceding-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear'] and following-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']]" priority="2">
4297
+ <fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
4298
+ </xsl:template>
4299
+
4224
4300
  <!-- ========================= -->
4225
4301
  <!-- END Rich text formatting -->
4226
4302
  <!-- ========================= -->
@@ -4319,6 +4395,7 @@
4319
4395
  </word>
4320
4396
  <xsl:call-template name="tokenize_with_tags">
4321
4397
  <xsl:with-param name="text" select="substring-after($text, $separator)"/>
4398
+ <xsl:with-param name="tags" select="$tags"/>
4322
4399
  </xsl:call-template>
4323
4400
  </xsl:otherwise>
4324
4401
  </xsl:choose>
@@ -4358,8 +4435,18 @@
4358
4435
 
4359
4436
  <xsl:template name="add-zero-spaces-java">
4360
4437
  <xsl:param name="text" select="."/>
4361
- <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
4362
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1​')"/>
4438
+ <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, arrow right -->
4439
+ <xsl:variable name="text1" select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |→)','$1​')"/>
4440
+ <!-- add zero-width space (#x200B) after characters: 'great than' -->
4441
+ <xsl:variable name="text2" select="java:replaceAll(java:java.lang.String.new($text1), '(\u003e)(?!\u003e)', '$1​')"/><!-- negative lookahead: 'great than' not followed by 'great than' -->
4442
+ <!-- add zero-width space (#x200B) before characters: 'less than' -->
4443
+ <xsl:variable name="text3" select="java:replaceAll(java:java.lang.String.new($text2), '(?&lt;!\u003c)(\u003c)', '​$1')"/> <!-- (?<!\u003c)(\u003c) --> <!-- negative lookbehind: 'less than' not preceeded by 'less than' -->
4444
+ <!-- add zero-width space (#x200B) before character: { -->
4445
+ <xsl:variable name="text4" select="java:replaceAll(java:java.lang.String.new($text3), '(?&lt;!\W)(\{)', '​$1')"/> <!-- negative lookbehind: '{' not preceeded by 'punctuation char' -->
4446
+ <!-- add zero-width space (#x200B) after character: , -->
4447
+ <xsl:variable name="text5" select="java:replaceAll(java:java.lang.String.new($text4), '(\,)(?!\d)', '$1​')"/> <!-- negative lookahead: ',' not followed by digit -->
4448
+
4449
+ <xsl:value-of select="$text5"/>
4363
4450
  </xsl:template>
4364
4451
 
4365
4452
  <xsl:template name="add-zero-spaces-link-java">
@@ -4505,7 +4592,7 @@
4505
4592
  </xsl:copy>
4506
4593
  </xsl:template>
4507
4594
 
4508
- <xsl:template match="*[local-name()='th' or local-name() = 'td'][not(*[local-name()='br']) and not(*[local-name()='p'])]" mode="table-without-br">
4595
+ <xsl:template match="*[local-name()='th' or local-name() = 'td'][not(*[local-name()='br']) and not(*[local-name()='p']) and not(*[local-name()='sourcecode'])]" mode="table-without-br">
4509
4596
  <xsl:copy>
4510
4597
  <xsl:copy-of select="@*"/>
4511
4598
  <p>
@@ -4553,6 +4640,28 @@
4553
4640
  </xsl:for-each>
4554
4641
  </xsl:template>
4555
4642
 
4643
+ <xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'sourcecode']" mode="table-without-br">
4644
+ <xsl:apply-templates mode="table-without-br"/>
4645
+ </xsl:template>
4646
+
4647
+ <xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'sourcecode']/text()[contains(., '&#13;') or contains(., '&#10;')]" mode="table-without-br">
4648
+
4649
+ <xsl:variable name="sep">###SOURCECODE_NEWLINE###</xsl:variable>
4650
+ <xsl:variable name="sourcecode_text" select="java:replaceAll(java:java.lang.String.new(.),'(&#13;&#10;|&#13;|&#10;)', $sep)"/>
4651
+ <xsl:variable name="items">
4652
+ <xsl:call-template name="split">
4653
+ <xsl:with-param name="pText" select="$sourcecode_text"/>
4654
+ <xsl:with-param name="sep" select="$sep"/>
4655
+ <xsl:with-param name="normalize-space">false</xsl:with-param>
4656
+ </xsl:call-template>
4657
+ </xsl:variable>
4658
+ <xsl:for-each select="xalan:nodeset($items)/*">
4659
+ <p>
4660
+ <sourcecode><xsl:copy-of select="node()"/></sourcecode>
4661
+ </p>
4662
+ </xsl:for-each>
4663
+ </xsl:template>
4664
+
4556
4665
  <!-- remove redundant white spaces -->
4557
4666
  <xsl:template match="text()[not(ancestor::*[local-name() = 'sourcecode'])]" mode="table-without-br">
4558
4667
  <xsl:variable name="text" select="translate(.,'&#9;&#10;&#13;','')"/>
@@ -4583,7 +4692,7 @@
4583
4692
  <xsl:choose>
4584
4693
  <xsl:when test="@colspan">
4585
4694
  <xsl:variable name="td">
4586
- <xsl:element name="td">
4695
+ <xsl:element name="{local-name()}">
4587
4696
  <xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
4588
4697
  <xsl:if test="local-name()='th'">
4589
4698
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -4598,7 +4707,7 @@
4598
4707
  </xsl:call-template>
4599
4708
  </xsl:when>
4600
4709
  <xsl:otherwise>
4601
- <xsl:element name="td">
4710
+ <xsl:element name="{local-name()}">
4602
4711
  <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
4603
4712
  <xsl:if test="local-name()='th'">
4604
4713
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -4665,7 +4774,7 @@
4665
4774
  <xsl:variable name="currentRow" select="."/>
4666
4775
 
4667
4776
  <xsl:variable name="normalizedTDs">
4668
- <xsl:for-each select="xalan:nodeset($previousRow)//td">
4777
+ <xsl:for-each select="xalan:nodeset($previousRow)//*[self::td or self::th]">
4669
4778
  <xsl:choose>
4670
4779
  <xsl:when test="@rowspan &gt; 1">
4671
4780
  <xsl:copy>
@@ -4677,7 +4786,7 @@
4677
4786
  </xsl:copy>
4678
4787
  </xsl:when>
4679
4788
  <xsl:otherwise>
4680
- <xsl:copy-of select="$currentRow/td[1 + count(current()/preceding-sibling::td[not(@rowspan) or (@rowspan = 1)])]"/>
4789
+ <xsl:copy-of select="$currentRow/*[self::td or self::th][1 + count(current()/preceding-sibling::*[self::td or self::th][not(@rowspan) or (@rowspan = 1)])]"/>
4681
4790
  </xsl:otherwise>
4682
4791
  </xsl:choose>
4683
4792
  </xsl:for-each>
@@ -4863,6 +4972,7 @@
4863
4972
  <xsl:if test="ancestor::*[local-name() = 'sub']"><tag>sub</tag></xsl:if>
4864
4973
  <xsl:if test="ancestor::*[local-name() = 'sup']"><tag>sup</tag></xsl:if>
4865
4974
  <xsl:if test="ancestor::*[local-name() = 'tt']"><tag>tt</tag></xsl:if>
4975
+ <xsl:if test="ancestor::*[local-name() = 'sourcecode']"><tag>sourcecode</tag></xsl:if>
4866
4976
  <xsl:if test="ancestor::*[local-name() = 'keep-together_within-line']"><tag>keep-together_within-line</tag></xsl:if>
4867
4977
  </tags>
4868
4978
  </xsl:template>
@@ -5847,6 +5957,31 @@
5847
5957
  <xsl:apply-templates mode="svg_update"/>
5848
5958
  </xsl:copy>
5849
5959
  </xsl:template>
5960
+
5961
+ <!-- regex for 'display: inline-block;' -->
5962
+ <xsl:variable name="regex_svg_style_notsupported">display(\s|\h)*:(\s|\h)*inline-block(\s|\h)*;</xsl:variable>
5963
+ <xsl:template match="*[local-name() = 'svg']//*[local-name() = 'style']/text()" mode="svg_update">
5964
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), $regex_svg_style_notsupported, '')"/>
5965
+ </xsl:template>
5966
+
5967
+ <!-- replace
5968
+ stroke="rgba(r, g, b, alpha)" to
5969
+ stroke="rgb(r,g,b)" stroke-opacity="alpha", and
5970
+ fill="rgba(r, g, b, alpha)" to
5971
+ fill="rgb(r,g,b)" fill-opacity="alpha" -->
5972
+ <xsl:template match="@*[local-name() = 'stroke' or local-name() = 'fill'][starts-with(normalize-space(.), 'rgba')]" mode="svg_update">
5973
+ <xsl:variable name="components_">
5974
+ <xsl:call-template name="split">
5975
+ <xsl:with-param name="pText" select="substring-before(substring-after(., '('), ')')"/>
5976
+ <xsl:with-param name="sep" select="','"/>
5977
+ </xsl:call-template>
5978
+ </xsl:variable>
5979
+ <xsl:variable name="components" select="xalan:nodeset($components_)"/>
5980
+ <xsl:variable name="att_name" select="local-name()"/>
5981
+ <xsl:attribute name="{$att_name}"><xsl:value-of select="concat('rgb(', $components/item[1], ',', $components/item[2], ',', $components/item[3], ')')"/></xsl:attribute>
5982
+ <xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/item[4]"/></xsl:attribute>
5983
+ </xsl:template>
5984
+
5850
5985
  <!-- ============== -->
5851
5986
  <!-- END: svg_update -->
5852
5987
  <!-- ============== -->
@@ -6485,40 +6620,18 @@
6485
6620
  <!-- =============== -->
6486
6621
  <xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
6487
6622
 
6488
- <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
6489
-
6490
- <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
6491
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
6492
- </xsl:if>
6493
-
6494
- <xsl:if test="ancestor::*[local-name() = 'example']">
6495
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
6496
- </xsl:if>
6497
-
6498
- <xsl:copy-of select="@id"/>
6499
-
6500
- <xsl:if test="parent::*[local-name() = 'note']">
6501
- <xsl:attribute name="margin-left">
6502
- <xsl:choose>
6503
- <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
6504
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
6505
- </xsl:choose>
6506
- </xsl:attribute>
6507
-
6508
- </xsl:if>
6509
- <fo:block-container margin-left="0mm">
6510
-
6511
- <fo:block xsl:use-attribute-sets="sourcecode-style">
6512
- <xsl:variable name="_font-size">
6623
+ <xsl:variable name="sourcecode_attributes">
6624
+ <xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
6625
+ <xsl:variable name="_font-size">
6513
6626
 
6514
- 10
6627
+ 10
6515
6628
 
6516
6629
 
6517
- <!-- 9 -->
6630
+ <!-- 9 -->
6518
6631
 
6519
- <!-- <xsl:if test="$namespace = 'ieee'">
6520
- <xsl:if test="$current_template = 'standard'">8</xsl:if>
6521
- </xsl:if> -->
6632
+ <!-- <xsl:if test="$namespace = 'ieee'">
6633
+ <xsl:if test="$current_template = 'standard'">8</xsl:if>
6634
+ </xsl:if> -->
6522
6635
 
6523
6636
  </xsl:variable>
6524
6637
 
@@ -6533,14 +6646,60 @@
6533
6646
  </xsl:choose>
6534
6647
  </xsl:attribute>
6535
6648
  </xsl:if>
6649
+ </xsl:element>
6650
+ </xsl:variable>
6536
6651
 
6652
+ <xsl:choose>
6653
+ <xsl:when test="$isGenerateTableIF = 'true' and (ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])">
6654
+ <xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
6655
+ <xsl:attribute name="{local-name()}">
6656
+ <xsl:value-of select="."/>
6657
+ </xsl:attribute>
6658
+ </xsl:for-each>
6537
6659
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
6538
- </fo:block>
6660
+ </xsl:when>
6539
6661
 
6540
- <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
6662
+ <xsl:otherwise>
6663
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
6541
6664
 
6542
- </fo:block-container>
6543
- </fo:block-container>
6665
+ <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
6666
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
6667
+ </xsl:if>
6668
+
6669
+ <xsl:if test="ancestor::*[local-name() = 'example']">
6670
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
6671
+ </xsl:if>
6672
+
6673
+ <xsl:copy-of select="@id"/>
6674
+
6675
+ <xsl:if test="parent::*[local-name() = 'note']">
6676
+ <xsl:attribute name="margin-left">
6677
+ <xsl:choose>
6678
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
6679
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
6680
+ </xsl:choose>
6681
+ </xsl:attribute>
6682
+
6683
+ </xsl:if>
6684
+ <fo:block-container margin-left="0mm">
6685
+
6686
+ <fo:block xsl:use-attribute-sets="sourcecode-style">
6687
+
6688
+ <xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
6689
+ <xsl:attribute name="{local-name()}">
6690
+ <xsl:value-of select="."/>
6691
+ </xsl:attribute>
6692
+ </xsl:for-each>
6693
+
6694
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
6695
+ </fo:block>
6696
+
6697
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
6698
+
6699
+ </fo:block-container>
6700
+ </fo:block-container>
6701
+ </xsl:otherwise>
6702
+ </xsl:choose>
6544
6703
  </xsl:template>
6545
6704
 
6546
6705
  <xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
@@ -8778,7 +8937,11 @@
8778
8937
  <!-- ===================================== -->
8779
8938
  <!-- Update xml -->
8780
8939
  <!-- ===================================== -->
8781
- <!-- STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
8940
+ <!-- =========================================================================== -->
8941
+ <!-- STEP1: -->
8942
+ <!-- - Re-order elements in 'preface', 'sections' based on @displayorder -->
8943
+ <!-- - Ignore 'span' without style -->
8944
+ <!-- =========================================================================== -->
8782
8945
  <xsl:template match="@*|node()" mode="update_xml_step1">
8783
8946
  <xsl:copy>
8784
8947
  <xsl:apply-templates select="@*|node()" mode="update_xml_step1"/>
@@ -8860,7 +9023,8 @@
8860
9023
  </xsl:copy>
8861
9024
  </xsl:template>
8862
9025
 
8863
- <xsl:template match="*[local-name() = 'span'][@style]" mode="update_xml_step1" priority="2">
9026
+ <!-- Example with 'class': <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
9027
+ <xsl:template match="*[local-name() = 'span'][@style or @class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']" mode="update_xml_step1" priority="2">
8864
9028
  <xsl:copy>
8865
9029
  <xsl:copy-of select="@*"/>
8866
9030
  <xsl:apply-templates mode="update_xml_step1"/>
@@ -8870,10 +9034,15 @@
8870
9034
  <xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
8871
9035
  <xsl:apply-templates mode="update_xml_step1"/>
8872
9036
  </xsl:template>
8873
-
9037
+ <!-- =========================================================================== -->
8874
9038
  <!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
9039
+ <!-- =========================================================================== -->
8875
9040
 
9041
+ <!-- =========================================================================== -->
8876
9042
  <!-- XML UPDATE STEP: enclose standard's name into tag 'keep-together_within-line' -->
9043
+ <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
9044
+ <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
9045
+ <!-- =========================================================================== -->
8877
9046
  <!-- Example: <keep-together_within-line>ISO 10303-51</keep-together_within-line> -->
8878
9047
  <xsl:template match="@*|node()" mode="update_xml_enclose_keep-together_within-line">
8879
9048
  <xsl:copy>
@@ -8889,10 +9058,15 @@
8889
9058
  <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
8890
9059
 
8891
9060
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
8892
- <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
8893
9061
  <xsl:variable name="tag_keep-together_within-line_open">###<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
8894
9062
  <xsl:variable name="tag_keep-together_within-line_close">###/<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
8895
- <xsl:variable name="text_" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
9063
+ <xsl:variable name="text__" select="java:replaceAll(java:java.lang.String.new(.), $regex_standard_reference, concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
9064
+ <xsl:variable name="text_">
9065
+ <xsl:choose>
9066
+ <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when> <!-- no need enclose standard's number into tag 'keep-together_within-line' in table cells -->
9067
+ <xsl:otherwise><xsl:value-of select="$text__"/></xsl:otherwise>
9068
+ </xsl:choose>
9069
+ </xsl:variable>
8896
9070
  <xsl:variable name="text"><text><xsl:call-template name="replace_text_tags">
8897
9071
  <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
8898
9072
  <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
@@ -8908,7 +9082,11 @@
8908
9082
  </xsl:variable>
8909
9083
 
8910
9084
  <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
8911
- <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable>
9085
+ <!-- \S matches any non-whitespace character (equivalent to [^\r\n\t\f\v ]) -->
9086
+ <!-- <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable> -->
9087
+ <!-- add &lt; and &gt; to \S -->
9088
+ <xsl:variable name="regex_S">[^\r\n\t\f\v \&lt;&gt;]</xsl:variable>
9089
+ <xsl:variable name="regex_solidus_units">((\b((<xsl:value-of select="$regex_S"/>{1,3}\/<xsl:value-of select="$regex_S"/>+)|(<xsl:value-of select="$regex_S"/>+\/<xsl:value-of select="$regex_S"/>{1,3}))\b)|(\/<xsl:value-of select="$regex_S"/>{1,3})\b)</xsl:variable>
8912
9090
  <xsl:variable name="text3">
8913
9091
  <text><xsl:for-each select="xalan:nodeset($text2)/text/node()">
8914
9092
  <xsl:choose>
@@ -8972,9 +9150,8 @@
8972
9150
  <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
8973
9151
  </xsl:choose>
8974
9152
  </xsl:template>
8975
-
8976
9153
  <!-- ===================================== -->
8977
- <!-- End Update xml -->
9154
+ <!-- END XML UPDATE STEP: enclose standard's name into tag 'keep-together_within-line' -->
8978
9155
  <!-- ===================================== -->
8979
9156
 
8980
9157
  <!-- for correct rendering combining chars -->
@@ -647,6 +647,15 @@ nav #toc {
647
647
  #toc .h3, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h3 {
648
648
  padding-left: 50px; }
649
649
 
650
+ #toc .h4, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h4 {
651
+ padding-left: 70px; }
652
+
653
+ #toc .h5, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h5 {
654
+ padding-left: 90px; }
655
+
656
+ #toc .h6, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h6 {
657
+ padding-left: 110px; }
658
+
650
659
  #toc .toc-active, #toc li:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
651
660
  background: #1d1d1d;
652
661
  box-shadow: inset -5px 0px 10px -5px #1d1d1d !important; }
@@ -683,6 +683,156 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3 {
683
683
  font-weight: bold;
684
684
  mso-bidi-font-weight: normal; }
685
685
 
686
+ p.MsoToc4, li.MsoToc4, div.MsoToc4 {
687
+ mso-style-noshow: yes;
688
+ mso-style-priority: 39;
689
+ mso-style-unhide: no;
690
+ mso-style-name: "TOC 4";
691
+ mso-style-parent: "TOC 3";
692
+ mso-style-next: Normal;
693
+ margin-top: 0cm;
694
+ margin-right: 25.0pt;
695
+ margin-bottom: 0cm;
696
+ margin-left: 36.0pt;
697
+ margin-bottom: .0001pt;
698
+ text-indent: -36.0pt;
699
+ line-height: 12.0pt;
700
+ mso-pagination: widow-orphan;
701
+ mso-hyphenate: none;
702
+ tab-stops: 20.15pt 47.9pt right dotted 487.6pt;
703
+ font-size: 10.5pt;
704
+ font-family: {{bodyfont}};
705
+ mso-fareast-font-family: {{bodyfont}};
706
+ mso-bidi-font-family: {{bodyfont}};
707
+ mso-ansi-language: EN-GB;
708
+ font-weight: bold;
709
+ mso-bidi-font-weight: normal; }
710
+
711
+ p.MsoToc5, li.MsoToc5, div.MsoToc5 {
712
+ mso-style-noshow: yes;
713
+ mso-style-priority: 39;
714
+ mso-style-unhide: no;
715
+ mso-style-name: "TOC 5";
716
+ mso-style-parent: "TOC 4";
717
+ mso-style-next: Normal;
718
+ margin-top: 0cm;
719
+ margin-right: 25.0pt;
720
+ margin-bottom: 0cm;
721
+ margin-left: 36.0pt;
722
+ margin-bottom: .0001pt;
723
+ text-indent: -36.0pt;
724
+ line-height: 12.0pt;
725
+ mso-pagination: widow-orphan;
726
+ mso-hyphenate: none;
727
+ tab-stops: 20.15pt 47.9pt right dotted 487.6pt;
728
+ font-size: 10.5pt;
729
+ font-family: {{bodyfont}};
730
+ mso-fareast-font-family: {{bodyfont}};
731
+ mso-bidi-font-family: {{bodyfont}};
732
+ mso-ansi-language: EN-GB;
733
+ font-weight: bold;
734
+ mso-bidi-font-weight: normal; }
735
+
736
+ p.MsoToc6, li.MsoToc6, div.MsoToc6 {
737
+ mso-style-noshow: yes;
738
+ mso-style-priority: 39;
739
+ mso-style-unhide: no;
740
+ mso-style-name: "TOC 6";
741
+ mso-style-parent: "TOC 5";
742
+ mso-style-next: Normal;
743
+ margin-top: 0cm;
744
+ margin-right: 25.0pt;
745
+ margin-bottom: 0cm;
746
+ margin-left: 36.0pt;
747
+ margin-bottom: .0001pt;
748
+ text-indent: -36.0pt;
749
+ line-height: 12.0pt;
750
+ mso-pagination: widow-orphan;
751
+ mso-hyphenate: none;
752
+ tab-stops: 20.15pt 55.0pt right dotted 487.6pt;
753
+ font-size: 10.5pt;
754
+ font-family: {{bodyfont}};
755
+ mso-fareast-font-family: {{bodyfont}};
756
+ mso-bidi-font-family: {{bodyfont}};
757
+ mso-ansi-language: EN-GB;
758
+ font-weight: bold;
759
+ mso-bidi-font-weight: normal; }
760
+
761
+ p.MsoToc7, li.MsoToc7, div.MsoToc7 {
762
+ mso-style-noshow: yes;
763
+ mso-style-priority: 39;
764
+ mso-style-unhide: no;
765
+ mso-style-name: "TOC 7";
766
+ mso-style-parent: "TOC 6";
767
+ mso-style-next: Normal;
768
+ margin-top: 0cm;
769
+ margin-right: 25.0pt;
770
+ margin-bottom: 0cm;
771
+ margin-left: 36.0pt;
772
+ margin-bottom: .0001pt;
773
+ text-indent: -36.0pt;
774
+ line-height: 12.0pt;
775
+ mso-pagination: widow-orphan;
776
+ mso-hyphenate: none;
777
+ tab-stops: 20.15pt 62.7pt right dotted 487.6pt;
778
+ font-size: 10.5pt;
779
+ font-family: {{bodyfont}};
780
+ mso-fareast-font-family: {{bodyfont}};
781
+ mso-bidi-font-family: {{bodyfont}};
782
+ mso-ansi-language: EN-GB;
783
+ font-weight: bold;
784
+ mso-bidi-font-weight: normal; }
785
+
786
+ p.MsoToc8, li.MsoToc8, div.MsoToc8 {
787
+ mso-style-noshow: yes;
788
+ mso-style-priority: 39;
789
+ mso-style-unhide: no;
790
+ mso-style-name: "TOC 8";
791
+ mso-style-parent: "TOC 7";
792
+ mso-style-next: Normal;
793
+ margin-top: 0cm;
794
+ margin-right: 25.0pt;
795
+ margin-bottom: 0cm;
796
+ margin-left: 36.0pt;
797
+ margin-bottom: .0001pt;
798
+ text-indent: -36.0pt;
799
+ line-height: 12.0pt;
800
+ mso-pagination: widow-orphan;
801
+ mso-hyphenate: none;
802
+ tab-stops: 20.15pt 70.3pt right dotted 487.6pt;
803
+ font-size: 10.5pt;
804
+ font-family: {{bodyfont}};
805
+ mso-fareast-font-family: {{bodyfont}};
806
+ mso-bidi-font-family: {{bodyfont}};
807
+ mso-ansi-language: EN-GB;
808
+ font-weight: bold;
809
+ mso-bidi-font-weight: normal; }
810
+
811
+ p.MsoToc9, li.MsoToc9, div.MsoToc9 {
812
+ mso-style-noshow: yes;
813
+ mso-style-priority: 39;
814
+ mso-style-unhide: no;
815
+ mso-style-name: "TOC 9";
816
+ mso-style-parent: "TOC 8";
817
+ mso-style-next: Normal;
818
+ margin-top: 0cm;
819
+ margin-right: 25.0pt;
820
+ margin-bottom: 0cm;
821
+ margin-left: 36.0pt;
822
+ margin-bottom: .0001pt;
823
+ text-indent: -36.0pt;
824
+ line-height: 12.0pt;
825
+ mso-pagination: widow-orphan;
826
+ mso-hyphenate: none;
827
+ tab-stops: 20.15pt 78.0pt right dotted 487.6pt;
828
+ font-size: 10.5pt;
829
+ font-family: {{bodyfont}};
830
+ mso-fareast-font-family: {{bodyfont}};
831
+ mso-bidi-font-family: {{bodyfont}};
832
+ mso-ansi-language: EN-GB;
833
+ font-weight: bold;
834
+ mso-bidi-font-weight: normal; }
835
+
686
836
  span.MsoFootnoteReference {
687
837
  mso-style-name: "Footnote Reference";
688
838
  mso-style-priority: 99;
@@ -642,6 +642,150 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3
642
642
  mso-ansi-language:EN-GB;
643
643
  font-weight:bold;
644
644
  mso-bidi-font-weight:normal;}
645
+ p.MsoToc4, li.MsoToc4, div.MsoToc4
646
+ {mso-style-noshow:yes;
647
+ mso-style-priority:39;
648
+ mso-style-unhide:no;
649
+ mso-style-name:"TOC 4";
650
+ mso-style-parent:"TOC 3";
651
+ mso-style-next:Normal;
652
+ margin-top:0cm;
653
+ margin-right:25.0pt;
654
+ margin-bottom:0cm;
655
+ margin-left:36.0pt;
656
+ margin-bottom:.0001pt;
657
+ text-indent:-36.0pt;
658
+ line-height:12.0pt;
659
+ mso-pagination:widow-orphan;
660
+ mso-hyphenate:none;
661
+ tab-stops:20.15pt 47.9pt right dotted 487.6pt;
662
+ font-size:10.5pt;
663
+ font-family:$bodyfont;
664
+ mso-fareast-font-family:$bodyfont;
665
+ mso-bidi-font-family:$bodyfont;
666
+ mso-ansi-language:EN-GB;
667
+ font-weight:bold;
668
+ mso-bidi-font-weight:normal;}
669
+ p.MsoToc5, li.MsoToc5, div.MsoToc5
670
+ {mso-style-noshow:yes;
671
+ mso-style-priority:39;
672
+ mso-style-unhide:no;
673
+ mso-style-name:"TOC 5";
674
+ mso-style-parent:"TOC 4";
675
+ mso-style-next:Normal;
676
+ margin-top:0cm;
677
+ margin-right:25.0pt;
678
+ margin-bottom:0cm;
679
+ margin-left:36.0pt;
680
+ margin-bottom:.0001pt;
681
+ text-indent:-36.0pt;
682
+ line-height:12.0pt;
683
+ mso-pagination:widow-orphan;
684
+ mso-hyphenate:none;
685
+ tab-stops:20.15pt 47.9pt right dotted 487.6pt;
686
+ font-size:10.5pt;
687
+ font-family:$bodyfont;
688
+ mso-fareast-font-family:$bodyfont;
689
+ mso-bidi-font-family:$bodyfont;
690
+ mso-ansi-language:EN-GB;
691
+ font-weight:bold;
692
+ mso-bidi-font-weight:normal;}
693
+ p.MsoToc6, li.MsoToc6, div.MsoToc6
694
+ {mso-style-noshow:yes;
695
+ mso-style-priority:39;
696
+ mso-style-unhide:no;
697
+ mso-style-name:"TOC 6";
698
+ mso-style-parent:"TOC 5";
699
+ mso-style-next:Normal;
700
+ margin-top:0cm;
701
+ margin-right:25.0pt;
702
+ margin-bottom:0cm;
703
+ margin-left:36.0pt;
704
+ margin-bottom:.0001pt;
705
+ text-indent:-36.0pt;
706
+ line-height:12.0pt;
707
+ mso-pagination:widow-orphan;
708
+ mso-hyphenate:none;
709
+ tab-stops:20.15pt 55.0pt right dotted 487.6pt;
710
+ font-size:10.5pt;
711
+ font-family:$bodyfont;
712
+ mso-fareast-font-family:$bodyfont;
713
+ mso-bidi-font-family:$bodyfont;
714
+ mso-ansi-language:EN-GB;
715
+ font-weight:bold;
716
+ mso-bidi-font-weight:normal;}
717
+ p.MsoToc7, li.MsoToc7, div.MsoToc7
718
+ {mso-style-noshow:yes;
719
+ mso-style-priority:39;
720
+ mso-style-unhide:no;
721
+ mso-style-name:"TOC 7";
722
+ mso-style-parent:"TOC 6";
723
+ mso-style-next:Normal;
724
+ margin-top:0cm;
725
+ margin-right:25.0pt;
726
+ margin-bottom:0cm;
727
+ margin-left:36.0pt;
728
+ margin-bottom:.0001pt;
729
+ text-indent:-36.0pt;
730
+ line-height:12.0pt;
731
+ mso-pagination:widow-orphan;
732
+ mso-hyphenate:none;
733
+ tab-stops:20.15pt 62.7pt right dotted 487.6pt;
734
+ font-size:10.5pt;
735
+ font-family:$bodyfont;
736
+ mso-fareast-font-family:$bodyfont;
737
+ mso-bidi-font-family:$bodyfont;
738
+ mso-ansi-language:EN-GB;
739
+ font-weight:bold;
740
+ mso-bidi-font-weight:normal;}
741
+ p.MsoToc8, li.MsoToc8, div.MsoToc8
742
+ {mso-style-noshow:yes;
743
+ mso-style-priority:39;
744
+ mso-style-unhide:no;
745
+ mso-style-name:"TOC 8";
746
+ mso-style-parent:"TOC 7";
747
+ mso-style-next:Normal;
748
+ margin-top:0cm;
749
+ margin-right:25.0pt;
750
+ margin-bottom:0cm;
751
+ margin-left:36.0pt;
752
+ margin-bottom:.0001pt;
753
+ text-indent:-36.0pt;
754
+ line-height:12.0pt;
755
+ mso-pagination:widow-orphan;
756
+ mso-hyphenate:none;
757
+ tab-stops:20.15pt 70.3pt right dotted 487.6pt;
758
+ font-size:10.5pt;
759
+ font-family:$bodyfont;
760
+ mso-fareast-font-family:$bodyfont;
761
+ mso-bidi-font-family:$bodyfont;
762
+ mso-ansi-language:EN-GB;
763
+ font-weight:bold;
764
+ mso-bidi-font-weight:normal;}
765
+ p.MsoToc9, li.MsoToc9, div.MsoToc9
766
+ {mso-style-noshow:yes;
767
+ mso-style-priority:39;
768
+ mso-style-unhide:no;
769
+ mso-style-name:"TOC 9";
770
+ mso-style-parent:"TOC 8";
771
+ mso-style-next:Normal;
772
+ margin-top:0cm;
773
+ margin-right:25.0pt;
774
+ margin-bottom:0cm;
775
+ margin-left:36.0pt;
776
+ margin-bottom:.0001pt;
777
+ text-indent:-36.0pt;
778
+ line-height:12.0pt;
779
+ mso-pagination:widow-orphan;
780
+ mso-hyphenate:none;
781
+ tab-stops:20.15pt 78.0pt right dotted 487.6pt;
782
+ font-size:10.5pt;
783
+ font-family:$bodyfont;
784
+ mso-fareast-font-family:$bodyfont;
785
+ mso-bidi-font-family:$bodyfont;
786
+ mso-ansi-language:EN-GB;
787
+ font-weight:bold;
788
+ mso-bidi-font-weight:normal;}
645
789
  span.MsoFootnoteReference {
646
790
  mso-style-name:"Footnote Reference";
647
791
  mso-style-priority:99;
@@ -8,7 +8,7 @@ module IsoDoc
8
8
  def annex1(elem)
9
9
  lbl = @xrefs.anchor(elem["id"], :label)
10
10
  if t = elem.at(ns("./title"))
11
- t.children = "<strong>#{t.children.to_xml}</strong>"
11
+ t.children = "<strong>#{to_xml(t.children)}</strong>"
12
12
  end
13
13
  prefix_name(elem, "<br/>", lbl, "title")
14
14
  end
@@ -683,6 +683,9 @@
683
683
  </define>
684
684
  <define name="underline">
685
685
  <element name="underline">
686
+ <optional>
687
+ <attribute name="style"/>
688
+ </optional>
686
689
  <zeroOrMore>
687
690
  <ref name="PureTextElement"/>
688
691
  </zeroOrMore>
@@ -47,7 +47,7 @@
47
47
  </element>
48
48
  </define>
49
49
  <define name="DocumentType">
50
- <value>document</value>
50
+ <text/>
51
51
  </define>
52
52
  <define name="docsubtype">
53
53
  <element name="subdoctype">
@@ -1152,7 +1152,7 @@
1152
1152
  <data type="boolean"/>
1153
1153
  </attribute>
1154
1154
  </optional>
1155
- <ref name="BibliographicItem"/>
1155
+ <ref name="ReducedBibliographicItem"/>
1156
1156
  </element>
1157
1157
  </define>
1158
1158
  <define name="image" combine="choice">
@@ -2653,6 +2653,7 @@
2653
2653
  <value>full</value>
2654
2654
  <value>short</value>
2655
2655
  <value>id</value>
2656
+ <value>modspec</value>
2656
2657
  </choice>
2657
2658
  </define>
2658
2659
  <define name="erefTypeWithConnective">
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module CC
3
- VERSION = "2.1.12".freeze
3
+ VERSION = "2.2.0".freeze
4
4
  end
5
5
  end
data/metanorma-cc.gemspec CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.require_paths = ["lib"]
30
30
  spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
31
31
 
32
- spec.add_dependency "metanorma-generic", "~> 2.2.2"
32
+ spec.add_dependency "metanorma-generic", "~> 2.3.0"
33
33
 
34
34
  spec.add_development_dependency "debug"
35
35
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
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.1.12
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-11-07 00:00:00.000000000 Z
11
+ date: 2022-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.2.2
19
+ version: 2.3.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.2.2
26
+ version: 2.3.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -245,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
245
245
  - !ruby/object:Gem::Version
246
246
  version: '0'
247
247
  requirements: []
248
- rubygems_version: 3.3.7
248
+ rubygems_version: 3.3.26
249
249
  signing_key:
250
250
  specification_version: 4
251
251
  summary: metanorma-cc lets you write CalConnect standards in AsciiDoc.