metanorma-bipm 2.4.5 → 2.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/bipm/bipm.brochure.xsl +213 -54
- data/lib/isodoc/bipm/bipm.guide.xsl +213 -54
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +213 -54
- data/lib/isodoc/bipm/bipm.rapport.xsl +213 -54
- data/lib/isodoc/bipm/jcgm.standard.xsl +220 -53
- data/lib/metanorma/bipm/biblio.rng +22 -23
- data/lib/metanorma/bipm/isodoc.rng +37 -116
- data/lib/metanorma/bipm/version.rb +1 -1
- metadata +2 -2
@@ -1744,17 +1744,30 @@
|
|
1744
1744
|
<xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
|
1745
1745
|
|
1746
1746
|
<xsl:param name="table_if">false</xsl:param> <!-- generate extended table in IF for autolayout-algorithm -->
|
1747
|
-
<xsl:param name="table_widths"/> <!-- path to xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
|
1747
|
+
<xsl:param name="table_widths"/> <!-- (debug: path to) xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
|
1748
1748
|
<!-- Example: <tables>
|
1749
|
-
|
1750
|
-
|
1751
|
-
|
1752
|
-
|
1753
|
-
|
1754
|
-
|
1755
|
-
|
1756
|
-
|
1757
|
-
|
1749
|
+
<table page-width="509103" id="table1" width_max="223561" width_min="223560">
|
1750
|
+
<column width_max="39354" width_min="39354"/>
|
1751
|
+
<column width_max="75394" width_min="75394"/>
|
1752
|
+
<column width_max="108813" width_min="108813"/>
|
1753
|
+
<tbody>
|
1754
|
+
<tr>
|
1755
|
+
<td width_max="39354" width_min="39354">
|
1756
|
+
<p_len>39354</p_len>
|
1757
|
+
<word_len>39354</word_len>
|
1758
|
+
</td>
|
1759
|
+
|
1760
|
+
OLD:
|
1761
|
+
<tables>
|
1762
|
+
<table id="table_if_tab-symdu" page-width="75"> - table id prefixed by 'table_if_' to simple search in IF
|
1763
|
+
<tbody>
|
1764
|
+
<tr>
|
1765
|
+
<td id="tab-symdu_1_1">
|
1766
|
+
<p_len>6</p_len>
|
1767
|
+
<p_len>100</p_len> for 2nd paragraph
|
1768
|
+
<word_len>6</word_len>
|
1769
|
+
<word_len>20</word_len>
|
1770
|
+
...
|
1758
1771
|
-->
|
1759
1772
|
|
1760
1773
|
<!-- for command line debug: <xsl:variable name="table_widths_from_if" select="document($table_widths)"/> -->
|
@@ -1974,6 +1987,9 @@
|
|
1974
1987
|
<xsl:variable name="hair_space"> </xsl:variable>
|
1975
1988
|
<xsl:variable name="en_dash">–</xsl:variable>
|
1976
1989
|
<xsl:variable name="em_dash">—</xsl:variable>
|
1990
|
+
<xsl:variable name="cr"> </xsl:variable>
|
1991
|
+
<xsl:variable name="lf">
|
1992
|
+
</xsl:variable>
|
1977
1993
|
|
1978
1994
|
<xsl:template name="getTitle">
|
1979
1995
|
<xsl:param name="name"/>
|
@@ -3668,6 +3684,20 @@
|
|
3668
3684
|
</xsl:for-each>
|
3669
3685
|
</xsl:template>
|
3670
3686
|
|
3687
|
+
<xsl:param name="table_only_with_id"/><!-- Example: table1, for table auto-layout algorithm -->
|
3688
|
+
|
3689
|
+
<xsl:template match="*[local-name()='table']" priority="2">
|
3690
|
+
<xsl:choose>
|
3691
|
+
<xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
|
3692
|
+
<xsl:call-template name="table"/>
|
3693
|
+
</xsl:when>
|
3694
|
+
<xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
|
3695
|
+
<xsl:otherwise>
|
3696
|
+
<xsl:call-template name="table"/>
|
3697
|
+
</xsl:otherwise>
|
3698
|
+
</xsl:choose>
|
3699
|
+
</xsl:template>
|
3700
|
+
|
3671
3701
|
<xsl:template match="*[local-name()='table']" name="table">
|
3672
3702
|
|
3673
3703
|
<xsl:variable name="table-preamble">
|
@@ -3677,9 +3707,11 @@
|
|
3677
3707
|
<xsl:variable name="table">
|
3678
3708
|
|
3679
3709
|
<xsl:variable name="simple-table">
|
3680
|
-
<xsl:
|
3681
|
-
<xsl:
|
3682
|
-
|
3710
|
+
<xsl:if test="$isGenerateTableIF = 'true' and $isApplyAutolayoutAlgorithm = 'true'">
|
3711
|
+
<xsl:call-template name="getSimpleTable">
|
3712
|
+
<xsl:with-param name="id" select="@id"/>
|
3713
|
+
</xsl:call-template>
|
3714
|
+
</xsl:if>
|
3683
3715
|
</xsl:variable>
|
3684
3716
|
<!-- <xsl:variable name="simple-table" select="xalan:nodeset($simple-table_)"/> -->
|
3685
3717
|
|
@@ -3771,9 +3803,9 @@
|
|
3771
3803
|
</xsl:attribute>
|
3772
3804
|
</xsl:for-each>
|
3773
3805
|
|
3774
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
3806
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'][not(@type = 'units')] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
3775
3807
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
3776
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute
|
3808
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute><!-- set 0pt border, because there is a separete table below for footer -->
|
3777
3809
|
</xsl:if>
|
3778
3810
|
|
3779
3811
|
<xsl:choose>
|
@@ -3928,9 +3960,28 @@
|
|
3928
3960
|
|
3929
3961
|
</fo:block>
|
3930
3962
|
|
3963
|
+
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
3964
|
+
<xsl:if test="$continued = 'true'">
|
3965
|
+
<fo:block text-align="right">
|
3966
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
3967
|
+
</fo:block>
|
3968
|
+
</xsl:if>
|
3969
|
+
<!-- </xsl:if> -->
|
3970
|
+
|
3931
3971
|
</xsl:if>
|
3932
3972
|
</xsl:template> <!-- table/name -->
|
3933
3973
|
|
3974
|
+
<!-- workaround solution for https://github.com/metanorma/metanorma-iso/issues/1151#issuecomment-2033087938 -->
|
3975
|
+
<xsl:template match="*[local-name()='table']/*[local-name() = 'note'][@type = 'units']/*[local-name() = 'p']/text()" priority="4">
|
3976
|
+
<xsl:choose>
|
3977
|
+
<xsl:when test="preceding-sibling::*[local-name() = 'br']">
|
3978
|
+
<!-- remove CR or LF at start -->
|
3979
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'^( | | )', '')"/>
|
3980
|
+
</xsl:when>
|
3981
|
+
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
3982
|
+
</xsl:choose>
|
3983
|
+
</xsl:template>
|
3984
|
+
|
3934
3985
|
<!-- SOURCE: ... -->
|
3935
3986
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'source']" priority="2">
|
3936
3987
|
<xsl:call-template name="termsource"/>
|
@@ -4354,7 +4405,7 @@
|
|
4354
4405
|
<xsl:param name="colwidths"/>
|
4355
4406
|
<xsl:param name="colgroup"/>
|
4356
4407
|
|
4357
|
-
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
4408
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
4358
4409
|
|
4359
4410
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
4360
4411
|
|
@@ -4426,7 +4477,7 @@
|
|
4426
4477
|
|
4427
4478
|
<xsl:apply-templates select="../*[local-name()='p']"/>
|
4428
4479
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
4429
|
-
<xsl:apply-templates select="../*[local-name()='note']"/>
|
4480
|
+
<xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
|
4430
4481
|
<xsl:apply-templates select="../*[local-name()='example']"/>
|
4431
4482
|
<xsl:apply-templates select="../*[local-name()='source']"/>
|
4432
4483
|
|
@@ -4436,7 +4487,7 @@
|
|
4436
4487
|
|
4437
4488
|
<!-- horizontal row separator -->
|
4438
4489
|
<xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
|
4439
|
-
<xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
4490
|
+
<xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
4440
4491
|
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
4441
4492
|
|
4442
4493
|
<xsl:call-template name="setBordersTableArray"/>
|
@@ -5142,7 +5193,20 @@
|
|
5142
5193
|
<!-- Definition List -->
|
5143
5194
|
<!-- ===================== -->
|
5144
5195
|
|
5145
|
-
|
5196
|
+
<!-- for table auto-layout algorithm -->
|
5197
|
+
<xsl:template match="*[local-name()='dl']" priority="2">
|
5198
|
+
<xsl:choose>
|
5199
|
+
<xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
|
5200
|
+
<xsl:call-template name="dl"/>
|
5201
|
+
</xsl:when>
|
5202
|
+
<xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
|
5203
|
+
<xsl:otherwise>
|
5204
|
+
<xsl:call-template name="dl"/>
|
5205
|
+
</xsl:otherwise>
|
5206
|
+
</xsl:choose>
|
5207
|
+
</xsl:template>
|
5208
|
+
|
5209
|
+
<xsl:template match="*[local-name()='dl']" name="dl">
|
5146
5210
|
<xsl:variable name="isAdded" select="@added"/>
|
5147
5211
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
5148
5212
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
@@ -7088,7 +7152,13 @@
|
|
7088
7152
|
<xsl:value-of select="$language_current_2"/>
|
7089
7153
|
</xsl:when>
|
7090
7154
|
<xsl:otherwise>
|
7091
|
-
<xsl:
|
7155
|
+
<xsl:variable name="language_current_3" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'])"/>
|
7156
|
+
<xsl:choose>
|
7157
|
+
<xsl:when test="$language_current_3 != ''">
|
7158
|
+
<xsl:value-of select="$language_current_3"/>
|
7159
|
+
</xsl:when>
|
7160
|
+
<xsl:otherwise>en</xsl:otherwise>
|
7161
|
+
</xsl:choose>
|
7092
7162
|
</xsl:otherwise>
|
7093
7163
|
</xsl:choose>
|
7094
7164
|
</xsl:otherwise>
|
@@ -7959,10 +8029,11 @@
|
|
7959
8029
|
</xsl:template>
|
7960
8030
|
|
7961
8031
|
<xsl:template match="*[local-name() = 'image']">
|
8032
|
+
<xsl:param name="indent">0</xsl:param>
|
7962
8033
|
<xsl:variable name="isAdded" select="../@added"/>
|
7963
8034
|
<xsl:variable name="isDeleted" select="../@deleted"/>
|
7964
8035
|
<xsl:choose>
|
7965
|
-
<xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
8036
|
+
<xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']"> <!-- inline image ( 'image:path' in adoc, with one colon after image) -->
|
7966
8037
|
<fo:inline padding-left="1mm" padding-right="1mm">
|
7967
8038
|
<xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
7968
8039
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
@@ -7971,7 +8042,43 @@
|
|
7971
8042
|
<xsl:variable name="src">
|
7972
8043
|
<xsl:call-template name="image_src"/>
|
7973
8044
|
</xsl:variable>
|
7974
|
-
|
8045
|
+
|
8046
|
+
<xsl:variable name="scale">
|
8047
|
+
<xsl:call-template name="getImageScale">
|
8048
|
+
<xsl:with-param name="indent" select="$indent"/>
|
8049
|
+
</xsl:call-template>
|
8050
|
+
</xsl:variable>
|
8051
|
+
|
8052
|
+
<!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
|
8053
|
+
|
8054
|
+
<!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
|
8055
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
|
8056
|
+
|
8057
|
+
<xsl:variable name="width">
|
8058
|
+
<xsl:call-template name="setImageWidth"/>
|
8059
|
+
</xsl:variable>
|
8060
|
+
<xsl:if test="$width != ''">
|
8061
|
+
<xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
|
8062
|
+
</xsl:if>
|
8063
|
+
<xsl:variable name="height">
|
8064
|
+
<xsl:call-template name="setImageHeight"/>
|
8065
|
+
</xsl:variable>
|
8066
|
+
<xsl:if test="$height != ''">
|
8067
|
+
<xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
|
8068
|
+
</xsl:if>
|
8069
|
+
|
8070
|
+
<xsl:if test="$width = '' and $height = ''">
|
8071
|
+
<xsl:if test="number($scale) < 100">
|
8072
|
+
<xsl:attribute name="content-width"><xsl:value-of select="number($scale)"/>%</xsl:attribute>
|
8073
|
+
<!-- <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
|
8074
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
8075
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
8076
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute> -->
|
8077
|
+
</xsl:if>
|
8078
|
+
</xsl:if>
|
8079
|
+
|
8080
|
+
</fo:external-graphic>
|
8081
|
+
|
7975
8082
|
</fo:inline>
|
7976
8083
|
</xsl:when>
|
7977
8084
|
<xsl:otherwise>
|
@@ -7992,25 +8099,23 @@
|
|
7992
8099
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
7993
8100
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
7994
8101
|
|
7995
|
-
|
8102
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
7996
8103
|
|
7997
8104
|
</fo:instream-foreign-object>
|
7998
8105
|
</xsl:when>
|
7999
8106
|
<xsl:otherwise>
|
8107
|
+
<!-- <fo:block>debug block image:
|
8108
|
+
<xsl:variable name="scale">
|
8109
|
+
<xsl:call-template name="getImageScale">
|
8110
|
+
<xsl:with-param name="indent" select="$indent"/>
|
8111
|
+
</xsl:call-template>
|
8112
|
+
</xsl:variable>
|
8113
|
+
<xsl:value-of select="concat('scale=', $scale,', indent=', $indent)"/>
|
8114
|
+
</fo:block> -->
|
8000
8115
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
8001
|
-
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
8116
|
+
<xsl:if test="not(@mimetype = 'image/svg+xml') and (../*[local-name() = 'name'] or parent::*[local-name() = 'figure'][@unnumbered = 'true']) and not(ancestor::*[local-name() = 'table'])">
|
8002
8117
|
|
8003
|
-
<xsl:
|
8004
|
-
<xsl:attribute name="width">
|
8005
|
-
<xsl:value-of select="@width"/>
|
8006
|
-
</xsl:attribute>
|
8007
|
-
</xsl:if>
|
8008
|
-
|
8009
|
-
<xsl:if test="@height != '' and @height != 'auto'">
|
8010
|
-
<xsl:attribute name="height">
|
8011
|
-
<xsl:value-of select="@height"/>
|
8012
|
-
</xsl:attribute>
|
8013
|
-
</xsl:if>
|
8118
|
+
<xsl:call-template name="setImageWidthHeight"/>
|
8014
8119
|
|
8015
8120
|
<xsl:choose>
|
8016
8121
|
<xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
|
@@ -8018,24 +8123,18 @@
|
|
8018
8123
|
</xsl:when>
|
8019
8124
|
<xsl:otherwise>
|
8020
8125
|
|
8021
|
-
<xsl:variable name="
|
8022
|
-
<xsl:
|
8023
|
-
<xsl:
|
8024
|
-
|
8025
|
-
</xsl:choose>
|
8126
|
+
<xsl:variable name="scale">
|
8127
|
+
<xsl:call-template name="getImageScale">
|
8128
|
+
<xsl:with-param name="indent" select="$indent"/>
|
8129
|
+
</xsl:call-template>
|
8026
8130
|
</xsl:variable>
|
8027
8131
|
|
8028
|
-
<xsl:variable name="
|
8029
|
-
|
8030
|
-
<xsl:value-of select="$width_effective"/>
|
8031
|
-
|
8132
|
+
<xsl:variable name="scaleRatio">
|
8133
|
+
1
|
8032
8134
|
</xsl:variable>
|
8033
8135
|
|
8034
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
8035
8136
|
<xsl:if test="number($scale) < 100">
|
8036
|
-
|
8037
|
-
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
8038
|
-
|
8137
|
+
<xsl:attribute name="content-width"><xsl:value-of select="number($scale) * number($scaleRatio)"/>%</xsl:attribute>
|
8039
8138
|
</xsl:if>
|
8040
8139
|
</xsl:otherwise>
|
8041
8140
|
</xsl:choose>
|
@@ -8051,6 +8150,62 @@
|
|
8051
8150
|
</xsl:choose>
|
8052
8151
|
</xsl:template>
|
8053
8152
|
|
8153
|
+
<xsl:template name="setImageWidth">
|
8154
|
+
<xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
|
8155
|
+
<xsl:value-of select="@width"/>
|
8156
|
+
</xsl:if>
|
8157
|
+
</xsl:template>
|
8158
|
+
<xsl:template name="setImageHeight">
|
8159
|
+
<xsl:if test="@height != '' and @height != 'auto'">
|
8160
|
+
<xsl:value-of select="@height"/>
|
8161
|
+
</xsl:if>
|
8162
|
+
</xsl:template>
|
8163
|
+
<xsl:template name="setImageWidthHeight">
|
8164
|
+
<xsl:variable name="width">
|
8165
|
+
<xsl:call-template name="setImageWidth"/>
|
8166
|
+
</xsl:variable>
|
8167
|
+
<xsl:if test="$width != ''">
|
8168
|
+
<xsl:attribute name="width">
|
8169
|
+
<xsl:value-of select="$width"/>
|
8170
|
+
</xsl:attribute>
|
8171
|
+
</xsl:if>
|
8172
|
+
<xsl:variable name="height">
|
8173
|
+
<xsl:call-template name="setImageHeight"/>
|
8174
|
+
</xsl:variable>
|
8175
|
+
<xsl:if test="$height != ''">
|
8176
|
+
<xsl:attribute name="height">
|
8177
|
+
<xsl:value-of select="$height"/>
|
8178
|
+
</xsl:attribute>
|
8179
|
+
</xsl:if>
|
8180
|
+
</xsl:template>
|
8181
|
+
|
8182
|
+
<xsl:template name="getImageScale">
|
8183
|
+
<xsl:param name="indent"/>
|
8184
|
+
<xsl:variable name="indent_left">
|
8185
|
+
<xsl:choose>
|
8186
|
+
<xsl:when test="$indent != ''"><xsl:value-of select="$indent"/></xsl:when>
|
8187
|
+
<xsl:otherwise>0</xsl:otherwise>
|
8188
|
+
</xsl:choose>
|
8189
|
+
</xsl:variable>
|
8190
|
+
<xsl:variable name="img_src">
|
8191
|
+
<xsl:choose>
|
8192
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
8193
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
8194
|
+
</xsl:choose>
|
8195
|
+
</xsl:variable>
|
8196
|
+
|
8197
|
+
<xsl:variable name="image_width_effective">
|
8198
|
+
|
8199
|
+
<xsl:value-of select="$width_effective - number($indent_left)"/>
|
8200
|
+
|
8201
|
+
</xsl:variable>
|
8202
|
+
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
8203
|
+
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
8204
|
+
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
8205
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
8206
|
+
<xsl:value-of select="$scale"/>
|
8207
|
+
</xsl:template>
|
8208
|
+
|
8054
8209
|
<xsl:template name="image_src">
|
8055
8210
|
<xsl:choose>
|
8056
8211
|
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
@@ -10739,6 +10894,7 @@
|
|
10739
10894
|
</xsl:template>
|
10740
10895
|
|
10741
10896
|
<xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
10897
|
+
<xsl:param name="indent">0</xsl:param>
|
10742
10898
|
<xsl:choose>
|
10743
10899
|
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
10744
10900
|
<fo:block-container role="SKIP">
|
@@ -10753,7 +10909,9 @@
|
|
10753
10909
|
|
10754
10910
|
<fo:block-container margin-left="0mm" role="SKIP">
|
10755
10911
|
<fo:block>
|
10756
|
-
<xsl:apply-templates select="." mode="list"
|
10912
|
+
<xsl:apply-templates select="." mode="list">
|
10913
|
+
<xsl:with-param name="indent" select="$indent"/>
|
10914
|
+
</xsl:apply-templates>
|
10757
10915
|
</fo:block>
|
10758
10916
|
</fo:block-container>
|
10759
10917
|
</fo:block-container>
|
@@ -10761,7 +10919,9 @@
|
|
10761
10919
|
<xsl:otherwise>
|
10762
10920
|
|
10763
10921
|
<fo:block role="SKIP">
|
10764
|
-
<xsl:apply-templates select="." mode="list"
|
10922
|
+
<xsl:apply-templates select="." mode="list">
|
10923
|
+
<xsl:with-param name="indent" select="$indent"/>
|
10924
|
+
</xsl:apply-templates>
|
10765
10925
|
</fo:block>
|
10766
10926
|
|
10767
10927
|
</xsl:otherwise>
|
@@ -10846,6 +11006,13 @@
|
|
10846
11006
|
</xsl:template>
|
10847
11007
|
|
10848
11008
|
<xsl:template match="*[local-name()='li']">
|
11009
|
+
<xsl:param name="indent">0</xsl:param>
|
11010
|
+
<!-- <fo:list-item xsl:use-attribute-sets="list-item-style">
|
11011
|
+
<fo:list-item-label end-indent="label-end()"><fo:block>x</fo:block></fo:list-item-label>
|
11012
|
+
<fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
|
11013
|
+
<fo:block>debug li indent=<xsl:value-of select="$indent"/></fo:block>
|
11014
|
+
</fo:list-item-body>
|
11015
|
+
</fo:list-item> -->
|
10849
11016
|
<fo:list-item xsl:use-attribute-sets="list-item-style">
|
10850
11017
|
<xsl:copy-of select="@id"/>
|
10851
11018
|
|
@@ -10870,7 +11037,9 @@
|
|
10870
11037
|
|
10871
11038
|
<xsl:call-template name="refine_list-item-body-style"/>
|
10872
11039
|
|
10873
|
-
<xsl:apply-templates
|
11040
|
+
<xsl:apply-templates>
|
11041
|
+
<xsl:with-param name="indent" select="$indent"/>
|
11042
|
+
</xsl:apply-templates>
|
10874
11043
|
|
10875
11044
|
<!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
|
10876
11045
|
|
@@ -13038,6 +13207,4 @@
|
|
13038
13207
|
</xsl:if>
|
13039
13208
|
</xsl:template>
|
13040
13209
|
|
13041
|
-
<!-- update -->
|
13042
|
-
|
13043
13210
|
</xsl:stylesheet>
|
@@ -95,7 +95,7 @@
|
|
95
95
|
<text/>
|
96
96
|
</element>
|
97
97
|
</define>
|
98
|
-
<define name="
|
98
|
+
<define name="LocalizedStringAttrs">
|
99
99
|
<optional>
|
100
100
|
<!-- multiple languages and scripts possible: comma delimit them if so -->
|
101
101
|
<attribute name="language"/>
|
@@ -106,6 +106,10 @@
|
|
106
106
|
<optional>
|
107
107
|
<attribute name="script"/>
|
108
108
|
</optional>
|
109
|
+
</define>
|
110
|
+
<define name="LocalizedString1">
|
111
|
+
<!-- multiple languages and scripts possible: comma delimit them if so -->
|
112
|
+
<ref name="LocalizedStringAttrs"/>
|
109
113
|
<text/>
|
110
114
|
</define>
|
111
115
|
<define name="LocalizedString">
|
@@ -142,16 +146,8 @@
|
|
142
146
|
<ref name="LocalizedStringOrXsAny"/>
|
143
147
|
</define>
|
144
148
|
<define name="LocalizedStringOrXsAny1">
|
145
|
-
|
146
|
-
|
147
|
-
<attribute name="language"/>
|
148
|
-
</optional>
|
149
|
-
<optional>
|
150
|
-
<attribute name="locale"/>
|
151
|
-
</optional>
|
152
|
-
<optional>
|
153
|
-
<attribute name="script"/>
|
154
|
-
</optional>
|
149
|
+
<!-- multiple languages and scripts possible: comma delimit them if so -->
|
150
|
+
<ref name="LocalizedStringAttrs"/>
|
155
151
|
<oneOrMore>
|
156
152
|
<choice>
|
157
153
|
<text/>
|
@@ -208,6 +204,7 @@
|
|
208
204
|
</define>
|
209
205
|
<define name="roledescription">
|
210
206
|
<element name="description">
|
207
|
+
<ref name="LocalizedStringAttrs"/>
|
211
208
|
<oneOrMore>
|
212
209
|
<ref name="TextElement"/>
|
213
210
|
</oneOrMore>
|
@@ -335,6 +332,7 @@
|
|
335
332
|
</define>
|
336
333
|
<define name="affiliationdescription">
|
337
334
|
<element name="description">
|
335
|
+
<ref name="LocalizedStringAttrs"/>
|
338
336
|
<oneOrMore>
|
339
337
|
<ref name="TextElement"/>
|
340
338
|
</oneOrMore>
|
@@ -948,6 +946,7 @@
|
|
948
946
|
<optional>
|
949
947
|
<attribute name="type"/>
|
950
948
|
</optional>
|
949
|
+
<ref name="LocalizedStringAttrs"/>
|
951
950
|
<zeroOrMore>
|
952
951
|
<ref name="TextElement"/>
|
953
952
|
</zeroOrMore>
|
@@ -1041,15 +1040,7 @@
|
|
1041
1040
|
<data type="boolean"/>
|
1042
1041
|
</attribute>
|
1043
1042
|
</optional>
|
1044
|
-
<
|
1045
|
-
<attribute name="language"/>
|
1046
|
-
</optional>
|
1047
|
-
<optional>
|
1048
|
-
<attribute name="locale"/>
|
1049
|
-
</optional>
|
1050
|
-
<optional>
|
1051
|
-
<attribute name="script"/>
|
1052
|
-
</optional>
|
1043
|
+
<ref name="LocalizedStringAttrs"/>
|
1053
1044
|
<oneOrMore>
|
1054
1045
|
<ref name="TextElement"/>
|
1055
1046
|
</oneOrMore>
|
@@ -1277,6 +1268,7 @@
|
|
1277
1268
|
<optional>
|
1278
1269
|
<attribute name="type"/>
|
1279
1270
|
</optional>
|
1271
|
+
<ref name="LocalizedStringAttrs"/>
|
1280
1272
|
<oneOrMore>
|
1281
1273
|
<ref name="TextElement"/>
|
1282
1274
|
</oneOrMore>
|
@@ -1284,9 +1276,15 @@
|
|
1284
1276
|
</define>
|
1285
1277
|
<define name="bibabstract">
|
1286
1278
|
<element name="abstract">
|
1287
|
-
<
|
1288
|
-
|
1289
|
-
|
1279
|
+
<ref name="LocalizedStringAttrs"/>
|
1280
|
+
<choice>
|
1281
|
+
<oneOrMore>
|
1282
|
+
<ref name="BasicBlock"/>
|
1283
|
+
</oneOrMore>
|
1284
|
+
<oneOrMore>
|
1285
|
+
<ref name="TextElement"/>
|
1286
|
+
</oneOrMore>
|
1287
|
+
</choice>
|
1290
1288
|
</element>
|
1291
1289
|
</define>
|
1292
1290
|
<define name="copyright">
|
@@ -1391,6 +1389,7 @@
|
|
1391
1389
|
</attribute>
|
1392
1390
|
<optional>
|
1393
1391
|
<element name="description">
|
1392
|
+
<ref name="LocalizedStringAttrs"/>
|
1394
1393
|
<oneOrMore>
|
1395
1394
|
<ref name="TextElement"/>
|
1396
1395
|
</oneOrMore>
|