metanorma-iso 2.3.0 → 2.3.1
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/init.rb +12 -1
- data/lib/isodoc/iso/iso.amendment.xsl +245 -215
- data/lib/isodoc/iso/iso.international-standard.xsl +245 -215
- data/lib/isodoc/iso/word_cleanup.rb +4 -0
- data/lib/isodoc/iso/word_dis_cleanup.rb +4 -0
- 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 +1 -0
- metadata +2 -2
@@ -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
|
|
@@ -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>
|
@@ -5073,7 +5098,10 @@
|
|
5073
5098
|
</xsl:for-each>
|
5074
5099
|
<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
5100
|
<xsl:sort select="@displayorder" data-type="number"/>
|
5076
|
-
|
5101
|
+
<!-- commented:
|
5102
|
+
.//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
|
5103
|
+
because 'fn' there is in biblio-tag -->
|
5104
|
+
<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
5105
|
<!-- copy unique fn -->
|
5078
5106
|
<fn gen_id="{generate-id(.)}">
|
5079
5107
|
<xsl:copy-of select="@*"/>
|
@@ -5945,7 +5973,7 @@
|
|
5945
5973
|
|
5946
5974
|
<xsl:variable name="_font-size">
|
5947
5975
|
|
5948
|
-
|
5976
|
+
9 <!-- inherit -->
|
5949
5977
|
|
5950
5978
|
</xsl:variable>
|
5951
5979
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -6982,6 +7010,33 @@
|
|
6982
7010
|
</xsl:choose>
|
6983
7011
|
</xsl:template>
|
6984
7012
|
|
7013
|
+
<xsl:template name="getLang_fromCurrentNode">
|
7014
|
+
<xsl:variable name="language_current" select="normalize-space(.//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
7015
|
+
<xsl:variable name="language">
|
7016
|
+
<xsl:choose>
|
7017
|
+
<xsl:when test="$language_current != ''">
|
7018
|
+
<xsl:value-of select="$language_current"/>
|
7019
|
+
</xsl:when>
|
7020
|
+
<xsl:otherwise>
|
7021
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
7022
|
+
<xsl:choose>
|
7023
|
+
<xsl:when test="$language_current_2 != ''">
|
7024
|
+
<xsl:value-of select="$language_current_2"/>
|
7025
|
+
</xsl:when>
|
7026
|
+
<xsl:otherwise>
|
7027
|
+
<xsl:value-of select=".//*[local-name()='bibdata']//*[local-name()='language']"/>
|
7028
|
+
</xsl:otherwise>
|
7029
|
+
</xsl:choose>
|
7030
|
+
</xsl:otherwise>
|
7031
|
+
</xsl:choose>
|
7032
|
+
</xsl:variable>
|
7033
|
+
|
7034
|
+
<xsl:choose>
|
7035
|
+
<xsl:when test="$language = 'English'">en</xsl:when>
|
7036
|
+
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
7037
|
+
</xsl:choose>
|
7038
|
+
</xsl:template>
|
7039
|
+
|
6985
7040
|
<xsl:template name="capitalizeWords">
|
6986
7041
|
<xsl:param name="str"/>
|
6987
7042
|
<xsl:variable name="str2" select="translate($str, '-', ' ')"/>
|
@@ -7615,7 +7670,7 @@
|
|
7615
7670
|
<xsl:template match="*[local-name() = 'figure']" name="figure">
|
7616
7671
|
<xsl:variable name="isAdded" select="@added"/>
|
7617
7672
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
7618
|
-
<fo:block-container id="{@id}">
|
7673
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
7619
7674
|
|
7620
7675
|
<xsl:call-template name="setTrackChangesStyles">
|
7621
7676
|
<xsl:with-param name="isAdded" select="$isAdded"/>
|
@@ -8601,7 +8656,13 @@
|
|
8601
8656
|
</xsl:template>
|
8602
8657
|
|
8603
8658
|
<xsl:template match="text()" mode="contents_item">
|
8604
|
-
<xsl:
|
8659
|
+
<xsl:variable name="text">
|
8660
|
+
<!-- to split by '_' and other chars -->
|
8661
|
+
<text><xsl:call-template name="add-zero-spaces-java"/></text>
|
8662
|
+
</xsl:variable>
|
8663
|
+
<xsl:for-each select="xalan:nodeset($text)/text/text()">
|
8664
|
+
<xsl:call-template name="keep_together_standard_number"/>
|
8665
|
+
</xsl:for-each>
|
8605
8666
|
</xsl:template>
|
8606
8667
|
|
8607
8668
|
<!-- Note: to enable the addition of character span markup with semantic styling for DIS Word output -->
|
@@ -8612,34 +8673,52 @@
|
|
8612
8673
|
<!-- =============== -->
|
8613
8674
|
<!-- sourcecode -->
|
8614
8675
|
<!-- =============== -->
|
8615
|
-
<xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
8616
8676
|
|
8617
|
-
|
8618
|
-
|
8619
|
-
|
8677
|
+
<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'source-highlighter-css']"/>
|
8678
|
+
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
8679
|
+
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
8620
8680
|
|
8621
|
-
|
8681
|
+
<xsl:template match="*[local-name() = 'property']" mode="css">
|
8682
|
+
<xsl:attribute name="{@name}">
|
8683
|
+
<xsl:value-of select="@value"/>
|
8684
|
+
</xsl:attribute>
|
8685
|
+
</xsl:template>
|
8622
8686
|
|
8623
|
-
|
8624
|
-
|
8625
|
-
|
8687
|
+
<xsl:template name="get_sourcecode_attributes">
|
8688
|
+
<xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
|
8689
|
+
<xsl:variable name="_font-size">
|
8626
8690
|
|
8627
|
-
|
8691
|
+
9<!-- inherit -->
|
8628
8692
|
|
8629
|
-
<xsl:
|
8630
|
-
|
8631
|
-
|
8632
|
-
|
8633
|
-
|
8634
|
-
|
8635
|
-
|
8636
|
-
|
8637
|
-
|
8638
|
-
|
8639
|
-
|
8640
|
-
|
8693
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
8694
|
+
<xsl:if test="$current_template = 'standard'">8</xsl:if>
|
8695
|
+
</xsl:if> -->
|
8696
|
+
|
8697
|
+
</xsl:variable>
|
8698
|
+
|
8699
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
8700
|
+
<xsl:if test="$font-size != ''">
|
8701
|
+
<xsl:attribute name="font-size">
|
8702
|
+
<xsl:choose>
|
8703
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
8704
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
8705
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
8706
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
8707
|
+
</xsl:choose>
|
8708
|
+
</xsl:attribute>
|
8709
|
+
</xsl:if>
|
8710
|
+
<xsl:apply-templates select="$sourcecode_css//class[@name = 'sourcecode']" mode="css"/>
|
8711
|
+
</xsl:element>
|
8712
|
+
</xsl:template>
|
8713
|
+
|
8714
|
+
<xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
8715
|
+
|
8716
|
+
<xsl:variable name="sourcecode_attributes">
|
8717
|
+
<xsl:call-template name="get_sourcecode_attributes"/>
|
8641
8718
|
</xsl:variable>
|
8642
8719
|
|
8720
|
+
<!-- <xsl:copy-of select="$sourcecode_css"/> -->
|
8721
|
+
|
8643
8722
|
<xsl:choose>
|
8644
8723
|
<xsl:when test="$isGenerateTableIF = 'true' and (ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])">
|
8645
8724
|
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
|
@@ -8693,9 +8772,10 @@
|
|
8693
8772
|
</xsl:choose>
|
8694
8773
|
</xsl:template>
|
8695
8774
|
|
8696
|
-
<xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
8775
|
+
<xsl:template match="*[local-name()='sourcecode']/text() | *[local-name()='sourcecode']//*[local-name()='span']/text()" priority="2">
|
8697
8776
|
<xsl:choose>
|
8698
|
-
|
8777
|
+
<!-- disabled -->
|
8778
|
+
<xsl:when test="1 = 2 and normalize-space($syntax-highlight) = 'true' and normalize-space(../@lang) != ''"> <!-- condition for turn on of highlighting -->
|
8699
8779
|
<xsl:variable name="syntax" select="java:org.metanorma.fop.Util.syntaxHighlight(., ../@lang)"/>
|
8700
8780
|
<xsl:choose>
|
8701
8781
|
<xsl:when test="normalize-space($syntax) != ''"><!-- if there is highlighted result -->
|
@@ -8710,8 +8790,75 @@
|
|
8710
8790
|
<xsl:call-template name="add_spaces_to_sourcecode"/>
|
8711
8791
|
</xsl:otherwise>
|
8712
8792
|
</xsl:choose>
|
8793
|
+
</xsl:template>
|
8794
|
+
|
8795
|
+
<!-- add sourcecode highlighting -->
|
8796
|
+
<xsl:template match="*[local-name()='sourcecode']//*[local-name()='span'][@class]" priority="2">
|
8797
|
+
<xsl:variable name="class" select="@class"/>
|
8798
|
+
<xsl:choose>
|
8799
|
+
<xsl:when test="$sourcecode_css//class[@name = $class]">
|
8800
|
+
<fo:inline>
|
8801
|
+
<xsl:apply-templates select="$sourcecode_css//class[@name = $class]" mode="css"/>
|
8802
|
+
<xsl:apply-templates/>
|
8803
|
+
</fo:inline>
|
8804
|
+
</xsl:when>
|
8805
|
+
<xsl:otherwise>
|
8806
|
+
<xsl:apply-templates/>
|
8807
|
+
</xsl:otherwise>
|
8808
|
+
</xsl:choose>
|
8809
|
+
</xsl:template>
|
8713
8810
|
|
8811
|
+
<!-- outer table with line numbers for sourcecode -->
|
8812
|
+
<xsl:template match="*[local-name()='table'][@type = 'sourcecode']" priority="2">
|
8813
|
+
<fo:block>
|
8814
|
+
<fo:table width="100%" table-layout="fixed">
|
8815
|
+
<xsl:copy-of select="@id"/>
|
8816
|
+
<fo:table-column column-width="8%"/>
|
8817
|
+
<fo:table-column column-width="92%"/>
|
8818
|
+
<fo:table-body>
|
8819
|
+
<xsl:apply-templates/>
|
8820
|
+
</fo:table-body>
|
8821
|
+
</fo:table>
|
8822
|
+
</fo:block>
|
8823
|
+
</xsl:template>
|
8824
|
+
<xsl:template match="*[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody']" priority="2">
|
8825
|
+
<xsl:apply-templates/>
|
8826
|
+
</xsl:template>
|
8827
|
+
<xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']" priority="2">
|
8828
|
+
<fo:table-row>
|
8829
|
+
<xsl:apply-templates/>
|
8830
|
+
</fo:table-row>
|
8831
|
+
</xsl:template>
|
8832
|
+
<!-- first td with line numbers -->
|
8833
|
+
<xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']/*[local-name()='td'][not(preceding-sibling::*)]" priority="2">
|
8834
|
+
<fo:table-cell>
|
8835
|
+
<fo:block>
|
8836
|
+
|
8837
|
+
<!-- set attibutes for line numbers - same as sourcecode -->
|
8838
|
+
<xsl:variable name="sourcecode_attributes">
|
8839
|
+
<xsl:for-each select="following-sibling::*[local-name() = 'td']/*[local-name() = 'sourcecode']">
|
8840
|
+
<xsl:call-template name="get_sourcecode_attributes"/>
|
8841
|
+
</xsl:for-each>
|
8842
|
+
</xsl:variable>
|
8843
|
+
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*[not(starts-with(local-name(), 'margin-') or starts-with(local-name(), 'space-'))]">
|
8844
|
+
<xsl:attribute name="{local-name()}">
|
8845
|
+
<xsl:value-of select="."/>
|
8846
|
+
</xsl:attribute>
|
8847
|
+
</xsl:for-each>
|
8848
|
+
|
8849
|
+
<xsl:apply-templates/>
|
8850
|
+
</fo:block>
|
8851
|
+
</fo:table-cell>
|
8852
|
+
</xsl:template>
|
8853
|
+
<!-- second td with sourcecode -->
|
8854
|
+
<xsl:template match="*[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr']/*[local-name()='td'][preceding-sibling::*]" priority="2">
|
8855
|
+
<fo:table-cell>
|
8856
|
+
<fo:block>
|
8857
|
+
<xsl:apply-templates/>
|
8858
|
+
</fo:block>
|
8859
|
+
</fo:table-cell>
|
8714
8860
|
</xsl:template>
|
8861
|
+
<!-- END outer table with line numbers for sourcecode -->
|
8715
8862
|
|
8716
8863
|
<xsl:template name="add_spaces_to_sourcecode">
|
8717
8864
|
<xsl:variable name="text_step1">
|
@@ -10399,17 +10546,17 @@
|
|
10399
10546
|
<fo:block>
|
10400
10547
|
<fo:inline>
|
10401
10548
|
|
10402
|
-
|
10403
|
-
|
10404
|
-
|
10405
|
-
</xsl:if>
|
10406
|
-
|
10549
|
+
<xsl:apply-templates select="*[local-name() = 'biblio-tag']">
|
10550
|
+
<xsl:with-param name="biblio_tag_part">first</xsl:with-param>
|
10551
|
+
</xsl:apply-templates>
|
10407
10552
|
</fo:inline>
|
10408
10553
|
</fo:block>
|
10409
10554
|
</fo:list-item-label>
|
10410
10555
|
<fo:list-item-body start-indent="body-start()">
|
10411
10556
|
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style">
|
10412
|
-
<xsl:call-template name="processBibitem"
|
10557
|
+
<xsl:call-template name="processBibitem">
|
10558
|
+
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
10559
|
+
</xsl:call-template>
|
10413
10560
|
</fo:block>
|
10414
10561
|
</fo:list-item-body>
|
10415
10562
|
</fo:list-item>
|
@@ -10418,178 +10565,51 @@
|
|
10418
10565
|
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
|
10419
10566
|
|
10420
10567
|
<xsl:template name="processBibitem">
|
10568
|
+
<xsl:param name="biblio_tag_part">both</xsl:param>
|
10421
10569
|
|
10422
10570
|
<!-- start bibitem processing -->
|
10423
10571
|
<xsl:if test=".//*[local-name() = 'fn']">
|
10424
10572
|
<xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
|
10425
10573
|
</xsl:if>
|
10426
10574
|
|
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
|
-
|
10575
|
+
<xsl:apply-templates select="*[local-name() = 'biblio-tag']">
|
10576
|
+
<xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
|
10577
|
+
</xsl:apply-templates>
|
10443
10578
|
<xsl:apply-templates select="*[local-name() = 'formattedref']"/>
|
10444
10579
|
<!-- end bibitem processing -->
|
10445
10580
|
|
10446
10581
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
10447
10582
|
|
10448
|
-
<xsl:template name="
|
10449
|
-
<xsl:
|
10450
|
-
|
10451
|
-
|
10452
|
-
|
10453
|
-
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
10454
|
-
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
10455
|
-
</xsl:if> -->
|
10456
|
-
<xsl:value-of select="$_doc_ident"/>
|
10457
|
-
</xsl:when>
|
10458
|
-
<xsl:otherwise>
|
10459
|
-
<!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
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 -->
|
10583
|
+
<xsl:template match="*[local-name() = 'title']" mode="title">
|
10584
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
10585
|
+
</xsl:template>
|
10586
|
+
|
10587
|
+
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/>
|
10467
10588
|
|
10468
|
-
<xsl:template name="
|
10589
|
+
<xsl:template match="*[local-name() = 'formattedref']">
|
10590
|
+
<!-- <xsl:if test="$namespace = 'unece' or $namespace = 'unece-rec'">
|
10591
|
+
<xsl:text>, </xsl:text>
|
10592
|
+
</xsl:if> -->
|
10593
|
+
<xsl:apply-templates/>
|
10594
|
+
</xsl:template>
|
10595
|
+
|
10596
|
+
<xsl:template match="*[local-name() = 'biblio-tag']">
|
10597
|
+
<xsl:param name="biblio_tag_part">both</xsl:param>
|
10469
10598
|
<xsl:choose>
|
10470
|
-
<xsl:when test="
|
10471
|
-
<
|
10472
|
-
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
10473
|
-
</author>
|
10474
|
-
</xsl:when>
|
10475
|
-
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
|
10476
|
-
<author>
|
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>
|
10599
|
+
<xsl:when test="$biblio_tag_part = 'first' and *[local-name() = 'tab']">
|
10600
|
+
<xsl:apply-templates select="./*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
10481
10601
|
</xsl:when>
|
10482
|
-
<xsl:when test="
|
10483
|
-
<
|
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>
|
10602
|
+
<xsl:when test="$biblio_tag_part = 'last'">
|
10603
|
+
<xsl:apply-templates select="./*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
10488
10604
|
</xsl:when>
|
10489
10605
|
<xsl:otherwise>
|
10490
10606
|
<xsl:apply-templates/>
|
10491
10607
|
</xsl:otherwise>
|
10492
10608
|
</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
|
-
</xsl:template>
|
10507
|
-
|
10508
|
-
<xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
10509
|
-
<xsl:value-of select="substring(.,1,1)"/>
|
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
10609
|
</xsl:template>
|
10577
10610
|
|
10578
|
-
<xsl:template match="*[local-name() = '
|
10579
|
-
<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/>
|
10611
|
+
<xsl:template match="*[local-name() = 'biblio-tag']/*[local-name() = 'tab']" priority="2">
|
10612
|
+
<xsl:text> </xsl:text>
|
10593
10613
|
</xsl:template>
|
10594
10614
|
|
10595
10615
|
<!-- ======================= -->
|
@@ -11022,6 +11042,12 @@
|
|
11022
11042
|
<xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
|
11023
11043
|
<xsl:apply-templates mode="update_xml_step1"/>
|
11024
11044
|
</xsl:template>
|
11045
|
+
<xsl:template match="*[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
|
11046
|
+
<xsl:copy>
|
11047
|
+
<xsl:copy-of select="@*"/>
|
11048
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
11049
|
+
</xsl:copy>
|
11050
|
+
</xsl:template>
|
11025
11051
|
<!-- =========================================================================== -->
|
11026
11052
|
<!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
|
11027
11053
|
<!-- =========================================================================== -->
|
@@ -11095,17 +11121,17 @@
|
|
11095
11121
|
</xsl:template>
|
11096
11122
|
|
11097
11123
|
<!-- add @reference for bibitem/note, similar to fn/reference -->
|
11098
|
-
<xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" mode="update_xml_step2">
|
11124
|
+
<!-- <xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" mode="update_xml_step2">
|
11099
11125
|
<xsl:copy>
|
11100
11126
|
<xsl:apply-templates select="@*" mode="update_xml_step2"/>
|
11101
|
-
|
11127
|
+
|
11102
11128
|
<xsl:attribute name="reference">
|
11103
11129
|
<xsl:value-of select="concat('bibitem_', ../@id, '_', count(preceding-sibling::*[local-name() = 'note']))"/>
|
11104
11130
|
</xsl:attribute>
|
11105
|
-
|
11131
|
+
|
11106
11132
|
<xsl:apply-templates select="node()" mode="update_xml_step2"/>
|
11107
11133
|
</xsl:copy>
|
11108
|
-
</xsl:template>
|
11134
|
+
</xsl:template> -->
|
11109
11135
|
|
11110
11136
|
<!-- enclose sequence of 'char x' + 'combining char y' to <lang_none>xy</lang_none> -->
|
11111
11137
|
<xsl:variable name="regex_combining_chars">(.[̀-ͯ])</xsl:variable>
|
@@ -11610,6 +11636,10 @@
|
|
11610
11636
|
<xsl:call-template name="getLang"/><xsl:value-of select="//*[local-name() = 'p'][1]/@id"/>
|
11611
11637
|
</xsl:template>
|
11612
11638
|
|
11639
|
+
<xsl:template name="getDocumentId_fromCurrentNode">
|
11640
|
+
<xsl:call-template name="getLang_fromCurrentNode"/><xsl:value-of select=".//*[local-name() = 'p'][1]/@id"/>
|
11641
|
+
</xsl:template>
|
11642
|
+
|
11613
11643
|
<xsl:template name="namespaceCheck">
|
11614
11644
|
<xsl:variable name="documentNS" select="namespace-uri(/*)"/>
|
11615
11645
|
<xsl:variable name="XSLNS">
|