metanorma-iso 1.3.27 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/macos.yml +0 -1
- data/.github/workflows/ubuntu.yml +6 -3
- data/.github/workflows/windows.yml +0 -1
- data/Gemfile +1 -0
- data/Rakefile +2 -0
- data/lib/asciidoctor/iso/base.rb +11 -14
- data/lib/isodoc/iso/base_convert.rb +23 -22
- data/lib/isodoc/iso/html/htmlstyle.css +47 -0
- data/lib/isodoc/iso/html/htmlstyle.scss +0 -1
- data/lib/isodoc/iso/html/isodoc.css +862 -0
- data/lib/isodoc/iso/html/isodoc.scss +0 -1
- data/lib/isodoc/iso/html/style-human.css +968 -0
- data/lib/isodoc/iso/html/style-iso.css +996 -0
- data/lib/isodoc/iso/html/wordstyle.css +1515 -0
- data/lib/isodoc/iso/html/wordstyle.scss +0 -1
- data/lib/isodoc/iso/iso.amendment.xsl +778 -261
- data/lib/isodoc/iso/iso.international-standard.xsl +778 -261
- data/lib/isodoc/iso/pdf_convert.rb +1 -14
- data/lib/isodoc/iso/presentation_xml_convert.rb +13 -0
- data/lib/isodoc/iso/sections.rb +2 -2
- data/lib/isodoc/iso/sts_convert.rb +8 -6
- data/lib/isodoc/iso/xref.rb +15 -9
- data/lib/metanorma-iso.rb +1 -0
- data/lib/metanorma/iso/processor.rb +11 -8
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +3 -2
- data/spec/asciidoctor-iso/cleanup_spec.rb +1 -1
- data/spec/asciidoctor-iso/table_spec.rb +1 -1
- data/spec/isodoc/ref_spec.rb +1 -1
- data/spec/metanorma/processor_spec.rb +2 -2
- metadata +32 -13
@@ -24,18 +24,15 @@
|
|
24
24
|
<xsl:variable name="ISOname" select="/iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'iso-reference']"/>
|
25
25
|
|
26
26
|
<!-- Information and documentation — Codes for transcription systems -->
|
27
|
-
<xsl:variable name="title-en" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'main']"/>
|
28
|
-
<xsl:variable name="title-fr" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'fr' and @type = 'main']"/>
|
29
27
|
<xsl:variable name="title-intro" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-intro']"/>
|
30
28
|
<xsl:variable name="title-intro-fr" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'fr' and @type = 'title-intro']"/>
|
31
29
|
<xsl:variable name="title-main" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-main']"/>
|
32
30
|
<xsl:variable name="title-main-fr" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'fr' and @type = 'title-main']"/>
|
33
31
|
<xsl:variable name="part" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@part"/>
|
34
32
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
33
|
+
<xsl:variable name="doctype" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:doctype"/>
|
34
|
+
<xsl:variable name="doctype_uppercased" select="java:toUpperCase(java:java.lang.String.new(translate($doctype,'-',' ')))"/>
|
35
|
+
|
39
36
|
<xsl:variable name="stage" select="number(/iso:iso-standard/iso:bibdata/iso:status/iso:stage)"/>
|
40
37
|
<xsl:variable name="substage" select="number(/iso:iso-standard/iso:bibdata/iso:status/iso:substage)"/>
|
41
38
|
<xsl:variable name="stagename" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:ext/iso:stagename)"/>
|
@@ -62,8 +59,8 @@
|
|
62
59
|
|
63
60
|
<xsl:variable name="stage-fullname-uppercased">
|
64
61
|
<xsl:choose>
|
65
|
-
<xsl:when test="$stagename != ''">
|
66
|
-
<xsl:value-of select="
|
62
|
+
<xsl:when test="$stagename != ''">
|
63
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new($stagename))"/>
|
67
64
|
</xsl:when>
|
68
65
|
<xsl:when test="$stage-abbreviation = 'NWIP' or $stage-abbreviation = 'NP'">NEW WORK ITEM PROPOSAL</xsl:when>
|
69
66
|
<xsl:when test="$stage-abbreviation = 'PWI'">PRELIMINARY WORK ITEM</xsl:when>
|
@@ -311,35 +308,7 @@
|
|
311
308
|
|
312
309
|
</fo:layout-master-set>
|
313
310
|
|
314
|
-
<
|
315
|
-
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
316
|
-
<pdf:dictionary type="normal" key="ViewerPreferences">
|
317
|
-
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
318
|
-
</pdf:dictionary>
|
319
|
-
</pdf:catalog>
|
320
|
-
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
321
|
-
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
322
|
-
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
323
|
-
<!-- Dublin Core properties go here -->
|
324
|
-
<dc:title><xsl:value-of select="$title-en"/></dc:title>
|
325
|
-
<dc:creator><xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:contributor[iso:role/@type='author']/iso:organization/iso:name"/></dc:creator>
|
326
|
-
<dc:description>
|
327
|
-
<xsl:variable name="abstract">
|
328
|
-
<xsl:copy-of select="/iso:iso-standard/iso:bibliography/iso:references/iso:bibitem/iso:abstract//text()"/>
|
329
|
-
</xsl:variable>
|
330
|
-
<xsl:value-of select="normalize-space($abstract)"/>
|
331
|
-
</dc:description>
|
332
|
-
<pdf:Keywords>
|
333
|
-
<xsl:call-template name="insertKeywords"/>
|
334
|
-
</pdf:Keywords>
|
335
|
-
</rdf:Description>
|
336
|
-
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
|
337
|
-
<!-- XMP properties go here -->
|
338
|
-
<xmp:CreatorTool/>
|
339
|
-
</rdf:Description>
|
340
|
-
</rdf:RDF>
|
341
|
-
</x:xmpmeta>
|
342
|
-
</fo:declarations>
|
311
|
+
<xsl:call-template name="addPDFUAmeta"/>
|
343
312
|
|
344
313
|
<!-- cover page -->
|
345
314
|
<xsl:choose>
|
@@ -928,8 +897,9 @@
|
|
928
897
|
<xsl:if test="$part != ''">
|
929
898
|
<xsl:text> — </xsl:text>
|
930
899
|
<fo:block margin-top="6pt" font-weight="normal">
|
931
|
-
<xsl:value-of select="$title-part
|
932
|
-
<xsl:
|
900
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang='fr']),'#',$part)"/>
|
901
|
+
<!-- <xsl:value-of select="$title-part-fr"/><xsl:value-of select="$part"/>
|
902
|
+
<xsl:text>:</xsl:text> -->
|
933
903
|
</fo:block>
|
934
904
|
</xsl:if>
|
935
905
|
<xsl:value-of select="$part-fr"/>
|
@@ -972,81 +942,101 @@
|
|
972
942
|
<xsl:apply-templates select="/iso:iso-standard/iso:boilerplate/iso:copyright-statement"/>
|
973
943
|
</fo:block>
|
974
944
|
</fo:block>
|
975
|
-
</fo:block-container>
|
976
|
-
<fo:block break-after="page"/>
|
945
|
+
</fo:block-container>
|
977
946
|
</xsl:if>
|
978
947
|
|
979
|
-
|
980
|
-
|
981
|
-
<
|
982
|
-
<fo:inline font-size="16pt" font-weight="bold">Contents</fo:inline>
|
983
|
-
<fo:inline keep-together.within-line="always">
|
984
|
-
<fo:leader leader-pattern="space"/>
|
985
|
-
<fo:inline font-weight="normal" font-size="10pt">Page</fo:inline>
|
986
|
-
</fo:inline>
|
987
|
-
</fo:block>
|
988
|
-
|
989
|
-
<xsl:if test="$debug = 'true'">
|
990
|
-
<xsl:text disable-output-escaping="yes"><!--</xsl:text>
|
991
|
-
DEBUG
|
992
|
-
contents=<xsl:copy-of select="xalan:nodeset($contents)"/>
|
993
|
-
<xsl:text disable-output-escaping="yes">--></xsl:text>
|
994
|
-
</xsl:if>
|
948
|
+
|
949
|
+
<xsl:choose>
|
950
|
+
<xsl:when test="$doctype = 'amendment'"/><!-- ToC shouldn't be generated in amendments. -->
|
995
951
|
|
996
|
-
<xsl:
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
952
|
+
<xsl:otherwise>
|
953
|
+
<xsl:if test="/iso:iso-standard/iso:boilerplate/iso:copyright-statement">
|
954
|
+
<fo:block break-after="page"/>
|
955
|
+
</xsl:if>
|
956
|
+
<fo:block-container font-weight="bold">
|
957
|
+
|
958
|
+
<fo:block text-align-last="justify" font-size="16pt" margin-top="10pt" margin-bottom="18pt">
|
959
|
+
<xsl:variable name="title-toc">
|
960
|
+
<xsl:call-template name="getTitle">
|
961
|
+
<xsl:with-param name="name" select="'title-toc'"/>
|
962
|
+
</xsl:call-template>
|
963
|
+
</xsl:variable>
|
964
|
+
<fo:inline font-size="16pt" font-weight="bold"><xsl:value-of select="$title-toc"/></fo:inline>
|
965
|
+
<fo:inline keep-together.within-line="always">
|
966
|
+
<fo:leader leader-pattern="space"/>
|
967
|
+
<xsl:variable name="title-page">
|
968
|
+
<xsl:call-template name="getTitle">
|
969
|
+
<xsl:with-param name="name" select="'title-page'"/>
|
970
|
+
</xsl:call-template>
|
971
|
+
</xsl:variable>
|
972
|
+
<fo:inline font-weight="normal" font-size="10pt"><xsl:value-of select="$title-page"/></fo:inline>
|
973
|
+
</fo:inline>
|
974
|
+
</fo:block>
|
975
|
+
|
976
|
+
<xsl:if test="$debug = 'true'">
|
977
|
+
<xsl:text disable-output-escaping="yes"><!--</xsl:text>
|
978
|
+
DEBUG
|
979
|
+
contents=<xsl:copy-of select="xalan:nodeset($contents)"/>
|
980
|
+
<xsl:text disable-output-escaping="yes">--></xsl:text>
|
1005
981
|
</xsl:if>
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
<xsl:
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
<xsl:if test="@
|
1034
|
-
<
|
982
|
+
|
983
|
+
<xsl:variable name="margin-left">12</xsl:variable>
|
984
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true'][not(@level = 2 and starts-with(@section, '0'))]"><!-- skip clause from preface -->
|
985
|
+
|
986
|
+
<fo:block>
|
987
|
+
<xsl:if test="@level = 1">
|
988
|
+
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
989
|
+
</xsl:if>
|
990
|
+
<xsl:if test="@level = 3">
|
991
|
+
<xsl:attribute name="margin-top">-0.7pt</xsl:attribute>
|
992
|
+
</xsl:if>
|
993
|
+
<fo:list-block>
|
994
|
+
<xsl:attribute name="margin-left"><xsl:value-of select="$margin-left * (@level - 1)"/>mm</xsl:attribute>
|
995
|
+
<xsl:if test="@level >= 2">
|
996
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
997
|
+
</xsl:if>
|
998
|
+
<xsl:attribute name="provisional-distance-between-starts">
|
999
|
+
<xsl:choose>
|
1000
|
+
<!-- skip 0 section without subsections -->
|
1001
|
+
<xsl:when test="@level >= 3"><xsl:value-of select="$margin-left * 1.2"/>mm</xsl:when>
|
1002
|
+
<xsl:when test="@section != '' and not(@display-section = 'false')"><xsl:value-of select="$margin-left"/>mm</xsl:when>
|
1003
|
+
<xsl:otherwise>0mm</xsl:otherwise>
|
1004
|
+
</xsl:choose>
|
1005
|
+
</xsl:attribute>
|
1006
|
+
<fo:list-item>
|
1007
|
+
<fo:list-item-label end-indent="label-end()">
|
1008
|
+
<fo:block>
|
1009
|
+
<xsl:if test="@section and not(@display-section = 'false')"> <!-- output below -->
|
1010
|
+
<xsl:value-of select="@section"/>
|
1035
1011
|
</xsl:if>
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1012
|
+
</fo:block>
|
1013
|
+
</fo:list-item-label>
|
1014
|
+
<fo:list-item-body start-indent="body-start()">
|
1015
|
+
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
1016
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
|
1017
|
+
<xsl:if test="@section and @display-section = 'false'">
|
1018
|
+
<xsl:value-of select="@section"/><xsl:text> </xsl:text>
|
1019
|
+
</xsl:if>
|
1020
|
+
<xsl:if test="@addon != ''">
|
1021
|
+
<fo:inline font-weight="normal">(<xsl:value-of select="@addon"/>)</fo:inline>
|
1022
|
+
</xsl:if>
|
1023
|
+
<xsl:text> </xsl:text><xsl:value-of select="text()"/>
|
1024
|
+
<fo:inline keep-together.within-line="always">
|
1025
|
+
<fo:leader font-size="9pt" font-weight="normal" leader-pattern="dots"/>
|
1026
|
+
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
1027
|
+
</fo:inline>
|
1028
|
+
</fo:basic-link>
|
1029
|
+
</fo:block>
|
1030
|
+
</fo:list-item-body>
|
1031
|
+
</fo:list-item>
|
1032
|
+
</fo:list-block>
|
1033
|
+
</fo:block>
|
1034
|
+
|
1035
|
+
</xsl:for-each>
|
1036
|
+
</fo:block-container>
|
1037
|
+
</xsl:otherwise>
|
1038
|
+
</xsl:choose>
|
1039
|
+
|
1050
1040
|
<!-- Foreword, Introduction -->
|
1051
1041
|
<xsl:apply-templates select="/iso:iso-standard/iso:preface/node()"/>
|
1052
1042
|
|
@@ -1084,9 +1074,10 @@
|
|
1084
1074
|
<xsl:if test="$part != ''">
|
1085
1075
|
<xsl:text> — </xsl:text>
|
1086
1076
|
<fo:block font-weight="normal" margin-top="12pt" line-height="1.1">
|
1087
|
-
<xsl:value-of select="$title-part
|
1077
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang='en']),'#',$part)"/>
|
1078
|
+
<!-- <xsl:value-of select="$title-part-en"/>
|
1088
1079
|
<xsl:value-of select="$part"/>
|
1089
|
-
<xsl:text>:</xsl:text>
|
1080
|
+
<xsl:text>:</xsl:text> -->
|
1090
1081
|
</fo:block>
|
1091
1082
|
</xsl:if>
|
1092
1083
|
</xsl:if>
|
@@ -1094,9 +1085,27 @@
|
|
1094
1085
|
<fo:block>
|
1095
1086
|
<xsl:value-of select="$part-en"/>
|
1096
1087
|
</fo:block>
|
1088
|
+
|
1089
|
+
<xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-amd']"/>
|
1090
|
+
<xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
|
1091
|
+
<fo:block font-weight="normal" margin-top="12pt" line-height="1.1">
|
1092
|
+
<xsl:variable name="title-amendment">
|
1093
|
+
<xsl:call-template name="getTitle">
|
1094
|
+
<xsl:with-param name="name" select="'title-amendment'"/>
|
1095
|
+
</xsl:call-template>
|
1096
|
+
</xsl:variable>
|
1097
|
+
<xsl:value-of select="$title-amendment"/>
|
1098
|
+
<xsl:variable name="amendment-number" select="/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:project-number/@amendment"/>
|
1099
|
+
<xsl:if test="normalize-space($amendment-number) != ''">
|
1100
|
+
<xsl:text> </xsl:text><xsl:value-of select="$amendment-number"/>
|
1101
|
+
</xsl:if>
|
1102
|
+
<xsl:text>: </xsl:text>
|
1103
|
+
<xsl:value-of select="$title-amd"/>
|
1104
|
+
</fo:block>
|
1105
|
+
</xsl:if>
|
1106
|
+
|
1097
1107
|
</fo:block>
|
1098
1108
|
|
1099
|
-
|
1100
1109
|
</fo:block-container>
|
1101
1110
|
<!-- Clause(s) -->
|
1102
1111
|
<fo:block>
|
@@ -1174,6 +1183,11 @@
|
|
1174
1183
|
</fo:block>
|
1175
1184
|
<xsl:if test="/iso:iso-standard/iso:bibdata/iso:keyword">
|
1176
1185
|
<fo:block font-size="9pt" margin-bottom="6pt">
|
1186
|
+
<xsl:variable name="title-descriptors">
|
1187
|
+
<xsl:call-template name="getTitle">
|
1188
|
+
<xsl:with-param name="name" select="'title-descriptors'"/>
|
1189
|
+
</xsl:call-template>
|
1190
|
+
</xsl:variable>
|
1177
1191
|
<fo:inline font-weight="bold"><xsl:value-of select="$title-descriptors"/>: </fo:inline>
|
1178
1192
|
<xsl:call-template name="insertKeywords">
|
1179
1193
|
<xsl:with-param name="sorting">no</xsl:with-param>
|
@@ -1296,8 +1310,7 @@
|
|
1296
1310
|
<xsl:template match="iso:figure" mode="contents">
|
1297
1311
|
<item level="" id="{@id}" display="false">
|
1298
1312
|
<xsl:attribute name="section">
|
1299
|
-
<xsl:call-template name="getFigureNumber"/>
|
1300
|
-
<!-- <xsl:text>Figure </xsl:text><xsl:number format="A.1-1" level="multiple" count="iso:annex | iso:figure"/> -->
|
1313
|
+
<xsl:call-template name="getFigureNumber"/>
|
1301
1314
|
</xsl:attribute>
|
1302
1315
|
</item>
|
1303
1316
|
</xsl:template>
|
@@ -1308,6 +1321,11 @@
|
|
1308
1321
|
<xsl:variable name="annex-id" select="ancestor::iso:annex/@id"/>
|
1309
1322
|
<item level="" id="{@id}" display="false" type="table">
|
1310
1323
|
<xsl:attribute name="section">
|
1324
|
+
<xsl:variable name="title-table">
|
1325
|
+
<xsl:call-template name="getTitle">
|
1326
|
+
<xsl:with-param name="name" select="'title-table'"/>
|
1327
|
+
</xsl:call-template>
|
1328
|
+
</xsl:variable>
|
1311
1329
|
<xsl:value-of select="$title-table"/>
|
1312
1330
|
<xsl:call-template name="getTableNumber"/>
|
1313
1331
|
</xsl:attribute>
|
@@ -1318,7 +1336,15 @@
|
|
1318
1336
|
<xsl:template match="iso:formula" mode="contents">
|
1319
1337
|
<item level="" id="{@id}" display="false">
|
1320
1338
|
<xsl:attribute name="section">
|
1321
|
-
<xsl:
|
1339
|
+
<xsl:variable name="title-formula">
|
1340
|
+
<xsl:call-template name="getTitle">
|
1341
|
+
<xsl:with-param name="name" select="'title-formula'"/>
|
1342
|
+
</xsl:call-template>
|
1343
|
+
</xsl:variable>
|
1344
|
+
<xsl:value-of select="$title-formula"/>
|
1345
|
+
<xsl:call-template name="getFormulaNumber">
|
1346
|
+
<xsl:with-param name="display" select="not(@unnumbered = 'true')"/>
|
1347
|
+
</xsl:call-template>
|
1322
1348
|
</xsl:attribute>
|
1323
1349
|
</item>
|
1324
1350
|
</xsl:template>
|
@@ -1512,6 +1538,11 @@
|
|
1512
1538
|
</xsl:variable>
|
1513
1539
|
|
1514
1540
|
<xsl:choose>
|
1541
|
+
<xsl:when test="$doctype = 'amendment'">
|
1542
|
+
<fo:block id="{$id}" font-size="11pt" font-style="italic" margin-bottom="12pt" keep-with-next="always">
|
1543
|
+
<xsl:apply-templates/>
|
1544
|
+
</fo:block>
|
1545
|
+
</xsl:when>
|
1515
1546
|
<xsl:when test="$parent-name = 'annex'">
|
1516
1547
|
<fo:block id="{$id}" font-size="16pt" font-weight="bold" text-align="center" margin-bottom="12pt" keep-with-next="always">
|
1517
1548
|
<xsl:value-of select="$section"/>
|
@@ -1705,7 +1736,7 @@
|
|
1705
1736
|
<fo:external-graphic src="{@src}" fox:alt-text="Image {@alt}"/>
|
1706
1737
|
</fo:block>
|
1707
1738
|
<fo:block font-weight="bold" margin-top="12pt" margin-bottom="12pt">
|
1708
|
-
<xsl:value-of select="$title-figure"/>
|
1739
|
+
<!-- <xsl:value-of select="$title-figure"/> -->
|
1709
1740
|
<xsl:call-template name="getFigureNumber"/>
|
1710
1741
|
</fo:block>
|
1711
1742
|
</fo:block-container>
|
@@ -1721,9 +1752,12 @@
|
|
1721
1752
|
<xsl:call-template name="note"/>
|
1722
1753
|
</xsl:for-each>
|
1723
1754
|
<fo:block font-weight="bold" text-align="center" margin-top="12pt" margin-bottom="12pt" keep-with-previous="always">
|
1724
|
-
<xsl:
|
1755
|
+
<xsl:variable name="figureNumber">
|
1756
|
+
<xsl:call-template name="getFigureNumber"/>
|
1757
|
+
</xsl:variable>
|
1758
|
+
<xsl:value-of select="$figureNumber"/>
|
1725
1759
|
<xsl:if test="iso:name">
|
1726
|
-
<xsl:if test="not(local-name(..) = 'figure')">
|
1760
|
+
<xsl:if test="not(local-name(..) = 'figure') and normalize-space($figureNumber) != ''">
|
1727
1761
|
<xsl:text> — </xsl:text>
|
1728
1762
|
</xsl:if>
|
1729
1763
|
<xsl:value-of select="iso:name"/>
|
@@ -1733,7 +1767,13 @@
|
|
1733
1767
|
</xsl:template>
|
1734
1768
|
|
1735
1769
|
<xsl:template name="getFigureNumber">
|
1770
|
+
<xsl:variable name="title-figure">
|
1771
|
+
<xsl:call-template name="getTitle">
|
1772
|
+
<xsl:with-param name="name" select="'title-figure'"/>
|
1773
|
+
</xsl:call-template>
|
1774
|
+
</xsl:variable>
|
1736
1775
|
<xsl:choose>
|
1776
|
+
<xsl:when test="$doctype = 'amendment'"/>
|
1737
1777
|
<xsl:when test="ancestor::iso:annex">
|
1738
1778
|
<xsl:choose>
|
1739
1779
|
<xsl:when test="local-name(..) = 'figure'">
|
@@ -1805,13 +1845,13 @@
|
|
1805
1845
|
<xsl:number level="any" count="iso:bibitem/iso:note"/>
|
1806
1846
|
</xsl:variable>
|
1807
1847
|
<fo:inline font-size="8pt" keep-with-previous.within-line="always" baseline-shift="30%"> <!--85% vertical-align="super"-->
|
1808
|
-
<fo:basic-link internal-destination="
|
1848
|
+
<fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
|
1809
1849
|
<xsl:value-of select="$number"/><xsl:text>)</xsl:text>
|
1810
1850
|
</fo:basic-link>
|
1811
1851
|
</fo:inline>
|
1812
1852
|
<fo:footnote-body>
|
1813
1853
|
<fo:block font-size="10pt" margin-bottom="4pt" start-indent="0pt">
|
1814
|
-
<fo:inline id="
|
1854
|
+
<fo:inline id="{generate-id()}" keep-with-next.within-line="always" alignment-baseline="hanging" padding-right="3mm"><!-- font-size="60%" -->
|
1815
1855
|
<xsl:value-of select="$number"/><xsl:text>)</xsl:text>
|
1816
1856
|
</fo:inline>
|
1817
1857
|
<xsl:apply-templates/>
|
@@ -1849,7 +1889,7 @@
|
|
1849
1889
|
|
1850
1890
|
<xsl:template match="iso:term">
|
1851
1891
|
<xsl:param name="sectionNum"/>
|
1852
|
-
<fo:block margin-bottom="10pt">
|
1892
|
+
<fo:block id="{@id}" margin-bottom="10pt">
|
1853
1893
|
<xsl:apply-templates>
|
1854
1894
|
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
1855
1895
|
</xsl:apply-templates>
|
@@ -1860,7 +1900,7 @@
|
|
1860
1900
|
<xsl:param name="sectionNum"/>
|
1861
1901
|
<fo:block line-height="1.1">
|
1862
1902
|
<fo:block font-weight="bold" keep-with-next="always">
|
1863
|
-
<fo:inline
|
1903
|
+
<fo:inline>
|
1864
1904
|
<xsl:variable name="section">
|
1865
1905
|
<xsl:call-template name="getSection">
|
1866
1906
|
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
@@ -1883,7 +1923,12 @@
|
|
1883
1923
|
</xsl:template>
|
1884
1924
|
|
1885
1925
|
<xsl:template match="iso:deprecates">
|
1886
|
-
<
|
1926
|
+
<xsl:variable name="title-deprecated">
|
1927
|
+
<xsl:call-template name="getTitle">
|
1928
|
+
<xsl:with-param name="name" select="'title-deprecated'"/>
|
1929
|
+
</xsl:call-template>
|
1930
|
+
</xsl:variable>
|
1931
|
+
<fo:block><xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/></fo:block>
|
1887
1932
|
</xsl:template>
|
1888
1933
|
|
1889
1934
|
<xsl:template match="iso:definition[preceding-sibling::iso:domain]">
|
@@ -1905,6 +1950,11 @@
|
|
1905
1950
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
1906
1951
|
<fo:basic-link internal-destination="{iso:origin/@bibitemid}" fox:alt-text="{iso:origin/@citeas}">
|
1907
1952
|
<xsl:text>[</xsl:text>
|
1953
|
+
<xsl:variable name="title-source">
|
1954
|
+
<xsl:call-template name="getTitle">
|
1955
|
+
<xsl:with-param name="name" select="'title-source'"/>
|
1956
|
+
</xsl:call-template>
|
1957
|
+
</xsl:variable>
|
1908
1958
|
<xsl:value-of select="$title-source"/>
|
1909
1959
|
<xsl:text>: </xsl:text>
|
1910
1960
|
<xsl:value-of select="iso:origin/@citeas"/>
|
@@ -1920,10 +1970,7 @@
|
|
1920
1970
|
</fo:block>
|
1921
1971
|
</xsl:template>
|
1922
1972
|
|
1923
|
-
|
1924
|
-
<xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text>
|
1925
|
-
<xsl:apply-templates/>
|
1926
|
-
</xsl:template>
|
1973
|
+
|
1927
1974
|
<xsl:template match="iso:modification/iso:p">
|
1928
1975
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
1929
1976
|
</xsl:template>
|
@@ -1934,6 +1981,11 @@
|
|
1934
1981
|
<xsl:number />
|
1935
1982
|
<xsl:text> to entry: </xsl:text> -->
|
1936
1983
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
1984
|
+
<xsl:variable name="title-note-to-entry">
|
1985
|
+
<xsl:call-template name="getTitle">
|
1986
|
+
<xsl:with-param name="name" select="'title-note-to-entry'"/>
|
1987
|
+
</xsl:call-template>
|
1988
|
+
</xsl:variable>
|
1937
1989
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($title-note-to-entry),'#',$num)"/>
|
1938
1990
|
<xsl:apply-templates/>
|
1939
1991
|
</fo:block>
|
@@ -1955,6 +2007,11 @@
|
|
1955
2007
|
<xsl:template match="iso:termexample">
|
1956
2008
|
<fo:block font-size="10pt" margin-top="8pt" margin-bottom="8pt" text-align="justify">
|
1957
2009
|
<fo:inline padding-right="5mm">
|
2010
|
+
<xsl:variable name="title-example">
|
2011
|
+
<xsl:call-template name="getTitle">
|
2012
|
+
<xsl:with-param name="name" select="'title-example'"/>
|
2013
|
+
</xsl:call-template>
|
2014
|
+
</xsl:variable>
|
1958
2015
|
<xsl:value-of select="$title-example"/>
|
1959
2016
|
<xsl:if test="count(ancestor::iso:term[1]//iso:termexample) > 1">
|
1960
2017
|
<xsl:number/>
|
@@ -2038,7 +2095,8 @@
|
|
2038
2095
|
</fo:block>
|
2039
2096
|
<fo:block text-align="right">
|
2040
2097
|
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
2041
|
-
<xsl:
|
2098
|
+
<xsl:apply-templates select="iso:author"/>
|
2099
|
+
<!-- <xsl:text>— </xsl:text><xsl:value-of select="iso:author"/> -->
|
2042
2100
|
<xsl:if test="iso:source">
|
2043
2101
|
<xsl:text>, </xsl:text>
|
2044
2102
|
<xsl:apply-templates select="iso:source"/>
|
@@ -2046,9 +2104,13 @@
|
|
2046
2104
|
</fo:block>
|
2047
2105
|
</xsl:template>
|
2048
2106
|
|
2107
|
+
<xsl:template match="iso:quote/iso:author">
|
2108
|
+
<xsl:text>— </xsl:text><xsl:apply-templates/>
|
2109
|
+
</xsl:template>
|
2110
|
+
|
2049
2111
|
<xsl:template match="iso:source">
|
2050
2112
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
2051
|
-
<xsl:value-of select="@citeas" disable-output-escaping="yes"
|
2113
|
+
<xsl:value-of select="@citeas"/> <!-- disable-output-escaping="yes" -->
|
2052
2114
|
<xsl:apply-templates select="iso:localityStack"/>
|
2053
2115
|
</fo:basic-link>
|
2054
2116
|
</xsl:template>
|
@@ -2075,6 +2137,13 @@
|
|
2075
2137
|
<xsl:variable name="type" select="xalan:nodeset($contents)//item[@id = $target]/@type"/>
|
2076
2138
|
<xsl:variable name="root" select="xalan:nodeset($contents)//item[@id =$target]/@root"/>
|
2077
2139
|
<xsl:variable name="level" select="xalan:nodeset($contents)//item[@id =$target]/@level"/>
|
2140
|
+
|
2141
|
+
<xsl:variable name="title-clause">
|
2142
|
+
<xsl:call-template name="getTitle">
|
2143
|
+
<xsl:with-param name="name" select="'title-clause'"/>
|
2144
|
+
</xsl:call-template>
|
2145
|
+
</xsl:variable>
|
2146
|
+
|
2078
2147
|
<xsl:choose>
|
2079
2148
|
<xsl:when test="$type = 'clause' and $root != 'annex' and $level = 1"><xsl:value-of select="$title-clause"/></xsl:when><!-- and not (ancestor::annex) -->
|
2080
2149
|
<xsl:when test="$type = 'li'">
|
@@ -2105,6 +2174,11 @@
|
|
2105
2174
|
</xsl:if> -->
|
2106
2175
|
<xsl:variable name="claims_id" select="ancestor::iso:clause[1]/@id"/>
|
2107
2176
|
<fo:inline padding-right="5mm">
|
2177
|
+
<xsl:variable name="title-example">
|
2178
|
+
<xsl:call-template name="getTitle">
|
2179
|
+
<xsl:with-param name="name" select="'title-example'"/>
|
2180
|
+
</xsl:call-template>
|
2181
|
+
</xsl:variable>
|
2108
2182
|
<xsl:value-of select="$title-example"/>
|
2109
2183
|
<xsl:if test="count(ancestor::iso:clause[1]//iso:example) > 1">
|
2110
2184
|
<xsl:number count="iso:example[ancestor::iso:clause[@id = $claims_id]]" level="any"/>
|
@@ -2118,6 +2192,11 @@
|
|
2118
2192
|
<fo:block font-size="10pt" margin-top="8pt" margin-bottom="12pt" text-align="justify">
|
2119
2193
|
<xsl:variable name="claims_id" select="ancestor::iso:clause[1]/@id"/>
|
2120
2194
|
<fo:inline padding-right="6mm">
|
2195
|
+
<xsl:variable name="title-note">
|
2196
|
+
<xsl:call-template name="getTitle">
|
2197
|
+
<xsl:with-param name="name" select="'title-note'"/>
|
2198
|
+
</xsl:call-template>
|
2199
|
+
</xsl:variable>
|
2121
2200
|
<xsl:value-of select="$title-note"/>
|
2122
2201
|
<xsl:if test="count(ancestor::iso:clause[1]//iso:note) > 1">
|
2123
2202
|
<xsl:number count="iso:note[ancestor::iso:clause[@id = $claims_id]]" level="any"/>
|
@@ -2143,7 +2222,7 @@
|
|
2143
2222
|
|
2144
2223
|
<xsl:choose>
|
2145
2224
|
<xsl:when test="@citeas and normalize-space(text()) = ''">
|
2146
|
-
<xsl:value-of select="@citeas" disable-output-escaping="yes"
|
2225
|
+
<xsl:value-of select="@citeas"/> <!-- disable-output-escaping="yes" -->
|
2147
2226
|
</xsl:when>
|
2148
2227
|
<xsl:when test="@bibitemid and normalize-space(text()) = ''">
|
2149
2228
|
<xsl:value-of select="//iso:bibitem[@id = current()/@bibitemid]/iso:docidentifier"/>
|
@@ -2156,6 +2235,21 @@
|
|
2156
2235
|
</xsl:template>
|
2157
2236
|
|
2158
2237
|
<xsl:template match="iso:locality">
|
2238
|
+
<xsl:variable name="title-clause">
|
2239
|
+
<xsl:call-template name="getTitle">
|
2240
|
+
<xsl:with-param name="name" select="'title-clause'"/>
|
2241
|
+
</xsl:call-template>
|
2242
|
+
</xsl:variable>
|
2243
|
+
<xsl:variable name="title-annex">
|
2244
|
+
<xsl:call-template name="getTitle">
|
2245
|
+
<xsl:with-param name="name" select="'title-annex'"/>
|
2246
|
+
</xsl:call-template>
|
2247
|
+
</xsl:variable>
|
2248
|
+
<xsl:variable name="title-table">
|
2249
|
+
<xsl:call-template name="getTitle">
|
2250
|
+
<xsl:with-param name="name" select="'title-table'"/>
|
2251
|
+
</xsl:call-template>
|
2252
|
+
</xsl:variable>
|
2159
2253
|
<xsl:choose>
|
2160
2254
|
<xsl:when test="ancestor::iso:termsource"/>
|
2161
2255
|
<xsl:when test="@type ='clause' and ancestor::iso:eref"/>
|
@@ -2168,13 +2262,19 @@
|
|
2168
2262
|
</xsl:template>
|
2169
2263
|
|
2170
2264
|
<xsl:template match="iso:admonition">
|
2171
|
-
<fo:block margin-bottom="12pt" font-weight="bold"> <!-- text-align="center" -->
|
2172
|
-
<xsl:value-of select="
|
2265
|
+
<fo:block margin-bottom="12pt" font-weight="bold"> <!-- text-align="center" -->
|
2266
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@type))"/>
|
2173
2267
|
<xsl:text> — </xsl:text>
|
2174
2268
|
<xsl:apply-templates/>
|
2175
2269
|
</fo:block>
|
2176
2270
|
</xsl:template>
|
2177
2271
|
|
2272
|
+
<xsl:template match="iso:formula">
|
2273
|
+
<fo:block id="{@id}">
|
2274
|
+
<xsl:apply-templates/>
|
2275
|
+
</fo:block>
|
2276
|
+
</xsl:template>
|
2277
|
+
|
2178
2278
|
<xsl:template match="iso:formula/iso:dt/iso:stem">
|
2179
2279
|
<fo:inline>
|
2180
2280
|
<xsl:apply-templates/>
|
@@ -2182,7 +2282,7 @@
|
|
2182
2282
|
</xsl:template>
|
2183
2283
|
|
2184
2284
|
<xsl:template match="iso:formula/iso:stem">
|
2185
|
-
<fo:block
|
2285
|
+
<fo:block margin-top="6pt" margin-bottom="12pt">
|
2186
2286
|
<fo:table table-layout="fixed" width="100%">
|
2187
2287
|
<fo:table-column column-width="95%"/>
|
2188
2288
|
<fo:table-column column-width="5%"/>
|
@@ -2195,14 +2295,9 @@
|
|
2195
2295
|
</fo:table-cell>
|
2196
2296
|
<fo:table-cell display-align="center">
|
2197
2297
|
<fo:block text-align="right">
|
2198
|
-
<xsl:
|
2199
|
-
<xsl:
|
2200
|
-
|
2201
|
-
</xsl:when>
|
2202
|
-
<xsl:otherwise> <!-- not(ancestor::iso:annex) -->
|
2203
|
-
<!-- <xsl:text>(</xsl:text><xsl:number level="any" count="iso:formula"/><xsl:text>)</xsl:text> -->
|
2204
|
-
</xsl:otherwise>
|
2205
|
-
</xsl:choose>
|
2298
|
+
<xsl:call-template name="getFormulaNumber">
|
2299
|
+
<xsl:with-param name="display" select="not(../@unnumbered = 'true')"/>
|
2300
|
+
</xsl:call-template>
|
2206
2301
|
</fo:block>
|
2207
2302
|
</fo:table-cell>
|
2208
2303
|
</fo:table-row>
|
@@ -2301,38 +2396,6 @@
|
|
2301
2396
|
</fo:static-content>
|
2302
2397
|
</xsl:template>
|
2303
2398
|
|
2304
|
-
<xsl:template name="getId">
|
2305
|
-
<xsl:choose>
|
2306
|
-
<xsl:when test="../@id">
|
2307
|
-
<xsl:value-of select="../@id"/>
|
2308
|
-
</xsl:when>
|
2309
|
-
<xsl:otherwise>
|
2310
|
-
<xsl:value-of select="text()"/>
|
2311
|
-
</xsl:otherwise>
|
2312
|
-
</xsl:choose>
|
2313
|
-
</xsl:template>
|
2314
|
-
|
2315
|
-
<xsl:template name="getLevel">
|
2316
|
-
<xsl:variable name="level_total" select="count(ancestor::*)"/>
|
2317
|
-
<xsl:variable name="level">
|
2318
|
-
<xsl:choose>
|
2319
|
-
<xsl:when test="ancestor::iso:preface">
|
2320
|
-
<xsl:value-of select="$level_total - 2"/>
|
2321
|
-
</xsl:when>
|
2322
|
-
<xsl:when test="ancestor::iso:sections">
|
2323
|
-
<xsl:value-of select="$level_total - 2"/>
|
2324
|
-
</xsl:when>
|
2325
|
-
<xsl:when test="ancestor::iso:bibliography">
|
2326
|
-
<xsl:value-of select="$level_total - 2"/>
|
2327
|
-
</xsl:when>
|
2328
|
-
<xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
|
2329
|
-
<xsl:otherwise>
|
2330
|
-
<xsl:value-of select="$level_total - 1"/>
|
2331
|
-
</xsl:otherwise>
|
2332
|
-
</xsl:choose>
|
2333
|
-
</xsl:variable>
|
2334
|
-
<xsl:value-of select="$level"/>
|
2335
|
-
</xsl:template>
|
2336
2399
|
|
2337
2400
|
<xsl:template name="getSection">
|
2338
2401
|
<xsl:param name="sectionNum"/>
|
@@ -2352,7 +2415,7 @@
|
|
2352
2415
|
</xsl:when>
|
2353
2416
|
<xsl:when test="$level >= 2">
|
2354
2417
|
<xsl:variable name="num">
|
2355
|
-
<xsl:
|
2418
|
+
<xsl:call-template name="getSubSection"/>
|
2356
2419
|
</xsl:variable>
|
2357
2420
|
<xsl:value-of select="concat($sectionNum, $num)"/>
|
2358
2421
|
</xsl:when>
|
@@ -2376,6 +2439,11 @@
|
|
2376
2439
|
<xsl:variable name="annexid" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:ext/iso:structuredidentifier/iso:annexid)"/>
|
2377
2440
|
<xsl:choose>
|
2378
2441
|
<xsl:when test="$level = 1">
|
2442
|
+
<xsl:variable name="title-annex">
|
2443
|
+
<xsl:call-template name="getTitle">
|
2444
|
+
<xsl:with-param name="name" select="'title-annex'"/>
|
2445
|
+
</xsl:call-template>
|
2446
|
+
</xsl:variable>
|
2379
2447
|
<xsl:value-of select="$title-annex"/>
|
2380
2448
|
<xsl:choose>
|
2381
2449
|
<xsl:when test="count(//iso:annex) = 1 and $annexid != ''">
|
@@ -3101,7 +3169,12 @@
|
|
3101
3169
|
<xsl:value-of select="$edition"/>
|
3102
3170
|
</xsl:when>
|
3103
3171
|
</xsl:choose>
|
3104
|
-
<xsl:
|
3172
|
+
<xsl:variable name="title-edition">
|
3173
|
+
<xsl:call-template name="getTitle">
|
3174
|
+
<xsl:with-param name="name" select="'title-edition'"/>
|
3175
|
+
</xsl:call-template>
|
3176
|
+
</xsl:variable>
|
3177
|
+
<xsl:if test="$edition != ''"><xsl:text> </xsl:text><xsl:value-of select="java:toLowerCase(java:java.lang.String.new($title-edition))"/></xsl:if>
|
3105
3178
|
</xsl:template>
|
3106
3179
|
|
3107
3180
|
<xsl:template name="printTitlePartFr">
|
@@ -3109,9 +3182,10 @@
|
|
3109
3182
|
<xsl:if test="normalize-space($part-fr) != ''">
|
3110
3183
|
<xsl:if test="$part != ''">
|
3111
3184
|
<xsl:text> — </xsl:text>
|
3112
|
-
<xsl:value-of select="$title-part
|
3185
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang='fr']),'#',$part)"/>
|
3186
|
+
<!-- <xsl:value-of select="$title-part-fr"/>
|
3113
3187
|
<xsl:value-of select="$part"/>
|
3114
|
-
<xsl:text>:</xsl:text>
|
3188
|
+
<xsl:text>:</xsl:text> -->
|
3115
3189
|
</xsl:if>
|
3116
3190
|
<xsl:value-of select="$part-fr"/>
|
3117
3191
|
</xsl:if>
|
@@ -3123,54 +3197,213 @@
|
|
3123
3197
|
<xsl:if test="$part != ''">
|
3124
3198
|
<xsl:text> — </xsl:text>
|
3125
3199
|
<fo:block font-weight="normal" margin-top="6pt">
|
3126
|
-
<xsl:value-of select="$title-part
|
3200
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang='en']),'#',$part)"/>
|
3201
|
+
<!-- <xsl:value-of select="$title-part-en"/>
|
3127
3202
|
<xsl:value-of select="$part"/>
|
3128
|
-
<xsl:text>:</xsl:text>
|
3203
|
+
<xsl:text>:</xsl:text> -->
|
3129
3204
|
</fo:block>
|
3130
3205
|
</xsl:if>
|
3131
3206
|
<xsl:value-of select="$part-en"/>
|
3132
3207
|
</xsl:if>
|
3133
3208
|
</xsl:template>
|
3209
|
+
|
3210
|
+
<xsl:template name="getFormulaNumber">
|
3211
|
+
<xsl:param name="display" select="'true'"/>
|
3212
|
+
<xsl:if test="$display = 'true'">
|
3213
|
+
<xsl:choose>
|
3214
|
+
<xsl:when test="ancestor::iso:annex">
|
3215
|
+
<xsl:number format="(A.1)" level="multiple" count="iso:annex | iso:formula[not(@unnumbered='true')]"/>
|
3216
|
+
</xsl:when>
|
3217
|
+
<xsl:otherwise> <!-- not(ancestor::iso:annex) -->
|
3218
|
+
<xsl:text>(</xsl:text><xsl:number level="any" count="iso:formula[not(@unnumbered='true')]"/><xsl:text>)</xsl:text>
|
3219
|
+
</xsl:otherwise>
|
3220
|
+
</xsl:choose>
|
3221
|
+
</xsl:if>
|
3222
|
+
</xsl:template>
|
3134
3223
|
|
3224
|
+
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
|
3225
|
+
|
3226
|
+
<title-table lang="en">Table </title-table>
|
3227
|
+
<title-table lang="fr">Tableau </title-table>
|
3228
|
+
|
3229
|
+
<title-table lang="zh">Table </title-table>
|
3230
|
+
|
3231
|
+
|
3135
3232
|
|
3136
|
-
<
|
3233
|
+
<title-note lang="en">NOTE </title-note>
|
3234
|
+
<title-note lang="fr">NOTE </title-note>
|
3235
|
+
|
3236
|
+
<title-note lang="zh">NOTE </title-note>
|
3237
|
+
|
3238
|
+
|
3239
|
+
|
3240
|
+
<title-figure lang="en">Figure </title-figure>
|
3241
|
+
<title-figure lang="fr">Figure </title-figure>
|
3242
|
+
|
3243
|
+
<title-figure lang="zh">Figure </title-figure>
|
3244
|
+
|
3245
|
+
|
3246
|
+
|
3247
|
+
<title-example lang="en">EXAMPLE </title-example>
|
3248
|
+
<title-example lang="fr">EXEMPLE </title-example>
|
3249
|
+
|
3250
|
+
<title-example lang="zh">EXAMPLE </title-example>
|
3251
|
+
|
3252
|
+
|
3253
|
+
|
3254
|
+
<title-example-xref lang="en">Example </title-example-xref>
|
3255
|
+
<title-example-xref lang="fr">Exemple </title-example-xref>
|
3256
|
+
|
3257
|
+
<title-section lang="en">Section </title-section>
|
3258
|
+
<title-section lang="fr">Section </title-section>
|
3259
|
+
|
3260
|
+
<title-inequality lang="en">Inequality </title-inequality>
|
3261
|
+
<title-inequality lang="fr">Inequality </title-inequality>
|
3262
|
+
|
3263
|
+
<title-equation lang="en">Equation </title-equation>
|
3264
|
+
<title-equation lang="fr">Equation </title-equation>
|
3265
|
+
|
3266
|
+
<title-annex lang="en">Annex </title-annex>
|
3267
|
+
<title-annex lang="fr">Annexe </title-annex>
|
3268
|
+
|
3269
|
+
<title-annex lang="zh">Annex </title-annex>
|
3270
|
+
|
3271
|
+
|
3272
|
+
|
3273
|
+
<title-appendix lang="en">Appendix </title-appendix>
|
3274
|
+
<title-appendix lang="fr">Appendix </title-appendix>
|
3275
|
+
|
3276
|
+
<title-clause lang="en">Clause </title-clause>
|
3277
|
+
<title-clause lang="fr">Article </title-clause>
|
3278
|
+
|
3279
|
+
<title-clause lang="zh">Clause </title-clause>
|
3280
|
+
|
3281
|
+
|
3282
|
+
|
3283
|
+
<title-edition lang="en">
|
3284
|
+
|
3285
|
+
<xsl:text>Edition </xsl:text>
|
3286
|
+
|
3287
|
+
|
3288
|
+
</title-edition>
|
3289
|
+
|
3290
|
+
<title-formula lang="en">Formula </title-formula>
|
3291
|
+
<title-formula lang="fr">Formula </title-formula>
|
3292
|
+
|
3293
|
+
<title-toc lang="en">
|
3294
|
+
|
3295
|
+
<xsl:text>Contents</xsl:text>
|
3296
|
+
|
3297
|
+
|
3298
|
+
|
3299
|
+
</title-toc>
|
3300
|
+
<title-toc lang="fr">Sommaire</title-toc>
|
3301
|
+
|
3302
|
+
<title-toc lang="zh">Contents</title-toc>
|
3303
|
+
|
3304
|
+
|
3305
|
+
|
3306
|
+
<title-page lang="en">Page</title-page>
|
3307
|
+
<title-page lang="fr">Page</title-page>
|
3308
|
+
|
3309
|
+
<title-key lang="en">Key</title-key>
|
3310
|
+
<title-key lang="fr">Légende</title-key>
|
3311
|
+
|
3312
|
+
<title-where lang="en">where</title-where>
|
3313
|
+
<title-where lang="fr">où</title-where>
|
3314
|
+
|
3315
|
+
<title-descriptors lang="en">Descriptors</title-descriptors>
|
3137
3316
|
|
3138
|
-
|
3317
|
+
<title-part lang="en">
|
3318
|
+
|
3319
|
+
<xsl:text>Part #:</xsl:text>
|
3320
|
+
|
3321
|
+
|
3322
|
+
</title-part>
|
3323
|
+
<title-part lang="fr">
|
3324
|
+
|
3325
|
+
<xsl:text>Partie #:</xsl:text>
|
3326
|
+
|
3327
|
+
|
3328
|
+
</title-part>
|
3329
|
+
<title-part lang="zh">第 # 部分:</title-part>
|
3330
|
+
|
3331
|
+
<title-note-to-entry lang="en">Note # to entry: </title-note-to-entry>
|
3332
|
+
<title-note-to-entry lang="fr">Note # à l'article: </title-note-to-entry>
|
3333
|
+
|
3334
|
+
<title-note-to-entry lang="zh">Note # to entry: </title-note-to-entry>
|
3335
|
+
|
3336
|
+
|
3337
|
+
|
3338
|
+
<title-modified lang="en">modified</title-modified>
|
3339
|
+
<title-modified lang="fr">modifiée</title-modified>
|
3340
|
+
|
3341
|
+
<title-modified lang="zh">modified</title-modified>
|
3139
3342
|
|
3140
3343
|
|
3141
|
-
</xsl:variable><xsl:variable name="title-note">
|
3142
3344
|
|
3143
|
-
|
3345
|
+
<title-source lang="en">SOURCE</title-source>
|
3144
3346
|
|
3347
|
+
<title-keywords lang="en">Keywords</title-keywords>
|
3145
3348
|
|
3146
|
-
|
3349
|
+
<title-deprecated lang="en">DEPRECATED</title-deprecated>
|
3350
|
+
<title-deprecated lang="fr">DEPRECATED</title-deprecated>
|
3147
3351
|
|
3148
|
-
|
3352
|
+
<title-submitting-organizations lang="en">Submitting Organizations</title-submitting-organizations>
|
3149
3353
|
|
3354
|
+
<title-list-tables lang="en">List of Tables</title-list-tables>
|
3150
3355
|
|
3151
|
-
|
3356
|
+
<title-list-figures lang="en">List of Figures</title-list-figures>
|
3152
3357
|
|
3153
|
-
|
3358
|
+
<title-recommendation lang="en">Recommendation </title-recommendation>
|
3154
3359
|
|
3360
|
+
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
3155
3361
|
|
3156
|
-
|
3362
|
+
<title-abstract lang="en">Abstract</title-abstract>
|
3157
3363
|
|
3158
|
-
|
3364
|
+
<title-summary lang="en">Summary</title-summary>
|
3159
3365
|
|
3366
|
+
<title-in lang="en">in </title-in>
|
3160
3367
|
|
3161
|
-
|
3162
|
-
<xsl:text>Appendix </xsl:text>
|
3163
|
-
</xsl:variable><xsl:variable name="title-clause">
|
3368
|
+
<title-box lang="en">Box </title-box>
|
3164
3369
|
|
3165
|
-
|
3370
|
+
<title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
|
3371
|
+
<title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
|
3166
3372
|
|
3373
|
+
<title-completion-date lang="en">Completion date for this manuscript</title-completion-date>
|
3374
|
+
<title-completion-date lang="zh">本稿完成日期</title-completion-date>
|
3167
3375
|
|
3168
|
-
|
3169
|
-
<
|
3170
|
-
</xsl:variable><xsl:variable name="title-toc">
|
3376
|
+
<title-issuance-date lang="en">Issuance Date: #</title-issuance-date>
|
3377
|
+
<title-issuance-date lang="zh"># 发布</title-issuance-date>
|
3171
3378
|
|
3379
|
+
<title-implementation-date lang="en">Implementation Date: #</title-implementation-date>
|
3380
|
+
<title-implementation-date lang="zh"># 实施</title-implementation-date>
|
3381
|
+
|
3382
|
+
<title-obligation-normative lang="en">normative</title-obligation-normative>
|
3383
|
+
<title-obligation-normative lang="zh">规范性附录</title-obligation-normative>
|
3384
|
+
|
3385
|
+
<title-caution lang="en">CAUTION</title-caution>
|
3386
|
+
<title-caution lang="zh">注意</title-caution>
|
3387
|
+
|
3388
|
+
<title-warning lang="en">WARNING</title-warning>
|
3389
|
+
<title-warning lang="zh">警告</title-warning>
|
3172
3390
|
|
3173
|
-
|
3391
|
+
<title-amendment lang="en">AMENDMENT</title-amendment>
|
3392
|
+
</xsl:variable><xsl:template name="getTitle">
|
3393
|
+
<xsl:param name="name"/>
|
3394
|
+
<xsl:variable name="lang">
|
3395
|
+
<xsl:call-template name="getLang"/>
|
3396
|
+
</xsl:variable>
|
3397
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $lang]"/>
|
3398
|
+
<xsl:choose>
|
3399
|
+
<xsl:when test="normalize-space($title_) != ''">
|
3400
|
+
<xsl:value-of select="$title_"/>
|
3401
|
+
</xsl:when>
|
3402
|
+
<xsl:otherwise>
|
3403
|
+
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
3404
|
+
</xsl:otherwise>
|
3405
|
+
</xsl:choose>
|
3406
|
+
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="link-style">
|
3174
3407
|
|
3175
3408
|
<xsl:attribute name="color">blue</xsl:attribute>
|
3176
3409
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
@@ -3248,7 +3481,11 @@
|
|
3248
3481
|
|
3249
3482
|
|
3250
3483
|
|
3251
|
-
|
3484
|
+
<xsl:variable name="title-table">
|
3485
|
+
<xsl:call-template name="getTitle">
|
3486
|
+
<xsl:with-param name="name" select="'title-table'"/>
|
3487
|
+
</xsl:call-template>
|
3488
|
+
</xsl:variable>
|
3252
3489
|
<xsl:value-of select="$title-table"/>
|
3253
3490
|
|
3254
3491
|
<xsl:call-template name="getTableNumber"/>
|
@@ -3360,7 +3597,16 @@
|
|
3360
3597
|
</xsl:otherwise>
|
3361
3598
|
</xsl:choose>
|
3362
3599
|
</xsl:for-each>
|
3363
|
-
|
3600
|
+
|
3601
|
+
<xsl:choose>
|
3602
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
3603
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
3604
|
+
</xsl:when>
|
3605
|
+
<xsl:otherwise>
|
3606
|
+
<xsl:apply-templates/>
|
3607
|
+
</xsl:otherwise>
|
3608
|
+
</xsl:choose>
|
3609
|
+
|
3364
3610
|
</fo:table>
|
3365
3611
|
|
3366
3612
|
|
@@ -3530,6 +3776,10 @@
|
|
3530
3776
|
|
3531
3777
|
<xsl:apply-templates/>
|
3532
3778
|
</fo:table-header>
|
3779
|
+
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
3780
|
+
<fo:table-body>
|
3781
|
+
<xsl:apply-templates/>
|
3782
|
+
</fo:table-body>
|
3533
3783
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
3534
3784
|
<xsl:apply-templates/>
|
3535
3785
|
</xsl:template><xsl:template name="insertTableFooter">
|
@@ -3704,6 +3954,11 @@
|
|
3704
3954
|
<fo:marker marker-class-name="table_continued">
|
3705
3955
|
<xsl:if test="$row_number > 1">
|
3706
3956
|
<fo:inline>
|
3957
|
+
<xsl:variable name="title-table">
|
3958
|
+
<xsl:call-template name="getTitle">
|
3959
|
+
<xsl:with-param name="name" select="'title-table'"/>
|
3960
|
+
</xsl:call-template>
|
3961
|
+
</xsl:variable>
|
3707
3962
|
<xsl:value-of select="$title-table"/>
|
3708
3963
|
<xsl:call-template name="getTableNumber"/>
|
3709
3964
|
<xsl:text> </xsl:text>
|
@@ -3741,6 +3996,12 @@
|
|
3741
3996
|
<fo:inline padding-right="2mm">
|
3742
3997
|
|
3743
3998
|
|
3999
|
+
|
4000
|
+
<xsl:variable name="title-note">
|
4001
|
+
<xsl:call-template name="getTitle">
|
4002
|
+
<xsl:with-param name="name" select="'title-note'"/>
|
4003
|
+
</xsl:call-template>
|
4004
|
+
</xsl:variable>
|
3744
4005
|
<xsl:value-of select="$title-note"/>
|
3745
4006
|
|
3746
4007
|
<xsl:variable name="id" select="ancestor::*[local-name() = 'table'][1]/@id"/>
|
@@ -3824,6 +4085,36 @@
|
|
3824
4085
|
</fn>
|
3825
4086
|
</xsl:for-each>
|
3826
4087
|
</xsl:variable>
|
4088
|
+
|
4089
|
+
<!-- current hierarchy is 'figure' element -->
|
4090
|
+
<xsl:variable name="following_dl_colwidths">
|
4091
|
+
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
4092
|
+
<xsl:variable name="html-table">
|
4093
|
+
<xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
|
4094
|
+
<xsl:element name="{$ns}:table">
|
4095
|
+
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
4096
|
+
<tbody>
|
4097
|
+
<xsl:apply-templates mode="dl"/>
|
4098
|
+
</tbody>
|
4099
|
+
</xsl:for-each>
|
4100
|
+
</xsl:element>
|
4101
|
+
</xsl:variable>
|
4102
|
+
|
4103
|
+
<xsl:call-template name="calculate-column-widths">
|
4104
|
+
<xsl:with-param name="cols-count" select="2"/>
|
4105
|
+
<xsl:with-param name="table" select="$html-table"/>
|
4106
|
+
</xsl:call-template>
|
4107
|
+
|
4108
|
+
</xsl:if>
|
4109
|
+
</xsl:variable>
|
4110
|
+
|
4111
|
+
|
4112
|
+
<xsl:variable name="maxlength_dt">
|
4113
|
+
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
4114
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
4115
|
+
</xsl:for-each>
|
4116
|
+
</xsl:variable>
|
4117
|
+
|
3827
4118
|
<xsl:if test="xalan:nodeset($references)//fn">
|
3828
4119
|
<fo:block>
|
3829
4120
|
<fo:table width="95%" table-layout="fixed">
|
@@ -3831,8 +4122,19 @@
|
|
3831
4122
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3832
4123
|
|
3833
4124
|
</xsl:if>
|
3834
|
-
<
|
3835
|
-
|
4125
|
+
<xsl:choose>
|
4126
|
+
<!-- if there 'dl', then set same columns width -->
|
4127
|
+
<xsl:when test="xalan:nodeset($following_dl_colwidths)//column">
|
4128
|
+
<xsl:call-template name="setColumnWidth_dl">
|
4129
|
+
<xsl:with-param name="colwidths" select="$following_dl_colwidths"/>
|
4130
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
4131
|
+
</xsl:call-template>
|
4132
|
+
</xsl:when>
|
4133
|
+
<xsl:otherwise>
|
4134
|
+
<fo:table-column column-width="15%"/>
|
4135
|
+
<fo:table-column column-width="85%"/>
|
4136
|
+
</xsl:otherwise>
|
4137
|
+
</xsl:choose>
|
3836
4138
|
<fo:table-body>
|
3837
4139
|
<xsl:for-each select="xalan:nodeset($references)//fn">
|
3838
4140
|
<xsl:variable name="reference" select="@reference"/>
|
@@ -3903,6 +4205,11 @@
|
|
3903
4205
|
|
3904
4206
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
3905
4207
|
|
4208
|
+
<xsl:variable name="title-where">
|
4209
|
+
<xsl:call-template name="getTitle">
|
4210
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
4211
|
+
</xsl:call-template>
|
4212
|
+
</xsl:variable>
|
3906
4213
|
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
3907
4214
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
3908
4215
|
<xsl:text/>
|
@@ -3918,17 +4225,27 @@
|
|
3918
4225
|
|
3919
4226
|
|
3920
4227
|
|
4228
|
+
<xsl:variable name="title-where">
|
4229
|
+
<xsl:call-template name="getTitle">
|
4230
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
4231
|
+
</xsl:call-template>
|
4232
|
+
</xsl:variable>
|
3921
4233
|
<xsl:value-of select="$title-where"/>
|
3922
4234
|
</fo:block>
|
3923
4235
|
</xsl:when>
|
3924
4236
|
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
3925
|
-
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt">
|
4237
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
3926
4238
|
|
3927
4239
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3928
4240
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
3929
4241
|
|
3930
4242
|
|
3931
4243
|
|
4244
|
+
<xsl:variable name="title-key">
|
4245
|
+
<xsl:call-template name="getTitle">
|
4246
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
4247
|
+
</xsl:call-template>
|
4248
|
+
</xsl:variable>
|
3932
4249
|
<xsl:value-of select="$title-key"/>
|
3933
4250
|
</fo:block>
|
3934
4251
|
</xsl:when>
|
@@ -3950,23 +4267,6 @@
|
|
3950
4267
|
|
3951
4268
|
|
3952
4269
|
|
3953
|
-
<!-- create virtual html table for dl/[dt and dd] -->
|
3954
|
-
<xsl:variable name="html-table">
|
3955
|
-
<xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
|
3956
|
-
<xsl:element name="{$ns}:table">
|
3957
|
-
<tbody>
|
3958
|
-
<xsl:apply-templates mode="dl"/>
|
3959
|
-
</tbody>
|
3960
|
-
</xsl:element>
|
3961
|
-
</xsl:variable>
|
3962
|
-
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
3963
|
-
<xsl:variable name="colwidths">
|
3964
|
-
<xsl:call-template name="calculate-column-widths">
|
3965
|
-
<xsl:with-param name="cols-count" select="2"/>
|
3966
|
-
<xsl:with-param name="table" select="$html-table"/>
|
3967
|
-
</xsl:call-template>
|
3968
|
-
</xsl:variable>
|
3969
|
-
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
3970
4270
|
|
3971
4271
|
<fo:table width="95%" table-layout="fixed">
|
3972
4272
|
|
@@ -3979,42 +4279,30 @@
|
|
3979
4279
|
|
3980
4280
|
</xsl:when>
|
3981
4281
|
</xsl:choose>
|
3982
|
-
|
3983
|
-
|
3984
|
-
|
3985
|
-
|
3986
|
-
|
3987
|
-
|
3988
|
-
|
3989
|
-
|
3990
|
-
|
3991
|
-
|
3992
|
-
|
3993
|
-
|
3994
|
-
|
3995
|
-
|
3996
|
-
|
3997
|
-
|
3998
|
-
|
3999
|
-
|
4000
|
-
|
4001
|
-
|
4002
|
-
|
4003
|
-
|
4004
|
-
|
4005
|
-
|
4006
|
-
</xsl:when>
|
4007
|
-
<xsl:otherwise>
|
4008
|
-
<fo:table-column column-width="proportional-column-width({.})"/>
|
4009
|
-
</xsl:otherwise>
|
4010
|
-
</xsl:choose>
|
4011
|
-
</xsl:for-each>
|
4012
|
-
</xsl:otherwise>
|
4013
|
-
</xsl:choose>
|
4014
|
-
<!-- <fo:table-column column-width="15%"/>
|
4015
|
-
<fo:table-column column-width="85%"/> -->
|
4016
|
-
</xsl:otherwise>
|
4017
|
-
</xsl:choose>
|
4282
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
4283
|
+
<xsl:variable name="html-table">
|
4284
|
+
<xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
|
4285
|
+
<xsl:element name="{$ns}:table">
|
4286
|
+
<tbody>
|
4287
|
+
<xsl:apply-templates mode="dl"/>
|
4288
|
+
</tbody>
|
4289
|
+
</xsl:element>
|
4290
|
+
</xsl:variable>
|
4291
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
4292
|
+
<xsl:variable name="colwidths">
|
4293
|
+
<xsl:call-template name="calculate-column-widths">
|
4294
|
+
<xsl:with-param name="cols-count" select="2"/>
|
4295
|
+
<xsl:with-param name="table" select="$html-table"/>
|
4296
|
+
</xsl:call-template>
|
4297
|
+
</xsl:variable>
|
4298
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
4299
|
+
<xsl:variable name="maxlength_dt">
|
4300
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
4301
|
+
</xsl:variable>
|
4302
|
+
<xsl:call-template name="setColumnWidth_dl">
|
4303
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
4304
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
4305
|
+
</xsl:call-template>
|
4018
4306
|
<fo:table-body>
|
4019
4307
|
<xsl:apply-templates>
|
4020
4308
|
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
@@ -4024,6 +4312,60 @@
|
|
4024
4312
|
</fo:block>
|
4025
4313
|
</fo:block>
|
4026
4314
|
</xsl:if>
|
4315
|
+
</xsl:template><xsl:template name="setColumnWidth_dl">
|
4316
|
+
<xsl:param name="colwidths"/>
|
4317
|
+
<xsl:param name="maxlength_dt"/>
|
4318
|
+
<xsl:choose>
|
4319
|
+
<xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
|
4320
|
+
<fo:table-column column-width="50%"/>
|
4321
|
+
<fo:table-column column-width="50%"/>
|
4322
|
+
</xsl:when>
|
4323
|
+
<xsl:otherwise>
|
4324
|
+
<xsl:choose>
|
4325
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
|
4326
|
+
<fo:table-column column-width="5%"/>
|
4327
|
+
<fo:table-column column-width="95%"/>
|
4328
|
+
</xsl:when>
|
4329
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 5"> <!-- if dt contains short text like t90, a, etc -->
|
4330
|
+
<fo:table-column column-width="10%"/>
|
4331
|
+
<fo:table-column column-width="90%"/>
|
4332
|
+
</xsl:when>
|
4333
|
+
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
4334
|
+
<fo:table-column column-width="60%"/>
|
4335
|
+
<fo:table-column column-width="40%"/>
|
4336
|
+
</xsl:when> -->
|
4337
|
+
<xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.3">
|
4338
|
+
<fo:table-column column-width="50%"/>
|
4339
|
+
<fo:table-column column-width="50%"/>
|
4340
|
+
</xsl:when>
|
4341
|
+
<xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 0.5">
|
4342
|
+
<fo:table-column column-width="40%"/>
|
4343
|
+
<fo:table-column column-width="60%"/>
|
4344
|
+
</xsl:when>
|
4345
|
+
<xsl:otherwise>
|
4346
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
4347
|
+
<xsl:choose>
|
4348
|
+
<xsl:when test=". = 1 or . = 0">
|
4349
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
4350
|
+
</xsl:when>
|
4351
|
+
<xsl:otherwise>
|
4352
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
4353
|
+
</xsl:otherwise>
|
4354
|
+
</xsl:choose>
|
4355
|
+
</xsl:for-each>
|
4356
|
+
</xsl:otherwise>
|
4357
|
+
</xsl:choose>
|
4358
|
+
<!-- <fo:table-column column-width="15%"/>
|
4359
|
+
<fo:table-column column-width="85%"/> -->
|
4360
|
+
</xsl:otherwise>
|
4361
|
+
</xsl:choose>
|
4362
|
+
</xsl:template><xsl:template name="getMaxLength_dt">
|
4363
|
+
<xsl:for-each select="*[local-name()='dt']">
|
4364
|
+
<xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
|
4365
|
+
<xsl:if test="position() = 1">
|
4366
|
+
<xsl:value-of select="string-length(normalize-space(.))"/>
|
4367
|
+
</xsl:if>
|
4368
|
+
</xsl:for-each>
|
4027
4369
|
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']">
|
4028
4370
|
<xsl:param name="key_iso"/>
|
4029
4371
|
|
@@ -4040,6 +4382,11 @@
|
|
4040
4382
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
4041
4383
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
4042
4384
|
</xsl:if>
|
4385
|
+
<xsl:variable name="title-note">
|
4386
|
+
<xsl:call-template name="getTitle">
|
4387
|
+
<xsl:with-param name="name" select="'title-note'"/>
|
4388
|
+
</xsl:call-template>
|
4389
|
+
</xsl:variable>
|
4043
4390
|
<xsl:value-of select="$title-note"/>
|
4044
4391
|
</fo:block>
|
4045
4392
|
</fo:table-cell>
|
@@ -4083,7 +4430,11 @@
|
|
4083
4430
|
|
4084
4431
|
|
4085
4432
|
<xsl:apply-templates/>
|
4086
|
-
|
4433
|
+
<!-- <xsl:if test="$namespace = 'gb'">
|
4434
|
+
<xsl:if test="ancestor::*[local-name()='formula']">
|
4435
|
+
<xsl:text>—</xsl:text>
|
4436
|
+
</xsl:if>
|
4437
|
+
</xsl:if> -->
|
4087
4438
|
</fo:block>
|
4088
4439
|
</fo:table-cell>
|
4089
4440
|
<fo:table-cell>
|
@@ -4139,7 +4490,8 @@
|
|
4139
4490
|
</xsl:template><xsl:template name="recursiveSmallCaps">
|
4140
4491
|
<xsl:param name="text"/>
|
4141
4492
|
<xsl:variable name="char" select="substring($text,1,1)"/>
|
4142
|
-
<xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/>
|
4493
|
+
<!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
|
4494
|
+
<xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
|
4143
4495
|
<xsl:choose>
|
4144
4496
|
<xsl:when test="$char=$upperCase">
|
4145
4497
|
<fo:inline font-size="{100 div 0.75}%">
|
@@ -4422,18 +4774,28 @@
|
|
4422
4774
|
<xsl:choose>
|
4423
4775
|
<xsl:when test="contains($str2, ' ')">
|
4424
4776
|
<xsl:variable name="substr" select="substring-before($str2, ' ')"/>
|
4425
|
-
<xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
|
4426
|
-
<xsl:value-of select="substring($substr, 2)"/>
|
4777
|
+
<!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
|
4778
|
+
<xsl:value-of select="substring($substr, 2)"/> -->
|
4779
|
+
<xsl:call-template name="capitalize">
|
4780
|
+
<xsl:with-param name="str" select="$substr"/>
|
4781
|
+
</xsl:call-template>
|
4427
4782
|
<xsl:text> </xsl:text>
|
4428
4783
|
<xsl:call-template name="capitalizeWords">
|
4429
4784
|
<xsl:with-param name="str" select="substring-after($str2, ' ')"/>
|
4430
4785
|
</xsl:call-template>
|
4431
4786
|
</xsl:when>
|
4432
4787
|
<xsl:otherwise>
|
4433
|
-
<xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
|
4434
|
-
<xsl:value-of select="substring($str2, 2)"/>
|
4788
|
+
<!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
|
4789
|
+
<xsl:value-of select="substring($str2, 2)"/> -->
|
4790
|
+
<xsl:call-template name="capitalize">
|
4791
|
+
<xsl:with-param name="str" select="$str2"/>
|
4792
|
+
</xsl:call-template>
|
4435
4793
|
</xsl:otherwise>
|
4436
4794
|
</xsl:choose>
|
4795
|
+
</xsl:template><xsl:template name="capitalize">
|
4796
|
+
<xsl:param name="str"/>
|
4797
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
4798
|
+
<xsl:value-of select="substring($str, 2)"/>
|
4437
4799
|
</xsl:template><xsl:template match="mathml:math">
|
4438
4800
|
<fo:inline font-family="STIX2Math">
|
4439
4801
|
<fo:instream-foreign-object fox:alt-text="Math">
|
@@ -4491,6 +4853,11 @@
|
|
4491
4853
|
<fo:inline id="{@id}"/>
|
4492
4854
|
</xsl:template><xsl:template match="*[local-name()='appendix']">
|
4493
4855
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
4856
|
+
<xsl:variable name="title-appendix">
|
4857
|
+
<xsl:call-template name="getTitle">
|
4858
|
+
<xsl:with-param name="name" select="'title-appendix'"/>
|
4859
|
+
</xsl:call-template>
|
4860
|
+
</xsl:variable>
|
4494
4861
|
<fo:inline padding-right="5mm"><xsl:value-of select="$title-appendix"/> <xsl:number/></fo:inline>
|
4495
4862
|
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
|
4496
4863
|
</fo:block>
|
@@ -4500,6 +4867,11 @@
|
|
4500
4867
|
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']">
|
4501
4868
|
<fo:block xsl:use-attribute-sets="appendix-example-style">
|
4502
4869
|
<xsl:variable name="claims_id" select="ancestor::*[local-name()='clause'][1]/@id"/>
|
4870
|
+
<xsl:variable name="title-example">
|
4871
|
+
<xsl:call-template name="getTitle">
|
4872
|
+
<xsl:with-param name="name" select="'title-example'"/>
|
4873
|
+
</xsl:call-template>
|
4874
|
+
</xsl:variable>
|
4503
4875
|
<xsl:value-of select="$title-example"/>
|
4504
4876
|
<xsl:if test="count(ancestor::*[local-name()='clause'][1]//*[local-name()='example']) > 1">
|
4505
4877
|
<xsl:number count="*[local-name()='example'][ancestor::*[local-name()='clause'][@id = $claims_id]]" level="any"/><xsl:text> </xsl:text>
|
@@ -4530,6 +4902,17 @@
|
|
4530
4902
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
4531
4903
|
<xsl:apply-templates/>
|
4532
4904
|
</fo:inline>
|
4905
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
4906
|
+
<xsl:variable name="title-modified">
|
4907
|
+
<xsl:call-template name="getTitle">
|
4908
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
4909
|
+
</xsl:call-template>
|
4910
|
+
</xsl:variable>
|
4911
|
+
<xsl:choose>
|
4912
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
4913
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
4914
|
+
</xsl:choose>
|
4915
|
+
<xsl:apply-templates/>
|
4533
4916
|
</xsl:template><xsl:template name="convertDate">
|
4534
4917
|
<xsl:param name="date"/>
|
4535
4918
|
<xsl:param name="format" select="'short'"/>
|
@@ -4594,4 +4977,138 @@
|
|
4594
4977
|
<xsl:when test="position() != last()"><xsl:value-of select="$charDelim"/></xsl:when>
|
4595
4978
|
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
4596
4979
|
</xsl:choose>
|
4980
|
+
</xsl:template><xsl:template name="addPDFUAmeta">
|
4981
|
+
<fo:declarations>
|
4982
|
+
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
4983
|
+
<pdf:dictionary type="normal" key="ViewerPreferences">
|
4984
|
+
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
4985
|
+
</pdf:dictionary>
|
4986
|
+
</pdf:catalog>
|
4987
|
+
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
4988
|
+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
4989
|
+
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
4990
|
+
<!-- Dublin Core properties go here -->
|
4991
|
+
<dc:title>
|
4992
|
+
<xsl:variable name="title">
|
4993
|
+
|
4994
|
+
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en' and @type = 'main']"/>
|
4995
|
+
|
4996
|
+
|
4997
|
+
|
4998
|
+
|
4999
|
+
</xsl:variable>
|
5000
|
+
<xsl:choose>
|
5001
|
+
<xsl:when test="normalize-space($title) != ''">
|
5002
|
+
<xsl:value-of select="$title"/>
|
5003
|
+
</xsl:when>
|
5004
|
+
<xsl:otherwise>
|
5005
|
+
<xsl:text> </xsl:text>
|
5006
|
+
</xsl:otherwise>
|
5007
|
+
</xsl:choose>
|
5008
|
+
</dc:title>
|
5009
|
+
<dc:creator>
|
5010
|
+
|
5011
|
+
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
5012
|
+
|
5013
|
+
|
5014
|
+
</dc:creator>
|
5015
|
+
<dc:description>
|
5016
|
+
<xsl:variable name="abstract">
|
5017
|
+
|
5018
|
+
<xsl:copy-of select="/*/*[local-name() = 'bibliography']/*[local-name() = 'references']/*[local-name() = 'bibitem']/*[local-name() = 'abstract']//text()"/>
|
5019
|
+
|
5020
|
+
|
5021
|
+
|
5022
|
+
|
5023
|
+
</xsl:variable>
|
5024
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
5025
|
+
</dc:description>
|
5026
|
+
<pdf:Keywords>
|
5027
|
+
<xsl:call-template name="insertKeywords"/>
|
5028
|
+
</pdf:Keywords>
|
5029
|
+
</rdf:Description>
|
5030
|
+
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
|
5031
|
+
<!-- XMP properties go here -->
|
5032
|
+
<xmp:CreatorTool/>
|
5033
|
+
</rdf:Description>
|
5034
|
+
</rdf:RDF>
|
5035
|
+
</x:xmpmeta>
|
5036
|
+
</fo:declarations>
|
5037
|
+
</xsl:template><xsl:template name="getId">
|
5038
|
+
<xsl:choose>
|
5039
|
+
<xsl:when test="../@id">
|
5040
|
+
<xsl:value-of select="../@id"/>
|
5041
|
+
</xsl:when>
|
5042
|
+
<xsl:otherwise>
|
5043
|
+
<!-- <xsl:value-of select="concat(local-name(..), '_', text())"/> -->
|
5044
|
+
<xsl:value-of select="concat(generate-id(..), '_', text())"/>
|
5045
|
+
</xsl:otherwise>
|
5046
|
+
</xsl:choose>
|
5047
|
+
</xsl:template><xsl:template name="getLevel">
|
5048
|
+
<xsl:variable name="level_total" select="count(ancestor::*)"/>
|
5049
|
+
<xsl:variable name="level">
|
5050
|
+
<xsl:choose>
|
5051
|
+
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
5052
|
+
<xsl:value-of select="$level_total - 2"/>
|
5053
|
+
</xsl:when>
|
5054
|
+
<xsl:when test="ancestor::*[local-name() = 'sections']">
|
5055
|
+
<xsl:value-of select="$level_total - 2"/>
|
5056
|
+
</xsl:when>
|
5057
|
+
<xsl:when test="ancestor::*[local-name() = 'bibliography']">
|
5058
|
+
<xsl:value-of select="$level_total - 2"/>
|
5059
|
+
</xsl:when>
|
5060
|
+
<xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
|
5061
|
+
<xsl:otherwise>
|
5062
|
+
<xsl:value-of select="$level_total - 1"/>
|
5063
|
+
</xsl:otherwise>
|
5064
|
+
</xsl:choose>
|
5065
|
+
</xsl:variable>
|
5066
|
+
<xsl:value-of select="$level"/>
|
5067
|
+
</xsl:template><xsl:template name="getSubSection">
|
5068
|
+
<xsl:number format=".1" level="multiple" count="*[local-name() = 'clause']/*[local-name() = 'clause'] | *[local-name() = 'clause']/*[local-name() = 'terms'] | *[local-name() = 'terms']/*[local-name() = 'term'] | *[local-name() = 'clause']/*[local-name() = 'term'] | *[local-name() = 'terms']/*[local-name() = 'clause'] | *[local-name() = 'terms']/*[local-name() = 'definitions'] | *[local-name() = 'definitions']/*[local-name() = 'clause'] | *[local-name() = 'clause']/*[local-name() = 'definitions'] | *[local-name() = 'definitions']/*[local-name() = 'definitions'] | *[local-name() = 'clause']/*[local-name() = 'references']"/>
|
5069
|
+
</xsl:template><xsl:template name="split">
|
5070
|
+
<xsl:param name="pText" select="."/>
|
5071
|
+
<xsl:param name="sep" select="','"/>
|
5072
|
+
<xsl:if test="string-length($pText) >0">
|
5073
|
+
<item>
|
5074
|
+
<xsl:value-of select="normalize-space(substring-before(concat($pText, ','), $sep))"/>
|
5075
|
+
</item>
|
5076
|
+
<xsl:call-template name="split">
|
5077
|
+
<xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
|
5078
|
+
<xsl:with-param name="sep" select="$sep"/>
|
5079
|
+
</xsl:call-template>
|
5080
|
+
</xsl:if>
|
5081
|
+
</xsl:template><xsl:template name="getDocumentId">
|
5082
|
+
<xsl:call-template name="getLang"/><xsl:value-of select="//*[local-name() = 'p'][1]/@id"/>
|
5083
|
+
</xsl:template><xsl:template name="namespaceCheck">
|
5084
|
+
<xsl:variable name="documentNS" select="namespace-uri(/*)"/>
|
5085
|
+
<xsl:variable name="XSLNS">
|
5086
|
+
|
5087
|
+
<xsl:value-of select="document('')//*/namespace::iso"/>
|
5088
|
+
|
5089
|
+
|
5090
|
+
|
5091
|
+
|
5092
|
+
|
5093
|
+
|
5094
|
+
|
5095
|
+
|
5096
|
+
|
5097
|
+
|
5098
|
+
|
5099
|
+
|
5100
|
+
</xsl:variable>
|
5101
|
+
<xsl:if test="$documentNS != $XSLNS">
|
5102
|
+
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
5103
|
+
</xsl:if>
|
5104
|
+
</xsl:template><xsl:template name="getLanguage">
|
5105
|
+
<xsl:param name="lang"/>
|
5106
|
+
<xsl:variable name="language" select="java:toLowerCase(java:java.lang.String.new($lang))"/>
|
5107
|
+
<xsl:choose>
|
5108
|
+
<xsl:when test="$language = 'en'">English</xsl:when>
|
5109
|
+
<xsl:when test="$language = 'fr'">French</xsl:when>
|
5110
|
+
<xsl:when test="$language = 'de'">Deutsch</xsl:when>
|
5111
|
+
<xsl:when test="$language = 'cn'">Chinese</xsl:when>
|
5112
|
+
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
5113
|
+
</xsl:choose>
|
4597
5114
|
</xsl:template></xsl:stylesheet>
|