metanorma-un 0.12.6 → 0.12.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/un/un.plenary-attachment.xsl +220 -53
- data/lib/isodoc/un/un.plenary.xsl +220 -53
- data/lib/isodoc/un/un.recommendation.xsl +220 -53
- data/lib/metanorma/un/biblio.rng +22 -23
- data/lib/metanorma/un/isodoc.rng +37 -116
- data/lib/metanorma/un/version.rb +1 -1
- metadata +2 -2
@@ -851,17 +851,30 @@
|
|
851
851
|
<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 -->
|
852
852
|
|
853
853
|
<xsl:param name="table_if">false</xsl:param> <!-- generate extended table in IF for autolayout-algorithm -->
|
854
|
-
<xsl:param name="table_widths"/> <!-- path to xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
|
854
|
+
<xsl:param name="table_widths"/> <!-- (debug: path to) xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
|
855
855
|
<!-- Example: <tables>
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
856
|
+
<table page-width="509103" id="table1" width_max="223561" width_min="223560">
|
857
|
+
<column width_max="39354" width_min="39354"/>
|
858
|
+
<column width_max="75394" width_min="75394"/>
|
859
|
+
<column width_max="108813" width_min="108813"/>
|
860
|
+
<tbody>
|
861
|
+
<tr>
|
862
|
+
<td width_max="39354" width_min="39354">
|
863
|
+
<p_len>39354</p_len>
|
864
|
+
<word_len>39354</word_len>
|
865
|
+
</td>
|
866
|
+
|
867
|
+
OLD:
|
868
|
+
<tables>
|
869
|
+
<table id="table_if_tab-symdu" page-width="75"> - table id prefixed by 'table_if_' to simple search in IF
|
870
|
+
<tbody>
|
871
|
+
<tr>
|
872
|
+
<td id="tab-symdu_1_1">
|
873
|
+
<p_len>6</p_len>
|
874
|
+
<p_len>100</p_len> for 2nd paragraph
|
875
|
+
<word_len>6</word_len>
|
876
|
+
<word_len>20</word_len>
|
877
|
+
...
|
865
878
|
-->
|
866
879
|
|
867
880
|
<!-- for command line debug: <xsl:variable name="table_widths_from_if" select="document($table_widths)"/> -->
|
@@ -1081,6 +1094,9 @@
|
|
1081
1094
|
<xsl:variable name="hair_space"> </xsl:variable>
|
1082
1095
|
<xsl:variable name="en_dash">–</xsl:variable>
|
1083
1096
|
<xsl:variable name="em_dash">—</xsl:variable>
|
1097
|
+
<xsl:variable name="cr"> </xsl:variable>
|
1098
|
+
<xsl:variable name="lf">
|
1099
|
+
</xsl:variable>
|
1084
1100
|
|
1085
1101
|
<xsl:template name="getTitle">
|
1086
1102
|
<xsl:param name="name"/>
|
@@ -2747,6 +2763,20 @@
|
|
2747
2763
|
</xsl:for-each>
|
2748
2764
|
</xsl:template>
|
2749
2765
|
|
2766
|
+
<xsl:param name="table_only_with_id"/><!-- Example: table1, for table auto-layout algorithm -->
|
2767
|
+
|
2768
|
+
<xsl:template match="*[local-name()='table']" priority="2">
|
2769
|
+
<xsl:choose>
|
2770
|
+
<xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
|
2771
|
+
<xsl:call-template name="table"/>
|
2772
|
+
</xsl:when>
|
2773
|
+
<xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
|
2774
|
+
<xsl:otherwise>
|
2775
|
+
<xsl:call-template name="table"/>
|
2776
|
+
</xsl:otherwise>
|
2777
|
+
</xsl:choose>
|
2778
|
+
</xsl:template>
|
2779
|
+
|
2750
2780
|
<xsl:template match="*[local-name()='table']" name="table">
|
2751
2781
|
|
2752
2782
|
<xsl:variable name="table-preamble">
|
@@ -2756,9 +2786,11 @@
|
|
2756
2786
|
<xsl:variable name="table">
|
2757
2787
|
|
2758
2788
|
<xsl:variable name="simple-table">
|
2759
|
-
<xsl:
|
2760
|
-
<xsl:
|
2761
|
-
|
2789
|
+
<xsl:if test="$isGenerateTableIF = 'true' and $isApplyAutolayoutAlgorithm = 'true'">
|
2790
|
+
<xsl:call-template name="getSimpleTable">
|
2791
|
+
<xsl:with-param name="id" select="@id"/>
|
2792
|
+
</xsl:call-template>
|
2793
|
+
</xsl:if>
|
2762
2794
|
</xsl:variable>
|
2763
2795
|
<!-- <xsl:variable name="simple-table" select="xalan:nodeset($simple-table_)"/> -->
|
2764
2796
|
|
@@ -2860,9 +2892,9 @@
|
|
2860
2892
|
</xsl:attribute>
|
2861
2893
|
</xsl:for-each>
|
2862
2894
|
|
2863
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
2895
|
+
<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']"/>
|
2864
2896
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2865
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute
|
2897
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute><!-- set 0pt border, because there is a separete table below for footer -->
|
2866
2898
|
</xsl:if>
|
2867
2899
|
|
2868
2900
|
<xsl:choose>
|
@@ -3011,9 +3043,28 @@
|
|
3011
3043
|
|
3012
3044
|
</fo:block>
|
3013
3045
|
|
3046
|
+
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
3047
|
+
<xsl:if test="$continued = 'true'">
|
3048
|
+
<fo:block text-align="right">
|
3049
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
3050
|
+
</fo:block>
|
3051
|
+
</xsl:if>
|
3052
|
+
<!-- </xsl:if> -->
|
3053
|
+
|
3014
3054
|
</xsl:if>
|
3015
3055
|
</xsl:template> <!-- table/name -->
|
3016
3056
|
|
3057
|
+
<!-- workaround solution for https://github.com/metanorma/metanorma-iso/issues/1151#issuecomment-2033087938 -->
|
3058
|
+
<xsl:template match="*[local-name()='table']/*[local-name() = 'note'][@type = 'units']/*[local-name() = 'p']/text()" priority="4">
|
3059
|
+
<xsl:choose>
|
3060
|
+
<xsl:when test="preceding-sibling::*[local-name() = 'br']">
|
3061
|
+
<!-- remove CR or LF at start -->
|
3062
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'^( | | )', '')"/>
|
3063
|
+
</xsl:when>
|
3064
|
+
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
3065
|
+
</xsl:choose>
|
3066
|
+
</xsl:template>
|
3067
|
+
|
3017
3068
|
<!-- SOURCE: ... -->
|
3018
3069
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'source']" priority="2">
|
3019
3070
|
<xsl:call-template name="termsource"/>
|
@@ -3424,7 +3475,7 @@
|
|
3424
3475
|
<xsl:param name="colwidths"/>
|
3425
3476
|
<xsl:param name="colgroup"/>
|
3426
3477
|
|
3427
|
-
<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']"/>
|
3478
|
+
<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']"/>
|
3428
3479
|
|
3429
3480
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
3430
3481
|
|
@@ -3496,7 +3547,7 @@
|
|
3496
3547
|
|
3497
3548
|
<xsl:apply-templates select="../*[local-name()='p']"/>
|
3498
3549
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
3499
|
-
<xsl:apply-templates select="../*[local-name()='note']"/>
|
3550
|
+
<xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
|
3500
3551
|
<xsl:apply-templates select="../*[local-name()='example']"/>
|
3501
3552
|
<xsl:apply-templates select="../*[local-name()='source']"/>
|
3502
3553
|
|
@@ -3506,7 +3557,7 @@
|
|
3506
3557
|
|
3507
3558
|
<!-- horizontal row separator -->
|
3508
3559
|
<xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
|
3509
|
-
<xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
3560
|
+
<xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
3510
3561
|
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
3511
3562
|
|
3512
3563
|
<xsl:call-template name="setBordersTableArray"/>
|
@@ -4171,7 +4222,20 @@
|
|
4171
4222
|
<!-- Definition List -->
|
4172
4223
|
<!-- ===================== -->
|
4173
4224
|
|
4174
|
-
|
4225
|
+
<!-- for table auto-layout algorithm -->
|
4226
|
+
<xsl:template match="*[local-name()='dl']" priority="2">
|
4227
|
+
<xsl:choose>
|
4228
|
+
<xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
|
4229
|
+
<xsl:call-template name="dl"/>
|
4230
|
+
</xsl:when>
|
4231
|
+
<xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
|
4232
|
+
<xsl:otherwise>
|
4233
|
+
<xsl:call-template name="dl"/>
|
4234
|
+
</xsl:otherwise>
|
4235
|
+
</xsl:choose>
|
4236
|
+
</xsl:template>
|
4237
|
+
|
4238
|
+
<xsl:template match="*[local-name()='dl']" name="dl">
|
4175
4239
|
<xsl:variable name="isAdded" select="@added"/>
|
4176
4240
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
4177
4241
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
@@ -6100,7 +6164,13 @@
|
|
6100
6164
|
<xsl:value-of select="$language_current_2"/>
|
6101
6165
|
</xsl:when>
|
6102
6166
|
<xsl:otherwise>
|
6103
|
-
<xsl:
|
6167
|
+
<xsl:variable name="language_current_3" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'])"/>
|
6168
|
+
<xsl:choose>
|
6169
|
+
<xsl:when test="$language_current_3 != ''">
|
6170
|
+
<xsl:value-of select="$language_current_3"/>
|
6171
|
+
</xsl:when>
|
6172
|
+
<xsl:otherwise>en</xsl:otherwise>
|
6173
|
+
</xsl:choose>
|
6104
6174
|
</xsl:otherwise>
|
6105
6175
|
</xsl:choose>
|
6106
6176
|
</xsl:otherwise>
|
@@ -6975,10 +7045,11 @@
|
|
6975
7045
|
</xsl:template>
|
6976
7046
|
|
6977
7047
|
<xsl:template match="*[local-name() = 'image']">
|
7048
|
+
<xsl:param name="indent">0</xsl:param>
|
6978
7049
|
<xsl:variable name="isAdded" select="../@added"/>
|
6979
7050
|
<xsl:variable name="isDeleted" select="../@deleted"/>
|
6980
7051
|
<xsl:choose>
|
6981
|
-
<xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
7052
|
+
<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) -->
|
6982
7053
|
<fo:inline padding-left="1mm" padding-right="1mm">
|
6983
7054
|
<xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
|
6984
7055
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
@@ -6987,7 +7058,43 @@
|
|
6987
7058
|
<xsl:variable name="src">
|
6988
7059
|
<xsl:call-template name="image_src"/>
|
6989
7060
|
</xsl:variable>
|
6990
|
-
|
7061
|
+
|
7062
|
+
<xsl:variable name="scale">
|
7063
|
+
<xsl:call-template name="getImageScale">
|
7064
|
+
<xsl:with-param name="indent" select="$indent"/>
|
7065
|
+
</xsl:call-template>
|
7066
|
+
</xsl:variable>
|
7067
|
+
|
7068
|
+
<!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
|
7069
|
+
|
7070
|
+
<!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
|
7071
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
|
7072
|
+
|
7073
|
+
<xsl:variable name="width">
|
7074
|
+
<xsl:call-template name="setImageWidth"/>
|
7075
|
+
</xsl:variable>
|
7076
|
+
<xsl:if test="$width != ''">
|
7077
|
+
<xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
|
7078
|
+
</xsl:if>
|
7079
|
+
<xsl:variable name="height">
|
7080
|
+
<xsl:call-template name="setImageHeight"/>
|
7081
|
+
</xsl:variable>
|
7082
|
+
<xsl:if test="$height != ''">
|
7083
|
+
<xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
|
7084
|
+
</xsl:if>
|
7085
|
+
|
7086
|
+
<xsl:if test="$width = '' and $height = ''">
|
7087
|
+
<xsl:if test="number($scale) < 100">
|
7088
|
+
<xsl:attribute name="content-width"><xsl:value-of select="number($scale)"/>%</xsl:attribute>
|
7089
|
+
<!-- <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
|
7090
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
7091
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
7092
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute> -->
|
7093
|
+
</xsl:if>
|
7094
|
+
</xsl:if>
|
7095
|
+
|
7096
|
+
</fo:external-graphic>
|
7097
|
+
|
6991
7098
|
</fo:inline>
|
6992
7099
|
</xsl:when>
|
6993
7100
|
<xsl:otherwise>
|
@@ -7008,25 +7115,23 @@
|
|
7008
7115
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
7009
7116
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
7010
7117
|
|
7011
|
-
|
7118
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
7012
7119
|
|
7013
7120
|
</fo:instream-foreign-object>
|
7014
7121
|
</xsl:when>
|
7015
7122
|
<xsl:otherwise>
|
7123
|
+
<!-- <fo:block>debug block image:
|
7124
|
+
<xsl:variable name="scale">
|
7125
|
+
<xsl:call-template name="getImageScale">
|
7126
|
+
<xsl:with-param name="indent" select="$indent"/>
|
7127
|
+
</xsl:call-template>
|
7128
|
+
</xsl:variable>
|
7129
|
+
<xsl:value-of select="concat('scale=', $scale,', indent=', $indent)"/>
|
7130
|
+
</fo:block> -->
|
7016
7131
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
7017
|
-
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
7018
|
-
|
7019
|
-
<xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
|
7020
|
-
<xsl:attribute name="width">
|
7021
|
-
<xsl:value-of select="@width"/>
|
7022
|
-
</xsl:attribute>
|
7023
|
-
</xsl:if>
|
7132
|
+
<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'])">
|
7024
7133
|
|
7025
|
-
<xsl:
|
7026
|
-
<xsl:attribute name="height">
|
7027
|
-
<xsl:value-of select="@height"/>
|
7028
|
-
</xsl:attribute>
|
7029
|
-
</xsl:if>
|
7134
|
+
<xsl:call-template name="setImageWidthHeight"/>
|
7030
7135
|
|
7031
7136
|
<xsl:choose>
|
7032
7137
|
<xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
|
@@ -7034,24 +7139,18 @@
|
|
7034
7139
|
</xsl:when>
|
7035
7140
|
<xsl:otherwise>
|
7036
7141
|
|
7037
|
-
<xsl:variable name="
|
7038
|
-
<xsl:
|
7039
|
-
<xsl:
|
7040
|
-
|
7041
|
-
</xsl:choose>
|
7142
|
+
<xsl:variable name="scale">
|
7143
|
+
<xsl:call-template name="getImageScale">
|
7144
|
+
<xsl:with-param name="indent" select="$indent"/>
|
7145
|
+
</xsl:call-template>
|
7042
7146
|
</xsl:variable>
|
7043
7147
|
|
7044
|
-
<xsl:variable name="
|
7045
|
-
|
7046
|
-
<xsl:value-of select="$width_effective"/>
|
7047
|
-
|
7148
|
+
<xsl:variable name="scaleRatio">
|
7149
|
+
1
|
7048
7150
|
</xsl:variable>
|
7049
7151
|
|
7050
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
7051
7152
|
<xsl:if test="number($scale) < 100">
|
7052
|
-
|
7053
|
-
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
7054
|
-
|
7153
|
+
<xsl:attribute name="content-width"><xsl:value-of select="number($scale) * number($scaleRatio)"/>%</xsl:attribute>
|
7055
7154
|
</xsl:if>
|
7056
7155
|
</xsl:otherwise>
|
7057
7156
|
</xsl:choose>
|
@@ -7067,6 +7166,62 @@
|
|
7067
7166
|
</xsl:choose>
|
7068
7167
|
</xsl:template>
|
7069
7168
|
|
7169
|
+
<xsl:template name="setImageWidth">
|
7170
|
+
<xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
|
7171
|
+
<xsl:value-of select="@width"/>
|
7172
|
+
</xsl:if>
|
7173
|
+
</xsl:template>
|
7174
|
+
<xsl:template name="setImageHeight">
|
7175
|
+
<xsl:if test="@height != '' and @height != 'auto'">
|
7176
|
+
<xsl:value-of select="@height"/>
|
7177
|
+
</xsl:if>
|
7178
|
+
</xsl:template>
|
7179
|
+
<xsl:template name="setImageWidthHeight">
|
7180
|
+
<xsl:variable name="width">
|
7181
|
+
<xsl:call-template name="setImageWidth"/>
|
7182
|
+
</xsl:variable>
|
7183
|
+
<xsl:if test="$width != ''">
|
7184
|
+
<xsl:attribute name="width">
|
7185
|
+
<xsl:value-of select="$width"/>
|
7186
|
+
</xsl:attribute>
|
7187
|
+
</xsl:if>
|
7188
|
+
<xsl:variable name="height">
|
7189
|
+
<xsl:call-template name="setImageHeight"/>
|
7190
|
+
</xsl:variable>
|
7191
|
+
<xsl:if test="$height != ''">
|
7192
|
+
<xsl:attribute name="height">
|
7193
|
+
<xsl:value-of select="$height"/>
|
7194
|
+
</xsl:attribute>
|
7195
|
+
</xsl:if>
|
7196
|
+
</xsl:template>
|
7197
|
+
|
7198
|
+
<xsl:template name="getImageScale">
|
7199
|
+
<xsl:param name="indent"/>
|
7200
|
+
<xsl:variable name="indent_left">
|
7201
|
+
<xsl:choose>
|
7202
|
+
<xsl:when test="$indent != ''"><xsl:value-of select="$indent"/></xsl:when>
|
7203
|
+
<xsl:otherwise>0</xsl:otherwise>
|
7204
|
+
</xsl:choose>
|
7205
|
+
</xsl:variable>
|
7206
|
+
<xsl:variable name="img_src">
|
7207
|
+
<xsl:choose>
|
7208
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
7209
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
7210
|
+
</xsl:choose>
|
7211
|
+
</xsl:variable>
|
7212
|
+
|
7213
|
+
<xsl:variable name="image_width_effective">
|
7214
|
+
|
7215
|
+
<xsl:value-of select="$width_effective - number($indent_left)"/>
|
7216
|
+
|
7217
|
+
</xsl:variable>
|
7218
|
+
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
7219
|
+
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
7220
|
+
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
7221
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
7222
|
+
<xsl:value-of select="$scale"/>
|
7223
|
+
</xsl:template>
|
7224
|
+
|
7070
7225
|
<xsl:template name="image_src">
|
7071
7226
|
<xsl:choose>
|
7072
7227
|
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
@@ -9747,6 +9902,7 @@
|
|
9747
9902
|
</xsl:template>
|
9748
9903
|
|
9749
9904
|
<xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
9905
|
+
<xsl:param name="indent">0</xsl:param>
|
9750
9906
|
<xsl:choose>
|
9751
9907
|
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
9752
9908
|
<fo:block-container role="SKIP">
|
@@ -9761,7 +9917,9 @@
|
|
9761
9917
|
|
9762
9918
|
<fo:block-container margin-left="0mm" role="SKIP">
|
9763
9919
|
<fo:block>
|
9764
|
-
<xsl:apply-templates select="." mode="list"
|
9920
|
+
<xsl:apply-templates select="." mode="list">
|
9921
|
+
<xsl:with-param name="indent" select="$indent"/>
|
9922
|
+
</xsl:apply-templates>
|
9765
9923
|
</fo:block>
|
9766
9924
|
</fo:block-container>
|
9767
9925
|
</fo:block-container>
|
@@ -9769,7 +9927,9 @@
|
|
9769
9927
|
<xsl:otherwise>
|
9770
9928
|
|
9771
9929
|
<fo:block role="SKIP">
|
9772
|
-
<xsl:apply-templates select="." mode="list"
|
9930
|
+
<xsl:apply-templates select="." mode="list">
|
9931
|
+
<xsl:with-param name="indent" select="$indent"/>
|
9932
|
+
</xsl:apply-templates>
|
9773
9933
|
</fo:block>
|
9774
9934
|
|
9775
9935
|
</xsl:otherwise>
|
@@ -9858,6 +10018,13 @@
|
|
9858
10018
|
</xsl:template>
|
9859
10019
|
|
9860
10020
|
<xsl:template match="*[local-name()='li']">
|
10021
|
+
<xsl:param name="indent">0</xsl:param>
|
10022
|
+
<!-- <fo:list-item xsl:use-attribute-sets="list-item-style">
|
10023
|
+
<fo:list-item-label end-indent="label-end()"><fo:block>x</fo:block></fo:list-item-label>
|
10024
|
+
<fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
|
10025
|
+
<fo:block>debug li indent=<xsl:value-of select="$indent"/></fo:block>
|
10026
|
+
</fo:list-item-body>
|
10027
|
+
</fo:list-item> -->
|
9861
10028
|
<fo:list-item xsl:use-attribute-sets="list-item-style">
|
9862
10029
|
<xsl:copy-of select="@id"/>
|
9863
10030
|
|
@@ -9882,7 +10049,9 @@
|
|
9882
10049
|
|
9883
10050
|
<xsl:call-template name="refine_list-item-body-style"/>
|
9884
10051
|
|
9885
|
-
<xsl:apply-templates
|
10052
|
+
<xsl:apply-templates>
|
10053
|
+
<xsl:with-param name="indent" select="$indent"/>
|
10054
|
+
</xsl:apply-templates>
|
9886
10055
|
|
9887
10056
|
<!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
|
9888
10057
|
|
@@ -12027,6 +12196,4 @@
|
|
12027
12196
|
</xsl:if>
|
12028
12197
|
</xsl:template>
|
12029
12198
|
|
12030
|
-
<!-- update -->
|
12031
|
-
|
12032
12199
|
</xsl:stylesheet>
|
data/lib/metanorma/un/biblio.rng
CHANGED
@@ -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>
|