metanorma-itu 2.5.10 → 2.5.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/itu/itu.implementers-guide.xsl +189 -89
- data/lib/isodoc/itu/itu.in-force.xsl +189 -89
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +189 -89
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +189 -89
- data/lib/isodoc/itu/itu.recommendation.xsl +189 -89
- data/lib/isodoc/itu/itu.resolution.xsl +189 -89
- data/lib/isodoc/itu/itu.service-publication.xsl +189 -89
- data/lib/isodoc/itu/itu.technical-paper.xsl +189 -89
- data/lib/isodoc/itu/itu.technical-report.xsl +189 -89
- data/lib/isodoc/itu/presentation_ref.rb +1 -1
- data/lib/metanorma/itu/version.rb +1 -1
- metadata +5 -5
@@ -1381,7 +1381,7 @@
|
|
1381
1381
|
|
1382
1382
|
<xsl:for-each select="xalan:nodeset($updated_xml_with_pages)"> <!-- set context to preface/sections -->
|
1383
1383
|
|
1384
|
-
<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface']][normalize-space() != '' or
|
1384
|
+
<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface']][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">
|
1385
1385
|
|
1386
1386
|
<fo:page-sequence master-reference="document-preface" format="i" force-page-count="no-force">
|
1387
1387
|
|
@@ -1492,7 +1492,7 @@
|
|
1492
1492
|
</fo:page-sequence>
|
1493
1493
|
</xsl:for-each> <!-- END: preface pages -->
|
1494
1494
|
|
1495
|
-
<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface'])][normalize-space() != '' or
|
1495
|
+
<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface'])][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">
|
1496
1496
|
|
1497
1497
|
<!-- BODY -->
|
1498
1498
|
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
@@ -2780,8 +2780,21 @@
|
|
2780
2780
|
|
2781
2781
|
<!-- <xsl:strip-space elements="itu:xref"/> -->
|
2782
2782
|
|
2783
|
-
<xsl:variable name="
|
2784
|
-
|
2783
|
+
<xsl:variable name="namespace_full_">
|
2784
|
+
<xsl:choose>
|
2785
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
|
2786
|
+
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/iso -->
|
2787
|
+
</xsl:choose>
|
2788
|
+
</xsl:variable>
|
2789
|
+
<xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
|
2790
|
+
|
2791
|
+
<xsl:variable name="root_element_">
|
2792
|
+
<xsl:choose>
|
2793
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
|
2794
|
+
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
|
2795
|
+
</xsl:choose>
|
2796
|
+
</xsl:variable>
|
2797
|
+
<xsl:variable name="root_element" select="normalize-space($root_element_)"/>
|
2785
2798
|
|
2786
2799
|
<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'])"/>
|
2787
2800
|
|
@@ -6109,7 +6122,9 @@
|
|
6109
6122
|
<fo:block role="SKIP">
|
6110
6123
|
|
6111
6124
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
6112
|
-
|
6125
|
+
|
6126
|
+
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
6127
|
+
|
6113
6128
|
</xsl:if>
|
6114
6129
|
|
6115
6130
|
<xsl:apply-templates/>
|
@@ -7172,7 +7187,17 @@
|
|
7172
7187
|
<xsl:call-template name="refine_dt-cell-style"/>
|
7173
7188
|
|
7174
7189
|
<fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
|
7175
|
-
|
7190
|
+
|
7191
|
+
<xsl:choose>
|
7192
|
+
<xsl:when test="$isGenerateTableIF = 'true'">
|
7193
|
+
|
7194
|
+
<xsl:copy-of select="@id"/>
|
7195
|
+
|
7196
|
+
</xsl:when>
|
7197
|
+
<xsl:otherwise>
|
7198
|
+
<xsl:copy-of select="@id"/>
|
7199
|
+
</xsl:otherwise>
|
7200
|
+
</xsl:choose>
|
7176
7201
|
|
7177
7202
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
7178
7203
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
@@ -7204,7 +7229,9 @@
|
|
7204
7229
|
<fo:block role="SKIP">
|
7205
7230
|
|
7206
7231
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
7207
|
-
|
7232
|
+
|
7233
|
+
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
7234
|
+
|
7208
7235
|
</xsl:if>
|
7209
7236
|
|
7210
7237
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
@@ -7686,6 +7713,12 @@
|
|
7686
7713
|
</xsl:if>
|
7687
7714
|
</xsl:template>
|
7688
7715
|
|
7716
|
+
<xsl:template match="*[local-name()='strike']">
|
7717
|
+
<fo:inline text-decoration="line-through">
|
7718
|
+
<xsl:apply-templates/>
|
7719
|
+
</fo:inline>
|
7720
|
+
</xsl:template>
|
7721
|
+
|
7689
7722
|
<xsl:template match="*[local-name() = 'pagebreak']">
|
7690
7723
|
<fo:block break-after="page"/>
|
7691
7724
|
<fo:block> </fo:block>
|
@@ -8448,6 +8481,14 @@
|
|
8448
8481
|
</xsl:for-each>
|
8449
8482
|
</xsl:variable>
|
8450
8483
|
|
8484
|
+
<!-- <xsl:if test="$debug = 'true'">
|
8485
|
+
<redirect:write file="{generate-id()}_words_with_width_sorted.xml">
|
8486
|
+
<td_text><xsl:copy-of select="$td_text"/></td_text>
|
8487
|
+
<words_with_width><xsl:copy-of select="$words_with_width"/></words_with_width>
|
8488
|
+
<xsl:copy-of select="$words_with_width_sorted"/>
|
8489
|
+
</redirect:write>
|
8490
|
+
</xsl:if> -->
|
8491
|
+
|
8451
8492
|
<xsl:variable name="words">
|
8452
8493
|
<xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
|
8453
8494
|
<word>
|
@@ -8573,6 +8614,7 @@
|
|
8573
8614
|
<xsl:if test="ancestor::*[local-name() = 'tt']"><tag>tt</tag></xsl:if>
|
8574
8615
|
<xsl:if test="ancestor::*[local-name() = 'sourcecode']"><tag>sourcecode</tag></xsl:if>
|
8575
8616
|
<xsl:if test="ancestor::*[local-name() = 'keep-together_within-line']"><tag>keep-together_within-line</tag></xsl:if>
|
8617
|
+
<xsl:if test="ancestor::*[local-name() = 'font_en_vertical']"><tag>font_en_vertical</tag></xsl:if>
|
8576
8618
|
</tags>
|
8577
8619
|
</xsl:template>
|
8578
8620
|
<!-- =============================== -->
|
@@ -9113,7 +9155,16 @@
|
|
9113
9155
|
</xsl:when>
|
9114
9156
|
<xsl:otherwise>
|
9115
9157
|
<!-- output text from <link>text</link> -->
|
9116
|
-
<xsl:
|
9158
|
+
<xsl:choose>
|
9159
|
+
<xsl:when test="starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.')">
|
9160
|
+
<xsl:call-template name="add-zero-spaces-link-java">
|
9161
|
+
<xsl:with-param name="text" select="."/>
|
9162
|
+
</xsl:call-template>
|
9163
|
+
</xsl:when>
|
9164
|
+
<xsl:otherwise>
|
9165
|
+
<xsl:apply-templates/>
|
9166
|
+
</xsl:otherwise>
|
9167
|
+
</xsl:choose>
|
9117
9168
|
</xsl:otherwise>
|
9118
9169
|
</xsl:choose>
|
9119
9170
|
</fo:basic-link>
|
@@ -9756,16 +9807,29 @@
|
|
9756
9807
|
<xsl:template name="getImageSrc">
|
9757
9808
|
<xsl:choose>
|
9758
9809
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
9810
|
+
<xsl:call-template name="getImageSrcExternal"/>
|
9811
|
+
</xsl:when>
|
9812
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
9813
|
+
</xsl:choose>
|
9814
|
+
</xsl:template>
|
9815
|
+
|
9816
|
+
<xsl:template name="getImageSrcExternal">
|
9817
|
+
<xsl:choose>
|
9818
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
9819
|
+
<xsl:value-of select="@src"/>
|
9820
|
+
</xsl:when>
|
9821
|
+
<xsl:otherwise>
|
9822
|
+
<xsl:variable name="src_with_basepath" select="concat($basepath, @src)"/>
|
9823
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($src_with_basepath)))"/>
|
9759
9824
|
<xsl:choose>
|
9760
|
-
<xsl:when test="
|
9761
|
-
<xsl:value-of select="
|
9825
|
+
<xsl:when test="$file_exists = 'true'">
|
9826
|
+
<xsl:value-of select="$src_with_basepath"/>
|
9762
9827
|
</xsl:when>
|
9763
9828
|
<xsl:otherwise>
|
9764
|
-
<xsl:value-of select="
|
9829
|
+
<xsl:value-of select="@src"/>
|
9765
9830
|
</xsl:otherwise>
|
9766
9831
|
</xsl:choose>
|
9767
|
-
</xsl:
|
9768
|
-
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
9832
|
+
</xsl:otherwise>
|
9769
9833
|
</xsl:choose>
|
9770
9834
|
</xsl:template>
|
9771
9835
|
|
@@ -9813,14 +9877,8 @@
|
|
9813
9877
|
<xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
|
9814
9878
|
</xsl:when>
|
9815
9879
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
9816
|
-
<xsl:
|
9817
|
-
|
9818
|
-
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
9819
|
-
</xsl:when>
|
9820
|
-
<xsl:otherwise>
|
9821
|
-
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
9822
|
-
</xsl:otherwise>
|
9823
|
-
</xsl:choose>
|
9880
|
+
<xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
|
9881
|
+
<xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
|
9824
9882
|
</xsl:when>
|
9825
9883
|
<xsl:otherwise>
|
9826
9884
|
<xsl:value-of select="@src"/>
|
@@ -9841,16 +9899,8 @@
|
|
9841
9899
|
</svg>
|
9842
9900
|
</xsl:when>
|
9843
9901
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
9844
|
-
<xsl:variable name="
|
9845
|
-
|
9846
|
-
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
9847
|
-
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
9848
|
-
</xsl:when>
|
9849
|
-
<xsl:otherwise>
|
9850
|
-
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
9851
|
-
</xsl:otherwise>
|
9852
|
-
</xsl:choose>
|
9853
|
-
</xsl:variable>
|
9902
|
+
<xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
|
9903
|
+
<xsl:variable name="src" select="concat('url(file:///', $src_external, ')')"/>
|
9854
9904
|
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
9855
9905
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
9856
9906
|
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
@@ -14001,7 +14051,9 @@
|
|
14001
14051
|
<xsl:template name="add_id">
|
14002
14052
|
<xsl:if test="not(@id)">
|
14003
14053
|
<!-- add @id - first element with @id plus '_element_name' -->
|
14004
|
-
<xsl:
|
14054
|
+
<xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
|
14055
|
+
<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>
|
14056
|
+
<xsl:attribute name="id"><xsl:value-of select="$prefix_id"/>_<xsl:value-of select="local-name()"/></xsl:attribute>
|
14005
14057
|
</xsl:if>
|
14006
14058
|
</xsl:template>
|
14007
14059
|
|
@@ -15306,6 +15358,7 @@
|
|
15306
15358
|
<xsl:param name="formatted">false</xsl:param>
|
15307
15359
|
<xsl:param name="lang"/>
|
15308
15360
|
<xsl:param name="returnEmptyIfNotFound">false</xsl:param>
|
15361
|
+
<xsl:param name="bibdata_updated"/>
|
15309
15362
|
|
15310
15363
|
<xsl:variable name="curr_lang">
|
15311
15364
|
<xsl:choose>
|
@@ -15319,6 +15372,9 @@
|
|
15319
15372
|
|
15320
15373
|
<xsl:variable name="data_value">
|
15321
15374
|
<xsl:choose>
|
15375
|
+
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
|
15376
|
+
<xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
15377
|
+
</xsl:when>
|
15322
15378
|
<xsl:when test="$formatted = 'true'">
|
15323
15379
|
<xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
15324
15380
|
</xsl:when>
|
@@ -15490,14 +15546,8 @@
|
|
15490
15546
|
<xsl:value-of select="$src"/>
|
15491
15547
|
</xsl:when>
|
15492
15548
|
<xsl:otherwise>
|
15493
|
-
<xsl:
|
15494
|
-
|
15495
|
-
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
15496
|
-
</xsl:when>
|
15497
|
-
<xsl:otherwise>
|
15498
|
-
<xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
|
15499
|
-
</xsl:otherwise>
|
15500
|
-
</xsl:choose>
|
15549
|
+
<xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
|
15550
|
+
<xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
|
15501
15551
|
</xsl:otherwise>
|
15502
15552
|
</xsl:choose>
|
15503
15553
|
</xsl:template>
|
@@ -15519,15 +15569,23 @@
|
|
15519
15569
|
<!-- END: insert cover page image -->
|
15520
15570
|
|
15521
15571
|
<!-- https://github.com/metanorma/docs/blob/main/109.adoc -->
|
15572
|
+
<xsl:variable name="regex_ja_spec_half_width_">
|
15573
|
+
\u0028 <!-- U+0028 LEFT PARENTHESIS (() -->
|
15574
|
+
\u0029 <!-- U+0029 RIGHT PARENTHESIS ()) -->
|
15575
|
+
\u007B <!-- U+007B LEFT CURLY BRACKET ({) -->
|
15576
|
+
\u007D <!-- U+007D RIGHT CURLY BRACKET (}) -->
|
15577
|
+
\uFF62 <!-- U+FF62 HALFWIDTH LEFT CORNER BRACKET (「) -->
|
15578
|
+
\uFF63 <!-- U+FF63 HALFWIDTH RIGHT CORNER BRACKET (」) -->
|
15579
|
+
\u005B <!-- U+005B LEFT SQUARE BRACKET ([) -->
|
15580
|
+
\u005D <!-- U+005D RIGHT SQUARE BRACKET (]) -->
|
15581
|
+
</xsl:variable>
|
15582
|
+
<xsl:variable name="regex_ja_spec_half_width" select="translate(normalize-space($regex_ja_spec_half_width_), ' ', '')"/>
|
15522
15583
|
<xsl:variable name="regex_ja_spec_">[
|
15523
15584
|
<!-- Rotate 90° clockwise -->
|
15524
|
-
|
15585
|
+
<xsl:value-of select="$regex_ja_spec_half_width"/>
|
15525
15586
|
\uFF08 <!-- U+FF08 FULLWIDTH LEFT PARENTHESIS (() -->
|
15526
|
-
\u0029 <!-- U+0029 RIGHT PARENTHESIS ()) -->
|
15527
15587
|
\uFF09 <!-- U+FF09 FULLWIDTH RIGHT PARENTHESIS ()) -->
|
15528
|
-
\u007B <!-- U+007B LEFT CURLY BRACKET ({) -->
|
15529
15588
|
\uFF5B <!-- U+FF5B FULLWIDTH LEFT CURLY BRACKET ({) -->
|
15530
|
-
\u007D <!-- U+007D RIGHT CURLY BRACKET (}) -->
|
15531
15589
|
\uFF5D <!-- U+FF5D FULLWIDTH RIGHT CURLY BRACKET (}) -->
|
15532
15590
|
\u3014 <!-- U+3014 LEFT TORTOISE SHELL BRACKET (〔) -->
|
15533
15591
|
\u3015 <!-- U+3015 RIGHT TORTOISE SHELL BRACKET (〕) -->
|
@@ -15535,21 +15593,16 @@
|
|
15535
15593
|
\u3011 <!-- U+3011 RIGHT BLACK LENTICULAR BRACKET (】) -->
|
15536
15594
|
\u300A <!-- U+300A LEFT DOUBLE ANGLE BRACKET (《) -->
|
15537
15595
|
\u300B <!-- U+300B RIGHT DOUBLE ANGLE BRACKET (》) -->
|
15538
|
-
\uFF62 <!-- U+FF62 HALFWIDTH LEFT CORNER BRACKET (「) -->
|
15539
15596
|
\u300C <!-- U+300C LEFT CORNER BRACKET (「) -->
|
15540
|
-
\uFF63 <!-- U+FF63 HALFWIDTH RIGHT CORNER BRACKET (」) -->
|
15541
15597
|
\u300D <!-- U+300D RIGHT CORNER BRACKET (」) -->
|
15542
15598
|
\u300E <!-- U+300E LEFT WHITE CORNER BRACKET (『) -->
|
15543
15599
|
\u300F <!-- U+300F RIGHT WHITE CORNER BRACKET (』) -->
|
15544
|
-
\u005B <!-- U+005B LEFT SQUARE BRACKET ([) -->
|
15545
15600
|
\uFF3B <!-- U+FF3B FULLWIDTH LEFT SQUARE BRACKET ([) -->
|
15546
|
-
\u005D <!-- U+005D RIGHT SQUARE BRACKET (]) -->
|
15547
15601
|
\uFF3D <!-- U+FF3D FULLWIDTH RIGHT SQUARE BRACKET (]) -->
|
15548
15602
|
\u3008 <!-- U+3008 LEFT ANGLE BRACKET (〈) -->
|
15549
15603
|
\u3009 <!-- U+3009 RIGHT ANGLE BRACKET (〉) -->
|
15550
15604
|
\u3016 <!-- U+3016 LEFT WHITE LENTICULAR BRACKET (〖) -->
|
15551
15605
|
\u3017 <!-- U+3017 RIGHT WHITE LENTICULAR BRACKET (〗) -->
|
15552
|
-
|
15553
15606
|
\u301A <!-- U+301A LEFT WHITE SQUARE BRACKET (〚) -->
|
15554
15607
|
\u301B <!-- U+301B RIGHT WHITE SQUARE BRACKET (〛) -->
|
15555
15608
|
\u301C <!-- U+301C WAVE DASH (〜) -->
|
@@ -15581,6 +15634,7 @@
|
|
15581
15634
|
<xsl:variable name="regex_ja_spec"><xsl:value-of select="translate(normalize-space($regex_ja_spec_), ' ', '')"/></xsl:variable>
|
15582
15635
|
<xsl:template name="insertVerticalChar">
|
15583
15636
|
<xsl:param name="str"/>
|
15637
|
+
<xsl:param name="char_prev"/>
|
15584
15638
|
<xsl:param name="writing-mode">lr-tb</xsl:param>
|
15585
15639
|
<xsl:param name="reference-orientation">90</xsl:param>
|
15586
15640
|
<xsl:param name="add_zero_width_space">false</xsl:param>
|
@@ -15590,53 +15644,99 @@
|
|
15590
15644
|
</xsl:when>
|
15591
15645
|
<xsl:otherwise>
|
15592
15646
|
<xsl:if test="string-length($str) > 0">
|
15593
|
-
|
15647
|
+
|
15648
|
+
<!-- <xsl:variable name="horizontal_mode" select="normalize-space(ancestor::*[local-name() = 'span'][@class = 'horizontal'] and 1 = 1)"/> -->
|
15594
15649
|
<xsl:variable name="char" select="substring($str,1,1)"/>
|
15595
|
-
<
|
15596
|
-
|
15597
|
-
|
15598
|
-
|
15599
|
-
|
15600
|
-
<xsl:
|
15601
|
-
<
|
15602
|
-
|
15603
|
-
|
15604
|
-
|
15605
|
-
|
15606
|
-
|
15607
|
-
|
15608
|
-
|
15609
|
-
|
15610
|
-
|
15611
|
-
|
15612
|
-
|
15613
|
-
|
15614
|
-
|
15615
|
-
|
15616
|
-
|
15617
|
-
</xsl:
|
15618
|
-
|
15650
|
+
<xsl:variable name="char_next" select="substring($str,2,1)"/>
|
15651
|
+
|
15652
|
+
<xsl:variable name="char_half_width" select="normalize-space(java:matches(java:java.lang.String.new($char), concat('([', $regex_ja_spec_half_width, ']{1,})')))"/>
|
15653
|
+
|
15654
|
+
<xsl:choose>
|
15655
|
+
<xsl:when test="$char_half_width = 'true'">
|
15656
|
+
<fo:inline>
|
15657
|
+
<xsl:attribute name="baseline-shift">7%</xsl:attribute>
|
15658
|
+
<xsl:value-of select="$char"/>
|
15659
|
+
</fo:inline>
|
15660
|
+
</xsl:when>
|
15661
|
+
<xsl:otherwise>
|
15662
|
+
<!-- namespace-uri(ancestor::*[local-name() = 'title']) != '' to skip title from $contents -->
|
15663
|
+
<xsl:if test="namespace-uri(ancestor::*[local-name() = 'title']) != '' and ($char_prev = '' and ../preceding-sibling::node())">
|
15664
|
+
<fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
|
15665
|
+
</xsl:if>
|
15666
|
+
<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">
|
15667
|
+
<xsl:if test="normalize-space($writing-mode) != ''">
|
15668
|
+
<xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
|
15669
|
+
<xsl:attribute name="reference-orientation">90</xsl:attribute>
|
15670
|
+
</xsl:if>
|
15671
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
|
15672
|
+
<xsl:attribute name="reference-orientation">0</xsl:attribute>
|
15673
|
+
</xsl:if>
|
15674
|
+
<xsl:if test="$char = '゜' or $char = '。' or $char = '﹒' or $char = '.'">
|
15675
|
+
<!-- Rotate 180°:
|
15676
|
+
U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK (゜)
|
15677
|
+
U+3002 IDEOGRAPHIC FULL STOP (。)
|
15678
|
+
U+FE52 SMALL FULL STOP (﹒)
|
15679
|
+
U+FF0E FULLWIDTH FULL STOP (.)
|
15680
|
+
-->
|
15681
|
+
<xsl:attribute name="reference-orientation">-90</xsl:attribute>
|
15682
|
+
</xsl:if>
|
15683
|
+
<fo:block-container width="1em" role="SKIP"><!-- border="0.5pt solid blue" -->
|
15684
|
+
<fo:block line-height="1em" role="SKIP">
|
15685
|
+
<!-- <xsl:choose>
|
15686
|
+
<xsl:when test="$horizontal_mode = 'true'">
|
15687
|
+
<xsl:value-of select="$str"/>
|
15688
|
+
</xsl:when>
|
15689
|
+
<xsl:otherwise>
|
15690
|
+
<xsl:value-of select="$char"/>
|
15691
|
+
</xsl:otherwise>
|
15692
|
+
</xsl:choose> -->
|
15619
15693
|
<xsl:value-of select="$char"/>
|
15620
|
-
</
|
15621
|
-
</
|
15622
|
-
</fo:
|
15623
|
-
|
15624
|
-
|
15625
|
-
|
15626
|
-
|
15627
|
-
|
15628
|
-
|
15629
|
-
|
15630
|
-
|
15631
|
-
<xsl:
|
15632
|
-
|
15633
|
-
|
15634
|
-
|
15694
|
+
</fo:block>
|
15695
|
+
</fo:block-container>
|
15696
|
+
</fo:inline-container>
|
15697
|
+
<xsl:if test="namespace-uri(ancestor::*[local-name() = 'title']) != '' and ($char_next != '' or ../following-sibling::node())">
|
15698
|
+
<fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
|
15699
|
+
</xsl:if>
|
15700
|
+
</xsl:otherwise>
|
15701
|
+
</xsl:choose>
|
15702
|
+
|
15703
|
+
<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>
|
15704
|
+
<!-- <xsl:if test="$horizontal_mode = 'false'"> -->
|
15705
|
+
<xsl:call-template name="insertVerticalChar">
|
15706
|
+
<xsl:with-param name="str" select="substring($str, 2)"/>
|
15707
|
+
<xsl:with-param name="char_prev" select="$char"/>
|
15708
|
+
<xsl:with-param name="writing-mode" select="$writing-mode"/>
|
15709
|
+
<xsl:with-param name="reference-orientation" select="$reference-orientation"/>
|
15710
|
+
<xsl:with-param name="add_zero_width_space" select="$add_zero_width_space"/>
|
15711
|
+
</xsl:call-template>
|
15712
|
+
<!-- </xsl:if> -->
|
15635
15713
|
</xsl:if>
|
15636
15714
|
</xsl:otherwise>
|
15637
15715
|
</xsl:choose>
|
15638
15716
|
</xsl:template>
|
15639
15717
|
|
15718
|
+
<xsl:template name="insertHorizontalChars">
|
15719
|
+
<xsl:param name="str"/>
|
15720
|
+
<xsl:param name="writing-mode">lr-tb</xsl:param>
|
15721
|
+
<xsl:param name="reference-orientation">90</xsl:param>
|
15722
|
+
<xsl:param name="add_zero_width_space">false</xsl:param>
|
15723
|
+
<xsl:choose>
|
15724
|
+
<xsl:otherwise>
|
15725
|
+
<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">
|
15726
|
+
<xsl:if test="normalize-space($writing-mode) != ''">
|
15727
|
+
<xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
|
15728
|
+
<xsl:attribute name="reference-orientation">90</xsl:attribute>
|
15729
|
+
</xsl:if>
|
15730
|
+
<fo:block-container width="1em" role="SKIP"> <!-- border="0.5pt solid green" -->
|
15731
|
+
<fo:block line-height="1em" role="SKIP">
|
15732
|
+
<xsl:value-of select="$str"/>
|
15733
|
+
</fo:block>
|
15734
|
+
</fo:block-container>
|
15735
|
+
</fo:inline-container>
|
15736
|
+
</xsl:otherwise>
|
15737
|
+
</xsl:choose>
|
15738
|
+
</xsl:template>
|
15739
|
+
|
15640
15740
|
<xsl:template name="number-to-words">
|
15641
15741
|
<xsl:param name="number"/>
|
15642
15742
|
<xsl:param name="first"/>
|