metanorma-csa 2.5.8 → 2.5.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/csa/csa.standard.xsl +188 -88
- data/lib/metanorma/csa/biblio.rng +12 -6
- data/lib/metanorma/csa/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8ea0778b4e68a55bead6274e7e3cf36b91b2a16d964f6b840d472f9adb468ce
|
4
|
+
data.tar.gz: 70b4227e4c3eccd950766dd67c90a5cef44a6873f6f868faa86ebf39ba074db5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4e409b698b17b4d9120965528538ff949a93092b75c5bcbda2ddc6b1d5ac924d3f6d761d3fc374b3db80bb8564c8970e38a454d0d1be7ebc1fe1dc4270565f7
|
7
|
+
data.tar.gz: f12c7ab8f68ba003001c74bca76774baa5c3609a94b85986a264b494586408c4f172527ead3e263c2109d50de78767d1ed299c1629ae9f7f6e932792487ee8dd
|
@@ -222,7 +222,7 @@
|
|
222
222
|
</xsl:variable>
|
223
223
|
|
224
224
|
<xsl:for-each select="xalan:nodeset($updated_xml_with_pages)"> <!-- set context to preface -->
|
225
|
-
<xsl:for-each select=".//*[local-name() = 'page_sequence'][normalize-space() != '' or
|
225
|
+
<xsl:for-each select=".//*[local-name() = 'page_sequence'][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">
|
226
226
|
<fo:page-sequence master-reference="document" format="1" force-page-count="no-force">
|
227
227
|
|
228
228
|
<xsl:attribute name="master-reference">
|
@@ -671,8 +671,21 @@
|
|
671
671
|
|
672
672
|
<!-- <xsl:strip-space elements="csa:xref"/> -->
|
673
673
|
|
674
|
-
<xsl:variable name="
|
675
|
-
|
674
|
+
<xsl:variable name="namespace_full_">
|
675
|
+
<xsl:choose>
|
676
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
|
677
|
+
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/iso -->
|
678
|
+
</xsl:choose>
|
679
|
+
</xsl:variable>
|
680
|
+
<xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
|
681
|
+
|
682
|
+
<xsl:variable name="root_element_">
|
683
|
+
<xsl:choose>
|
684
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
|
685
|
+
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
|
686
|
+
</xsl:choose>
|
687
|
+
</xsl:variable>
|
688
|
+
<xsl:variable name="root_element" select="normalize-space($root_element_)"/>
|
676
689
|
|
677
690
|
<xsl:variable name="document_scheme" select="normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'document-scheme']/*[local-name() = 'value'])"/>
|
678
691
|
|
@@ -3922,7 +3935,9 @@
|
|
3922
3935
|
<fo:block role="SKIP">
|
3923
3936
|
|
3924
3937
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
3925
|
-
|
3938
|
+
|
3939
|
+
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
3940
|
+
|
3926
3941
|
</xsl:if>
|
3927
3942
|
|
3928
3943
|
<xsl:apply-templates/>
|
@@ -4941,7 +4956,17 @@
|
|
4941
4956
|
<xsl:call-template name="refine_dt-cell-style"/>
|
4942
4957
|
|
4943
4958
|
<fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
|
4944
|
-
|
4959
|
+
|
4960
|
+
<xsl:choose>
|
4961
|
+
<xsl:when test="$isGenerateTableIF = 'true'">
|
4962
|
+
|
4963
|
+
<xsl:copy-of select="@id"/>
|
4964
|
+
|
4965
|
+
</xsl:when>
|
4966
|
+
<xsl:otherwise>
|
4967
|
+
<xsl:copy-of select="@id"/>
|
4968
|
+
</xsl:otherwise>
|
4969
|
+
</xsl:choose>
|
4945
4970
|
|
4946
4971
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
4947
4972
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
@@ -4973,7 +4998,9 @@
|
|
4973
4998
|
<fo:block role="SKIP">
|
4974
4999
|
|
4975
5000
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
4976
|
-
|
5001
|
+
|
5002
|
+
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
5003
|
+
|
4977
5004
|
</xsl:if>
|
4978
5005
|
|
4979
5006
|
<xsl:choose>
|
@@ -5451,6 +5478,12 @@
|
|
5451
5478
|
</xsl:if>
|
5452
5479
|
</xsl:template>
|
5453
5480
|
|
5481
|
+
<xsl:template match="*[local-name()='strike']">
|
5482
|
+
<fo:inline text-decoration="line-through">
|
5483
|
+
<xsl:apply-templates/>
|
5484
|
+
</fo:inline>
|
5485
|
+
</xsl:template>
|
5486
|
+
|
5454
5487
|
<xsl:template match="*[local-name() = 'pagebreak']">
|
5455
5488
|
<fo:block break-after="page"/>
|
5456
5489
|
<fo:block> </fo:block>
|
@@ -6213,6 +6246,14 @@
|
|
6213
6246
|
</xsl:for-each>
|
6214
6247
|
</xsl:variable>
|
6215
6248
|
|
6249
|
+
<!-- <xsl:if test="$debug = 'true'">
|
6250
|
+
<redirect:write file="{generate-id()}_words_with_width_sorted.xml">
|
6251
|
+
<td_text><xsl:copy-of select="$td_text"/></td_text>
|
6252
|
+
<words_with_width><xsl:copy-of select="$words_with_width"/></words_with_width>
|
6253
|
+
<xsl:copy-of select="$words_with_width_sorted"/>
|
6254
|
+
</redirect:write>
|
6255
|
+
</xsl:if> -->
|
6256
|
+
|
6216
6257
|
<xsl:variable name="words">
|
6217
6258
|
<xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
|
6218
6259
|
<word>
|
@@ -6338,6 +6379,7 @@
|
|
6338
6379
|
<xsl:if test="ancestor::*[local-name() = 'tt']"><tag>tt</tag></xsl:if>
|
6339
6380
|
<xsl:if test="ancestor::*[local-name() = 'sourcecode']"><tag>sourcecode</tag></xsl:if>
|
6340
6381
|
<xsl:if test="ancestor::*[local-name() = 'keep-together_within-line']"><tag>keep-together_within-line</tag></xsl:if>
|
6382
|
+
<xsl:if test="ancestor::*[local-name() = 'font_en_vertical']"><tag>font_en_vertical</tag></xsl:if>
|
6341
6383
|
</tags>
|
6342
6384
|
</xsl:template>
|
6343
6385
|
<!-- =============================== -->
|
@@ -6878,7 +6920,16 @@
|
|
6878
6920
|
</xsl:when>
|
6879
6921
|
<xsl:otherwise>
|
6880
6922
|
<!-- output text from <link>text</link> -->
|
6881
|
-
<xsl:
|
6923
|
+
<xsl:choose>
|
6924
|
+
<xsl:when test="starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.')">
|
6925
|
+
<xsl:call-template name="add-zero-spaces-link-java">
|
6926
|
+
<xsl:with-param name="text" select="."/>
|
6927
|
+
</xsl:call-template>
|
6928
|
+
</xsl:when>
|
6929
|
+
<xsl:otherwise>
|
6930
|
+
<xsl:apply-templates/>
|
6931
|
+
</xsl:otherwise>
|
6932
|
+
</xsl:choose>
|
6882
6933
|
</xsl:otherwise>
|
6883
6934
|
</xsl:choose>
|
6884
6935
|
</fo:basic-link>
|
@@ -7521,16 +7572,29 @@
|
|
7521
7572
|
<xsl:template name="getImageSrc">
|
7522
7573
|
<xsl:choose>
|
7523
7574
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
7575
|
+
<xsl:call-template name="getImageSrcExternal"/>
|
7576
|
+
</xsl:when>
|
7577
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
7578
|
+
</xsl:choose>
|
7579
|
+
</xsl:template>
|
7580
|
+
|
7581
|
+
<xsl:template name="getImageSrcExternal">
|
7582
|
+
<xsl:choose>
|
7583
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
7584
|
+
<xsl:value-of select="@src"/>
|
7585
|
+
</xsl:when>
|
7586
|
+
<xsl:otherwise>
|
7587
|
+
<xsl:variable name="src_with_basepath" select="concat($basepath, @src)"/>
|
7588
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($src_with_basepath)))"/>
|
7524
7589
|
<xsl:choose>
|
7525
|
-
<xsl:when test="
|
7526
|
-
<xsl:value-of select="
|
7590
|
+
<xsl:when test="$file_exists = 'true'">
|
7591
|
+
<xsl:value-of select="$src_with_basepath"/>
|
7527
7592
|
</xsl:when>
|
7528
7593
|
<xsl:otherwise>
|
7529
|
-
<xsl:value-of select="
|
7594
|
+
<xsl:value-of select="@src"/>
|
7530
7595
|
</xsl:otherwise>
|
7531
7596
|
</xsl:choose>
|
7532
|
-
</xsl:
|
7533
|
-
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
7597
|
+
</xsl:otherwise>
|
7534
7598
|
</xsl:choose>
|
7535
7599
|
</xsl:template>
|
7536
7600
|
|
@@ -7578,14 +7642,8 @@
|
|
7578
7642
|
<xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
|
7579
7643
|
</xsl:when>
|
7580
7644
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
7581
|
-
<xsl:
|
7582
|
-
|
7583
|
-
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
7584
|
-
</xsl:when>
|
7585
|
-
<xsl:otherwise>
|
7586
|
-
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
7587
|
-
</xsl:otherwise>
|
7588
|
-
</xsl:choose>
|
7645
|
+
<xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
|
7646
|
+
<xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
|
7589
7647
|
</xsl:when>
|
7590
7648
|
<xsl:otherwise>
|
7591
7649
|
<xsl:value-of select="@src"/>
|
@@ -7606,16 +7664,8 @@
|
|
7606
7664
|
</svg>
|
7607
7665
|
</xsl:when>
|
7608
7666
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
7609
|
-
<xsl:variable name="
|
7610
|
-
|
7611
|
-
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
7612
|
-
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
7613
|
-
</xsl:when>
|
7614
|
-
<xsl:otherwise>
|
7615
|
-
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
7616
|
-
</xsl:otherwise>
|
7617
|
-
</xsl:choose>
|
7618
|
-
</xsl:variable>
|
7667
|
+
<xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
|
7668
|
+
<xsl:variable name="src" select="concat('url(file:///', $src_external, ')')"/>
|
7619
7669
|
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
7620
7670
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
7621
7671
|
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
@@ -11711,7 +11761,9 @@
|
|
11711
11761
|
<xsl:template name="add_id">
|
11712
11762
|
<xsl:if test="not(@id)">
|
11713
11763
|
<!-- add @id - first element with @id plus '_element_name' -->
|
11714
|
-
<xsl:
|
11764
|
+
<xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
|
11765
|
+
<xsl:variable name="prefix_id"><xsl:value-of select="$prefix_id_"/><xsl:if test="normalize-space($prefix_id_) = ''"><xsl:value-of select="generate-id()"/></xsl:if></xsl:variable>
|
11766
|
+
<xsl:attribute name="id"><xsl:value-of select="$prefix_id"/>_<xsl:value-of select="local-name()"/></xsl:attribute>
|
11715
11767
|
</xsl:if>
|
11716
11768
|
</xsl:template>
|
11717
11769
|
|
@@ -13016,6 +13068,7 @@
|
|
13016
13068
|
<xsl:param name="formatted">false</xsl:param>
|
13017
13069
|
<xsl:param name="lang"/>
|
13018
13070
|
<xsl:param name="returnEmptyIfNotFound">false</xsl:param>
|
13071
|
+
<xsl:param name="bibdata_updated"/>
|
13019
13072
|
|
13020
13073
|
<xsl:variable name="curr_lang">
|
13021
13074
|
<xsl:choose>
|
@@ -13029,6 +13082,9 @@
|
|
13029
13082
|
|
13030
13083
|
<xsl:variable name="data_value">
|
13031
13084
|
<xsl:choose>
|
13085
|
+
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
|
13086
|
+
<xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
13087
|
+
</xsl:when>
|
13032
13088
|
<xsl:when test="$formatted = 'true'">
|
13033
13089
|
<xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
13034
13090
|
</xsl:when>
|
@@ -13200,14 +13256,8 @@
|
|
13200
13256
|
<xsl:value-of select="$src"/>
|
13201
13257
|
</xsl:when>
|
13202
13258
|
<xsl:otherwise>
|
13203
|
-
<xsl:
|
13204
|
-
|
13205
|
-
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
13206
|
-
</xsl:when>
|
13207
|
-
<xsl:otherwise>
|
13208
|
-
<xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
|
13209
|
-
</xsl:otherwise>
|
13210
|
-
</xsl:choose>
|
13259
|
+
<xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
|
13260
|
+
<xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
|
13211
13261
|
</xsl:otherwise>
|
13212
13262
|
</xsl:choose>
|
13213
13263
|
</xsl:template>
|
@@ -13229,15 +13279,23 @@
|
|
13229
13279
|
<!-- END: insert cover page image -->
|
13230
13280
|
|
13231
13281
|
<!-- https://github.com/metanorma/docs/blob/main/109.adoc -->
|
13282
|
+
<xsl:variable name="regex_ja_spec_half_width_">
|
13283
|
+
\u0028 <!-- U+0028 LEFT PARENTHESIS (() -->
|
13284
|
+
\u0029 <!-- U+0029 RIGHT PARENTHESIS ()) -->
|
13285
|
+
\u007B <!-- U+007B LEFT CURLY BRACKET ({) -->
|
13286
|
+
\u007D <!-- U+007D RIGHT CURLY BRACKET (}) -->
|
13287
|
+
\uFF62 <!-- U+FF62 HALFWIDTH LEFT CORNER BRACKET (「) -->
|
13288
|
+
\uFF63 <!-- U+FF63 HALFWIDTH RIGHT CORNER BRACKET (」) -->
|
13289
|
+
\u005B <!-- U+005B LEFT SQUARE BRACKET ([) -->
|
13290
|
+
\u005D <!-- U+005D RIGHT SQUARE BRACKET (]) -->
|
13291
|
+
</xsl:variable>
|
13292
|
+
<xsl:variable name="regex_ja_spec_half_width" select="translate(normalize-space($regex_ja_spec_half_width_), ' ', '')"/>
|
13232
13293
|
<xsl:variable name="regex_ja_spec_">[
|
13233
13294
|
<!-- Rotate 90° clockwise -->
|
13234
|
-
|
13295
|
+
<xsl:value-of select="$regex_ja_spec_half_width"/>
|
13235
13296
|
\uFF08 <!-- U+FF08 FULLWIDTH LEFT PARENTHESIS (() -->
|
13236
|
-
\u0029 <!-- U+0029 RIGHT PARENTHESIS ()) -->
|
13237
13297
|
\uFF09 <!-- U+FF09 FULLWIDTH RIGHT PARENTHESIS ()) -->
|
13238
|
-
\u007B <!-- U+007B LEFT CURLY BRACKET ({) -->
|
13239
13298
|
\uFF5B <!-- U+FF5B FULLWIDTH LEFT CURLY BRACKET ({) -->
|
13240
|
-
\u007D <!-- U+007D RIGHT CURLY BRACKET (}) -->
|
13241
13299
|
\uFF5D <!-- U+FF5D FULLWIDTH RIGHT CURLY BRACKET (}) -->
|
13242
13300
|
\u3014 <!-- U+3014 LEFT TORTOISE SHELL BRACKET (〔) -->
|
13243
13301
|
\u3015 <!-- U+3015 RIGHT TORTOISE SHELL BRACKET (〕) -->
|
@@ -13245,21 +13303,16 @@
|
|
13245
13303
|
\u3011 <!-- U+3011 RIGHT BLACK LENTICULAR BRACKET (】) -->
|
13246
13304
|
\u300A <!-- U+300A LEFT DOUBLE ANGLE BRACKET (《) -->
|
13247
13305
|
\u300B <!-- U+300B RIGHT DOUBLE ANGLE BRACKET (》) -->
|
13248
|
-
\uFF62 <!-- U+FF62 HALFWIDTH LEFT CORNER BRACKET (「) -->
|
13249
13306
|
\u300C <!-- U+300C LEFT CORNER BRACKET (「) -->
|
13250
|
-
\uFF63 <!-- U+FF63 HALFWIDTH RIGHT CORNER BRACKET (」) -->
|
13251
13307
|
\u300D <!-- U+300D RIGHT CORNER BRACKET (」) -->
|
13252
13308
|
\u300E <!-- U+300E LEFT WHITE CORNER BRACKET (『) -->
|
13253
13309
|
\u300F <!-- U+300F RIGHT WHITE CORNER BRACKET (』) -->
|
13254
|
-
\u005B <!-- U+005B LEFT SQUARE BRACKET ([) -->
|
13255
13310
|
\uFF3B <!-- U+FF3B FULLWIDTH LEFT SQUARE BRACKET ([) -->
|
13256
|
-
\u005D <!-- U+005D RIGHT SQUARE BRACKET (]) -->
|
13257
13311
|
\uFF3D <!-- U+FF3D FULLWIDTH RIGHT SQUARE BRACKET (]) -->
|
13258
13312
|
\u3008 <!-- U+3008 LEFT ANGLE BRACKET (〈) -->
|
13259
13313
|
\u3009 <!-- U+3009 RIGHT ANGLE BRACKET (〉) -->
|
13260
13314
|
\u3016 <!-- U+3016 LEFT WHITE LENTICULAR BRACKET (〖) -->
|
13261
13315
|
\u3017 <!-- U+3017 RIGHT WHITE LENTICULAR BRACKET (〗) -->
|
13262
|
-
|
13263
13316
|
\u301A <!-- U+301A LEFT WHITE SQUARE BRACKET (〚) -->
|
13264
13317
|
\u301B <!-- U+301B RIGHT WHITE SQUARE BRACKET (〛) -->
|
13265
13318
|
\u301C <!-- U+301C WAVE DASH (〜) -->
|
@@ -13291,6 +13344,7 @@
|
|
13291
13344
|
<xsl:variable name="regex_ja_spec"><xsl:value-of select="translate(normalize-space($regex_ja_spec_), ' ', '')"/></xsl:variable>
|
13292
13345
|
<xsl:template name="insertVerticalChar">
|
13293
13346
|
<xsl:param name="str"/>
|
13347
|
+
<xsl:param name="char_prev"/>
|
13294
13348
|
<xsl:param name="writing-mode">lr-tb</xsl:param>
|
13295
13349
|
<xsl:param name="reference-orientation">90</xsl:param>
|
13296
13350
|
<xsl:param name="add_zero_width_space">false</xsl:param>
|
@@ -13300,53 +13354,99 @@
|
|
13300
13354
|
</xsl:when>
|
13301
13355
|
<xsl:otherwise>
|
13302
13356
|
<xsl:if test="string-length($str) > 0">
|
13303
|
-
|
13357
|
+
|
13358
|
+
<!-- <xsl:variable name="horizontal_mode" select="normalize-space(ancestor::*[local-name() = 'span'][@class = 'horizontal'] and 1 = 1)"/> -->
|
13304
13359
|
<xsl:variable name="char" select="substring($str,1,1)"/>
|
13305
|
-
<
|
13306
|
-
|
13307
|
-
|
13308
|
-
|
13309
|
-
|
13310
|
-
<xsl:
|
13311
|
-
<
|
13312
|
-
|
13313
|
-
|
13314
|
-
|
13315
|
-
|
13316
|
-
|
13317
|
-
|
13318
|
-
|
13319
|
-
|
13320
|
-
|
13321
|
-
|
13322
|
-
|
13323
|
-
|
13324
|
-
|
13325
|
-
|
13326
|
-
|
13327
|
-
</xsl:
|
13328
|
-
|
13360
|
+
<xsl:variable name="char_next" select="substring($str,2,1)"/>
|
13361
|
+
|
13362
|
+
<xsl:variable name="char_half_width" select="normalize-space(java:matches(java:java.lang.String.new($char), concat('([', $regex_ja_spec_half_width, ']{1,})')))"/>
|
13363
|
+
|
13364
|
+
<xsl:choose>
|
13365
|
+
<xsl:when test="$char_half_width = 'true'">
|
13366
|
+
<fo:inline>
|
13367
|
+
<xsl:attribute name="baseline-shift">7%</xsl:attribute>
|
13368
|
+
<xsl:value-of select="$char"/>
|
13369
|
+
</fo:inline>
|
13370
|
+
</xsl:when>
|
13371
|
+
<xsl:otherwise>
|
13372
|
+
<!-- namespace-uri(ancestor::*[local-name() = 'title']) != '' to skip title from $contents -->
|
13373
|
+
<xsl:if test="namespace-uri(ancestor::*[local-name() = 'title']) != '' and ($char_prev = '' and ../preceding-sibling::node())">
|
13374
|
+
<fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
|
13375
|
+
</xsl:if>
|
13376
|
+
<fo:inline-container text-align="center" alignment-baseline="central" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm" role="SKIP" text-align-last="center">
|
13377
|
+
<xsl:if test="normalize-space($writing-mode) != ''">
|
13378
|
+
<xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
|
13379
|
+
<xsl:attribute name="reference-orientation">90</xsl:attribute>
|
13380
|
+
</xsl:if>
|
13381
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
|
13382
|
+
<xsl:attribute name="reference-orientation">0</xsl:attribute>
|
13383
|
+
</xsl:if>
|
13384
|
+
<xsl:if test="$char = '゜' or $char = '。' or $char = '﹒' or $char = '.'">
|
13385
|
+
<!-- Rotate 180°:
|
13386
|
+
U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK (゜)
|
13387
|
+
U+3002 IDEOGRAPHIC FULL STOP (。)
|
13388
|
+
U+FE52 SMALL FULL STOP (﹒)
|
13389
|
+
U+FF0E FULLWIDTH FULL STOP (.)
|
13390
|
+
-->
|
13391
|
+
<xsl:attribute name="reference-orientation">-90</xsl:attribute>
|
13392
|
+
</xsl:if>
|
13393
|
+
<fo:block-container width="1em" role="SKIP"><!-- border="0.5pt solid blue" -->
|
13394
|
+
<fo:block line-height="1em" role="SKIP">
|
13395
|
+
<!-- <xsl:choose>
|
13396
|
+
<xsl:when test="$horizontal_mode = 'true'">
|
13397
|
+
<xsl:value-of select="$str"/>
|
13398
|
+
</xsl:when>
|
13399
|
+
<xsl:otherwise>
|
13400
|
+
<xsl:value-of select="$char"/>
|
13401
|
+
</xsl:otherwise>
|
13402
|
+
</xsl:choose> -->
|
13329
13403
|
<xsl:value-of select="$char"/>
|
13330
|
-
</
|
13331
|
-
</
|
13332
|
-
</fo:
|
13333
|
-
|
13334
|
-
|
13335
|
-
|
13336
|
-
|
13337
|
-
|
13338
|
-
|
13339
|
-
|
13340
|
-
|
13341
|
-
<xsl:
|
13342
|
-
|
13343
|
-
|
13344
|
-
|
13404
|
+
</fo:block>
|
13405
|
+
</fo:block-container>
|
13406
|
+
</fo:inline-container>
|
13407
|
+
<xsl:if test="namespace-uri(ancestor::*[local-name() = 'title']) != '' and ($char_next != '' or ../following-sibling::node())">
|
13408
|
+
<fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
|
13409
|
+
</xsl:if>
|
13410
|
+
</xsl:otherwise>
|
13411
|
+
</xsl:choose>
|
13412
|
+
|
13413
|
+
<xsl:if test="$add_zero_width_space = 'true' and ($char = ',' or $char = '.' or $char = ' ' or $char = '·' or $char = ')' or $char = ']' or $char = '}' or $char = '/')"><xsl:value-of select="$zero_width_space"/></xsl:if>
|
13414
|
+
<!-- <xsl:if test="$horizontal_mode = 'false'"> -->
|
13415
|
+
<xsl:call-template name="insertVerticalChar">
|
13416
|
+
<xsl:with-param name="str" select="substring($str, 2)"/>
|
13417
|
+
<xsl:with-param name="char_prev" select="$char"/>
|
13418
|
+
<xsl:with-param name="writing-mode" select="$writing-mode"/>
|
13419
|
+
<xsl:with-param name="reference-orientation" select="$reference-orientation"/>
|
13420
|
+
<xsl:with-param name="add_zero_width_space" select="$add_zero_width_space"/>
|
13421
|
+
</xsl:call-template>
|
13422
|
+
<!-- </xsl:if> -->
|
13345
13423
|
</xsl:if>
|
13346
13424
|
</xsl:otherwise>
|
13347
13425
|
</xsl:choose>
|
13348
13426
|
</xsl:template>
|
13349
13427
|
|
13428
|
+
<xsl:template name="insertHorizontalChars">
|
13429
|
+
<xsl:param name="str"/>
|
13430
|
+
<xsl:param name="writing-mode">lr-tb</xsl:param>
|
13431
|
+
<xsl:param name="reference-orientation">90</xsl:param>
|
13432
|
+
<xsl:param name="add_zero_width_space">false</xsl:param>
|
13433
|
+
<xsl:choose>
|
13434
|
+
<xsl:otherwise>
|
13435
|
+
<fo:inline-container text-align="center" alignment-baseline="central" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm" role="SKIP">
|
13436
|
+
<xsl:if test="normalize-space($writing-mode) != ''">
|
13437
|
+
<xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
|
13438
|
+
<xsl:attribute name="reference-orientation">90</xsl:attribute>
|
13439
|
+
</xsl:if>
|
13440
|
+
<fo:block-container width="1em" role="SKIP"> <!-- border="0.5pt solid green" -->
|
13441
|
+
<fo:block line-height="1em" role="SKIP">
|
13442
|
+
<xsl:value-of select="$str"/>
|
13443
|
+
</fo:block>
|
13444
|
+
</fo:block-container>
|
13445
|
+
</fo:inline-container>
|
13446
|
+
</xsl:otherwise>
|
13447
|
+
</xsl:choose>
|
13448
|
+
</xsl:template>
|
13449
|
+
|
13350
13450
|
<xsl:template name="number-to-words">
|
13351
13451
|
<xsl:param name="number"/>
|
13352
13452
|
<xsl:param name="first"/>
|
@@ -267,11 +267,11 @@ Detailed in https://www.relaton.org/model/creator/</a:documentation>
|
|
267
267
|
<a:documentation>An identifier of the person according to an international identifier scheme</a:documentation>
|
268
268
|
</ref>
|
269
269
|
</zeroOrMore>
|
270
|
-
<
|
270
|
+
<optional>
|
271
271
|
<ref name="contact">
|
272
272
|
<a:documentation>Contact information for the person, including URI, address, phone number, and email</a:documentation>
|
273
273
|
</ref>
|
274
|
-
</
|
274
|
+
</optional>
|
275
275
|
</element>
|
276
276
|
</define>
|
277
277
|
<define name="fullname">
|
@@ -454,11 +454,11 @@ real names (if the person is named with a pseudonym or user name); previous lega
|
|
454
454
|
<a:documentation>An identifier of the organization according to an international identifier scheme</a:documentation>
|
455
455
|
</ref>
|
456
456
|
</zeroOrMore>
|
457
|
-
<
|
457
|
+
<optional>
|
458
458
|
<ref name="contact">
|
459
459
|
<a:documentation>Contact information for the organization, including address, phone number, and email</a:documentation>
|
460
460
|
</ref>
|
461
|
-
</
|
461
|
+
</optional>
|
462
462
|
<optional>
|
463
463
|
<ref name="logo">
|
464
464
|
<a:documentation>A logo for the organization</a:documentation>
|
@@ -540,12 +540,18 @@ real names (if the person is named with a pseudonym or user name); previous lega
|
|
540
540
|
<!-- TODO may change -->
|
541
541
|
<define name="contact">
|
542
542
|
<a:documentation>Contact information for a person or organization</a:documentation>
|
543
|
-
<
|
543
|
+
<zeroOrMore>
|
544
544
|
<ref name="address"/>
|
545
|
+
</zeroOrMore>
|
546
|
+
<zeroOrMore>
|
545
547
|
<ref name="phone"/>
|
548
|
+
</zeroOrMore>
|
549
|
+
<zeroOrMore>
|
546
550
|
<ref name="email"/>
|
551
|
+
</zeroOrMore>
|
552
|
+
<zeroOrMore>
|
547
553
|
<ref name="uri"/>
|
548
|
-
</
|
554
|
+
</zeroOrMore>
|
549
555
|
</define>
|
550
556
|
<define name="phone">
|
551
557
|
<a:documentation>The phone number associated with a person or organization</a:documentation>
|
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.5.
|
4
|
+
version: 2.5.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -242,7 +242,7 @@ homepage: https://github.com/metanorma/metanorma-csa
|
|
242
242
|
licenses:
|
243
243
|
- BSD-2-Clause
|
244
244
|
metadata: {}
|
245
|
-
post_install_message:
|
245
|
+
post_install_message:
|
246
246
|
rdoc_options: []
|
247
247
|
require_paths:
|
248
248
|
- lib
|
@@ -258,7 +258,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
258
258
|
version: '0'
|
259
259
|
requirements: []
|
260
260
|
rubygems_version: 3.3.27
|
261
|
-
signing_key:
|
261
|
+
signing_key:
|
262
262
|
specification_version: 4
|
263
263
|
summary: metanorma-csa lets you write CSA Normal Documents (CSAND) in AsciiDoc.
|
264
264
|
test_files: []
|