metanorma-iso 2.9.0 → 2.9.2
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/iso/base_convert.rb +27 -21
- data/lib/isodoc/iso/html/isodoc-dis.css +1 -1
- data/lib/isodoc/iso/html/isodoc-dis.scss +1 -1
- data/lib/isodoc/iso/html/isodoc.css +1 -1
- data/lib/isodoc/iso/html/isodoc.scss +1 -1
- data/lib/isodoc/iso/iso.amendment.xsl +506 -156
- data/lib/isodoc/iso/iso.international-standard.xsl +506 -156
- data/lib/isodoc/iso/presentation_bibdata.rb +0 -29
- data/lib/isodoc/iso/presentation_xml_convert.rb +95 -30
- data/lib/isodoc/iso/presentation_xref.rb +4 -2
- data/lib/isodoc/iso/sections.rb +2 -2
- data/lib/isodoc/iso/word_convert.rb +11 -13
- data/lib/isodoc/iso/word_dis_convert.rb +1 -4
- data/lib/isodoc/iso/xref.rb +52 -14
- data/lib/isodoc/iso/xref_section.rb +23 -28
- data/lib/metanorma/iso/biblio.rng +13 -1
- data/lib/metanorma/iso/isodoc.rng +6 -6
- data/lib/metanorma/iso/relaton-iso.rng +13 -30
- data/lib/metanorma/iso/version.rb +1 -1
- data/lib/metanorma/requirements/modspec.rb +10 -6
- data/metanorma-iso.gemspec +1 -1
- metadata +4 -4
@@ -1898,7 +1898,7 @@
|
|
1898
1898
|
</fo:table-cell>
|
1899
1899
|
<fo:table-cell number-columns-spanned="2" display-align="after" padding-left="6mm">
|
1900
1900
|
<fo:block font-size="19pt" font-weight="bold" line-height="1">
|
1901
|
-
<xsl:if test="$stage >=60">
|
1901
|
+
<xsl:if test="$stage >=60 and $substage != 0">
|
1902
1902
|
<xsl:attribute name="color"><xsl:value-of select="$color_red"/></xsl:attribute>
|
1903
1903
|
</xsl:if>
|
1904
1904
|
<xsl:value-of select="$docidentifierISO"/>
|
@@ -1924,7 +1924,7 @@
|
|
1924
1924
|
<xsl:call-template name="insertTitlesLangMain"/>
|
1925
1925
|
</fo:block>
|
1926
1926
|
|
1927
|
-
<xsl:if test="not($stage-abbreviation = 'FDAMD' or $stage-abbreviation = 'FDAM')">
|
1927
|
+
<xsl:if test="not($stage-abbreviation = 'FDAMD' or $stage-abbreviation = 'FDAM' or $stage-abbreviation = 'PRF')">
|
1928
1928
|
<xsl:for-each select="xalan:nodeset($lang_other)/lang">
|
1929
1929
|
<xsl:variable name="lang_other" select="."/>
|
1930
1930
|
<fo:block font-size="12pt" role="SKIP"><xsl:value-of select="$linebreak"/></fo:block>
|
@@ -1961,7 +1961,7 @@
|
|
1961
1961
|
</xsl:if>
|
1962
1962
|
|
1963
1963
|
<xsl:if test="$doctype = 'amendment'"> <!-- and not($stage-abbreviation = 'FDAMD' or $stage-abbreviation = 'FDAM') -->
|
1964
|
-
<fo:block font-size="
|
1964
|
+
<fo:block font-size="15pt" font-weight="bold" margin-bottom="3mm">
|
1965
1965
|
<xsl:value-of select="$doctype_uppercased"/>
|
1966
1966
|
<xsl:text> </xsl:text>
|
1967
1967
|
<xsl:variable name="amendment-number" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@amendment"/>
|
@@ -2030,7 +2030,10 @@
|
|
2030
2030
|
<xsl:variable name="additionalNotes">
|
2031
2031
|
<xsl:call-template name="insertCoverPageAdditionalNotes"/>
|
2032
2032
|
</xsl:variable>
|
2033
|
-
|
2033
|
+
|
2034
|
+
<xsl:variable name="feedback_link" select="normalize-space(/iso:iso-standard/iso:metanorma-extension/iso:semantic-metadata/iso:feedback-link)"/>
|
2035
|
+
|
2036
|
+
<xsl:if test="normalize-space($additionalNotes) != ''"> <!-- or $stage-abbreviation = 'PRF' -->
|
2034
2037
|
<xsl:attribute name="display-align">center</xsl:attribute>
|
2035
2038
|
<fo:block>
|
2036
2039
|
<xsl:copy-of select="$additionalNotes"/>
|
@@ -2038,7 +2041,10 @@
|
|
2038
2041
|
</xsl:if>
|
2039
2042
|
|
2040
2043
|
<xsl:if test="$stage-abbreviation = 'PRF'">
|
2041
|
-
<fo:block font-size="
|
2044
|
+
<fo:block font-size="34pt" font-weight="bold">
|
2045
|
+
<xsl:if test="normalize-space($additionalNotes) = '' and $feedback_link = ''">
|
2046
|
+
<xsl:attribute name="margin-bottom">3.5mm</xsl:attribute>
|
2047
|
+
</xsl:if>
|
2042
2048
|
<xsl:call-template name="add-letter-spacing">
|
2043
2049
|
<xsl:with-param name="text" select="$proof-text"/>
|
2044
2050
|
<xsl:with-param name="letter-spacing" select="0.65"/>
|
@@ -2047,7 +2053,6 @@
|
|
2047
2053
|
</xsl:if>
|
2048
2054
|
|
2049
2055
|
<fo:block>
|
2050
|
-
<xsl:variable name="feedback_link" select="normalize-space(/iso:iso-standard/iso:metanorma-extension/iso:semantic-metadata/iso:feedback-link)"/>
|
2051
2056
|
<xsl:if test="$stage >=60 and $feedback_link != ''">
|
2052
2057
|
<fo:block-container width="69mm" background-color="rgb(242,242,242)" display-align="before">
|
2053
2058
|
<fo:table table-layout="fixed" width="100%" role="SKIP">
|
@@ -2973,7 +2978,7 @@
|
|
2973
2978
|
<xsl:when test="($stage-abbreviation = 'IS' or $stage-abbreviation = 'D') and /iso:iso-standard/iso:bibdata/iso:date[@type = 'created']">
|
2974
2979
|
<xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:date[@type = 'created']"/>
|
2975
2980
|
</xsl:when>
|
2976
|
-
<xsl:when test="$stage-abbreviation = 'IS' or $stage-abbreviation = 'published'">
|
2981
|
+
<xsl:when test="$stage-abbreviation = 'IS' or $stage-abbreviation = 'published' or $stage-abbreviation = 'PRF'">
|
2977
2982
|
<xsl:value-of select="substring(/iso:iso-standard/iso:bibdata/iso:version/iso:revision-date,1, 7)"/>
|
2978
2983
|
</xsl:when>
|
2979
2984
|
</xsl:choose>
|
@@ -3587,10 +3592,10 @@
|
|
3587
3592
|
<!-- ============================= -->
|
3588
3593
|
|
3589
3594
|
<!-- element with title -->
|
3590
|
-
<xsl:template match="*[iso:title]" mode="contents">
|
3595
|
+
<xsl:template match="*[iso:title or iso:fmt-title]" mode="contents">
|
3591
3596
|
<xsl:variable name="level">
|
3592
3597
|
<xsl:call-template name="getLevel">
|
3593
|
-
<xsl:with-param name="depth" select="iso:title/@depth"/>
|
3598
|
+
<xsl:with-param name="depth" select="iso:fmt-title/@depth | iso:title/@depth"/>
|
3594
3599
|
</xsl:call-template>
|
3595
3600
|
</xsl:variable>
|
3596
3601
|
|
@@ -5099,12 +5104,22 @@
|
|
5099
5104
|
<xsl:param name="font-weight" select="'bold'"/>
|
5100
5105
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
5101
5106
|
<xsl:attribute name="line-height">1.1</xsl:attribute>
|
5107
|
+
<xsl:if test="$stage-abbreviation = 'PRF'">
|
5108
|
+
<fo:block font-size="10pt" font-weight="bold" text-align="center">
|
5109
|
+
<xsl:value-of select="$proof-text"/>
|
5110
|
+
</fo:block>
|
5111
|
+
</xsl:if>
|
5102
5112
|
<fo:block font-size="9pt">
|
5103
5113
|
<!-- <xsl:call-template name="insertInterFont"/> -->
|
5104
5114
|
<xsl:value-of select="$copyrightText"/>
|
5105
5115
|
</fo:block>
|
5106
|
-
<xsl:if test="$copyrightAbbrIEEE = ''"><fo:block> </fo:block></xsl:if>
|
5107
|
-
<fo:block font-size="11pt" font-weight="{$font-weight}"
|
5116
|
+
<xsl:if test="$copyrightAbbrIEEE = '' and $stage-abbreviation != 'PRF'"><fo:block> </fo:block></xsl:if>
|
5117
|
+
<fo:block font-size="11pt" font-weight="{$font-weight}">
|
5118
|
+
<xsl:if test="$stage-abbreviation = 'PRF'">
|
5119
|
+
<xsl:attribute name="margin-top">1mm</xsl:attribute>
|
5120
|
+
</xsl:if>
|
5121
|
+
<fo:page-number/>
|
5122
|
+
</fo:block>
|
5108
5123
|
</xsl:template>
|
5109
5124
|
<xsl:template name="insertLayoutVersionAttributesTop">
|
5110
5125
|
<xsl:param name="odd_or_even"/>
|
@@ -5320,7 +5335,7 @@
|
|
5320
5335
|
</fo:table-cell>
|
5321
5336
|
<fo:table-cell number-columns-spanned="2" text-align="right" display-align="after">
|
5322
5337
|
<fo:block font-size="16pt" font-weight="bold" margin-bottom="1mm" margin-right="1.5mm">
|
5323
|
-
<xsl:if test="$stage >=60">
|
5338
|
+
<xsl:if test="$stage >=60 and $substage != 0">
|
5324
5339
|
<xsl:attribute name="color"><xsl:value-of select="$color_red"/></xsl:attribute>
|
5325
5340
|
</xsl:if>
|
5326
5341
|
<xsl:text>iso.org</xsl:text>
|
@@ -5360,7 +5375,7 @@
|
|
5360
5375
|
<xsl:variable name="Image-ISO-Logo-SVG">
|
5361
5376
|
<xsl:variable name="logo_color">
|
5362
5377
|
<xsl:choose>
|
5363
|
-
<xsl:when test="$stage >=60"><xsl:value-of select="$color_red"/></xsl:when>
|
5378
|
+
<xsl:when test="$stage >=60 and $substage != 0"><xsl:value-of select="$color_red"/></xsl:when>
|
5364
5379
|
<xsl:otherwise>rgb(88,88,90)</xsl:otherwise>
|
5365
5380
|
</xsl:choose>
|
5366
5381
|
</xsl:variable>
|
@@ -5524,7 +5539,7 @@
|
|
5524
5539
|
<fo:block id="lastBlock" font-size="1pt" keep-with-previous="always" role="SKIP"><fo:wrapper role="artifact"> </fo:wrapper></fo:block>
|
5525
5540
|
</xsl:template>
|
5526
5541
|
|
5527
|
-
<xsl:strip-space elements="iso:xref"/>
|
5542
|
+
<!-- <xsl:strip-space elements="iso:xref"/> -->
|
5528
5543
|
|
5529
5544
|
<xsl:variable name="namespace_full" select="namespace-uri(/*)"/> <!-- example: https://www.metanorma.org/ns/iso -->
|
5530
5545
|
<xsl:variable name="root_element" select="local-name(/*)"/> <!-- example: iso-standard -->
|
@@ -6737,6 +6752,10 @@
|
|
6737
6752
|
|
6738
6753
|
<xsl:template name="refine_termnote-name-style">
|
6739
6754
|
|
6755
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
6756
|
+
<xsl:attribute name="padding-right">0mm</xsl:attribute>
|
6757
|
+
</xsl:if> -->
|
6758
|
+
|
6740
6759
|
</xsl:template>
|
6741
6760
|
|
6742
6761
|
<xsl:attribute-set name="termnote-p-style">
|
@@ -7452,9 +7471,21 @@
|
|
7452
7471
|
<xsl:template name="processTables_Contents">
|
7453
7472
|
<tables>
|
7454
7473
|
<xsl:for-each select="//*[local-name() = 'table'][not(ancestor::*[local-name() = 'metanorma-extension'])][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
|
7455
|
-
<
|
7456
|
-
<xsl:
|
7457
|
-
|
7474
|
+
<xsl:choose>
|
7475
|
+
<xsl:when test="*[local-name() = 'fmt-name']">
|
7476
|
+
<xsl:variable name="fmt_name">
|
7477
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
|
7478
|
+
</xsl:variable>
|
7479
|
+
<table id="{@id}" alt-text="{normalize-space($fmt_name)}">
|
7480
|
+
<xsl:copy-of select="$fmt_name"/>
|
7481
|
+
</table>
|
7482
|
+
</xsl:when>
|
7483
|
+
<xsl:otherwise>
|
7484
|
+
<table id="{@id}" alt-text="{*[local-name() = 'name']}">
|
7485
|
+
<xsl:copy-of select="*[local-name() = 'name']"/>
|
7486
|
+
</table>
|
7487
|
+
</xsl:otherwise>
|
7488
|
+
</xsl:choose>
|
7458
7489
|
</xsl:for-each>
|
7459
7490
|
</tables>
|
7460
7491
|
</xsl:template>
|
@@ -7462,9 +7493,21 @@
|
|
7462
7493
|
<xsl:template name="processFigures_Contents">
|
7463
7494
|
<figures>
|
7464
7495
|
<xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name'] and not(@unnumbered = 'true') and normalize-space(@id) != ''] | //*[@id and starts-with(*[local-name() = 'name'], 'Figure ') and normalize-space(@id) != '']">
|
7465
|
-
<
|
7466
|
-
<xsl:
|
7467
|
-
|
7496
|
+
<xsl:choose>
|
7497
|
+
<xsl:when test="*[local-name() = 'fmt-name']">
|
7498
|
+
<xsl:variable name="fmt_name">
|
7499
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
|
7500
|
+
</xsl:variable>
|
7501
|
+
<figure id="{@id}" alt-text="{normalize-space($fmt_name)}">
|
7502
|
+
<xsl:copy-of select="$fmt_name"/>
|
7503
|
+
</figure>
|
7504
|
+
</xsl:when>
|
7505
|
+
<xsl:otherwise>
|
7506
|
+
<figure id="{@id}" alt-text="{*[local-name() = 'name']}">
|
7507
|
+
<xsl:copy-of select="*[local-name() = 'name']"/>
|
7508
|
+
</figure>
|
7509
|
+
</xsl:otherwise>
|
7510
|
+
</xsl:choose>
|
7468
7511
|
</xsl:for-each>
|
7469
7512
|
</figures>
|
7470
7513
|
</xsl:template>
|
@@ -12411,6 +12454,8 @@
|
|
12411
12454
|
|
12412
12455
|
<fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
|
12413
12456
|
|
12457
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab"/>
|
12458
|
+
|
12414
12459
|
<xsl:call-template name="refine_note-name-style"/>
|
12415
12460
|
|
12416
12461
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
@@ -12490,10 +12535,6 @@
|
|
12490
12535
|
|
12491
12536
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
12492
12537
|
|
12493
|
-
<xsl:if test="not(*[local-name() = 'name']/following-sibling::node()[1][self::text()][normalize-space()=''])">
|
12494
|
-
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
12495
|
-
</xsl:if>
|
12496
|
-
|
12497
12538
|
<xsl:call-template name="refine_termnote-name-style"/>
|
12498
12539
|
|
12499
12540
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
@@ -12646,17 +12687,29 @@
|
|
12646
12687
|
<!-- Example: Dimensions in millimeters -->
|
12647
12688
|
<xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
|
12648
12689
|
|
12690
|
+
<xsl:variable name="show_figure_key_in_block_container">
|
12691
|
+
true
|
12692
|
+
</xsl:variable>
|
12693
|
+
|
12649
12694
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
12650
12695
|
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
|
12651
12696
|
</fo:block>
|
12652
|
-
|
12653
|
-
|
12654
|
-
|
12655
|
-
|
12697
|
+
|
12698
|
+
<xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
|
12699
|
+
<xsl:call-template name="showFigureKey"/>
|
12700
|
+
</xsl:if>
|
12656
12701
|
|
12657
12702
|
<xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
|
12658
12703
|
|
12659
12704
|
</fo:block-container>
|
12705
|
+
|
12706
|
+
</xsl:template>
|
12707
|
+
|
12708
|
+
<xsl:template name="showFigureKey">
|
12709
|
+
<xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
|
12710
|
+
<xsl:call-template name="note"/>
|
12711
|
+
</xsl:for-each>
|
12712
|
+
<xsl:call-template name="fn_display_figure"/>
|
12660
12713
|
</xsl:template>
|
12661
12714
|
|
12662
12715
|
<xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
@@ -12852,6 +12905,22 @@
|
|
12852
12905
|
</xsl:if>
|
12853
12906
|
</xsl:template>
|
12854
12907
|
|
12908
|
+
<xsl:template name="getImageSrc">
|
12909
|
+
<xsl:choose>
|
12910
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
12911
|
+
<xsl:choose>
|
12912
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
12913
|
+
<xsl:value-of select="@src"/>
|
12914
|
+
</xsl:when>
|
12915
|
+
<xsl:otherwise>
|
12916
|
+
<xsl:value-of select="concat($basepath, @src)"/>
|
12917
|
+
</xsl:otherwise>
|
12918
|
+
</xsl:choose>
|
12919
|
+
</xsl:when>
|
12920
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
12921
|
+
</xsl:choose>
|
12922
|
+
</xsl:template>
|
12923
|
+
|
12855
12924
|
<xsl:template name="getImageScale">
|
12856
12925
|
<xsl:param name="indent"/>
|
12857
12926
|
<xsl:variable name="indent_left">
|
@@ -12861,19 +12930,7 @@
|
|
12861
12930
|
</xsl:choose>
|
12862
12931
|
</xsl:variable>
|
12863
12932
|
<xsl:variable name="img_src">
|
12864
|
-
<xsl:
|
12865
|
-
<xsl:when test="not(starts-with(@src, 'data:'))">
|
12866
|
-
<xsl:choose>
|
12867
|
-
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
12868
|
-
<xsl:value-of select="@src"/>
|
12869
|
-
</xsl:when>
|
12870
|
-
<xsl:otherwise>
|
12871
|
-
<xsl:value-of select="concat($basepath, @src)"/>
|
12872
|
-
</xsl:otherwise>
|
12873
|
-
</xsl:choose>
|
12874
|
-
</xsl:when>
|
12875
|
-
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
12876
|
-
</xsl:choose>
|
12933
|
+
<xsl:call-template name="getImageSrc"/>
|
12877
12934
|
</xsl:variable>
|
12878
12935
|
|
12879
12936
|
<xsl:variable name="image_width_effective">
|
@@ -12881,10 +12938,15 @@
|
|
12881
12938
|
<xsl:value-of select="$width_effective - number($indent_left)"/>
|
12882
12939
|
|
12883
12940
|
</xsl:variable>
|
12941
|
+
<xsl:variable name="image_height_effective" select="$height_effective - number($indent_left)"/>
|
12884
12942
|
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
12885
12943
|
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
12886
12944
|
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
12887
|
-
<xsl:variable name="scale"
|
12945
|
+
<xsl:variable name="scale">
|
12946
|
+
|
12947
|
+
<xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
12948
|
+
|
12949
|
+
</xsl:variable>
|
12888
12950
|
<xsl:value-of select="$scale"/>
|
12889
12951
|
</xsl:template>
|
12890
12952
|
|
@@ -13437,20 +13499,48 @@
|
|
13437
13499
|
<xsl:template match="*[local-name() = 'emf']"/>
|
13438
13500
|
|
13439
13501
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
13502
|
+
<xsl:if test="not(following-sibling::*[1][local-name() = 'fmt-name'])">
|
13503
|
+
<xsl:apply-templates mode="contents"/>
|
13504
|
+
<xsl:text> </xsl:text>
|
13505
|
+
</xsl:if>
|
13506
|
+
</xsl:template>
|
13507
|
+
|
13508
|
+
<xsl:template match="*[local-name() = 'title'][following-sibling::*[1][local-name() = 'fmt-title']]" mode="contents"/>
|
13509
|
+
|
13510
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fmt-name'] | *[local-name() = 'table']/*[local-name() = 'fmt-name'] | *[local-name() = 'permission']/*[local-name() = 'fmt-name'] | *[local-name() = 'recommendation']/*[local-name() = 'fmt-name'] | *[local-name() = 'requirement']/*[local-name() = 'fmt-name']" mode="contents">
|
13440
13511
|
<xsl:apply-templates mode="contents"/>
|
13441
13512
|
<xsl:text> </xsl:text>
|
13442
13513
|
</xsl:template>
|
13443
13514
|
|
13444
13515
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name'] | *[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="bookmarks">
|
13516
|
+
<xsl:if test="not(following-sibling::*[1][local-name() = 'fmt-name'])">
|
13517
|
+
<xsl:apply-templates mode="bookmarks"/>
|
13518
|
+
<xsl:text> </xsl:text>
|
13519
|
+
</xsl:if>
|
13520
|
+
</xsl:template>
|
13521
|
+
|
13522
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fmt-name'] | *[local-name() = 'table']/*[local-name() = 'fmt-name'] | *[local-name() = 'permission']/*[local-name() = 'fmt-name'] | *[local-name() = 'recommendation']/*[local-name() = 'fmt-name'] | *[local-name() = 'requirement']/*[local-name() = 'fmt-name'] | *[local-name() = 'sourcecode']/*[local-name() = 'fmt-name']" mode="bookmarks">
|
13445
13523
|
<xsl:apply-templates mode="bookmarks"/>
|
13446
13524
|
<xsl:text> </xsl:text>
|
13447
13525
|
</xsl:template>
|
13448
13526
|
|
13449
13527
|
<xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
|
13528
|
+
<xsl:if test="not(../following-sibling::*[1][local-name() = 'fmt-name'])">
|
13529
|
+
<xsl:value-of select="."/>
|
13530
|
+
</xsl:if>
|
13531
|
+
</xsl:template>
|
13532
|
+
|
13533
|
+
<xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'fmt-name']/text()" mode="contents" priority="2">
|
13450
13534
|
<xsl:value-of select="."/>
|
13451
13535
|
</xsl:template>
|
13452
13536
|
|
13453
13537
|
<xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement' or local-name() = 'sourcecode']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
|
13538
|
+
<xsl:if test="not(../following-sibling::*[1][local-name() = 'fmt-name'])">
|
13539
|
+
<xsl:value-of select="."/>
|
13540
|
+
</xsl:if>
|
13541
|
+
</xsl:template>
|
13542
|
+
|
13543
|
+
<xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement' or local-name() = 'sourcecode']/*[local-name() = 'fmt-name']//text()" mode="bookmarks" priority="2">
|
13454
13544
|
<xsl:value-of select="."/>
|
13455
13545
|
</xsl:template>
|
13456
13546
|
|
@@ -13471,7 +13561,7 @@
|
|
13471
13561
|
</xsl:template>
|
13472
13562
|
|
13473
13563
|
<!-- special case: ignore section-title if @depth different than @depth of parent clause, or @depth of parent clause = 1 -->
|
13474
|
-
<xsl:template match="*[local-name() = 'clause']/*[local-name() = 'p'][@type = 'section-title' and (@depth != ../*[local-name() = 'title']/@depth or ../*[local-name() = 'title']/@depth = 1)]" priority="3" mode="contents"/>
|
13564
|
+
<xsl:template match="*[local-name() = 'clause']/*[local-name() = 'p'][@type = 'section-title' and (@depth != ../*[local-name() = 'title' or local-name() = 'fmt-title']/@depth or ../*[local-name() = 'title' or local-name() = 'fmt-title']/@depth = 1)]" priority="3" mode="contents"/>
|
13475
13565
|
|
13476
13566
|
<xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="2" name="contents_section-title" mode="contents">
|
13477
13567
|
<xsl:variable name="level">
|
@@ -13483,6 +13573,9 @@
|
|
13483
13573
|
<xsl:variable name="section">
|
13484
13574
|
<xsl:choose>
|
13485
13575
|
<xsl:when test="@type = 'section-title'"/>
|
13576
|
+
<xsl:when test="*[local-name() = 'span'][@class = 'fmt-caption-delim']">
|
13577
|
+
<xsl:value-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/preceding-sibling::node()"/>
|
13578
|
+
</xsl:when>
|
13486
13579
|
<xsl:otherwise>
|
13487
13580
|
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
13488
13581
|
</xsl:otherwise>
|
@@ -13505,6 +13598,19 @@
|
|
13505
13598
|
|
13506
13599
|
<xsl:variable name="title">
|
13507
13600
|
<xsl:choose>
|
13601
|
+
<!-- https://github.com/metanorma/mn-native-pdf/issues/770 -->
|
13602
|
+
<xsl:when test="*[local-name() = 'span'][@class = 'fmt-caption-delim']">
|
13603
|
+
<xsl:choose>
|
13604
|
+
<xsl:when test="@type = 'section-title'">
|
13605
|
+
<xsl:value-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/preceding-sibling::node()"/>
|
13606
|
+
<xsl:text>: </xsl:text>
|
13607
|
+
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name = 'fmt-xref-label')]"/>
|
13608
|
+
</xsl:when>
|
13609
|
+
<xsl:otherwise>
|
13610
|
+
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name = 'fmt-xref-label')]"/>
|
13611
|
+
</xsl:otherwise>
|
13612
|
+
</xsl:choose>
|
13613
|
+
</xsl:when>
|
13508
13614
|
<xsl:when test="*[local-name() = 'tab']">
|
13509
13615
|
<xsl:choose>
|
13510
13616
|
<xsl:when test="@type = 'section-title'">
|
@@ -13540,7 +13646,7 @@
|
|
13540
13646
|
<xsl:apply-templates mode="bookmarks"/>
|
13541
13647
|
</xsl:template>
|
13542
13648
|
|
13543
|
-
<xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
13649
|
+
<xsl:template match="*[local-name() = 'title' or local-name() = 'name' or local-name() = 'fmt-title' or local-name() = 'fmt-name']//*[local-name() = 'stem']" mode="contents">
|
13544
13650
|
<xsl:apply-templates select="."/>
|
13545
13651
|
</xsl:template>
|
13546
13652
|
|
@@ -13553,6 +13659,10 @@
|
|
13553
13659
|
<xsl:apply-templates mode="contents"/>
|
13554
13660
|
</xsl:template>
|
13555
13661
|
|
13662
|
+
<xsl:template match="*[local-name() = 'semx']" mode="contents">
|
13663
|
+
<xsl:apply-templates mode="contents"/>
|
13664
|
+
</xsl:template>
|
13665
|
+
|
13556
13666
|
<xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
13557
13667
|
<xsl:apply-templates mode="bookmarks"/>
|
13558
13668
|
</xsl:template>
|
@@ -13562,9 +13672,14 @@
|
|
13562
13672
|
<xsl:apply-templates mode="bookmarks"/>
|
13563
13673
|
</xsl:template>
|
13564
13674
|
|
13675
|
+
<xsl:template match="*[local-name() = 'semx']" mode="bookmarks">
|
13676
|
+
<xsl:apply-templates mode="bookmarks"/>
|
13677
|
+
</xsl:template>
|
13678
|
+
|
13565
13679
|
<!-- Bookmarks -->
|
13566
13680
|
<xsl:template name="addBookmarks">
|
13567
13681
|
<xsl:param name="contents"/>
|
13682
|
+
<xsl:param name="contents_addon"/>
|
13568
13683
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
13569
13684
|
<xsl:if test="$contents_nodes//item">
|
13570
13685
|
<fo:bookmark-tree>
|
@@ -13662,6 +13777,9 @@
|
|
13662
13777
|
</xsl:otherwise>
|
13663
13778
|
</xsl:choose>
|
13664
13779
|
|
13780
|
+
<!-- for $namespace = 'nist-sp' $namespace = 'ogc' $namespace = 'ogc-white-paper' -->
|
13781
|
+
<xsl:copy-of select="$contents_addon"/>
|
13782
|
+
|
13665
13783
|
</fo:bookmark-tree>
|
13666
13784
|
</xsl:if>
|
13667
13785
|
</xsl:template>
|
@@ -13815,6 +13933,16 @@
|
|
13815
13933
|
<!-- ====== -->
|
13816
13934
|
<!-- ====== -->
|
13817
13935
|
<xsl:template match="*[local-name() = 'title']" mode="contents_item">
|
13936
|
+
<xsl:param name="mode">bookmarks</xsl:param>
|
13937
|
+
<xsl:if test="not(following-sibling::*[1][local-name() = 'fmt-title'])">
|
13938
|
+
<xsl:apply-templates mode="contents_item">
|
13939
|
+
<xsl:with-param name="mode" select="$mode"/>
|
13940
|
+
</xsl:apply-templates>
|
13941
|
+
<!-- <xsl:text> </xsl:text> -->
|
13942
|
+
</xsl:if>
|
13943
|
+
</xsl:template>
|
13944
|
+
|
13945
|
+
<xsl:template match="*[local-name() = 'fmt-title']" mode="contents_item">
|
13818
13946
|
<xsl:param name="mode">bookmarks</xsl:param>
|
13819
13947
|
<xsl:apply-templates mode="contents_item">
|
13820
13948
|
<xsl:with-param name="mode" select="$mode"/>
|
@@ -13822,12 +13950,38 @@
|
|
13822
13950
|
<!-- <xsl:text> </xsl:text> -->
|
13823
13951
|
</xsl:template>
|
13824
13952
|
|
13953
|
+
<xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim']" mode="contents_item" priority="3">
|
13954
|
+
<xsl:apply-templates mode="contents_item"/>
|
13955
|
+
</xsl:template>
|
13956
|
+
|
13957
|
+
<xsl:template match="*[local-name() = 'semx']" mode="contents_item">
|
13958
|
+
<xsl:apply-templates mode="contents_item"/>
|
13959
|
+
</xsl:template>
|
13960
|
+
|
13961
|
+
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="contents_item"/>
|
13962
|
+
|
13825
13963
|
<xsl:template name="getSection">
|
13826
|
-
<xsl:
|
13964
|
+
<xsl:choose>
|
13965
|
+
<xsl:when test="*[local-name() = 'fmt-title']">
|
13966
|
+
<xsl:variable name="fmt_title_section">
|
13967
|
+
<xsl:copy-of select="*[local-name() = 'fmt-title']//*[local-name() = 'span'][@class = 'fmt-caption-delim'][*[local-name() = 'tab']][1]/preceding-sibling::node()[not(local-name() = 'review')]"/>
|
13968
|
+
</xsl:variable>
|
13969
|
+
<xsl:value-of select="normalize-space($fmt_title_section)"/>
|
13970
|
+
</xsl:when>
|
13971
|
+
<xsl:otherwise>
|
13972
|
+
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
13973
|
+
</xsl:otherwise>
|
13974
|
+
</xsl:choose>
|
13827
13975
|
</xsl:template>
|
13828
13976
|
|
13829
13977
|
<xsl:template name="getName">
|
13830
13978
|
<xsl:choose>
|
13979
|
+
<xsl:when test="*[local-name() = 'fmt-title']//*[local-name() = 'span'][@class = 'fmt-caption-delim'][*[local-name() = 'tab']]">
|
13980
|
+
<xsl:copy-of select="*[local-name() = 'fmt-title']//*[local-name() = 'span'][@class = 'fmt-caption-delim'][*[local-name() = 'tab']][1]/following-sibling::node()"/>
|
13981
|
+
</xsl:when>
|
13982
|
+
<xsl:when test="*[local-name() = 'fmt-title']">
|
13983
|
+
<xsl:copy-of select="*[local-name() = 'fmt-title']/node()"/>
|
13984
|
+
</xsl:when>
|
13831
13985
|
<xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
|
13832
13986
|
<xsl:copy-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
13833
13987
|
</xsl:when>
|
@@ -13934,6 +14088,15 @@
|
|
13934
14088
|
</xsl:template>
|
13935
14089
|
|
13936
14090
|
<xsl:template match="*[local-name() = 'name']" mode="contents_item">
|
14091
|
+
<xsl:param name="mode">bookmarks</xsl:param>
|
14092
|
+
<xsl:if test="not(following-sibling::*[1][local-name() = 'fmt-name'])">
|
14093
|
+
<xsl:apply-templates mode="contents_item">
|
14094
|
+
<xsl:with-param name="mode" select="$mode"/>
|
14095
|
+
</xsl:apply-templates>
|
14096
|
+
</xsl:if>
|
14097
|
+
</xsl:template>
|
14098
|
+
|
14099
|
+
<xsl:template match="*[local-name() = 'fmt-name']" mode="contents_item">
|
13937
14100
|
<xsl:param name="mode">bookmarks</xsl:param>
|
13938
14101
|
<xsl:apply-templates mode="contents_item">
|
13939
14102
|
<xsl:with-param name="mode" select="$mode"/>
|
@@ -14772,112 +14935,113 @@
|
|
14772
14935
|
-->
|
14773
14936
|
<xsl:template match="*[local-name() = 'example']">
|
14774
14937
|
|
14775
|
-
|
14776
|
-
|
14777
|
-
<xsl:call-template name="setBlockSpanAll"/>
|
14938
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
|
14778
14939
|
|
14779
|
-
|
14940
|
+
<xsl:call-template name="setBlockSpanAll"/>
|
14780
14941
|
|
14781
|
-
|
14782
|
-
<xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
|
14942
|
+
<xsl:call-template name="refine_example-style"/>
|
14783
14943
|
|
14784
|
-
|
14785
|
-
|
14786
|
-
<xsl:otherwise>inline</xsl:otherwise>
|
14787
|
-
</xsl:choose>
|
14944
|
+
<xsl:variable name="fo_element">
|
14945
|
+
<xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
|
14788
14946
|
|
14789
|
-
|
14947
|
+
<xsl:choose>
|
14948
|
+
<xsl:when test="$layoutVersion = '1951' and $revision_date_num < 19610101">list</xsl:when>
|
14949
|
+
<xsl:otherwise>inline</xsl:otherwise>
|
14950
|
+
</xsl:choose>
|
14790
14951
|
|
14791
|
-
|
14952
|
+
</xsl:variable>
|
14792
14953
|
|
14793
|
-
|
14954
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
14794
14955
|
|
14795
|
-
|
14956
|
+
<xsl:choose>
|
14796
14957
|
|
14797
|
-
|
14798
|
-
<fo:block>
|
14799
|
-
<xsl:apply-templates select="*[local-name()='name']">
|
14800
|
-
<xsl:with-param name="fo_element" select="$fo_element"/>
|
14801
|
-
</xsl:apply-templates>
|
14802
|
-
</fo:block>
|
14958
|
+
<xsl:when test="contains(normalize-space($fo_element), 'block')">
|
14803
14959
|
|
14804
|
-
|
14805
|
-
|
14806
|
-
|
14807
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name')]">
|
14960
|
+
<!-- display name 'EXAMPLE' in a separate block -->
|
14961
|
+
<fo:block>
|
14962
|
+
<xsl:apply-templates select="*[local-name()='name']">
|
14808
14963
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
14809
14964
|
</xsl:apply-templates>
|
14965
|
+
</fo:block>
|
14966
|
+
|
14967
|
+
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
14968
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
14969
|
+
<xsl:variable name="example_body">
|
14970
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]">
|
14971
|
+
<xsl:with-param name="fo_element" select="$fo_element"/>
|
14972
|
+
</xsl:apply-templates>
|
14973
|
+
</xsl:variable>
|
14974
|
+
<xsl:choose>
|
14975
|
+
<xsl:when test="xalan:nodeset($example_body)/*">
|
14976
|
+
<xsl:copy-of select="$example_body"/>
|
14977
|
+
</xsl:when>
|
14978
|
+
<xsl:otherwise><fo:block/><!-- prevent empty block-container --></xsl:otherwise>
|
14979
|
+
</xsl:choose>
|
14980
|
+
</fo:block-container>
|
14981
|
+
</fo:block-container>
|
14982
|
+
</xsl:when> <!-- end block -->
|
14983
|
+
|
14984
|
+
<xsl:when test="contains(normalize-space($fo_element), 'list')">
|
14985
|
+
|
14986
|
+
<xsl:variable name="provisional_distance_between_starts_">
|
14987
|
+
45
|
14810
14988
|
</xsl:variable>
|
14811
|
-
<xsl:
|
14812
|
-
|
14813
|
-
|
14814
|
-
|
14815
|
-
|
14816
|
-
</xsl:choose>
|
14817
|
-
</fo:block-container>
|
14818
|
-
</fo:block-container>
|
14819
|
-
</xsl:when> <!-- end block -->
|
14989
|
+
<xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
|
14990
|
+
<xsl:variable name="indent_">
|
14991
|
+
28
|
14992
|
+
</xsl:variable>
|
14993
|
+
<xsl:variable name="indent" select="normalize-space($indent_)"/>
|
14820
14994
|
|
14821
|
-
|
14995
|
+
<fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
|
14996
|
+
<fo:list-item>
|
14997
|
+
<fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
|
14998
|
+
<fo:block>
|
14999
|
+
<xsl:apply-templates select="*[local-name()='name']">
|
15000
|
+
<xsl:with-param name="fo_element">block</xsl:with-param>
|
15001
|
+
</xsl:apply-templates>
|
15002
|
+
</fo:block>
|
15003
|
+
</fo:list-item-label>
|
15004
|
+
<fo:list-item-body start-indent="body-start()">
|
15005
|
+
<fo:block>
|
15006
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]">
|
15007
|
+
<xsl:with-param name="fo_element" select="$fo_element"/>
|
15008
|
+
</xsl:apply-templates>
|
15009
|
+
</fo:block>
|
15010
|
+
</fo:list-item-body>
|
15011
|
+
</fo:list-item>
|
15012
|
+
</fo:list-block>
|
15013
|
+
</xsl:when> <!-- end list -->
|
14822
15014
|
|
14823
|
-
|
14824
|
-
45
|
14825
|
-
</xsl:variable>
|
14826
|
-
<xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
|
14827
|
-
<xsl:variable name="indent_">
|
14828
|
-
28
|
14829
|
-
</xsl:variable>
|
14830
|
-
<xsl:variable name="indent" select="normalize-space($indent_)"/>
|
15015
|
+
<xsl:otherwise> <!-- inline -->
|
14831
15016
|
|
14832
|
-
|
14833
|
-
|
14834
|
-
|
14835
|
-
|
14836
|
-
|
14837
|
-
|
14838
|
-
|
14839
|
-
</fo:block>
|
14840
|
-
</fo:list-item-label>
|
14841
|
-
<fo:list-item-body start-indent="body-start()">
|
14842
|
-
<fo:block>
|
14843
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name')]">
|
15017
|
+
<!-- display 'EXAMPLE' and first element in the same line -->
|
15018
|
+
<fo:block>
|
15019
|
+
<xsl:apply-templates select="*[local-name()='name']">
|
15020
|
+
<xsl:with-param name="fo_element" select="$fo_element"/>
|
15021
|
+
</xsl:apply-templates>
|
15022
|
+
<fo:inline>
|
15023
|
+
<xsl:apply-templates select="*[not(local-name() = 'name')][1]">
|
14844
15024
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
14845
15025
|
</xsl:apply-templates>
|
14846
|
-
</fo:
|
14847
|
-
</fo:
|
14848
|
-
</fo:list-item>
|
14849
|
-
</fo:list-block>
|
14850
|
-
</xsl:when> <!-- end list -->
|
14851
|
-
|
14852
|
-
<xsl:otherwise> <!-- inline -->
|
15026
|
+
</fo:inline>
|
15027
|
+
</fo:block>
|
14853
15028
|
|
14854
|
-
|
14855
|
-
|
14856
|
-
|
14857
|
-
|
14858
|
-
|
14859
|
-
|
14860
|
-
|
14861
|
-
|
14862
|
-
|
14863
|
-
|
14864
|
-
|
15029
|
+
<xsl:if test="*[not(local-name() = 'name')][position() > 1]">
|
15030
|
+
<!-- display further elements in blocks -->
|
15031
|
+
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
15032
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
15033
|
+
<xsl:apply-templates select="*[not(local-name() = 'name')][position() > 1]">
|
15034
|
+
<xsl:with-param name="fo_element" select="'block'"/>
|
15035
|
+
</xsl:apply-templates>
|
15036
|
+
</fo:block-container>
|
15037
|
+
</fo:block-container>
|
15038
|
+
</xsl:if>
|
15039
|
+
</xsl:otherwise> <!-- end inline -->
|
14865
15040
|
|
14866
|
-
|
14867
|
-
|
14868
|
-
|
14869
|
-
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
14870
|
-
<xsl:apply-templates select="*[not(local-name() = 'name')][position() > 1]">
|
14871
|
-
<xsl:with-param name="fo_element" select="'block'"/>
|
14872
|
-
</xsl:apply-templates>
|
14873
|
-
</fo:block-container>
|
14874
|
-
</fo:block-container>
|
14875
|
-
</xsl:if>
|
14876
|
-
</xsl:otherwise> <!-- end inline -->
|
15041
|
+
</xsl:choose>
|
15042
|
+
</fo:block-container>
|
15043
|
+
</fo:block-container>
|
14877
15044
|
|
14878
|
-
</xsl:choose>
|
14879
|
-
</fo:block-container>
|
14880
|
-
</fo:block-container>
|
14881
15045
|
</xsl:template>
|
14882
15046
|
|
14883
15047
|
<xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
|
@@ -15270,6 +15434,15 @@
|
|
15270
15434
|
|
15271
15435
|
</xsl:template> <!-- tab -->
|
15272
15436
|
|
15437
|
+
<xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']/*[local-name() = 'tab']" priority="2"/>
|
15438
|
+
<xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']/*[local-name() = 'tab']" priority="2"/>
|
15439
|
+
|
15440
|
+
<xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab">
|
15441
|
+
|
15442
|
+
<xsl:attribute name="padding-right">6mm</xsl:attribute>
|
15443
|
+
|
15444
|
+
</xsl:template>
|
15445
|
+
|
15273
15446
|
<xsl:template name="insertNonBreakSpaces">
|
15274
15447
|
<xsl:param name="count"/>
|
15275
15448
|
<xsl:if test="$count > 0">
|
@@ -16868,6 +17041,10 @@
|
|
16868
17041
|
<!-- - Remove semantic xml part -->
|
16869
17042
|
<!-- - Remove image/emf (EMF vector image for Word) -->
|
16870
17043
|
<!-- - add @id, redundant for table auto-layout algorithm -->
|
17044
|
+
<!-- - process 'passthrough' element -->
|
17045
|
+
<!-- - split math by element with @linebreak into maths -->
|
17046
|
+
<!-- - rename fmt-title to title, fmt-name to name and another changes to convert new presentation XML to -->
|
17047
|
+
<!-- - old XML without significant changes in XSLT -->
|
16871
17048
|
<!-- =========================================================================== -->
|
16872
17049
|
<xsl:template match="@*|node()" mode="update_xml_step1">
|
16873
17050
|
<xsl:copy>
|
@@ -16875,6 +17052,12 @@
|
|
16875
17052
|
</xsl:copy>
|
16876
17053
|
</xsl:template>
|
16877
17054
|
|
17055
|
+
<xsl:template match="@*|node()" mode="update_xml_pres">
|
17056
|
+
<xsl:copy>
|
17057
|
+
<xsl:apply-templates select="@*|node()" mode="update_xml_pres"/>
|
17058
|
+
</xsl:copy>
|
17059
|
+
</xsl:template>
|
17060
|
+
|
16878
17061
|
<!-- change section's order based on @displayorder value -->
|
16879
17062
|
<xsl:template match="*[local-name() = 'preface']" mode="update_xml_step1">
|
16880
17063
|
<xsl:copy>
|
@@ -16951,7 +17134,7 @@
|
|
16951
17134
|
</xsl:template>
|
16952
17135
|
|
16953
17136
|
<!-- Example with 'class': <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
|
16954
|
-
<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">
|
17137
|
+
<xsl:template match="*[local-name() = 'span'][@style or @class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear' or @class = 'horizontal' or @class = 'norotate' or @class = 'halffontsize']" mode="update_xml_step1" priority="2">
|
16955
17138
|
<xsl:copy>
|
16956
17139
|
<xsl:copy-of select="@*"/>
|
16957
17140
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -16970,14 +17153,17 @@
|
|
16970
17153
|
|
16971
17154
|
<!-- remove semantic xml -->
|
16972
17155
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'metanorma']/*[local-name() = 'source']" mode="update_xml_step1"/>
|
17156
|
+
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'metanorma']/*[local-name() = 'source']" mode="update_xml_pres"/>
|
16973
17157
|
|
16974
17158
|
<!-- remove image/emf -->
|
16975
17159
|
<xsl:template match="*[local-name() = 'image']/*[local-name() = 'emf']" mode="update_xml_step1"/>
|
17160
|
+
<xsl:template match="*[local-name() = 'image']/*[local-name() = 'emf']" mode="update_xml_pres"/>
|
16976
17161
|
|
16977
17162
|
<!-- remove preprocess-xslt -->
|
16978
17163
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
|
17164
|
+
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_pres"/>
|
16979
17165
|
|
16980
|
-
<xsl:template match="*[local-name() = 'stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])] | *[local-name() = 'image'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'sourcecode'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'bibdata'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
|
17166
|
+
<xsl:template match="*[local-name() = 'stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])] | *[local-name() = 'image'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'sourcecode'][not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])] | *[local-name() = 'bibdata'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
|
16981
17167
|
<xsl:copy-of select="."/>
|
16982
17168
|
</xsl:template>
|
16983
17169
|
|
@@ -17059,6 +17245,77 @@
|
|
17059
17245
|
<xsl:copy-of select="$maths"/>
|
17060
17246
|
</xsl:template>
|
17061
17247
|
|
17248
|
+
<!-- update new Presentation XML -->
|
17249
|
+
<xsl:template match="*[local-name() = 'title'][following-sibling::*[1][local-name() = 'fmt-title']]" mode="update_xml_step1"/>
|
17250
|
+
<xsl:template match="*[local-name() = 'title'][following-sibling::*[1][local-name() = 'fmt-title']]" mode="update_xml_pres"/>
|
17251
|
+
<xsl:template match="*[local-name() = 'name'][following-sibling::*[1][local-name() = 'fmt-name']]" mode="update_xml_step1"/>
|
17252
|
+
<xsl:template match="*[local-name() = 'name'][following-sibling::*[1][local-name() = 'fmt-name']]" mode="update_xml_pres"/>
|
17253
|
+
<xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
|
17254
|
+
<xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_pres"/>
|
17255
|
+
|
17256
|
+
<xsl:template match="*[local-name() = 'p'][@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][local-name() = 'section-title']]" mode="update_xml_step1">
|
17257
|
+
<xsl:copy>
|
17258
|
+
<xsl:apply-templates select="@*" mode="update_xml_step1"/>
|
17259
|
+
<xsl:copy-of select="preceding-sibling::*[1][local-name() = 'section-title']/@depth"/>
|
17260
|
+
<xsl:apply-templates select="node()" mode="update_xml_step1"/>
|
17261
|
+
</xsl:copy>
|
17262
|
+
</xsl:template>
|
17263
|
+
<xsl:template match="*[local-name() = 'p'][@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][local-name() = 'section-title']]" mode="update_xml_pres">
|
17264
|
+
<xsl:copy>
|
17265
|
+
<xsl:apply-templates select="@*" mode="update_xml_pres"/>
|
17266
|
+
<xsl:copy-of select="preceding-sibling::*[1][local-name() = 'section-title']/@depth"/>
|
17267
|
+
<xsl:apply-templates select="node()" mode="update_xml_pres"/>
|
17268
|
+
</xsl:copy>
|
17269
|
+
</xsl:template>
|
17270
|
+
|
17271
|
+
<xsl:template match="*[local-name() = 'fmt-title']"/>
|
17272
|
+
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_step1">
|
17273
|
+
<xsl:element name="title" namespace="{$namespace_full}">
|
17274
|
+
<xsl:copy-of select="@*"/>
|
17275
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
17276
|
+
</xsl:element>
|
17277
|
+
</xsl:template>
|
17278
|
+
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_pres">
|
17279
|
+
<xsl:element name="title" namespace="{$namespace_full}">
|
17280
|
+
<xsl:copy-of select="@*"/>
|
17281
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
17282
|
+
</xsl:element>
|
17283
|
+
</xsl:template>
|
17284
|
+
|
17285
|
+
<xsl:template match="*[local-name() = 'fmt-name']"/>
|
17286
|
+
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
|
17287
|
+
<xsl:element name="name" namespace="{$namespace_full}">
|
17288
|
+
<xsl:copy-of select="@*"/>
|
17289
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
17290
|
+
</xsl:element>
|
17291
|
+
</xsl:template>
|
17292
|
+
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
|
17293
|
+
<xsl:element name="name" namespace="{$namespace_full}">
|
17294
|
+
<xsl:copy-of select="@*"/>
|
17295
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
17296
|
+
</xsl:element>
|
17297
|
+
</xsl:template>
|
17298
|
+
|
17299
|
+
<xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
|
17300
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
17301
|
+
</xsl:template>
|
17302
|
+
<xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_pres" priority="3">
|
17303
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
17304
|
+
</xsl:template>
|
17305
|
+
|
17306
|
+
<xsl:template match="*[local-name() = 'semx']" mode="update_xml_step1">
|
17307
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
17308
|
+
</xsl:template>
|
17309
|
+
<xsl:template match="*[local-name() = 'semx']" mode="update_xml_pres">
|
17310
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
17311
|
+
</xsl:template>
|
17312
|
+
|
17313
|
+
<xsl:template match="*[local-name() = 'fmt-xref-label']"/>
|
17314
|
+
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_step1"/>
|
17315
|
+
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_pres"/>
|
17316
|
+
|
17317
|
+
<!-- END: update new Presentation XML -->
|
17318
|
+
|
17062
17319
|
<!-- =========================================================================== -->
|
17063
17320
|
<!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
|
17064
17321
|
<!-- =========================================================================== -->
|
@@ -17355,7 +17612,7 @@
|
|
17355
17612
|
<xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
|
17356
17613
|
<xsl:variable name="regex_dots_units">((\b((<xsl:value-of select="$non_white_space"/>{1,3}\.<xsl:value-of select="$non_white_space"/>+)|(<xsl:value-of select="$non_white_space"/>+\.<xsl:value-of select="$non_white_space"/>{1,3}))\b)|(\.<xsl:value-of select="$non_white_space"/>{1,3})\b)</xsl:variable>
|
17357
17614
|
|
17358
|
-
<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 ancestor::*[local-name() = 'svg'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
|
17615
|
+
<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 ancestor::*[local-name() = 'svg'] or ancestor::*[local-name() = 'name'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
|
17359
17616
|
|
17360
17617
|
<xsl:variable name="parent" select="local-name(..)"/>
|
17361
17618
|
|
@@ -17957,6 +18214,7 @@
|
|
17957
18214
|
</pdf:catalog>
|
17958
18215
|
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
17959
18216
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
18217
|
+
<!-- Commented after upgrade to Apache FOP 2.10
|
17960
18218
|
<rdf:Description xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/" xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#" xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#" rdf:about="">
|
17961
18219
|
<pdfaExtension:schemas>
|
17962
18220
|
<rdf:Bag>
|
@@ -17989,7 +18247,7 @@
|
|
17989
18247
|
</rdf:li>
|
17990
18248
|
</rdf:Bag>
|
17991
18249
|
</pdfaExtension:schemas>
|
17992
|
-
</rdf:Description>
|
18250
|
+
</rdf:Description> -->
|
17993
18251
|
<rdf:Description xmlns:pdf="http://ns.adobe.com/pdf/1.3/" xmlns:dc="http://purl.org/dc/elements/1.1/" rdf:about="">
|
17994
18252
|
<!-- Dublin Core properties go here -->
|
17995
18253
|
<dc:title>
|
@@ -18036,7 +18294,7 @@
|
|
18036
18294
|
<xsl:variable name="dc_description">
|
18037
18295
|
<xsl:variable name="abstract">
|
18038
18296
|
|
18039
|
-
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'title'])]"/>
|
18297
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'fmt-title']) and not(ancestor::*[local-name() = 'title']) and not(ancestor::*[local-name() = 'fmt-xref-label'])]"/>
|
18040
18298
|
|
18041
18299
|
</xsl:variable>
|
18042
18300
|
<rdf:Alt>
|
@@ -18581,31 +18839,123 @@
|
|
18581
18839
|
|
18582
18840
|
<!-- END: insert cover page image -->
|
18583
18841
|
|
18584
|
-
|
18842
|
+
<!-- https://github.com/metanorma/docs/blob/main/109.adoc -->
|
18843
|
+
<xsl:variable name="regex_ja_spec_">[
|
18844
|
+
<!-- Rotate 90° clockwise -->
|
18845
|
+
\u0028 <!-- U+0028 LEFT PARENTHESIS (() -->
|
18846
|
+
\uFF08 <!-- U+FF08 FULLWIDTH LEFT PARENTHESIS (() -->
|
18847
|
+
\u0029 <!-- U+0029 RIGHT PARENTHESIS ()) -->
|
18848
|
+
\uFF09 <!-- U+FF09 FULLWIDTH RIGHT PARENTHESIS ()) -->
|
18849
|
+
\u007B <!-- U+007B LEFT CURLY BRACKET ({) -->
|
18850
|
+
\uFF5B <!-- U+FF5B FULLWIDTH LEFT CURLY BRACKET ({) -->
|
18851
|
+
\u007D <!-- U+007D RIGHT CURLY BRACKET (}) -->
|
18852
|
+
\uFF5D <!-- U+FF5D FULLWIDTH RIGHT CURLY BRACKET (}) -->
|
18853
|
+
\u3014 <!-- U+3014 LEFT TORTOISE SHELL BRACKET (〔) -->
|
18854
|
+
\u3015 <!-- U+3015 RIGHT TORTOISE SHELL BRACKET (〕) -->
|
18855
|
+
\u3010 <!-- U+3010 LEFT BLACK LENTICULAR BRACKET (【) -->
|
18856
|
+
\u3011 <!-- U+3011 RIGHT BLACK LENTICULAR BRACKET (】) -->
|
18857
|
+
\u300A <!-- U+300A LEFT DOUBLE ANGLE BRACKET (《) -->
|
18858
|
+
\u300B <!-- U+300B RIGHT DOUBLE ANGLE BRACKET (》) -->
|
18859
|
+
\uFF62 <!-- U+FF62 HALFWIDTH LEFT CORNER BRACKET (「) -->
|
18860
|
+
\u300C <!-- U+300C LEFT CORNER BRACKET (「) -->
|
18861
|
+
\uFF63 <!-- U+FF63 HALFWIDTH RIGHT CORNER BRACKET (」) -->
|
18862
|
+
\u300D <!-- U+300D RIGHT CORNER BRACKET (」) -->
|
18863
|
+
\u300E <!-- U+300E LEFT WHITE CORNER BRACKET (『) -->
|
18864
|
+
\u300F <!-- U+300F RIGHT WHITE CORNER BRACKET (』) -->
|
18865
|
+
\u005B <!-- U+005B LEFT SQUARE BRACKET ([) -->
|
18866
|
+
\uFF3B <!-- U+FF3B FULLWIDTH LEFT SQUARE BRACKET ([) -->
|
18867
|
+
\u005D <!-- U+005D RIGHT SQUARE BRACKET (]) -->
|
18868
|
+
\uFF3D <!-- U+FF3D FULLWIDTH RIGHT SQUARE BRACKET (]) -->
|
18869
|
+
\u3008 <!-- U+3008 LEFT ANGLE BRACKET (〈) -->
|
18870
|
+
\u3009 <!-- U+3009 RIGHT ANGLE BRACKET (〉) -->
|
18871
|
+
\u3016 <!-- U+3016 LEFT WHITE LENTICULAR BRACKET (〖) -->
|
18872
|
+
\u3017 <!-- U+3017 RIGHT WHITE LENTICULAR BRACKET (〗) -->
|
18873
|
+
|
18874
|
+
\u301A <!-- U+301A LEFT WHITE SQUARE BRACKET (〚) -->
|
18875
|
+
\u301B <!-- U+301B RIGHT WHITE SQUARE BRACKET (〛) -->
|
18876
|
+
\u301C <!-- U+301C WAVE DASH (〜) -->
|
18877
|
+
\u3030 <!-- U+3030 WAVY DASH (〰 )-->
|
18878
|
+
\u30FC <!-- U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK (ー) -->
|
18879
|
+
\u2329 <!-- U+2329 LEFT-POINTING ANGLE BRACKET (〈) -->
|
18880
|
+
\u232A <!-- U+232A RIGHT-POINTING ANGLE BRACKET (〉) -->
|
18881
|
+
\u3018 <!-- U+3018 LEFT WHITE TORTOISE SHELL BRACKET (〘) -->
|
18882
|
+
\u3019 <!-- U+3019 RIGHT WHITE TORTOISE SHELL BRACKET (〙) -->
|
18883
|
+
\u30A0 <!-- U+30A0 KATAKANA-HIRAGANA DOUBLE HYPHEN (゠) -->
|
18884
|
+
\uFE59 <!-- U+FE59 SMALL LEFT PARENTHESIS (﹙) -->
|
18885
|
+
\uFE5A <!-- U+FE5A SMALL RIGHT PARENTHESIS (﹚) -->
|
18886
|
+
\uFE5B <!-- U+FE5B SMALL LEFT CURLY BRACKET (﹛) -->
|
18887
|
+
\uFE5C <!-- U+FE5C SMALL RIGHT CURLY BRACKET (﹜) -->
|
18888
|
+
\uFE5D <!-- U+FE5D SMALL LEFT TORTOISE SHELL BRACKET (﹝) -->
|
18889
|
+
\uFE5E <!-- U+FE5E SMALL RIGHT TORTOISE SHELL BRACKET (﹞) -->
|
18890
|
+
\uFF5C <!-- U+FF5C FULLWIDTH VERTICAL LINE (|) -->
|
18891
|
+
\uFF5F <!-- U+FF5F FULLWIDTH LEFT WHITE PARENTHESIS (⦅) -->
|
18892
|
+
\uFF60 <!-- U+FF60 FULLWIDTH RIGHT WHITE PARENTHESIS (⦆) -->
|
18893
|
+
\uFFE3 <!-- U+FFE3 FULLWIDTH MACRON ( ̄) -->
|
18894
|
+
\uFF3F <!-- U+FF3F FULLWIDTH LOW LINE (_) -->
|
18895
|
+
\uFF5E <!-- U+FF5E FULLWIDTH TILDE (~) -->
|
18896
|
+
<!-- Rotate 180° -->
|
18897
|
+
\u309C <!-- U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK (゜) -->
|
18898
|
+
\u3002 <!-- U+3002 IDEOGRAPHIC FULL STOP (。) -->
|
18899
|
+
\uFE52 <!-- U+FE52 SMALL FULL STOP (﹒) -->
|
18900
|
+
\uFF0E <!-- U+FF0E FULLWIDTH FULL STOP (.) -->
|
18901
|
+
]</xsl:variable>
|
18902
|
+
<xsl:variable name="regex_ja_spec"><xsl:value-of select="translate(normalize-space($regex_ja_spec_), ' ', '')"/></xsl:variable>
|
18585
18903
|
<xsl:template name="insertVerticalChar">
|
18586
18904
|
<xsl:param name="str"/>
|
18587
18905
|
<xsl:param name="writing-mode">lr-tb</xsl:param>
|
18588
18906
|
<xsl:param name="reference-orientation">90</xsl:param>
|
18589
|
-
<xsl:
|
18590
|
-
|
18591
|
-
|
18592
|
-
|
18593
|
-
|
18594
|
-
|
18595
|
-
<xsl:
|
18596
|
-
|
18597
|
-
<xsl:
|
18907
|
+
<xsl:param name="add_zero_width_space">false</xsl:param>
|
18908
|
+
<xsl:choose>
|
18909
|
+
<xsl:when test="ancestor::*[local-name() = 'span'][@class = 'norotate']">
|
18910
|
+
<xsl:value-of select="$str"/>
|
18911
|
+
</xsl:when>
|
18912
|
+
<xsl:otherwise>
|
18913
|
+
<xsl:if test="string-length($str) > 0">
|
18914
|
+
<xsl:variable name="horizontal_mode" select="normalize-space(ancestor::*[local-name() = 'span'][@class = 'horizontal'] and 1 = 1)"/>
|
18915
|
+
<xsl:variable name="char" select="substring($str,1,1)"/>
|
18916
|
+
<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">
|
18917
|
+
<xsl:if test="normalize-space($writing-mode) != ''">
|
18918
|
+
<xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
|
18919
|
+
<xsl:attribute name="reference-orientation">90</xsl:attribute>
|
18920
|
+
</xsl:if>
|
18921
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
|
18922
|
+
<xsl:attribute name="reference-orientation">0</xsl:attribute>
|
18923
|
+
</xsl:if>
|
18924
|
+
<xsl:if test="$char = '゜' or $char = '。' or $char = '﹒' or $char = '.'">
|
18925
|
+
<!-- Rotate 180°:
|
18926
|
+
U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK (゜)
|
18927
|
+
U+3002 IDEOGRAPHIC FULL STOP (。)
|
18928
|
+
U+FE52 SMALL FULL STOP (﹒)
|
18929
|
+
U+FF0E FULLWIDTH FULL STOP (.)
|
18930
|
+
-->
|
18931
|
+
<xsl:attribute name="reference-orientation">-90</xsl:attribute>
|
18932
|
+
</xsl:if>
|
18933
|
+
<fo:block-container width="1em">
|
18934
|
+
<fo:block line-height="1em">
|
18935
|
+
<xsl:choose>
|
18936
|
+
<xsl:when test="$horizontal_mode = 'true'">
|
18937
|
+
<xsl:value-of select="$str"/>
|
18938
|
+
</xsl:when>
|
18939
|
+
<xsl:otherwise>
|
18940
|
+
<xsl:value-of select="$char"/>
|
18941
|
+
</xsl:otherwise>
|
18942
|
+
</xsl:choose>
|
18943
|
+
</fo:block>
|
18944
|
+
</fo:block-container>
|
18945
|
+
</fo:inline-container>
|
18946
|
+
<xsl:if test="$add_zero_width_space = 'true' and ($char = ',' or $char = '.' or $char = ' ' or $char = '·' or $char = ')' or $char = ']' or $char = '}')"><xsl:value-of select="$zero_width_space"/></xsl:if>
|
18947
|
+
|
18948
|
+
<xsl:if test="$horizontal_mode = 'false'">
|
18949
|
+
<xsl:call-template name="insertVerticalChar">
|
18950
|
+
<xsl:with-param name="str" select="substring($str, 2)"/>
|
18951
|
+
<xsl:with-param name="writing-mode" select="$writing-mode"/>
|
18952
|
+
<xsl:with-param name="reference-orientation" select="$reference-orientation"/>
|
18953
|
+
<xsl:with-param name="add_zero_width_space" select="$add_zero_width_space"/>
|
18954
|
+
</xsl:call-template>
|
18955
|
+
</xsl:if>
|
18598
18956
|
</xsl:if>
|
18599
|
-
|
18600
|
-
|
18601
|
-
</fo:block-container>
|
18602
|
-
</fo:inline-container>
|
18603
|
-
<xsl:call-template name="insertVerticalChar">
|
18604
|
-
<xsl:with-param name="str" select="substring($str, 2)"/>
|
18605
|
-
<xsl:with-param name="writing-mode" select="$writing-mode"/>
|
18606
|
-
<xsl:with-param name="reference-orientation" select="$reference-orientation"/>
|
18607
|
-
</xsl:call-template>
|
18608
|
-
</xsl:if>
|
18957
|
+
</xsl:otherwise>
|
18958
|
+
</xsl:choose>
|
18609
18959
|
</xsl:template>
|
18610
18960
|
|
18611
18961
|
<xsl:template name="number-to-words">
|