metanorma-itu 2.4.6 → 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/itu/itu.implementers-guide.xsl +129 -30
- data/lib/isodoc/itu/itu.in-force.xsl +129 -30
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +129 -30
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +129 -30
- data/lib/isodoc/itu/itu.recommendation.xsl +129 -30
- data/lib/isodoc/itu/itu.resolution.xsl +129 -30
- data/lib/isodoc/itu/itu.service-publication.xsl +129 -30
- data/lib/isodoc/itu/itu.technical-paper.xsl +129 -30
- data/lib/isodoc/itu/itu.technical-report.xsl +129 -30
- data/lib/metanorma/itu/biblio.rng +22 -23
- data/lib/metanorma/itu/isodoc.rng +37 -116
- data/lib/metanorma/itu/version.rb +1 -1
- metadata +2 -2
@@ -9031,10 +9031,11 @@
|
|
9031
9031
|
</xsl:template>
|
9032
9032
|
|
9033
9033
|
<xsl:template match="*[local-name() = 'image']">
|
9034
|
+
<xsl:param name="indent">0</xsl:param>
|
9034
9035
|
<xsl:variable name="isAdded" select="../@added"/>
|
9035
9036
|
<xsl:variable name="isDeleted" select="../@deleted"/>
|
9036
9037
|
<xsl:choose>
|
9037
|
-
<xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
9038
|
+
<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) -->
|
9038
9039
|
<fo:inline padding-left="1mm" padding-right="1mm">
|
9039
9040
|
<xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
9040
9041
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
@@ -9043,7 +9044,43 @@
|
|
9043
9044
|
<xsl:variable name="src">
|
9044
9045
|
<xsl:call-template name="image_src"/>
|
9045
9046
|
</xsl:variable>
|
9046
|
-
|
9047
|
+
|
9048
|
+
<xsl:variable name="scale">
|
9049
|
+
<xsl:call-template name="getImageScale">
|
9050
|
+
<xsl:with-param name="indent" select="$indent"/>
|
9051
|
+
</xsl:call-template>
|
9052
|
+
</xsl:variable>
|
9053
|
+
|
9054
|
+
<!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
|
9055
|
+
|
9056
|
+
<!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
|
9057
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
|
9058
|
+
|
9059
|
+
<xsl:variable name="width">
|
9060
|
+
<xsl:call-template name="setImageWidth"/>
|
9061
|
+
</xsl:variable>
|
9062
|
+
<xsl:if test="$width != ''">
|
9063
|
+
<xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
|
9064
|
+
</xsl:if>
|
9065
|
+
<xsl:variable name="height">
|
9066
|
+
<xsl:call-template name="setImageHeight"/>
|
9067
|
+
</xsl:variable>
|
9068
|
+
<xsl:if test="$height != ''">
|
9069
|
+
<xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
|
9070
|
+
</xsl:if>
|
9071
|
+
|
9072
|
+
<xsl:if test="$width = '' and $height = ''">
|
9073
|
+
<xsl:if test="number($scale) < 100">
|
9074
|
+
<xsl:attribute name="content-width"><xsl:value-of select="number($scale)"/>%</xsl:attribute>
|
9075
|
+
<!-- <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
|
9076
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
9077
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
9078
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute> -->
|
9079
|
+
</xsl:if>
|
9080
|
+
</xsl:if>
|
9081
|
+
|
9082
|
+
</fo:external-graphic>
|
9083
|
+
|
9047
9084
|
</fo:inline>
|
9048
9085
|
</xsl:when>
|
9049
9086
|
<xsl:otherwise>
|
@@ -9064,25 +9101,23 @@
|
|
9064
9101
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
9065
9102
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
9066
9103
|
|
9067
|
-
|
9104
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
9068
9105
|
|
9069
9106
|
</fo:instream-foreign-object>
|
9070
9107
|
</xsl:when>
|
9071
9108
|
<xsl:otherwise>
|
9109
|
+
<!-- <fo:block>debug block image:
|
9110
|
+
<xsl:variable name="scale">
|
9111
|
+
<xsl:call-template name="getImageScale">
|
9112
|
+
<xsl:with-param name="indent" select="$indent"/>
|
9113
|
+
</xsl:call-template>
|
9114
|
+
</xsl:variable>
|
9115
|
+
<xsl:value-of select="concat('scale=', $scale,', indent=', $indent)"/>
|
9116
|
+
</fo:block> -->
|
9072
9117
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
9073
9118
|
<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'])">
|
9074
9119
|
|
9075
|
-
<xsl:
|
9076
|
-
<xsl:attribute name="width">
|
9077
|
-
<xsl:value-of select="@width"/>
|
9078
|
-
</xsl:attribute>
|
9079
|
-
</xsl:if>
|
9080
|
-
|
9081
|
-
<xsl:if test="@height != '' and @height != 'auto'">
|
9082
|
-
<xsl:attribute name="height">
|
9083
|
-
<xsl:value-of select="@height"/>
|
9084
|
-
</xsl:attribute>
|
9085
|
-
</xsl:if>
|
9120
|
+
<xsl:call-template name="setImageWidthHeight"/>
|
9086
9121
|
|
9087
9122
|
<xsl:choose>
|
9088
9123
|
<xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
|
@@ -9090,24 +9125,18 @@
|
|
9090
9125
|
</xsl:when>
|
9091
9126
|
<xsl:otherwise>
|
9092
9127
|
|
9093
|
-
<xsl:variable name="
|
9094
|
-
<xsl:
|
9095
|
-
<xsl:
|
9096
|
-
|
9097
|
-
</xsl:choose>
|
9128
|
+
<xsl:variable name="scale">
|
9129
|
+
<xsl:call-template name="getImageScale">
|
9130
|
+
<xsl:with-param name="indent" select="$indent"/>
|
9131
|
+
</xsl:call-template>
|
9098
9132
|
</xsl:variable>
|
9099
9133
|
|
9100
|
-
<xsl:variable name="
|
9101
|
-
|
9102
|
-
<xsl:value-of select="$width_effective"/>
|
9103
|
-
|
9134
|
+
<xsl:variable name="scaleRatio">
|
9135
|
+
1
|
9104
9136
|
</xsl:variable>
|
9105
9137
|
|
9106
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
9107
9138
|
<xsl:if test="number($scale) < 100">
|
9108
|
-
|
9109
|
-
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
9110
|
-
|
9139
|
+
<xsl:attribute name="content-width"><xsl:value-of select="number($scale) * number($scaleRatio)"/>%</xsl:attribute>
|
9111
9140
|
</xsl:if>
|
9112
9141
|
</xsl:otherwise>
|
9113
9142
|
</xsl:choose>
|
@@ -9123,6 +9152,62 @@
|
|
9123
9152
|
</xsl:choose>
|
9124
9153
|
</xsl:template>
|
9125
9154
|
|
9155
|
+
<xsl:template name="setImageWidth">
|
9156
|
+
<xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
|
9157
|
+
<xsl:value-of select="@width"/>
|
9158
|
+
</xsl:if>
|
9159
|
+
</xsl:template>
|
9160
|
+
<xsl:template name="setImageHeight">
|
9161
|
+
<xsl:if test="@height != '' and @height != 'auto'">
|
9162
|
+
<xsl:value-of select="@height"/>
|
9163
|
+
</xsl:if>
|
9164
|
+
</xsl:template>
|
9165
|
+
<xsl:template name="setImageWidthHeight">
|
9166
|
+
<xsl:variable name="width">
|
9167
|
+
<xsl:call-template name="setImageWidth"/>
|
9168
|
+
</xsl:variable>
|
9169
|
+
<xsl:if test="$width != ''">
|
9170
|
+
<xsl:attribute name="width">
|
9171
|
+
<xsl:value-of select="$width"/>
|
9172
|
+
</xsl:attribute>
|
9173
|
+
</xsl:if>
|
9174
|
+
<xsl:variable name="height">
|
9175
|
+
<xsl:call-template name="setImageHeight"/>
|
9176
|
+
</xsl:variable>
|
9177
|
+
<xsl:if test="$height != ''">
|
9178
|
+
<xsl:attribute name="height">
|
9179
|
+
<xsl:value-of select="$height"/>
|
9180
|
+
</xsl:attribute>
|
9181
|
+
</xsl:if>
|
9182
|
+
</xsl:template>
|
9183
|
+
|
9184
|
+
<xsl:template name="getImageScale">
|
9185
|
+
<xsl:param name="indent"/>
|
9186
|
+
<xsl:variable name="indent_left">
|
9187
|
+
<xsl:choose>
|
9188
|
+
<xsl:when test="$indent != ''"><xsl:value-of select="$indent"/></xsl:when>
|
9189
|
+
<xsl:otherwise>0</xsl:otherwise>
|
9190
|
+
</xsl:choose>
|
9191
|
+
</xsl:variable>
|
9192
|
+
<xsl:variable name="img_src">
|
9193
|
+
<xsl:choose>
|
9194
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
9195
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
9196
|
+
</xsl:choose>
|
9197
|
+
</xsl:variable>
|
9198
|
+
|
9199
|
+
<xsl:variable name="image_width_effective">
|
9200
|
+
|
9201
|
+
<xsl:value-of select="$width_effective - number($indent_left)"/>
|
9202
|
+
|
9203
|
+
</xsl:variable>
|
9204
|
+
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
9205
|
+
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
9206
|
+
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
9207
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
9208
|
+
<xsl:value-of select="$scale"/>
|
9209
|
+
</xsl:template>
|
9210
|
+
|
9126
9211
|
<xsl:template name="image_src">
|
9127
9212
|
<xsl:choose>
|
9128
9213
|
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
@@ -11808,6 +11893,7 @@
|
|
11808
11893
|
</xsl:template>
|
11809
11894
|
|
11810
11895
|
<xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
11896
|
+
<xsl:param name="indent">0</xsl:param>
|
11811
11897
|
<xsl:choose>
|
11812
11898
|
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
11813
11899
|
<fo:block-container role="SKIP">
|
@@ -11822,7 +11908,9 @@
|
|
11822
11908
|
|
11823
11909
|
<fo:block-container margin-left="0mm" role="SKIP">
|
11824
11910
|
<fo:block>
|
11825
|
-
<xsl:apply-templates select="." mode="list"
|
11911
|
+
<xsl:apply-templates select="." mode="list">
|
11912
|
+
<xsl:with-param name="indent" select="$indent"/>
|
11913
|
+
</xsl:apply-templates>
|
11826
11914
|
</fo:block>
|
11827
11915
|
</fo:block-container>
|
11828
11916
|
</fo:block-container>
|
@@ -11830,7 +11918,9 @@
|
|
11830
11918
|
<xsl:otherwise>
|
11831
11919
|
|
11832
11920
|
<fo:block role="SKIP">
|
11833
|
-
<xsl:apply-templates select="." mode="list"
|
11921
|
+
<xsl:apply-templates select="." mode="list">
|
11922
|
+
<xsl:with-param name="indent" select="$indent"/>
|
11923
|
+
</xsl:apply-templates>
|
11834
11924
|
</fo:block>
|
11835
11925
|
|
11836
11926
|
</xsl:otherwise>
|
@@ -11915,6 +12005,13 @@
|
|
11915
12005
|
</xsl:template>
|
11916
12006
|
|
11917
12007
|
<xsl:template match="*[local-name()='li']">
|
12008
|
+
<xsl:param name="indent">0</xsl:param>
|
12009
|
+
<!-- <fo:list-item xsl:use-attribute-sets="list-item-style">
|
12010
|
+
<fo:list-item-label end-indent="label-end()"><fo:block>x</fo:block></fo:list-item-label>
|
12011
|
+
<fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
|
12012
|
+
<fo:block>debug li indent=<xsl:value-of select="$indent"/></fo:block>
|
12013
|
+
</fo:list-item-body>
|
12014
|
+
</fo:list-item> -->
|
11918
12015
|
<fo:list-item xsl:use-attribute-sets="list-item-style">
|
11919
12016
|
<xsl:copy-of select="@id"/>
|
11920
12017
|
|
@@ -11939,7 +12036,9 @@
|
|
11939
12036
|
|
11940
12037
|
<xsl:call-template name="refine_list-item-body-style"/>
|
11941
12038
|
|
11942
|
-
<xsl:apply-templates
|
12039
|
+
<xsl:apply-templates>
|
12040
|
+
<xsl:with-param name="indent" select="$indent"/>
|
12041
|
+
</xsl:apply-templates>
|
11943
12042
|
|
11944
12043
|
<!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
|
11945
12044
|
|
@@ -9031,10 +9031,11 @@
|
|
9031
9031
|
</xsl:template>
|
9032
9032
|
|
9033
9033
|
<xsl:template match="*[local-name() = 'image']">
|
9034
|
+
<xsl:param name="indent">0</xsl:param>
|
9034
9035
|
<xsl:variable name="isAdded" select="../@added"/>
|
9035
9036
|
<xsl:variable name="isDeleted" select="../@deleted"/>
|
9036
9037
|
<xsl:choose>
|
9037
|
-
<xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
9038
|
+
<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) -->
|
9038
9039
|
<fo:inline padding-left="1mm" padding-right="1mm">
|
9039
9040
|
<xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
9040
9041
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
@@ -9043,7 +9044,43 @@
|
|
9043
9044
|
<xsl:variable name="src">
|
9044
9045
|
<xsl:call-template name="image_src"/>
|
9045
9046
|
</xsl:variable>
|
9046
|
-
|
9047
|
+
|
9048
|
+
<xsl:variable name="scale">
|
9049
|
+
<xsl:call-template name="getImageScale">
|
9050
|
+
<xsl:with-param name="indent" select="$indent"/>
|
9051
|
+
</xsl:call-template>
|
9052
|
+
</xsl:variable>
|
9053
|
+
|
9054
|
+
<!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
|
9055
|
+
|
9056
|
+
<!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
|
9057
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
|
9058
|
+
|
9059
|
+
<xsl:variable name="width">
|
9060
|
+
<xsl:call-template name="setImageWidth"/>
|
9061
|
+
</xsl:variable>
|
9062
|
+
<xsl:if test="$width != ''">
|
9063
|
+
<xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
|
9064
|
+
</xsl:if>
|
9065
|
+
<xsl:variable name="height">
|
9066
|
+
<xsl:call-template name="setImageHeight"/>
|
9067
|
+
</xsl:variable>
|
9068
|
+
<xsl:if test="$height != ''">
|
9069
|
+
<xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
|
9070
|
+
</xsl:if>
|
9071
|
+
|
9072
|
+
<xsl:if test="$width = '' and $height = ''">
|
9073
|
+
<xsl:if test="number($scale) < 100">
|
9074
|
+
<xsl:attribute name="content-width"><xsl:value-of select="number($scale)"/>%</xsl:attribute>
|
9075
|
+
<!-- <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
|
9076
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
9077
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
9078
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute> -->
|
9079
|
+
</xsl:if>
|
9080
|
+
</xsl:if>
|
9081
|
+
|
9082
|
+
</fo:external-graphic>
|
9083
|
+
|
9047
9084
|
</fo:inline>
|
9048
9085
|
</xsl:when>
|
9049
9086
|
<xsl:otherwise>
|
@@ -9064,25 +9101,23 @@
|
|
9064
9101
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
9065
9102
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
9066
9103
|
|
9067
|
-
|
9104
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
9068
9105
|
|
9069
9106
|
</fo:instream-foreign-object>
|
9070
9107
|
</xsl:when>
|
9071
9108
|
<xsl:otherwise>
|
9109
|
+
<!-- <fo:block>debug block image:
|
9110
|
+
<xsl:variable name="scale">
|
9111
|
+
<xsl:call-template name="getImageScale">
|
9112
|
+
<xsl:with-param name="indent" select="$indent"/>
|
9113
|
+
</xsl:call-template>
|
9114
|
+
</xsl:variable>
|
9115
|
+
<xsl:value-of select="concat('scale=', $scale,', indent=', $indent)"/>
|
9116
|
+
</fo:block> -->
|
9072
9117
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
9073
9118
|
<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'])">
|
9074
9119
|
|
9075
|
-
<xsl:
|
9076
|
-
<xsl:attribute name="width">
|
9077
|
-
<xsl:value-of select="@width"/>
|
9078
|
-
</xsl:attribute>
|
9079
|
-
</xsl:if>
|
9080
|
-
|
9081
|
-
<xsl:if test="@height != '' and @height != 'auto'">
|
9082
|
-
<xsl:attribute name="height">
|
9083
|
-
<xsl:value-of select="@height"/>
|
9084
|
-
</xsl:attribute>
|
9085
|
-
</xsl:if>
|
9120
|
+
<xsl:call-template name="setImageWidthHeight"/>
|
9086
9121
|
|
9087
9122
|
<xsl:choose>
|
9088
9123
|
<xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
|
@@ -9090,24 +9125,18 @@
|
|
9090
9125
|
</xsl:when>
|
9091
9126
|
<xsl:otherwise>
|
9092
9127
|
|
9093
|
-
<xsl:variable name="
|
9094
|
-
<xsl:
|
9095
|
-
<xsl:
|
9096
|
-
|
9097
|
-
</xsl:choose>
|
9128
|
+
<xsl:variable name="scale">
|
9129
|
+
<xsl:call-template name="getImageScale">
|
9130
|
+
<xsl:with-param name="indent" select="$indent"/>
|
9131
|
+
</xsl:call-template>
|
9098
9132
|
</xsl:variable>
|
9099
9133
|
|
9100
|
-
<xsl:variable name="
|
9101
|
-
|
9102
|
-
<xsl:value-of select="$width_effective"/>
|
9103
|
-
|
9134
|
+
<xsl:variable name="scaleRatio">
|
9135
|
+
1
|
9104
9136
|
</xsl:variable>
|
9105
9137
|
|
9106
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
9107
9138
|
<xsl:if test="number($scale) < 100">
|
9108
|
-
|
9109
|
-
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
9110
|
-
|
9139
|
+
<xsl:attribute name="content-width"><xsl:value-of select="number($scale) * number($scaleRatio)"/>%</xsl:attribute>
|
9111
9140
|
</xsl:if>
|
9112
9141
|
</xsl:otherwise>
|
9113
9142
|
</xsl:choose>
|
@@ -9123,6 +9152,62 @@
|
|
9123
9152
|
</xsl:choose>
|
9124
9153
|
</xsl:template>
|
9125
9154
|
|
9155
|
+
<xsl:template name="setImageWidth">
|
9156
|
+
<xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
|
9157
|
+
<xsl:value-of select="@width"/>
|
9158
|
+
</xsl:if>
|
9159
|
+
</xsl:template>
|
9160
|
+
<xsl:template name="setImageHeight">
|
9161
|
+
<xsl:if test="@height != '' and @height != 'auto'">
|
9162
|
+
<xsl:value-of select="@height"/>
|
9163
|
+
</xsl:if>
|
9164
|
+
</xsl:template>
|
9165
|
+
<xsl:template name="setImageWidthHeight">
|
9166
|
+
<xsl:variable name="width">
|
9167
|
+
<xsl:call-template name="setImageWidth"/>
|
9168
|
+
</xsl:variable>
|
9169
|
+
<xsl:if test="$width != ''">
|
9170
|
+
<xsl:attribute name="width">
|
9171
|
+
<xsl:value-of select="$width"/>
|
9172
|
+
</xsl:attribute>
|
9173
|
+
</xsl:if>
|
9174
|
+
<xsl:variable name="height">
|
9175
|
+
<xsl:call-template name="setImageHeight"/>
|
9176
|
+
</xsl:variable>
|
9177
|
+
<xsl:if test="$height != ''">
|
9178
|
+
<xsl:attribute name="height">
|
9179
|
+
<xsl:value-of select="$height"/>
|
9180
|
+
</xsl:attribute>
|
9181
|
+
</xsl:if>
|
9182
|
+
</xsl:template>
|
9183
|
+
|
9184
|
+
<xsl:template name="getImageScale">
|
9185
|
+
<xsl:param name="indent"/>
|
9186
|
+
<xsl:variable name="indent_left">
|
9187
|
+
<xsl:choose>
|
9188
|
+
<xsl:when test="$indent != ''"><xsl:value-of select="$indent"/></xsl:when>
|
9189
|
+
<xsl:otherwise>0</xsl:otherwise>
|
9190
|
+
</xsl:choose>
|
9191
|
+
</xsl:variable>
|
9192
|
+
<xsl:variable name="img_src">
|
9193
|
+
<xsl:choose>
|
9194
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
9195
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
9196
|
+
</xsl:choose>
|
9197
|
+
</xsl:variable>
|
9198
|
+
|
9199
|
+
<xsl:variable name="image_width_effective">
|
9200
|
+
|
9201
|
+
<xsl:value-of select="$width_effective - number($indent_left)"/>
|
9202
|
+
|
9203
|
+
</xsl:variable>
|
9204
|
+
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
9205
|
+
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
9206
|
+
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
9207
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
9208
|
+
<xsl:value-of select="$scale"/>
|
9209
|
+
</xsl:template>
|
9210
|
+
|
9126
9211
|
<xsl:template name="image_src">
|
9127
9212
|
<xsl:choose>
|
9128
9213
|
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
@@ -11808,6 +11893,7 @@
|
|
11808
11893
|
</xsl:template>
|
11809
11894
|
|
11810
11895
|
<xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
11896
|
+
<xsl:param name="indent">0</xsl:param>
|
11811
11897
|
<xsl:choose>
|
11812
11898
|
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
11813
11899
|
<fo:block-container role="SKIP">
|
@@ -11822,7 +11908,9 @@
|
|
11822
11908
|
|
11823
11909
|
<fo:block-container margin-left="0mm" role="SKIP">
|
11824
11910
|
<fo:block>
|
11825
|
-
<xsl:apply-templates select="." mode="list"
|
11911
|
+
<xsl:apply-templates select="." mode="list">
|
11912
|
+
<xsl:with-param name="indent" select="$indent"/>
|
11913
|
+
</xsl:apply-templates>
|
11826
11914
|
</fo:block>
|
11827
11915
|
</fo:block-container>
|
11828
11916
|
</fo:block-container>
|
@@ -11830,7 +11918,9 @@
|
|
11830
11918
|
<xsl:otherwise>
|
11831
11919
|
|
11832
11920
|
<fo:block role="SKIP">
|
11833
|
-
<xsl:apply-templates select="." mode="list"
|
11921
|
+
<xsl:apply-templates select="." mode="list">
|
11922
|
+
<xsl:with-param name="indent" select="$indent"/>
|
11923
|
+
</xsl:apply-templates>
|
11834
11924
|
</fo:block>
|
11835
11925
|
|
11836
11926
|
</xsl:otherwise>
|
@@ -11915,6 +12005,13 @@
|
|
11915
12005
|
</xsl:template>
|
11916
12006
|
|
11917
12007
|
<xsl:template match="*[local-name()='li']">
|
12008
|
+
<xsl:param name="indent">0</xsl:param>
|
12009
|
+
<!-- <fo:list-item xsl:use-attribute-sets="list-item-style">
|
12010
|
+
<fo:list-item-label end-indent="label-end()"><fo:block>x</fo:block></fo:list-item-label>
|
12011
|
+
<fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
|
12012
|
+
<fo:block>debug li indent=<xsl:value-of select="$indent"/></fo:block>
|
12013
|
+
</fo:list-item-body>
|
12014
|
+
</fo:list-item> -->
|
11918
12015
|
<fo:list-item xsl:use-attribute-sets="list-item-style">
|
11919
12016
|
<xsl:copy-of select="@id"/>
|
11920
12017
|
|
@@ -11939,7 +12036,9 @@
|
|
11939
12036
|
|
11940
12037
|
<xsl:call-template name="refine_list-item-body-style"/>
|
11941
12038
|
|
11942
|
-
<xsl:apply-templates
|
12039
|
+
<xsl:apply-templates>
|
12040
|
+
<xsl:with-param name="indent" select="$indent"/>
|
12041
|
+
</xsl:apply-templates>
|
11943
12042
|
|
11944
12043
|
<!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
|
11945
12044
|
|