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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 876d0c08428a0b610702a31bc81f0abc40e9d6971499b3ab38bebb1959702ae4
|
4
|
+
data.tar.gz: cc408bfe1f6ba24ddb238479073a58e943953359548650b134bd002562ea1822
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58da984950bbdaf3321b18c8a0164921d4dd1802636c3761992caad1bce8de8cd2961ac558dc7d87f04f964ad018a2f3ced1cfcd360fc8e7c9fda36abeeab3ff
|
7
|
+
data.tar.gz: ce5701587a038e45d1f327a6597da194bb1a8585d283414cf6d9829fd58cf011a743fc35b2afc1b7522ef541f7b94a1bc8c60c4248810fac749d457c9586ea87
|
@@ -3883,17 +3883,30 @@
|
|
3883
3883
|
<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 -->
|
3884
3884
|
|
3885
3885
|
<xsl:param name="table_if">false</xsl:param> <!-- generate extended table in IF for autolayout-algorithm -->
|
3886
|
-
<xsl:param name="table_widths"/> <!-- path to xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
|
3886
|
+
<xsl:param name="table_widths"/> <!-- (debug: path to) xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
|
3887
3887
|
<!-- Example: <tables>
|
3888
|
-
|
3889
|
-
|
3890
|
-
|
3891
|
-
|
3892
|
-
|
3893
|
-
|
3894
|
-
|
3895
|
-
|
3896
|
-
|
3888
|
+
<table page-width="509103" id="table1" width_max="223561" width_min="223560">
|
3889
|
+
<column width_max="39354" width_min="39354"/>
|
3890
|
+
<column width_max="75394" width_min="75394"/>
|
3891
|
+
<column width_max="108813" width_min="108813"/>
|
3892
|
+
<tbody>
|
3893
|
+
<tr>
|
3894
|
+
<td width_max="39354" width_min="39354">
|
3895
|
+
<p_len>39354</p_len>
|
3896
|
+
<word_len>39354</word_len>
|
3897
|
+
</td>
|
3898
|
+
|
3899
|
+
OLD:
|
3900
|
+
<tables>
|
3901
|
+
<table id="table_if_tab-symdu" page-width="75"> - table id prefixed by 'table_if_' to simple search in IF
|
3902
|
+
<tbody>
|
3903
|
+
<tr>
|
3904
|
+
<td id="tab-symdu_1_1">
|
3905
|
+
<p_len>6</p_len>
|
3906
|
+
<p_len>100</p_len> for 2nd paragraph
|
3907
|
+
<word_len>6</word_len>
|
3908
|
+
<word_len>20</word_len>
|
3909
|
+
...
|
3897
3910
|
-->
|
3898
3911
|
|
3899
3912
|
<!-- for command line debug: <xsl:variable name="table_widths_from_if" select="document($table_widths)"/> -->
|
@@ -4117,6 +4130,9 @@
|
|
4117
4130
|
<xsl:variable name="hair_space"> </xsl:variable>
|
4118
4131
|
<xsl:variable name="en_dash">–</xsl:variable>
|
4119
4132
|
<xsl:variable name="em_dash">—</xsl:variable>
|
4133
|
+
<xsl:variable name="cr"> </xsl:variable>
|
4134
|
+
<xsl:variable name="lf">
|
4135
|
+
</xsl:variable>
|
4120
4136
|
|
4121
4137
|
<xsl:template name="getTitle">
|
4122
4138
|
<xsl:param name="name"/>
|
@@ -5819,6 +5835,20 @@
|
|
5819
5835
|
</xsl:for-each>
|
5820
5836
|
</xsl:template>
|
5821
5837
|
|
5838
|
+
<xsl:param name="table_only_with_id"/><!-- Example: table1, for table auto-layout algorithm -->
|
5839
|
+
|
5840
|
+
<xsl:template match="*[local-name()='table']" priority="2">
|
5841
|
+
<xsl:choose>
|
5842
|
+
<xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
|
5843
|
+
<xsl:call-template name="table"/>
|
5844
|
+
</xsl:when>
|
5845
|
+
<xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
|
5846
|
+
<xsl:otherwise>
|
5847
|
+
<xsl:call-template name="table"/>
|
5848
|
+
</xsl:otherwise>
|
5849
|
+
</xsl:choose>
|
5850
|
+
</xsl:template>
|
5851
|
+
|
5822
5852
|
<xsl:template match="*[local-name()='table']" name="table">
|
5823
5853
|
|
5824
5854
|
<xsl:variable name="table-preamble">
|
@@ -5828,9 +5858,11 @@
|
|
5828
5858
|
<xsl:variable name="table">
|
5829
5859
|
|
5830
5860
|
<xsl:variable name="simple-table">
|
5831
|
-
<xsl:
|
5832
|
-
<xsl:
|
5833
|
-
|
5861
|
+
<xsl:if test="$isGenerateTableIF = 'true' and $isApplyAutolayoutAlgorithm = 'true'">
|
5862
|
+
<xsl:call-template name="getSimpleTable">
|
5863
|
+
<xsl:with-param name="id" select="@id"/>
|
5864
|
+
</xsl:call-template>
|
5865
|
+
</xsl:if>
|
5834
5866
|
</xsl:variable>
|
5835
5867
|
<!-- <xsl:variable name="simple-table" select="xalan:nodeset($simple-table_)"/> -->
|
5836
5868
|
|
@@ -5932,9 +5964,9 @@
|
|
5932
5964
|
</xsl:attribute>
|
5933
5965
|
</xsl:for-each>
|
5934
5966
|
|
5935
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
5967
|
+
<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']"/>
|
5936
5968
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
5937
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute
|
5969
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute><!-- set 0pt border, because there is a separete table below for footer -->
|
5938
5970
|
</xsl:if>
|
5939
5971
|
|
5940
5972
|
<xsl:choose>
|
@@ -6102,6 +6134,17 @@
|
|
6102
6134
|
</xsl:if>
|
6103
6135
|
</xsl:template> <!-- table/name -->
|
6104
6136
|
|
6137
|
+
<!-- workaround solution for https://github.com/metanorma/metanorma-iso/issues/1151#issuecomment-2033087938 -->
|
6138
|
+
<xsl:template match="*[local-name()='table']/*[local-name() = 'note'][@type = 'units']/*[local-name() = 'p']/text()" priority="4">
|
6139
|
+
<xsl:choose>
|
6140
|
+
<xsl:when test="preceding-sibling::*[local-name() = 'br']">
|
6141
|
+
<!-- remove CR or LF at start -->
|
6142
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'^( | | )', '')"/>
|
6143
|
+
</xsl:when>
|
6144
|
+
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
6145
|
+
</xsl:choose>
|
6146
|
+
</xsl:template>
|
6147
|
+
|
6105
6148
|
<!-- SOURCE: ... -->
|
6106
6149
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'source']" priority="2">
|
6107
6150
|
<xsl:call-template name="termsource"/>
|
@@ -6512,7 +6555,7 @@
|
|
6512
6555
|
<xsl:param name="colwidths"/>
|
6513
6556
|
<xsl:param name="colgroup"/>
|
6514
6557
|
|
6515
|
-
<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']"/>
|
6558
|
+
<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']"/>
|
6516
6559
|
|
6517
6560
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
6518
6561
|
|
@@ -6578,7 +6621,7 @@
|
|
6578
6621
|
|
6579
6622
|
<!-- fn will be processed inside 'note' processing -->
|
6580
6623
|
|
6581
|
-
<xsl:if test="count(ancestor::bipm:table//*[local-name()='note']) > 1">
|
6624
|
+
<xsl:if test="count(ancestor::bipm:table//*[local-name()='note'][not(@type = 'units')]) > 1">
|
6582
6625
|
<fo:block font-weight="bold" role="SKIP">
|
6583
6626
|
<xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language"/>
|
6584
6627
|
<xsl:choose>
|
@@ -6594,7 +6637,7 @@
|
|
6594
6637
|
|
6595
6638
|
<xsl:apply-templates select="../*[local-name()='p']"/>
|
6596
6639
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
6597
|
-
<xsl:apply-templates select="../*[local-name()='note']"/>
|
6640
|
+
<xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
|
6598
6641
|
<xsl:apply-templates select="../*[local-name()='example']"/>
|
6599
6642
|
<xsl:apply-templates select="../*[local-name()='source']"/>
|
6600
6643
|
|
@@ -6604,7 +6647,7 @@
|
|
6604
6647
|
|
6605
6648
|
<!-- horizontal row separator -->
|
6606
6649
|
<xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
|
6607
|
-
<xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
6650
|
+
<xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
6608
6651
|
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
6609
6652
|
|
6610
6653
|
<xsl:call-template name="setBordersTableArray"/>
|
@@ -7297,7 +7340,20 @@
|
|
7297
7340
|
<!-- Definition List -->
|
7298
7341
|
<!-- ===================== -->
|
7299
7342
|
|
7300
|
-
|
7343
|
+
<!-- for table auto-layout algorithm -->
|
7344
|
+
<xsl:template match="*[local-name()='dl']" priority="2">
|
7345
|
+
<xsl:choose>
|
7346
|
+
<xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
|
7347
|
+
<xsl:call-template name="dl"/>
|
7348
|
+
</xsl:when>
|
7349
|
+
<xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
|
7350
|
+
<xsl:otherwise>
|
7351
|
+
<xsl:call-template name="dl"/>
|
7352
|
+
</xsl:otherwise>
|
7353
|
+
</xsl:choose>
|
7354
|
+
</xsl:template>
|
7355
|
+
|
7356
|
+
<xsl:template match="*[local-name()='dl']" name="dl">
|
7301
7357
|
<xsl:variable name="isAdded" select="@added"/>
|
7302
7358
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
7303
7359
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
@@ -9227,7 +9283,13 @@
|
|
9227
9283
|
<xsl:value-of select="$language_current_2"/>
|
9228
9284
|
</xsl:when>
|
9229
9285
|
<xsl:otherwise>
|
9230
|
-
<xsl:
|
9286
|
+
<xsl:variable name="language_current_3" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'])"/>
|
9287
|
+
<xsl:choose>
|
9288
|
+
<xsl:when test="$language_current_3 != ''">
|
9289
|
+
<xsl:value-of select="$language_current_3"/>
|
9290
|
+
</xsl:when>
|
9291
|
+
<xsl:otherwise>en</xsl:otherwise>
|
9292
|
+
</xsl:choose>
|
9231
9293
|
</xsl:otherwise>
|
9232
9294
|
</xsl:choose>
|
9233
9295
|
</xsl:otherwise>
|
@@ -10142,10 +10204,11 @@
|
|
10142
10204
|
</xsl:template>
|
10143
10205
|
|
10144
10206
|
<xsl:template match="*[local-name() = 'image']">
|
10207
|
+
<xsl:param name="indent">0</xsl:param>
|
10145
10208
|
<xsl:variable name="isAdded" select="../@added"/>
|
10146
10209
|
<xsl:variable name="isDeleted" select="../@deleted"/>
|
10147
10210
|
<xsl:choose>
|
10148
|
-
<xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
10211
|
+
<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) -->
|
10149
10212
|
<fo:inline padding-left="1mm" padding-right="1mm">
|
10150
10213
|
<xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
10151
10214
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
@@ -10154,7 +10217,43 @@
|
|
10154
10217
|
<xsl:variable name="src">
|
10155
10218
|
<xsl:call-template name="image_src"/>
|
10156
10219
|
</xsl:variable>
|
10157
|
-
|
10220
|
+
|
10221
|
+
<xsl:variable name="scale">
|
10222
|
+
<xsl:call-template name="getImageScale">
|
10223
|
+
<xsl:with-param name="indent" select="$indent"/>
|
10224
|
+
</xsl:call-template>
|
10225
|
+
</xsl:variable>
|
10226
|
+
|
10227
|
+
<!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
|
10228
|
+
|
10229
|
+
<!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
|
10230
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
|
10231
|
+
|
10232
|
+
<xsl:variable name="width">
|
10233
|
+
<xsl:call-template name="setImageWidth"/>
|
10234
|
+
</xsl:variable>
|
10235
|
+
<xsl:if test="$width != ''">
|
10236
|
+
<xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
|
10237
|
+
</xsl:if>
|
10238
|
+
<xsl:variable name="height">
|
10239
|
+
<xsl:call-template name="setImageHeight"/>
|
10240
|
+
</xsl:variable>
|
10241
|
+
<xsl:if test="$height != ''">
|
10242
|
+
<xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
|
10243
|
+
</xsl:if>
|
10244
|
+
|
10245
|
+
<xsl:if test="$width = '' and $height = ''">
|
10246
|
+
<xsl:if test="number($scale) < 100">
|
10247
|
+
<xsl:attribute name="content-width"><xsl:value-of select="number($scale)"/>%</xsl:attribute>
|
10248
|
+
<!-- <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
|
10249
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
10250
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
10251
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute> -->
|
10252
|
+
</xsl:if>
|
10253
|
+
</xsl:if>
|
10254
|
+
|
10255
|
+
</fo:external-graphic>
|
10256
|
+
|
10158
10257
|
</fo:inline>
|
10159
10258
|
</xsl:when>
|
10160
10259
|
<xsl:otherwise>
|
@@ -10175,25 +10274,23 @@
|
|
10175
10274
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
10176
10275
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
10177
10276
|
|
10178
|
-
|
10277
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
10179
10278
|
|
10180
10279
|
</fo:instream-foreign-object>
|
10181
10280
|
</xsl:when>
|
10182
10281
|
<xsl:otherwise>
|
10282
|
+
<!-- <fo:block>debug block image:
|
10283
|
+
<xsl:variable name="scale">
|
10284
|
+
<xsl:call-template name="getImageScale">
|
10285
|
+
<xsl:with-param name="indent" select="$indent"/>
|
10286
|
+
</xsl:call-template>
|
10287
|
+
</xsl:variable>
|
10288
|
+
<xsl:value-of select="concat('scale=', $scale,', indent=', $indent)"/>
|
10289
|
+
</fo:block> -->
|
10183
10290
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
10184
|
-
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
10291
|
+
<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'])">
|
10185
10292
|
|
10186
|
-
<xsl:
|
10187
|
-
<xsl:attribute name="width">
|
10188
|
-
<xsl:value-of select="@width"/>
|
10189
|
-
</xsl:attribute>
|
10190
|
-
</xsl:if>
|
10191
|
-
|
10192
|
-
<xsl:if test="@height != '' and @height != 'auto'">
|
10193
|
-
<xsl:attribute name="height">
|
10194
|
-
<xsl:value-of select="@height"/>
|
10195
|
-
</xsl:attribute>
|
10196
|
-
</xsl:if>
|
10293
|
+
<xsl:call-template name="setImageWidthHeight"/>
|
10197
10294
|
|
10198
10295
|
<xsl:choose>
|
10199
10296
|
<xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
|
@@ -10201,24 +10298,18 @@
|
|
10201
10298
|
</xsl:when>
|
10202
10299
|
<xsl:otherwise>
|
10203
10300
|
|
10204
|
-
<xsl:variable name="
|
10205
|
-
<xsl:
|
10206
|
-
<xsl:
|
10207
|
-
|
10208
|
-
</xsl:choose>
|
10301
|
+
<xsl:variable name="scale">
|
10302
|
+
<xsl:call-template name="getImageScale">
|
10303
|
+
<xsl:with-param name="indent" select="$indent"/>
|
10304
|
+
</xsl:call-template>
|
10209
10305
|
</xsl:variable>
|
10210
10306
|
|
10211
|
-
<xsl:variable name="
|
10212
|
-
|
10213
|
-
<xsl:value-of select="$width_effective"/>
|
10214
|
-
|
10307
|
+
<xsl:variable name="scaleRatio">
|
10308
|
+
1
|
10215
10309
|
</xsl:variable>
|
10216
10310
|
|
10217
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
10218
10311
|
<xsl:if test="number($scale) < 100">
|
10219
|
-
|
10220
|
-
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
10221
|
-
|
10312
|
+
<xsl:attribute name="content-width"><xsl:value-of select="number($scale) * number($scaleRatio)"/>%</xsl:attribute>
|
10222
10313
|
</xsl:if>
|
10223
10314
|
</xsl:otherwise>
|
10224
10315
|
</xsl:choose>
|
@@ -10234,6 +10325,62 @@
|
|
10234
10325
|
</xsl:choose>
|
10235
10326
|
</xsl:template>
|
10236
10327
|
|
10328
|
+
<xsl:template name="setImageWidth">
|
10329
|
+
<xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
|
10330
|
+
<xsl:value-of select="@width"/>
|
10331
|
+
</xsl:if>
|
10332
|
+
</xsl:template>
|
10333
|
+
<xsl:template name="setImageHeight">
|
10334
|
+
<xsl:if test="@height != '' and @height != 'auto'">
|
10335
|
+
<xsl:value-of select="@height"/>
|
10336
|
+
</xsl:if>
|
10337
|
+
</xsl:template>
|
10338
|
+
<xsl:template name="setImageWidthHeight">
|
10339
|
+
<xsl:variable name="width">
|
10340
|
+
<xsl:call-template name="setImageWidth"/>
|
10341
|
+
</xsl:variable>
|
10342
|
+
<xsl:if test="$width != ''">
|
10343
|
+
<xsl:attribute name="width">
|
10344
|
+
<xsl:value-of select="$width"/>
|
10345
|
+
</xsl:attribute>
|
10346
|
+
</xsl:if>
|
10347
|
+
<xsl:variable name="height">
|
10348
|
+
<xsl:call-template name="setImageHeight"/>
|
10349
|
+
</xsl:variable>
|
10350
|
+
<xsl:if test="$height != ''">
|
10351
|
+
<xsl:attribute name="height">
|
10352
|
+
<xsl:value-of select="$height"/>
|
10353
|
+
</xsl:attribute>
|
10354
|
+
</xsl:if>
|
10355
|
+
</xsl:template>
|
10356
|
+
|
10357
|
+
<xsl:template name="getImageScale">
|
10358
|
+
<xsl:param name="indent"/>
|
10359
|
+
<xsl:variable name="indent_left">
|
10360
|
+
<xsl:choose>
|
10361
|
+
<xsl:when test="$indent != ''"><xsl:value-of select="$indent"/></xsl:when>
|
10362
|
+
<xsl:otherwise>0</xsl:otherwise>
|
10363
|
+
</xsl:choose>
|
10364
|
+
</xsl:variable>
|
10365
|
+
<xsl:variable name="img_src">
|
10366
|
+
<xsl:choose>
|
10367
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
10368
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
10369
|
+
</xsl:choose>
|
10370
|
+
</xsl:variable>
|
10371
|
+
|
10372
|
+
<xsl:variable name="image_width_effective">
|
10373
|
+
|
10374
|
+
<xsl:value-of select="$width_effective - number($indent_left)"/>
|
10375
|
+
|
10376
|
+
</xsl:variable>
|
10377
|
+
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
10378
|
+
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
10379
|
+
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
10380
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
10381
|
+
<xsl:value-of select="$scale"/>
|
10382
|
+
</xsl:template>
|
10383
|
+
|
10237
10384
|
<xsl:template name="image_src">
|
10238
10385
|
<xsl:choose>
|
10239
10386
|
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
@@ -12928,6 +13075,7 @@
|
|
12928
13075
|
</xsl:template>
|
12929
13076
|
|
12930
13077
|
<xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
13078
|
+
<xsl:param name="indent">0</xsl:param>
|
12931
13079
|
<xsl:choose>
|
12932
13080
|
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
12933
13081
|
<fo:block-container role="SKIP">
|
@@ -12942,7 +13090,9 @@
|
|
12942
13090
|
|
12943
13091
|
<fo:block-container margin-left="0mm" role="SKIP">
|
12944
13092
|
<fo:block>
|
12945
|
-
<xsl:apply-templates select="." mode="list"
|
13093
|
+
<xsl:apply-templates select="." mode="list">
|
13094
|
+
<xsl:with-param name="indent" select="$indent"/>
|
13095
|
+
</xsl:apply-templates>
|
12946
13096
|
</fo:block>
|
12947
13097
|
</fo:block-container>
|
12948
13098
|
</fo:block-container>
|
@@ -12950,7 +13100,9 @@
|
|
12950
13100
|
<xsl:otherwise>
|
12951
13101
|
|
12952
13102
|
<fo:block role="SKIP">
|
12953
|
-
<xsl:apply-templates select="." mode="list"
|
13103
|
+
<xsl:apply-templates select="." mode="list">
|
13104
|
+
<xsl:with-param name="indent" select="$indent"/>
|
13105
|
+
</xsl:apply-templates>
|
12954
13106
|
</fo:block>
|
12955
13107
|
|
12956
13108
|
</xsl:otherwise>
|
@@ -13037,6 +13189,13 @@
|
|
13037
13189
|
</xsl:template>
|
13038
13190
|
|
13039
13191
|
<xsl:template match="*[local-name()='li']">
|
13192
|
+
<xsl:param name="indent">0</xsl:param>
|
13193
|
+
<!-- <fo:list-item xsl:use-attribute-sets="list-item-style">
|
13194
|
+
<fo:list-item-label end-indent="label-end()"><fo:block>x</fo:block></fo:list-item-label>
|
13195
|
+
<fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
|
13196
|
+
<fo:block>debug li indent=<xsl:value-of select="$indent"/></fo:block>
|
13197
|
+
</fo:list-item-body>
|
13198
|
+
</fo:list-item> -->
|
13040
13199
|
<fo:list-item xsl:use-attribute-sets="list-item-style">
|
13041
13200
|
<xsl:copy-of select="@id"/>
|
13042
13201
|
|
@@ -13061,7 +13220,9 @@
|
|
13061
13220
|
|
13062
13221
|
<xsl:call-template name="refine_list-item-body-style"/>
|
13063
13222
|
|
13064
|
-
<xsl:apply-templates
|
13223
|
+
<xsl:apply-templates>
|
13224
|
+
<xsl:with-param name="indent" select="$indent"/>
|
13225
|
+
</xsl:apply-templates>
|
13065
13226
|
|
13066
13227
|
<!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
|
13067
13228
|
|
@@ -15220,6 +15381,4 @@
|
|
15220
15381
|
</xsl:if>
|
15221
15382
|
</xsl:template>
|
15222
15383
|
|
15223
|
-
<!-- update -->
|
15224
|
-
|
15225
15384
|
</xsl:stylesheet>
|