metanorma-csa 2.2.2 → 2.2.4
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 +4 -4
- data/lib/isodoc/csa/csa.standard.xsl +162 -55
- data/lib/isodoc/csa/html/htmlstyle.css +4 -0
- data/lib/isodoc/csa/html/htmlstyle.scss +6 -0
- data/lib/metanorma/csa/basicdoc.rng +0 -1
- data/lib/metanorma/csa/biblio.rng +12 -2
- data/lib/metanorma/csa/isodoc.rng +12 -1
- data/lib/metanorma/csa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2d3a32f72415c3686b71c6403ce09f7eda11dbf6183b75cfaf91747b27e0ee60
|
|
4
|
+
data.tar.gz: 321c976dff72a64acbb5f267850505f2f0008d51ce79a6221958c836a55236e1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0f1147857046f984258e10ecf5f063797d69cedddd8600d11be944ed98d65a6824b9089bda57701f02a11cbb6fed852276c0277742eca49ec6433e6956603ffe
|
|
7
|
+
data.tar.gz: 8d2b991f6a03678bcc0baae65009874ebdcbb73f06d5c5f4a64e5732fb2fb30c29dd1d7c2277684f9221b33e77073b23efcc966cc19f0025f86b870fb22b3a88
|
|
@@ -625,14 +625,14 @@
|
|
|
625
625
|
BUT DON'T put any another conditions together with $namespace = '...' (such conditions will be ignored). For another conditions, please use nested xsl:if or xsl:choose -->
|
|
626
626
|
|
|
627
627
|
<!--
|
|
628
|
-
<
|
|
628
|
+
<metanorma-extension>
|
|
629
629
|
<presentation-metadata>
|
|
630
630
|
<papersize>letter</papersize>
|
|
631
631
|
</presentation-metadata>
|
|
632
|
-
</
|
|
632
|
+
</metanorma-extension>
|
|
633
633
|
-->
|
|
634
634
|
|
|
635
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
|
635
|
+
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/>
|
|
636
636
|
<xsl:variable name="papersize_width_">
|
|
637
637
|
<xsl:choose>
|
|
638
638
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
|
@@ -749,7 +749,7 @@
|
|
|
749
749
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
|
750
750
|
|
|
751
751
|
<xsl:variable name="title-list-tables">
|
|
752
|
-
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
|
752
|
+
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
|
753
753
|
<xsl:value-of select="$toc_table_title"/>
|
|
754
754
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
|
755
755
|
<xsl:call-template name="getTitle">
|
|
@@ -759,7 +759,7 @@
|
|
|
759
759
|
</xsl:variable>
|
|
760
760
|
|
|
761
761
|
<xsl:variable name="title-list-figures">
|
|
762
|
-
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
|
762
|
+
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
|
763
763
|
<xsl:value-of select="$toc_figure_title"/>
|
|
764
764
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
|
765
765
|
<xsl:call-template name="getTitle">
|
|
@@ -769,7 +769,7 @@
|
|
|
769
769
|
</xsl:variable>
|
|
770
770
|
|
|
771
771
|
<xsl:variable name="title-list-recommendations">
|
|
772
|
-
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
|
772
|
+
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
|
773
773
|
<xsl:value-of select="$toc_requirement_title"/>
|
|
774
774
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
|
775
775
|
<xsl:call-template name="getTitle">
|
|
@@ -841,7 +841,7 @@
|
|
|
841
841
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
|
842
842
|
|
|
843
843
|
<xsl:variable name="additional_fonts_">
|
|
844
|
-
<xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = '
|
|
844
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[contains(local-name(), '-standard')][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
|
|
845
845
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
|
846
846
|
</xsl:for-each>
|
|
847
847
|
</xsl:variable>
|
|
@@ -1903,10 +1903,10 @@
|
|
|
1903
1903
|
|
|
1904
1904
|
<xsl:template name="processTablesFigures_Contents">
|
|
1905
1905
|
<xsl:param name="always"/>
|
|
1906
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
|
1906
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
|
1907
1907
|
<xsl:call-template name="processTables_Contents"/>
|
|
1908
1908
|
</xsl:if>
|
|
1909
|
-
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = '
|
|
1909
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
|
1910
1910
|
<xsl:call-template name="processFigures_Contents"/>
|
|
1911
1911
|
</xsl:if>
|
|
1912
1912
|
</xsl:template>
|
|
@@ -2241,6 +2241,8 @@
|
|
|
2241
2241
|
<xsl:attribute name="margin-right"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
|
|
2242
2242
|
</xsl:if>
|
|
2243
2243
|
|
|
2244
|
+
<xsl:call-template name="setBordersTableArray"/>
|
|
2245
|
+
|
|
2244
2246
|
</xsl:element>
|
|
2245
2247
|
</xsl:variable>
|
|
2246
2248
|
|
|
@@ -2338,7 +2340,7 @@
|
|
|
2338
2340
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
|
2339
2341
|
|
|
2340
2342
|
<xsl:choose>
|
|
2341
|
-
<xsl:when test="@width">
|
|
2343
|
+
<xsl:when test="@width and @width != 'full-page-width' and @width != 'text-width'">
|
|
2342
2344
|
|
|
2343
2345
|
<!-- centered table when table name is centered (see table-name-style) -->
|
|
2344
2346
|
|
|
@@ -2385,6 +2387,10 @@
|
|
|
2385
2387
|
|
|
2386
2388
|
</xsl:template>
|
|
2387
2389
|
|
|
2390
|
+
<xsl:template name="setBordersTableArray">
|
|
2391
|
+
|
|
2392
|
+
</xsl:template>
|
|
2393
|
+
|
|
2388
2394
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
|
2389
2395
|
<xsl:param name="continued"/>
|
|
2390
2396
|
<xsl:if test="normalize-space() != ''">
|
|
@@ -2659,6 +2665,7 @@
|
|
|
2659
2665
|
This makes columns with large differences between minimum and maximum widths wider than columns with smaller differences. -->
|
|
2660
2666
|
<xsl:when test="(@width_max > $page_width and @width_min < $page_width) or (@width_min >= $page_width)">
|
|
2661
2667
|
<!-- difference between the available space and the minimum table width -->
|
|
2668
|
+
<_width_min><xsl:value-of select="@width_min"/></_width_min>
|
|
2662
2669
|
<xsl:variable name="W" select="$page_width - @width_min"/>
|
|
2663
2670
|
<W><xsl:value-of select="$W"/></W>
|
|
2664
2671
|
<!-- difference between maximum and minimum width of the table -->
|
|
@@ -2859,6 +2866,8 @@
|
|
|
2859
2866
|
<fo:table-row>
|
|
2860
2867
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
|
2861
2868
|
|
|
2869
|
+
<xsl:call-template name="setBordersTableArray"/>
|
|
2870
|
+
|
|
2862
2871
|
<!-- fn will be processed inside 'note' processing -->
|
|
2863
2872
|
|
|
2864
2873
|
<!-- for BSI (not PAS) display Notes before footnotes -->
|
|
@@ -2980,6 +2989,8 @@
|
|
|
2980
2989
|
<xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
|
|
2981
2990
|
<fo:table-row xsl:use-attribute-sets="table-header-row-style">
|
|
2982
2991
|
|
|
2992
|
+
<xsl:call-template name="setBordersTableArray"/>
|
|
2993
|
+
|
|
2983
2994
|
<xsl:call-template name="setTableRowAttributes"/>
|
|
2984
2995
|
|
|
2985
2996
|
<xsl:apply-templates/>
|
|
@@ -3003,6 +3014,8 @@
|
|
|
3003
3014
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
3004
3015
|
</xsl:if>
|
|
3005
3016
|
|
|
3017
|
+
<xsl:call-template name="setBordersTableArray"/>
|
|
3018
|
+
|
|
3006
3019
|
<xsl:call-template name="setTableRowAttributes"/>
|
|
3007
3020
|
<xsl:apply-templates/>
|
|
3008
3021
|
</fo:table-row>
|
|
@@ -3022,6 +3035,8 @@
|
|
|
3022
3035
|
<xsl:with-param name="default">center</xsl:with-param>
|
|
3023
3036
|
</xsl:call-template>
|
|
3024
3037
|
|
|
3038
|
+
<xsl:call-template name="setBordersTableArray"/>
|
|
3039
|
+
|
|
3025
3040
|
<xsl:if test="$lang = 'ar'">
|
|
3026
3041
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
|
3027
3042
|
</xsl:if>
|
|
@@ -3074,6 +3089,8 @@
|
|
|
3074
3089
|
|
|
3075
3090
|
<!-- bsi -->
|
|
3076
3091
|
|
|
3092
|
+
<xsl:call-template name="setBordersTableArray"/>
|
|
3093
|
+
|
|
3077
3094
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
|
3078
3095
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
|
3079
3096
|
</xsl:if>
|
|
@@ -3266,17 +3283,20 @@
|
|
|
3266
3283
|
<xsl:for-each select="xalan:nodeset($references)//fn">
|
|
3267
3284
|
<xsl:variable name="reference" select="@reference"/>
|
|
3268
3285
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
|
3269
|
-
<fo:block xsl:use-attribute-sets="table-fn-style">
|
|
3270
3286
|
|
|
3271
|
-
|
|
3287
|
+
<fo:block xsl:use-attribute-sets="table-fn-style">
|
|
3272
3288
|
|
|
3273
|
-
|
|
3289
|
+
<fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
|
|
3290
|
+
|
|
3291
|
+
<xsl:value-of select="@reference"/>
|
|
3292
|
+
|
|
3293
|
+
</fo:inline>
|
|
3294
|
+
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
|
3295
|
+
<xsl:copy-of select="./node()"/>
|
|
3296
|
+
</fo:inline>
|
|
3297
|
+
|
|
3298
|
+
</fo:block>
|
|
3274
3299
|
|
|
3275
|
-
</fo:inline>
|
|
3276
|
-
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
|
3277
|
-
<xsl:copy-of select="./node()"/>
|
|
3278
|
-
</fo:inline>
|
|
3279
|
-
</fo:block>
|
|
3280
3300
|
</xsl:if>
|
|
3281
3301
|
</xsl:for-each>
|
|
3282
3302
|
</xsl:template>
|
|
@@ -4214,12 +4234,12 @@
|
|
|
4214
4234
|
<xsl:param name="value"/>
|
|
4215
4235
|
<xsl:variable name="add_width" select="string-length($value) * 20"/>
|
|
4216
4236
|
<xsl:variable name="maxwidth" select="60 + $add_width"/>
|
|
4217
|
-
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-
|
|
4218
|
-
<xsl:attribute name="height">5mm</xsl:attribute>
|
|
4237
|
+
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-10%"><!-- alignment-baseline="middle" -->
|
|
4238
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute> <!-- 5mm -->
|
|
4219
4239
|
<xsl:attribute name="content-width">100%</xsl:attribute>
|
|
4220
4240
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
|
4221
4241
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
|
4222
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
|
4242
|
+
<!-- <svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
|
4223
4243
|
<g>
|
|
4224
4244
|
<xsl:if test="$type = 'closing' or $type = 'end'">
|
|
4225
4245
|
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
|
@@ -4233,6 +4253,27 @@
|
|
|
4233
4253
|
</xsl:if>
|
|
4234
4254
|
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
|
4235
4255
|
</text>
|
|
4256
|
+
</svg> -->
|
|
4257
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
|
4258
|
+
<g>
|
|
4259
|
+
<xsl:if test="$type = 'closing' or $type = 'end'">
|
|
4260
|
+
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
|
4261
|
+
</xsl:if>
|
|
4262
|
+
<polyline points="0,2.5 {$maxwidth},2.5 {$maxwidth + 20},40 {$maxwidth},77.5 0,77.5" stroke="black" stroke-width="5" fill="white"/>
|
|
4263
|
+
<line x1="9.5" y1="0" x2="9.5" y2="80" stroke="black" stroke-width="19"/>
|
|
4264
|
+
</g>
|
|
4265
|
+
<xsl:variable name="text_x">
|
|
4266
|
+
<xsl:choose>
|
|
4267
|
+
<xsl:when test="$type = 'closing' or $type = 'end'">28</xsl:when>
|
|
4268
|
+
<xsl:otherwise>22</xsl:otherwise>
|
|
4269
|
+
</xsl:choose>
|
|
4270
|
+
</xsl:variable>
|
|
4271
|
+
<text font-family="Arial" x="{$text_x}" y="50" font-size="40pt">
|
|
4272
|
+
<xsl:value-of select="$kind"/>
|
|
4273
|
+
</text>
|
|
4274
|
+
<text font-family="Arial" x="{$text_x + 33}" y="65" font-size="38pt">
|
|
4275
|
+
<xsl:value-of select="$value"/>
|
|
4276
|
+
</text>
|
|
4236
4277
|
</svg>
|
|
4237
4278
|
</fo:instream-foreign-object>
|
|
4238
4279
|
</xsl:template>
|
|
@@ -4487,18 +4528,20 @@
|
|
|
4487
4528
|
|
|
4488
4529
|
<xsl:template name="add-zero-spaces-java">
|
|
4489
4530
|
<xsl:param name="text" select="."/>
|
|
4490
|
-
<!-- add zero-width space (#x200B) after characters: dash, dot,
|
|
4491
|
-
<xsl:variable name="text1" select="java:replaceAll(java:java.lang.String.new($text),'(
|
|
4531
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, equal, underscore, em dash, thin space, arrow right -->
|
|
4532
|
+
<xsl:variable name="text1" select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|=|_|—| |→)','$1')"/>
|
|
4533
|
+
<!-- add zero-width space (#x200B) after characters: colon, if there aren't digits after -->
|
|
4534
|
+
<xsl:variable name="text2" select="java:replaceAll(java:java.lang.String.new($text1),'(:)(\D)','$1$2')"/>
|
|
4492
4535
|
<!-- add zero-width space (#x200B) after characters: 'great than' -->
|
|
4493
|
-
<xsl:variable name="
|
|
4536
|
+
<xsl:variable name="text3" select="java:replaceAll(java:java.lang.String.new($text2), '(\u003e)(?!\u003e)', '$1')"/><!-- negative lookahead: 'great than' not followed by 'great than' -->
|
|
4494
4537
|
<!-- add zero-width space (#x200B) before characters: 'less than' -->
|
|
4495
|
-
<xsl:variable name="
|
|
4538
|
+
<xsl:variable name="text4" select="java:replaceAll(java:java.lang.String.new($text3), '(?<!\u003c)(\u003c)', '$1')"/> <!-- (?<!\u003c)(\u003c) --> <!-- negative lookbehind: 'less than' not preceeded by 'less than' -->
|
|
4496
4539
|
<!-- add zero-width space (#x200B) before character: { -->
|
|
4497
|
-
<xsl:variable name="
|
|
4540
|
+
<xsl:variable name="text5" select="java:replaceAll(java:java.lang.String.new($text4), '(?<!\W)(\{)', '$1')"/> <!-- negative lookbehind: '{' not preceeded by 'punctuation char' -->
|
|
4498
4541
|
<!-- add zero-width space (#x200B) after character: , -->
|
|
4499
|
-
<xsl:variable name="
|
|
4542
|
+
<xsl:variable name="text6" select="java:replaceAll(java:java.lang.String.new($text5), '(\,)(?!\d)', '$1')"/> <!-- negative lookahead: ',' not followed by digit -->
|
|
4500
4543
|
|
|
4501
|
-
<xsl:value-of select="$
|
|
4544
|
+
<xsl:value-of select="$text6"/>
|
|
4502
4545
|
</xsl:template>
|
|
4503
4546
|
|
|
4504
4547
|
<xsl:template name="add-zero-spaces-link-java">
|
|
@@ -4507,7 +4550,9 @@
|
|
|
4507
4550
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
|
|
4508
4551
|
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
|
|
4509
4552
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
|
4510
|
-
<xsl:
|
|
4553
|
+
<xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1')"/>
|
|
4554
|
+
<!-- remove zero-width space at the end -->
|
|
4555
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url), '$', '')"/>
|
|
4511
4556
|
</xsl:template>
|
|
4512
4557
|
|
|
4513
4558
|
<!-- add zero space after dash character (for table's entries) -->
|
|
@@ -4644,7 +4689,7 @@
|
|
|
4644
4689
|
</xsl:copy>
|
|
4645
4690
|
</xsl:template>
|
|
4646
4691
|
|
|
4647
|
-
<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">
|
|
4692
|
+
<xsl:template match="*[local-name()='th' or local-name() = 'td'][not(*[local-name()='br']) and not(*[local-name()='p']) and not(*[local-name()='sourcecode']) and not(*[local-name()='ul']) and not(*[local-name()='ol'])]" mode="table-without-br">
|
|
4648
4693
|
<xsl:copy>
|
|
4649
4694
|
<xsl:copy-of select="@*"/>
|
|
4650
4695
|
<p>
|
|
@@ -4720,6 +4765,14 @@
|
|
|
4720
4765
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),' {2,}',' ')"/>
|
|
4721
4766
|
</xsl:template>
|
|
4722
4767
|
|
|
4768
|
+
<xsl:template match="*[local-name()='th' or local-name()='td']//*[local-name() = 'ol' or local-name() = 'ul']" mode="table-without-br">
|
|
4769
|
+
<xsl:apply-templates mode="table-without-br"/>
|
|
4770
|
+
</xsl:template>
|
|
4771
|
+
|
|
4772
|
+
<xsl:template match="*[local-name()='th' or local-name()='td']//*[local-name() = 'li']" mode="table-without-br">
|
|
4773
|
+
<xsl:apply-templates mode="table-without-br"/>
|
|
4774
|
+
</xsl:template>
|
|
4775
|
+
|
|
4723
4776
|
<!-- mode="table-without-br" -->
|
|
4724
4777
|
<!-- ================================== -->
|
|
4725
4778
|
<!-- END: Step 0. replace <br/> to <p>...</p> -->
|
|
@@ -5533,7 +5586,7 @@
|
|
|
5533
5586
|
|
|
5534
5587
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
|
|
5535
5588
|
|
|
5536
|
-
<fo:block-container margin-left="0mm">
|
|
5589
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
|
5537
5590
|
|
|
5538
5591
|
<xsl:if test="ancestor::csa:ul or ancestor::csa:ol and not(ancestor::csa:note[1]/following-sibling::*)">
|
|
5539
5592
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
|
@@ -5711,11 +5764,14 @@
|
|
|
5711
5764
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
|
5712
5765
|
</xsl:call-template>
|
|
5713
5766
|
|
|
5767
|
+
<!-- Example: Dimensions in millimeters -->
|
|
5768
|
+
<xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
|
|
5769
|
+
|
|
5714
5770
|
<fo:block xsl:use-attribute-sets="figure-style">
|
|
5715
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
|
5771
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
|
|
5716
5772
|
</fo:block>
|
|
5717
5773
|
<xsl:call-template name="fn_display_figure"/>
|
|
5718
|
-
<xsl:for-each select="*[local-name() = 'note']">
|
|
5774
|
+
<xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
|
|
5719
5775
|
<xsl:call-template name="note"/>
|
|
5720
5776
|
</xsl:for-each>
|
|
5721
5777
|
|
|
@@ -5972,24 +6028,47 @@
|
|
|
5972
6028
|
|
|
5973
6029
|
</xsl:when>
|
|
5974
6030
|
<xsl:otherwise>
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
<xsl:
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
<xsl:
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
6031
|
+
|
|
6032
|
+
<xsl:variable name="element">
|
|
6033
|
+
<xsl:choose>
|
|
6034
|
+
<xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
|
|
6035
|
+
<fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
|
|
6036
|
+
</xsl:when>
|
|
6037
|
+
<xsl:otherwise>
|
|
6038
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
|
6039
|
+
<xsl:if test="ancestor::*[local-name() = 'dt']">
|
|
6040
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
6041
|
+
</xsl:if>
|
|
6042
|
+
</fo:block>
|
|
6043
|
+
</xsl:otherwise>
|
|
6044
|
+
</xsl:choose>
|
|
6045
|
+
</xsl:variable>
|
|
6046
|
+
|
|
6047
|
+
<xsl:for-each select="xalan:nodeset($element)/*">
|
|
6048
|
+
<xsl:copy>
|
|
6049
|
+
<xsl:copy-of select="@*"/>
|
|
6050
|
+
<!-- <fo:block xsl:use-attribute-sets="image-style"> -->
|
|
6051
|
+
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
|
6052
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
|
6053
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
|
6054
|
+
</xsl:if>
|
|
6055
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
|
6056
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
|
6057
|
+
<xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
|
|
6058
|
+
<xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
|
|
6059
|
+
<!-- effective height 297 - 27.4 - 13 = 256.6 -->
|
|
6060
|
+
<!-- effective width 210 - 12.5 - 25 = 172.5 -->
|
|
6061
|
+
<!-- effective height / width = 1.48, 1.4 - with title -->
|
|
6062
|
+
<xsl:if test="$svg_height > ($svg_width * 1.4)"> <!-- for images with big height -->
|
|
6063
|
+
<xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
|
|
6064
|
+
<xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
|
|
6065
|
+
</xsl:if>
|
|
6066
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
|
6067
|
+
<xsl:copy-of select="$svg_content"/>
|
|
6068
|
+
</fo:instream-foreign-object>
|
|
6069
|
+
<!-- </fo:block> -->
|
|
6070
|
+
</xsl:copy>
|
|
6071
|
+
</xsl:for-each>
|
|
5993
6072
|
</xsl:otherwise>
|
|
5994
6073
|
</xsl:choose>
|
|
5995
6074
|
</xsl:template>
|
|
@@ -6081,6 +6160,13 @@
|
|
|
6081
6160
|
</xsl:for-each>
|
|
6082
6161
|
</xsl:template>
|
|
6083
6162
|
|
|
6163
|
+
<!-- For the structures like: <dt><image src="" mimetype="image/svg+xml" height="" width=""><svg xmlns="http://www.w3.org/2000/svg" ... -->
|
|
6164
|
+
<xsl:template match="*[local-name() != 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
|
6165
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
|
6166
|
+
<xsl:call-template name="image_svg"/>
|
|
6167
|
+
</xsl:for-each>
|
|
6168
|
+
</xsl:template>
|
|
6169
|
+
|
|
6084
6170
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
|
6085
6171
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
|
6086
6172
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
|
@@ -6219,6 +6305,8 @@
|
|
|
6219
6305
|
<xsl:value-of select="."/>
|
|
6220
6306
|
</xsl:template>
|
|
6221
6307
|
|
|
6308
|
+
<xsl:template match="*[local-name() = 'add'][starts-with(., $ace_tag)]/text()" mode="bookmarks" priority="3"/>
|
|
6309
|
+
|
|
6222
6310
|
<xsl:template match="node()" mode="contents">
|
|
6223
6311
|
<xsl:apply-templates mode="contents"/>
|
|
6224
6312
|
</xsl:template>
|
|
@@ -6526,7 +6614,15 @@
|
|
|
6526
6614
|
<xsl:value-of select="@section"/>
|
|
6527
6615
|
<xsl:text> </xsl:text>
|
|
6528
6616
|
</xsl:if>
|
|
6529
|
-
<xsl:
|
|
6617
|
+
<xsl:variable name="title">
|
|
6618
|
+
<xsl:for-each select="title/node()">
|
|
6619
|
+
<xsl:choose>
|
|
6620
|
+
<xsl:when test="local-name() = 'add' and starts-with(., $ace_tag)"><!-- skip --></xsl:when>
|
|
6621
|
+
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
|
6622
|
+
</xsl:choose>
|
|
6623
|
+
</xsl:for-each>
|
|
6624
|
+
</xsl:variable>
|
|
6625
|
+
<xsl:value-of select="normalize-space($title)"/>
|
|
6530
6626
|
</fo:bookmark-title>
|
|
6531
6627
|
<xsl:apply-templates mode="bookmark"/>
|
|
6532
6628
|
</fo:bookmark>
|
|
@@ -6552,6 +6648,12 @@
|
|
|
6552
6648
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
|
|
6553
6649
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']"/>
|
|
6554
6650
|
|
|
6651
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note'][@type = 'units'] | *[local-name() = 'image']/*[local-name() = 'note'][@type = 'units']" priority="2">
|
|
6652
|
+
<fo:block text-align="right" keep-with-next="always">
|
|
6653
|
+
<xsl:apply-templates/>
|
|
6654
|
+
</fo:block>
|
|
6655
|
+
</xsl:template>
|
|
6656
|
+
|
|
6555
6657
|
<!-- ====== -->
|
|
6556
6658
|
<!-- ====== -->
|
|
6557
6659
|
<xsl:template match="*[local-name() = 'title']" mode="contents_item">
|
|
@@ -6701,6 +6803,10 @@
|
|
|
6701
6803
|
</xsl:for-each>
|
|
6702
6804
|
</xsl:template>
|
|
6703
6805
|
|
|
6806
|
+
<xsl:template match="*[local-name() = 'add'][starts-with(., $ace_tag)]/text()" mode="contents_item" priority="2">
|
|
6807
|
+
<xsl:value-of select="."/>
|
|
6808
|
+
</xsl:template>
|
|
6809
|
+
|
|
6704
6810
|
<!-- Note: to enable the addition of character span markup with semantic styling for DIS Word output -->
|
|
6705
6811
|
<xsl:template match="*[local-name() = 'span']" mode="contents_item">
|
|
6706
6812
|
<xsl:apply-templates mode="contents_item"/>
|
|
@@ -6710,7 +6816,7 @@
|
|
|
6710
6816
|
<!-- sourcecode -->
|
|
6711
6817
|
<!-- =============== -->
|
|
6712
6818
|
|
|
6713
|
-
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = '
|
|
6819
|
+
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
|
6714
6820
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
|
6715
6821
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
|
6716
6822
|
|
|
@@ -8748,8 +8854,8 @@
|
|
|
8748
8854
|
|
|
8749
8855
|
<xsl:variable name="toc_level">
|
|
8750
8856
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
|
8751
|
-
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = '
|
|
8752
|
-
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = '
|
|
8857
|
+
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
|
|
8858
|
+
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
|
|
8753
8859
|
<xsl:choose>
|
|
8754
8860
|
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
|
8755
8861
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
|
@@ -9737,6 +9843,7 @@
|
|
|
9737
9843
|
<xsl:choose>
|
|
9738
9844
|
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
|
9739
9845
|
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
|
9846
|
+
<xsl:when test="$align = 'justified'">justify</xsl:when>
|
|
9740
9847
|
<xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
|
|
9741
9848
|
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
|
9742
9849
|
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
|
@@ -216,6 +216,9 @@
|
|
|
216
216
|
<optional>
|
|
217
217
|
<ref name="fullname"/>
|
|
218
218
|
</optional>
|
|
219
|
+
<zeroOrMore>
|
|
220
|
+
<ref name="credential"/>
|
|
221
|
+
</zeroOrMore>
|
|
219
222
|
<zeroOrMore>
|
|
220
223
|
<ref name="affiliation"/>
|
|
221
224
|
</zeroOrMore>
|
|
@@ -232,6 +235,11 @@
|
|
|
232
235
|
<ref name="FullNameType"/>
|
|
233
236
|
</element>
|
|
234
237
|
</define>
|
|
238
|
+
<define name="credential">
|
|
239
|
+
<element name="credential">
|
|
240
|
+
<text/>
|
|
241
|
+
</element>
|
|
242
|
+
</define>
|
|
235
243
|
<define name="FullNameType">
|
|
236
244
|
<choice>
|
|
237
245
|
<group>
|
|
@@ -305,7 +313,9 @@
|
|
|
305
313
|
<zeroOrMore>
|
|
306
314
|
<ref name="affiliationdescription"/>
|
|
307
315
|
</zeroOrMore>
|
|
308
|
-
<
|
|
316
|
+
<optional>
|
|
317
|
+
<ref name="organization"/>
|
|
318
|
+
</optional>
|
|
309
319
|
</element>
|
|
310
320
|
</define>
|
|
311
321
|
<define name="affiliationname">
|
|
@@ -1316,7 +1326,7 @@
|
|
|
1316
1326
|
<value>commentaryOf</value>
|
|
1317
1327
|
<value>hasCommentary</value>
|
|
1318
1328
|
<value>related</value>
|
|
1319
|
-
<value>
|
|
1329
|
+
<value>hasComplement</value>
|
|
1320
1330
|
<value>complementOf</value>
|
|
1321
1331
|
<value>obsoletes</value>
|
|
1322
1332
|
<value>obsoletedBy</value>
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
<value>caution</value>
|
|
67
67
|
<value>statement</value>
|
|
68
68
|
<value>editorial</value>
|
|
69
|
+
<value>box</value>
|
|
69
70
|
</choice>
|
|
70
71
|
</define>
|
|
71
72
|
<define name="index">
|
|
@@ -1577,10 +1578,13 @@
|
|
|
1577
1578
|
<zeroOrMore>
|
|
1578
1579
|
<ref name="indexsect"/>
|
|
1579
1580
|
</zeroOrMore>
|
|
1581
|
+
<optional>
|
|
1582
|
+
<ref name="colophon"/>
|
|
1583
|
+
</optional>
|
|
1580
1584
|
</element>
|
|
1581
1585
|
</define>
|
|
1582
1586
|
<define name="misccontainer">
|
|
1583
|
-
<element name="
|
|
1587
|
+
<element name="metanorma-extension">
|
|
1584
1588
|
<oneOrMore>
|
|
1585
1589
|
<ref name="AnyElement"/>
|
|
1586
1590
|
</oneOrMore>
|
|
@@ -1599,6 +1603,13 @@
|
|
|
1599
1603
|
</oneOrMore>
|
|
1600
1604
|
</element>
|
|
1601
1605
|
</define>
|
|
1606
|
+
<define name="colophon">
|
|
1607
|
+
<element name="colophon">
|
|
1608
|
+
<oneOrMore>
|
|
1609
|
+
<ref name="content"/>
|
|
1610
|
+
</oneOrMore>
|
|
1611
|
+
</element>
|
|
1612
|
+
</define>
|
|
1602
1613
|
<define name="foreword">
|
|
1603
1614
|
<element name="foreword">
|
|
1604
1615
|
<ref name="Content-Section"/>
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-csa
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.2.
|
|
4
|
+
version: 2.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-02-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-generic
|