metanorma-iso 2.3.0 → 2.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/iso/base_convert.rb +6 -0
- data/lib/isodoc/iso/html/isodoc-dis.css +8 -8
- data/lib/isodoc/iso/html/isodoc-dis.scss +8 -8
- data/lib/isodoc/iso/html/isodoc.css +8 -8
- data/lib/isodoc/iso/html/isodoc.scss +8 -8
- data/lib/isodoc/iso/html/style-human.css +30 -1
- data/lib/isodoc/iso/html/style-iso.css +30 -1
- data/lib/isodoc/iso/init.rb +12 -1
- data/lib/isodoc/iso/iso.amendment.xsl +277 -221
- data/lib/isodoc/iso/iso.international-standard.xsl +277 -221
- data/lib/isodoc/iso/presentation_xml_convert.rb +1 -1
- data/lib/isodoc/iso/word_cleanup.rb +4 -0
- data/lib/isodoc/iso/word_dis_cleanup.rb +14 -1
- data/lib/isodoc/iso/word_dis_convert.rb +1 -7
- data/lib/isodoc/iso/xref.rb +1 -0
- data/lib/isodoc/iso/xref_section.rb +3 -4
- data/lib/metanorma/iso/isodoc.rng +11 -1
- data/lib/metanorma/iso/version.rb +1 -1
- data/lib/relaton/render/config.yml +2 -1
- data/lib/relaton/render/general.rb +6 -0
- data/lib/relaton/render/parse.rb +20 -0
- metadata +3 -2
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
|
4
4
|
|
5
|
-
<xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])
|
5
|
+
<xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure' or local-name() = 'localized-strings')] and not(ancestor::*[local-name() = 'name']))]" use="@reference"/>
|
6
6
|
|
7
7
|
<xsl:key name="attachments" match="iso:eref[java:endsWith(java:java.lang.String.new(@bibitemid),'.exp')]" use="@bibitemid"/>
|
8
8
|
<xsl:key name="attachments2" match="iso:eref[contains(@bibitemid,'.exp_')]" use="@bibitemid"/>
|
@@ -326,31 +326,31 @@
|
|
326
326
|
<!-- contents pages -->
|
327
327
|
<!-- odd pages -->
|
328
328
|
<fo:simple-page-master master-name="odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
329
|
-
<fo:region-body margin-top="27.4mm" margin-bottom="{$marginBottom
|
329
|
+
<fo:region-body margin-top="27.4mm" margin-bottom="{$marginBottom}mm" margin-left="19mm" margin-right="19mm"/>
|
330
330
|
<fo:region-before region-name="header-odd" extent="27.4mm"/> <!-- display-align="center" -->
|
331
|
-
<fo:region-after region-name="footer-odd" extent="{$marginBottom}mm"/>
|
331
|
+
<fo:region-after region-name="footer-odd" extent="{$marginBottom - 2}mm"/>
|
332
332
|
<fo:region-start region-name="left-region" extent="19mm"/>
|
333
333
|
<fo:region-end region-name="right-region" extent="19mm"/>
|
334
334
|
</fo:simple-page-master>
|
335
335
|
<fo:simple-page-master master-name="odd-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
336
|
-
<fo:region-body margin-top="27.4mm" margin-bottom="{$marginBottom
|
336
|
+
<fo:region-body margin-top="27.4mm" margin-bottom="{$marginBottom}mm" margin-left="19mm" margin-right="19mm"/>
|
337
337
|
<fo:region-before region-name="header-odd" extent="27.4mm"/>
|
338
|
-
<fo:region-after region-name="footer-odd" extent="{$marginBottom}mm"/>
|
338
|
+
<fo:region-after region-name="footer-odd" extent="{$marginBottom - 2}mm"/>
|
339
339
|
<fo:region-start region-name="left-region" extent="19mm"/>
|
340
340
|
<fo:region-end region-name="right-region" extent="19mm"/>
|
341
341
|
</fo:simple-page-master>
|
342
342
|
<!-- even pages -->
|
343
343
|
<fo:simple-page-master master-name="even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
344
|
-
<fo:region-body margin-top="27.4mm" margin-bottom="{$marginBottom
|
344
|
+
<fo:region-body margin-top="27.4mm" margin-bottom="{$marginBottom}mm" margin-left="19mm" margin-right="19mm"/>
|
345
345
|
<fo:region-before region-name="header-even" extent="27.4mm"/> <!-- display-align="center" -->
|
346
|
-
<fo:region-after region-name="footer-even" extent="{$marginBottom}mm"/>
|
346
|
+
<fo:region-after region-name="footer-even" extent="{$marginBottom - 2}mm"/>
|
347
347
|
<fo:region-start region-name="left-region" extent="19mm"/>
|
348
348
|
<fo:region-end region-name="right-region" extent="19mm"/>
|
349
349
|
</fo:simple-page-master>
|
350
350
|
<fo:simple-page-master master-name="even-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
351
|
-
<fo:region-body margin-top="27.4mm" margin-bottom="{$marginBottom
|
351
|
+
<fo:region-body margin-top="27.4mm" margin-bottom="{$marginBottom}mm" margin-left="19mm" margin-right="19mm"/>
|
352
352
|
<fo:region-before region-name="header-even" extent="27.4mm"/> <!-- display-align="center" -->
|
353
|
-
<fo:region-after region-name="footer-even" extent="{$marginBottom}mm"/>
|
353
|
+
<fo:region-after region-name="footer-even" extent="{$marginBottom - 2}mm"/>
|
354
354
|
<fo:region-start region-name="left-region" extent="19mm"/>
|
355
355
|
<fo:region-end region-name="right-region" extent="19mm"/>
|
356
356
|
</fo:simple-page-master>
|
@@ -381,46 +381,46 @@
|
|
381
381
|
|
382
382
|
<!-- first page -->
|
383
383
|
<fo:simple-page-master master-name="first-publishedISO" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
384
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom
|
384
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
385
385
|
<fo:region-before region-name="header-first" extent="{$marginTop}mm"/> <!-- display-align="center" -->
|
386
|
-
<fo:region-after region-name="footer-odd" extent="{$marginBottom}mm"/>
|
386
|
+
<fo:region-after region-name="footer-odd" extent="{$marginBottom - 2}mm"/>
|
387
387
|
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
388
388
|
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
389
389
|
</fo:simple-page-master>
|
390
390
|
<!-- odd pages -->
|
391
391
|
<fo:simple-page-master master-name="odd-publishedISO" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
392
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom
|
392
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
393
393
|
<fo:region-before region-name="header-odd" extent="{$marginTop}mm"/> <!-- display-align="center" -->
|
394
|
-
<fo:region-after region-name="footer-odd" extent="{$marginBottom}mm"/>
|
394
|
+
<fo:region-after region-name="footer-odd" extent="{$marginBottom - 2}mm"/>
|
395
395
|
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
396
396
|
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
397
397
|
</fo:simple-page-master>
|
398
398
|
<fo:simple-page-master master-name="odd-publishedISO-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
399
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom
|
399
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
400
400
|
<fo:region-before region-name="header-odd" extent="{$marginTop}mm"/> <!-- display-align="center" -->
|
401
|
-
<fo:region-after region-name="footer-odd" extent="{$marginBottom}mm"/>
|
401
|
+
<fo:region-after region-name="footer-odd" extent="{$marginBottom - 2}mm"/>
|
402
402
|
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
403
403
|
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
404
404
|
</fo:simple-page-master>
|
405
405
|
<!-- even pages -->
|
406
406
|
<fo:simple-page-master master-name="even-publishedISO" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
407
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom
|
407
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm"/>
|
408
408
|
<fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
|
409
|
-
<fo:region-after region-name="footer-even" extent="{$marginBottom}mm"/>
|
409
|
+
<fo:region-after region-name="footer-even" extent="{$marginBottom - 2}mm"/>
|
410
410
|
<fo:region-start region-name="left-region" extent="{$marginLeftRight2}mm"/>
|
411
411
|
<fo:region-end region-name="right-region" extent="{$marginLeftRight1}mm"/>
|
412
412
|
</fo:simple-page-master>
|
413
413
|
<fo:simple-page-master master-name="even-publishedISO-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
414
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom
|
414
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm"/>
|
415
415
|
<fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
|
416
|
-
<fo:region-after region-name="footer-even" extent="{$marginBottom}mm"/>
|
416
|
+
<fo:region-after region-name="footer-even" extent="{$marginBottom - 2}mm"/>
|
417
417
|
<fo:region-start region-name="left-region" extent="{$marginLeftRight2}mm"/>
|
418
418
|
<fo:region-end region-name="right-region" extent="{$marginLeftRight1}mm"/>
|
419
419
|
</fo:simple-page-master>
|
420
420
|
<fo:simple-page-master master-name="blankpage" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
421
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom
|
421
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm"/>
|
422
422
|
<fo:region-before region-name="header" extent="{$marginTop}mm"/>
|
423
|
-
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
423
|
+
<fo:region-after region-name="footer" extent="{$marginBottom - 2}mm"/>
|
424
424
|
<fo:region-start region-name="left" extent="{$marginLeftRight2}mm"/>
|
425
425
|
<fo:region-end region-name="right" extent="{$marginLeftRight1}mm"/>
|
426
426
|
</fo:simple-page-master>
|
@@ -457,7 +457,7 @@
|
|
457
457
|
<fo:simple-page-master master-name="last-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
458
458
|
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm"/>
|
459
459
|
<fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
|
460
|
-
<fo:region-after region-name="last-page-footer" extent="{$marginBottom}mm"/>
|
460
|
+
<fo:region-after region-name="last-page-footer" extent="{$marginBottom - 2}mm"/>
|
461
461
|
<fo:region-start region-name="left-region" extent="{$marginLeftRight2}mm"/>
|
462
462
|
<fo:region-end region-name="right-region" extent="{$marginLeftRight1}mm"/>
|
463
463
|
</fo:simple-page-master>
|
@@ -466,14 +466,14 @@
|
|
466
466
|
<fo:simple-page-master master-name="index-odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
467
467
|
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm" column-count="2" column-gap="10mm"/>
|
468
468
|
<fo:region-before region-name="header-odd" extent="{$marginTop}mm"/>
|
469
|
-
<fo:region-after region-name="footer-odd" extent="{$marginBottom}mm"/>
|
469
|
+
<fo:region-after region-name="footer-odd" extent="{$marginBottom - 2}mm"/>
|
470
470
|
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
471
471
|
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
472
472
|
</fo:simple-page-master>
|
473
473
|
<fo:simple-page-master master-name="index-even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
474
474
|
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm" column-count="2" column-gap="10mm"/>
|
475
475
|
<fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
|
476
|
-
<fo:region-after region-name="footer-even" extent="{$marginBottom}mm"/>
|
476
|
+
<fo:region-after region-name="footer-even" extent="{$marginBottom - 2}mm"/>
|
477
477
|
<fo:region-start region-name="left-region" extent="{$marginLeftRight2}mm"/>
|
478
478
|
<fo:region-end region-name="right-region" extent="{$marginLeftRight1}mm"/>
|
479
479
|
</fo:simple-page-master>
|
@@ -2390,7 +2390,7 @@
|
|
2390
2390
|
<xsl:variable name="marginTop" select="normalize-space($marginTop_)"/>
|
2391
2391
|
|
2392
2392
|
<xsl:variable name="marginBottom_">
|
2393
|
-
|
2393
|
+
15
|
2394
2394
|
</xsl:variable>
|
2395
2395
|
<xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/>
|
2396
2396
|
|
@@ -3110,6 +3110,12 @@
|
|
3110
3110
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3111
3111
|
</xsl:attribute-set>
|
3112
3112
|
|
3113
|
+
<xsl:attribute-set name="figure-block-style">
|
3114
|
+
|
3115
|
+
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
3116
|
+
|
3117
|
+
</xsl:attribute-set>
|
3118
|
+
|
3113
3119
|
<xsl:attribute-set name="figure-style">
|
3114
3120
|
|
3115
3121
|
</xsl:attribute-set>
|
@@ -3119,7 +3125,7 @@
|
|
3119
3125
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3120
3126
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
3121
3127
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
3122
|
-
<xsl:attribute name="
|
3128
|
+
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
3123
3129
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
3124
3130
|
|
3125
3131
|
</xsl:attribute-set>
|
@@ -4544,6 +4550,10 @@
|
|
4544
4550
|
<xsl:with-param name="continued">true</xsl:with-param>
|
4545
4551
|
</xsl:apply-templates>
|
4546
4552
|
|
4553
|
+
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
4554
|
+
<fo:block/>
|
4555
|
+
</xsl:if>
|
4556
|
+
|
4547
4557
|
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
4548
4558
|
<xsl:call-template name="table_name_fn_display"/>
|
4549
4559
|
</xsl:for-each>
|
@@ -4831,7 +4841,7 @@
|
|
4831
4841
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4832
4842
|
</xsl:if>
|
4833
4843
|
|
4834
|
-
<xsl:if test="position() = 1 and not(ancestor::*[local-name() = 'table']/*[local-name() = 'thead'])">
|
4844
|
+
<xsl:if test="position() = 1 and not(ancestor::*[local-name() = 'table']/*[local-name() = 'thead']) and ancestor::*[local-name() = 'table']/*[local-name() = 'name']">
|
4835
4845
|
<xsl:attribute name="border-top"><xsl:value-of select="$table-border"/></xsl:attribute>
|
4836
4846
|
</xsl:if>
|
4837
4847
|
|
@@ -4976,7 +4986,7 @@
|
|
4976
4986
|
</fn>
|
4977
4987
|
-->
|
4978
4988
|
<!-- footnotes in text (title, bibliography, main body, table's, figure's names), not for tables, figures -->
|
4979
|
-
<xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])
|
4989
|
+
<xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))]" priority="2" name="fn">
|
4980
4990
|
|
4981
4991
|
<!-- list of footnotes to calculate actual footnotes number -->
|
4982
4992
|
<xsl:variable name="p_fn_">
|
@@ -5009,7 +5019,22 @@
|
|
5009
5019
|
|
5010
5020
|
<xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
5011
5021
|
<xsl:variable name="footnote_inline">
|
5012
|
-
<fo:inline
|
5022
|
+
<fo:inline>
|
5023
|
+
|
5024
|
+
<xsl:variable name="fn_styles">
|
5025
|
+
<xsl:choose>
|
5026
|
+
<xsl:when test="ancestor::*[local-name() = 'bibitem']">
|
5027
|
+
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"/>
|
5028
|
+
</xsl:when>
|
5029
|
+
<xsl:otherwise>
|
5030
|
+
<fn_styles xsl:use-attribute-sets="fn-num-style"/>
|
5031
|
+
</xsl:otherwise>
|
5032
|
+
</xsl:choose>
|
5033
|
+
</xsl:variable>
|
5034
|
+
|
5035
|
+
<xsl:for-each select="xalan:nodeset($fn_styles)/fn_styles/@*">
|
5036
|
+
<xsl:copy-of select="."/>
|
5037
|
+
</xsl:for-each>
|
5013
5038
|
|
5014
5039
|
<xsl:if test="following-sibling::*[1][local-name() = 'fn']">
|
5015
5040
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
@@ -5020,8 +5045,7 @@
|
|
5020
5045
|
</fo:basic-link>
|
5021
5046
|
</fo:inline>
|
5022
5047
|
</xsl:variable>
|
5023
|
-
|
5024
|
-
gen_id=<xsl:value-of select="$gen_id"/> -->
|
5048
|
+
|
5025
5049
|
<xsl:choose>
|
5026
5050
|
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
|
5027
5051
|
<xsl:copy-of select="$footnote_inline"/>
|
@@ -5073,7 +5097,10 @@
|
|
5073
5097
|
</xsl:for-each>
|
5074
5098
|
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='boilerplate']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
|
5075
5099
|
<xsl:sort select="@displayorder" data-type="number"/>
|
5076
|
-
|
5100
|
+
<!-- commented:
|
5101
|
+
.//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
|
5102
|
+
because 'fn' there is in biblio-tag -->
|
5103
|
+
<xsl:for-each select=".//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
5077
5104
|
<!-- copy unique fn -->
|
5078
5105
|
<fn gen_id="{generate-id(.)}">
|
5079
5106
|
<xsl:copy-of select="@*"/>
|
@@ -5945,7 +5972,7 @@
|
|
5945
5972
|
|
5946
5973
|
<xsl:variable name="_font-size">
|
5947
5974
|
|
5948
|
-
|
5975
|
+
9 <!-- inherit -->
|
5949
5976
|
|
5950
5977
|
</xsl:variable>
|
5951
5978
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -6982,6 +7009,33 @@
|
|
6982
7009
|
</xsl:choose>
|
6983
7010
|
</xsl:template>
|
6984
7011
|
|
7012
|
+
<xsl:template name="getLang_fromCurrentNode">
|
7013
|
+
<xsl:variable name="language_current" select="normalize-space(.//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
7014
|
+
<xsl:variable name="language">
|
7015
|
+
<xsl:choose>
|
7016
|
+
<xsl:when test="$language_current != ''">
|
7017
|
+
<xsl:value-of select="$language_current"/>
|
7018
|
+
</xsl:when>
|
7019
|
+
<xsl:otherwise>
|
7020
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
7021
|
+
<xsl:choose>
|
7022
|
+
<xsl:when test="$language_current_2 != ''">
|
7023
|
+
<xsl:value-of select="$language_current_2"/>
|
7024
|
+
</xsl:when>
|
7025
|
+
<xsl:otherwise>
|
7026
|
+
<xsl:value-of select=".//*[local-name()='bibdata']//*[local-name()='language']"/>
|
7027
|
+
</xsl:otherwise>
|
7028
|
+
</xsl:choose>
|
7029
|
+
</xsl:otherwise>
|
7030
|
+
</xsl:choose>
|
7031
|
+
</xsl:variable>
|
7032
|
+
|
7033
|
+
<xsl:choose>
|
7034
|
+
<xsl:when test="$language = 'English'">en</xsl:when>
|
7035
|
+
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
7036
|
+
</xsl:choose>
|
7037
|
+
</xsl:template>
|
7038
|
+
|
6985
7039
|
<xsl:template name="capitalizeWords">
|
6986
7040
|
<xsl:param name="str"/>
|
6987
7041
|
<xsl:variable name="str2" select="translate($str, '-', ' ')"/>
|
@@ -7615,7 +7669,7 @@
|
|
7615
7669
|
<xsl:template match="*[local-name() = 'figure']" name="figure">
|
7616
7670
|
<xsl:variable name="isAdded" select="@added"/>
|
7617
7671
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
7618
|
-
<fo:block-container id="{@id}">
|
7672
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
7619
7673
|
|
7620
7674
|
<xsl:call-template name="setTrackChangesStyles">
|
7621
7675
|
<xsl:with-param name="isAdded" select="$isAdded"/>
|
@@ -7693,7 +7747,9 @@
|
|
7693
7747
|
|
7694
7748
|
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
|
7695
7749
|
<xsl:if test="number($scale) < 100">
|
7696
|
-
|
7750
|
+
|
7751
|
+
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
7752
|
+
|
7697
7753
|
</xsl:if>
|
7698
7754
|
|
7699
7755
|
</xsl:if>
|
@@ -8601,7 +8657,13 @@
|
|
8601
8657
|
</xsl:template>
|
8602
8658
|
|
8603
8659
|
<xsl:template match="text()" mode="contents_item">
|
8604
|
-
<xsl:
|
8660
|
+
<xsl:variable name="text">
|
8661
|
+
<!-- to split by '_' and other chars -->
|
8662
|
+
<text><xsl:call-template name="add-zero-spaces-java"/></text>
|
8663
|
+
</xsl:variable>
|
8664
|
+
<xsl:for-each select="xalan:nodeset($text)/text/text()">
|
8665
|
+
<xsl:call-template name="keep_together_standard_number"/>
|
8666
|
+
</xsl:for-each>
|
8605
8667
|
</xsl:template>
|
8606
8668
|
|
8607
8669
|
<!-- Note: to enable the addition of character span markup with semantic styling for DIS Word output -->
|
@@ -8612,34 +8674,52 @@
|
|
8612
8674
|
<!-- =============== -->
|
8613
8675
|
<!-- sourcecode -->
|
8614
8676
|
<!-- =============== -->
|
8615
|
-
<xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
8616
8677
|
|
8617
|
-
|
8618
|
-
|
8619
|
-
|
8678
|
+
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'source-highlighter-css']"/>
|
8679
|
+
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
8680
|
+
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
8620
8681
|
|
8621
|
-
|
8682
|
+
<xsl:template match="*[local-name() = 'property']" mode="css">
|
8683
|
+
<xsl:attribute name="{@name}">
|
8684
|
+
<xsl:value-of select="@value"/>
|
8685
|
+
</xsl:attribute>
|
8686
|
+
</xsl:template>
|
8622
8687
|
|
8623
|
-
|
8624
|
-
|
8625
|
-
|
8688
|
+
<xsl:template name="get_sourcecode_attributes">
|
8689
|
+
<xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
|
8690
|
+
<xsl:variable name="_font-size">
|
8626
8691
|
|
8627
|
-
|
8692
|
+
9<!-- inherit -->
|
8628
8693
|
|
8629
|
-
<xsl:
|
8630
|
-
|
8631
|
-
|
8632
|
-
|
8633
|
-
|
8634
|
-
|
8635
|
-
|
8636
|
-
|
8637
|
-
|
8638
|
-
|
8639
|
-
|
8640
|
-
|
8694
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
8695
|
+
<xsl:if test="$current_template = 'standard'">8</xsl:if>
|
8696
|
+
</xsl:if> -->
|
8697
|
+
|
8698
|
+
</xsl:variable>
|
8699
|
+
|
8700
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
8701
|
+
<xsl:if test="$font-size != ''">
|
8702
|
+
<xsl:attribute name="font-size">
|
8703
|
+
<xsl:choose>
|
8704
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
8705
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
8706
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
8707
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
8708
|
+
</xsl:choose>
|
8709
|
+
</xsl:attribute>
|
8710
|
+
</xsl:if>
|
8711
|
+
<xsl:apply-templates select="$sourcecode_css//class[@name = 'sourcecode']" mode="css"/>
|
8712
|
+
</xsl:element>
|
8713
|
+
</xsl:template>
|
8714
|
+
|
8715
|
+
<xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
8716
|
+
|
8717
|
+
<xsl:variable name="sourcecode_attributes">
|
8718
|
+
<xsl:call-template name="get_sourcecode_attributes"/>
|
8641
8719
|
</xsl:variable>
|
8642
8720
|
|
8721
|
+
<!-- <xsl:copy-of select="$sourcecode_css"/> -->
|
8722
|
+
|
8643
8723
|
<xsl:choose>
|
8644
8724
|
<xsl:when test="$isGenerateTableIF = 'true' and (ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])">
|
8645
8725
|
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
|
@@ -8682,6 +8762,12 @@
|
|
8682
8762
|
</xsl:attribute>
|
8683
8763
|
</xsl:for-each>
|
8684
8764
|
|
8765
|
+
<!-- remove margin between rows in the table with sourcecode line numbers -->
|
8766
|
+
<xsl:if test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']">
|
8767
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
8768
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
8769
|
+
</xsl:if>
|
8770
|
+
|
8685
8771
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
8686
8772
|
</fo:block>
|
8687
8773
|
|
@@ -8693,9 +8779,10 @@
|
|
8693
8779
|
</xsl:choose>
|
8694
8780
|
</xsl:template>
|
8695
8781
|
|
8696
|
-
<xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
8782
|
+
<xsl:template match="*[local-name()='sourcecode']/text() | *[local-name()='sourcecode']//*[local-name()='span']/text()" priority="2">
|
8697
8783
|
<xsl:choose>
|
8698
|
-
|
8784
|
+
<!-- disabled -->
|
8785
|
+
<xsl:when test="1 = 2 and normalize-space($syntax-highlight) = 'true' and normalize-space(../@lang) != ''"> <!-- condition for turn on of highlighting -->
|
8699
8786
|
<xsl:variable name="syntax" select="java:org.metanorma.fop.Util.syntaxHighlight(., ../@lang)"/>
|
8700
8787
|
<xsl:choose>
|
8701
8788
|
<xsl:when test="normalize-space($syntax) != ''"><!-- if there is highlighted result -->
|
@@ -8710,8 +8797,76 @@
|
|
8710
8797
|
<xsl:call-template name="add_spaces_to_sourcecode"/>
|
8711
8798
|
</xsl:otherwise>
|
8712
8799
|
</xsl:choose>
|
8800
|
+
</xsl:template>
|
8801
|
+
|
8802
|
+
<!-- add sourcecode highlighting -->
|
8803
|
+
<xsl:template match="*[local-name()='sourcecode']//*[local-name()='span'][@class]" priority="2">
|
8804
|
+
<xsl:variable name="class" select="@class"/>
|
8805
|
+
<xsl:choose>
|
8806
|
+
<xsl:when test="$sourcecode_css//class[@name = $class]">
|
8807
|
+
<fo:inline>
|
8808
|
+
<xsl:apply-templates select="$sourcecode_css//class[@name = $class]" mode="css"/>
|
8809
|
+
<xsl:apply-templates/>
|
8810
|
+
</fo:inline>
|
8811
|
+
</xsl:when>
|
8812
|
+
<xsl:otherwise>
|
8813
|
+
<xsl:apply-templates/>
|
8814
|
+
</xsl:otherwise>
|
8815
|
+
</xsl:choose>
|
8816
|
+
</xsl:template>
|
8817
|
+
|
8818
|
+
<!-- outer table with line numbers for sourcecode -->
|
8819
|
+
<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] | -->
|
8820
|
+
<fo:block>
|
8821
|
+
<fo:table width="100%" table-layout="fixed">
|
8822
|
+
<xsl:copy-of select="@id"/>
|
8823
|
+
<fo:table-column column-width="8%"/>
|
8824
|
+
<fo:table-column column-width="92%"/>
|
8825
|
+
<fo:table-body>
|
8826
|
+
<xsl:apply-templates/>
|
8827
|
+
</fo:table-body>
|
8828
|
+
</fo:table>
|
8829
|
+
</fo:block>
|
8830
|
+
</xsl:template>
|
8831
|
+
<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']/*[local-name() = 'tbody']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody'] | -->
|
8832
|
+
<xsl:apply-templates/>
|
8833
|
+
</xsl:template>
|
8834
|
+
<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr'] | -->
|
8835
|
+
<fo:table-row>
|
8836
|
+
<xsl:apply-templates/>
|
8837
|
+
</fo:table-row>
|
8838
|
+
</xsl:template>
|
8839
|
+
<!-- first td with line numbers -->
|
8840
|
+
<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']/*[local-name()='td'][not(preceding-sibling::*)]" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
|
8841
|
+
<fo:table-cell>
|
8842
|
+
<fo:block>
|
8843
|
+
|
8844
|
+
<!-- set attibutes for line numbers - same as sourcecode -->
|
8845
|
+
<xsl:variable name="sourcecode_attributes">
|
8846
|
+
<xsl:for-each select="following-sibling::*[local-name() = 'td']/*[local-name() = 'sourcecode']">
|
8847
|
+
<xsl:call-template name="get_sourcecode_attributes"/>
|
8848
|
+
</xsl:for-each>
|
8849
|
+
</xsl:variable>
|
8850
|
+
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*[not(starts-with(local-name(), 'margin-') or starts-with(local-name(), 'space-'))]">
|
8851
|
+
<xsl:attribute name="{local-name()}">
|
8852
|
+
<xsl:value-of select="."/>
|
8853
|
+
</xsl:attribute>
|
8854
|
+
</xsl:for-each>
|
8855
|
+
|
8856
|
+
<xsl:apply-templates/>
|
8857
|
+
</fo:block>
|
8858
|
+
</fo:table-cell>
|
8859
|
+
</xsl:template>
|
8713
8860
|
|
8861
|
+
<!-- second td with sourcecode -->
|
8862
|
+
<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']/*[local-name()='td'][preceding-sibling::*]" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
|
8863
|
+
<fo:table-cell>
|
8864
|
+
<fo:block>
|
8865
|
+
<xsl:apply-templates/>
|
8866
|
+
</fo:block>
|
8867
|
+
</fo:table-cell>
|
8714
8868
|
</xsl:template>
|
8869
|
+
<!-- END outer table with line numbers for sourcecode -->
|
8715
8870
|
|
8716
8871
|
<xsl:template name="add_spaces_to_sourcecode">
|
8717
8872
|
<xsl:variable name="text_step1">
|
@@ -8942,7 +9097,25 @@
|
|
8942
9097
|
<xsl:template match="*[local-name()='pre']" name="pre">
|
8943
9098
|
<fo:block xsl:use-attribute-sets="pre-style">
|
8944
9099
|
<xsl:copy-of select="@id"/>
|
8945
|
-
<xsl:
|
9100
|
+
<xsl:choose>
|
9101
|
+
|
9102
|
+
<xsl:when test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name()='td'][1][not(preceding-sibling::*)]"> <!-- pre in the first td in the table with @linenums = 'true' -->
|
9103
|
+
<xsl:if test="ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']"> <!-- is current tr isn't last -->
|
9104
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
9105
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
9106
|
+
</xsl:if>
|
9107
|
+
<fo:instream-foreign-object fox:alt-text="{.}" content-width="95%">
|
9108
|
+
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
9109
|
+
<mtext><xsl:value-of select="."/></mtext>
|
9110
|
+
</math>
|
9111
|
+
</fo:instream-foreign-object>
|
9112
|
+
</xsl:when>
|
9113
|
+
|
9114
|
+
<xsl:otherwise>
|
9115
|
+
<xsl:apply-templates/>
|
9116
|
+
</xsl:otherwise>
|
9117
|
+
|
9118
|
+
</xsl:choose>
|
8946
9119
|
</fo:block>
|
8947
9120
|
</xsl:template>
|
8948
9121
|
<!-- =============== -->
|
@@ -10399,17 +10572,17 @@
|
|
10399
10572
|
<fo:block>
|
10400
10573
|
<fo:inline>
|
10401
10574
|
|
10402
|
-
|
10403
|
-
|
10404
|
-
|
10405
|
-
</xsl:if>
|
10406
|
-
|
10575
|
+
<xsl:apply-templates select="*[local-name() = 'biblio-tag']">
|
10576
|
+
<xsl:with-param name="biblio_tag_part">first</xsl:with-param>
|
10577
|
+
</xsl:apply-templates>
|
10407
10578
|
</fo:inline>
|
10408
10579
|
</fo:block>
|
10409
10580
|
</fo:list-item-label>
|
10410
10581
|
<fo:list-item-body start-indent="body-start()">
|
10411
10582
|
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style">
|
10412
|
-
<xsl:call-template name="processBibitem"
|
10583
|
+
<xsl:call-template name="processBibitem">
|
10584
|
+
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
10585
|
+
</xsl:call-template>
|
10413
10586
|
</fo:block>
|
10414
10587
|
</fo:list-item-body>
|
10415
10588
|
</fo:list-item>
|
@@ -10418,178 +10591,51 @@
|
|
10418
10591
|
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
|
10419
10592
|
|
10420
10593
|
<xsl:template name="processBibitem">
|
10594
|
+
<xsl:param name="biblio_tag_part">both</xsl:param>
|
10421
10595
|
|
10422
10596
|
<!-- start bibitem processing -->
|
10423
10597
|
<xsl:if test=".//*[local-name() = 'fn']">
|
10424
10598
|
<xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
|
10425
10599
|
</xsl:if>
|
10426
10600
|
|
10427
|
-
|
10428
|
-
|
10429
|
-
|
10430
|
-
<xsl:when test="*[local-name() = 'docidentifier']/@type = 'metanorma'"/>
|
10431
|
-
<xsl:otherwise><xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma-ordinal')]"/></xsl:otherwise>
|
10432
|
-
</xsl:choose>
|
10433
|
-
</xsl:variable>
|
10434
|
-
<xsl:value-of select="$docidentifier"/>
|
10435
|
-
|
10436
|
-
<xsl:apply-templates select="*[local-name() = 'note']"/>
|
10437
|
-
|
10438
|
-
<xsl:if test="normalize-space($docidentifier) != '' and *[local-name() = 'formattedref']">
|
10439
|
-
<xsl:text>,</xsl:text>
|
10440
|
-
<xsl:text> </xsl:text>
|
10441
|
-
</xsl:if>
|
10442
|
-
|
10601
|
+
<xsl:apply-templates select="*[local-name() = 'biblio-tag']">
|
10602
|
+
<xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
|
10603
|
+
</xsl:apply-templates>
|
10443
10604
|
<xsl:apply-templates select="*[local-name() = 'formattedref']"/>
|
10444
10605
|
<!-- end bibitem processing -->
|
10445
10606
|
|
10446
10607
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
10447
10608
|
|
10448
|
-
<xsl:template name="
|
10449
|
-
<xsl:
|
10450
|
-
|
10451
|
-
|
10452
|
-
|
10453
|
-
|
10454
|
-
|
10455
|
-
|
10456
|
-
|
10457
|
-
|
10458
|
-
|
10459
|
-
|
10460
|
-
<xsl:if test="$type != ''">
|
10461
|
-
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
10462
|
-
</xsl:if> -->
|
10463
|
-
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma') and not(@type = 'metanorma-ordinal')]"/>
|
10464
|
-
</xsl:otherwise>
|
10465
|
-
</xsl:choose>
|
10466
|
-
</xsl:template> <!-- processBibitemDocId -->
|
10609
|
+
<xsl:template match="*[local-name() = 'title']" mode="title">
|
10610
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
10611
|
+
</xsl:template>
|
10612
|
+
|
10613
|
+
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/>
|
10614
|
+
|
10615
|
+
<xsl:template match="*[local-name() = 'formattedref']">
|
10616
|
+
<!-- <xsl:if test="$namespace = 'unece' or $namespace = 'unece-rec'">
|
10617
|
+
<xsl:text>, </xsl:text>
|
10618
|
+
</xsl:if> -->
|
10619
|
+
<xsl:apply-templates/>
|
10620
|
+
</xsl:template>
|
10467
10621
|
|
10468
|
-
<xsl:template name="
|
10622
|
+
<xsl:template match="*[local-name() = 'biblio-tag']">
|
10623
|
+
<xsl:param name="biblio_tag_part">both</xsl:param>
|
10469
10624
|
<xsl:choose>
|
10470
|
-
<xsl:when test="
|
10471
|
-
<
|
10472
|
-
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
10473
|
-
</author>
|
10625
|
+
<xsl:when test="$biblio_tag_part = 'first' and *[local-name() = 'tab']">
|
10626
|
+
<xsl:apply-templates select="./*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
10474
10627
|
</xsl:when>
|
10475
|
-
<xsl:when test="
|
10476
|
-
<
|
10477
|
-
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
10478
|
-
<xsl:text> </xsl:text>
|
10479
|
-
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
10480
|
-
</author>
|
10481
|
-
</xsl:when>
|
10482
|
-
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
10483
|
-
<author>
|
10484
|
-
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
10485
|
-
<xsl:text> </xsl:text>
|
10486
|
-
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
10487
|
-
</author>
|
10628
|
+
<xsl:when test="$biblio_tag_part = 'last'">
|
10629
|
+
<xsl:apply-templates select="./*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
10488
10630
|
</xsl:when>
|
10489
10631
|
<xsl:otherwise>
|
10490
10632
|
<xsl:apply-templates/>
|
10491
10633
|
</xsl:otherwise>
|
10492
10634
|
</xsl:choose>
|
10493
|
-
</xsl:template> <!-- processPersonalAuthor -->
|
10494
|
-
|
10495
|
-
<xsl:template name="renderDate">
|
10496
|
-
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
10497
|
-
<xsl:value-of select="*[local-name() = 'on']"/>
|
10498
|
-
</xsl:if>
|
10499
|
-
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
10500
|
-
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
10501
|
-
</xsl:if>
|
10502
|
-
</xsl:template>
|
10503
|
-
|
10504
|
-
<xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
10505
|
-
<xsl:value-of select="translate(.,'. ','')"/>
|
10506
10635
|
</xsl:template>
|
10507
10636
|
|
10508
|
-
<xsl:template match="*[local-name() = '
|
10509
|
-
<xsl:
|
10510
|
-
</xsl:template>
|
10511
|
-
|
10512
|
-
<xsl:template match="*[local-name() = 'title']" mode="title">
|
10513
|
-
<fo:inline><xsl:apply-templates/></fo:inline>
|
10514
|
-
</xsl:template>
|
10515
|
-
|
10516
|
-
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'title']" priority="2">
|
10517
|
-
<!-- <fo:inline><xsl:apply-templates /></fo:inline> -->
|
10518
|
-
<fo:inline font-style="italic"> <!-- BIPM BSI CSD CSA GB IEC IHO ISO ITU JCGM -->
|
10519
|
-
<xsl:apply-templates/>
|
10520
|
-
</fo:inline>
|
10521
|
-
</xsl:template>
|
10522
|
-
|
10523
|
-
<!-- bibitem/note renders as footnote -->
|
10524
|
-
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" priority="2">
|
10525
|
-
|
10526
|
-
<!-- list of footnotes to calculate actual footnotes number -->
|
10527
|
-
<xsl:variable name="p_fn_">
|
10528
|
-
<xsl:call-template name="get_fn_list"/>
|
10529
|
-
</xsl:variable>
|
10530
|
-
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
10531
|
-
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
10532
|
-
<xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
10533
|
-
<!-- fn sequence number in document -->
|
10534
|
-
<xsl:variable name="current_fn_number">
|
10535
|
-
<xsl:choose>
|
10536
|
-
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
10537
|
-
<xsl:otherwise>
|
10538
|
-
<!-- <xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1" /> -->
|
10539
|
-
<xsl:value-of select="count($p_fn//fn[@gen_id = $gen_id]/preceding-sibling::fn) + 1"/>
|
10540
|
-
</xsl:otherwise>
|
10541
|
-
</xsl:choose>
|
10542
|
-
</xsl:variable>
|
10543
|
-
<fo:footnote>
|
10544
|
-
<xsl:variable name="number">
|
10545
|
-
|
10546
|
-
<xsl:value-of select="$current_fn_number"/>
|
10547
|
-
|
10548
|
-
</xsl:variable>
|
10549
|
-
|
10550
|
-
<xsl:variable name="current_fn_number_text">
|
10551
|
-
<xsl:value-of select="$number"/>
|
10552
|
-
|
10553
|
-
<xsl:text>)</xsl:text>
|
10554
|
-
|
10555
|
-
</xsl:variable>
|
10556
|
-
|
10557
|
-
<fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
|
10558
|
-
<fo:basic-link internal-destination="{$gen_id}" fox:alt-text="footnote {$number}">
|
10559
|
-
<xsl:value-of select="$current_fn_number_text"/>
|
10560
|
-
</fo:basic-link>
|
10561
|
-
</fo:inline>
|
10562
|
-
<fo:footnote-body>
|
10563
|
-
<fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
|
10564
|
-
<fo:inline id="{$gen_id}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
|
10565
|
-
<xsl:value-of select="$current_fn_number_text"/>
|
10566
|
-
</fo:inline>
|
10567
|
-
<xsl:apply-templates/>
|
10568
|
-
</fo:block>
|
10569
|
-
</fo:footnote-body>
|
10570
|
-
</fo:footnote>
|
10571
|
-
</xsl:template>
|
10572
|
-
|
10573
|
-
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'edition']"> <!-- for iho -->
|
10574
|
-
<xsl:text> edition </xsl:text>
|
10575
|
-
<xsl:value-of select="."/>
|
10576
|
-
</xsl:template>
|
10577
|
-
|
10578
|
-
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'uri']"> <!-- for iho -->
|
10579
|
-
<xsl:text> (</xsl:text>
|
10580
|
-
<fo:inline xsl:use-attribute-sets="link-style">
|
10581
|
-
<fo:basic-link external-destination="." fox:alt-text=".">
|
10582
|
-
<xsl:value-of select="."/>
|
10583
|
-
</fo:basic-link>
|
10584
|
-
</fo:inline>
|
10585
|
-
<xsl:text>)</xsl:text>
|
10586
|
-
</xsl:template>
|
10587
|
-
|
10588
|
-
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/>
|
10589
|
-
|
10590
|
-
<xsl:template match="*[local-name() = 'formattedref']">
|
10591
|
-
|
10592
|
-
<xsl:apply-templates/>
|
10637
|
+
<xsl:template match="*[local-name() = 'biblio-tag']/*[local-name() = 'tab']" priority="2">
|
10638
|
+
<xsl:text> </xsl:text>
|
10593
10639
|
</xsl:template>
|
10594
10640
|
|
10595
10641
|
<!-- ======================= -->
|
@@ -11022,6 +11068,12 @@
|
|
11022
11068
|
<xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
|
11023
11069
|
<xsl:apply-templates mode="update_xml_step1"/>
|
11024
11070
|
</xsl:template>
|
11071
|
+
<xsl:template match="*[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
|
11072
|
+
<xsl:copy>
|
11073
|
+
<xsl:copy-of select="@*"/>
|
11074
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
11075
|
+
</xsl:copy>
|
11076
|
+
</xsl:template>
|
11025
11077
|
<!-- =========================================================================== -->
|
11026
11078
|
<!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
|
11027
11079
|
<!-- =========================================================================== -->
|
@@ -11095,17 +11147,17 @@
|
|
11095
11147
|
</xsl:template>
|
11096
11148
|
|
11097
11149
|
<!-- add @reference for bibitem/note, similar to fn/reference -->
|
11098
|
-
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" mode="update_xml_step2">
|
11150
|
+
<!-- <xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" mode="update_xml_step2">
|
11099
11151
|
<xsl:copy>
|
11100
11152
|
<xsl:apply-templates select="@*" mode="update_xml_step2"/>
|
11101
|
-
|
11153
|
+
|
11102
11154
|
<xsl:attribute name="reference">
|
11103
11155
|
<xsl:value-of select="concat('bibitem_', ../@id, '_', count(preceding-sibling::*[local-name() = 'note']))"/>
|
11104
11156
|
</xsl:attribute>
|
11105
|
-
|
11157
|
+
|
11106
11158
|
<xsl:apply-templates select="node()" mode="update_xml_step2"/>
|
11107
11159
|
</xsl:copy>
|
11108
|
-
</xsl:template>
|
11160
|
+
</xsl:template> -->
|
11109
11161
|
|
11110
11162
|
<!-- enclose sequence of 'char x' + 'combining char y' to <lang_none>xy</lang_none> -->
|
11111
11163
|
<xsl:variable name="regex_combining_chars">(.[̀-ͯ])</xsl:variable>
|
@@ -11610,6 +11662,10 @@
|
|
11610
11662
|
<xsl:call-template name="getLang"/><xsl:value-of select="//*[local-name() = 'p'][1]/@id"/>
|
11611
11663
|
</xsl:template>
|
11612
11664
|
|
11665
|
+
<xsl:template name="getDocumentId_fromCurrentNode">
|
11666
|
+
<xsl:call-template name="getLang_fromCurrentNode"/><xsl:value-of select=".//*[local-name() = 'p'][1]/@id"/>
|
11667
|
+
</xsl:template>
|
11668
|
+
|
11613
11669
|
<xsl:template name="namespaceCheck">
|
11614
11670
|
<xsl:variable name="documentNS" select="namespace-uri(/*)"/>
|
11615
11671
|
<xsl:variable name="XSLNS">
|