metanorma-ieee 1.3.10 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/ieee/html/htmlstyle.css +624 -378
- data/lib/isodoc/ieee/html/htmlstyle.scss +1 -1
- data/lib/isodoc/ieee/html/ieee.css +1082 -891
- data/lib/isodoc/ieee/html/ieee_wp.css +844 -650
- data/lib/isodoc/ieee/html/wordstyle.css +1236 -1016
- data/lib/isodoc/ieee/html/wordstyle_wp.css +1332 -1117
- data/lib/isodoc/ieee/ieee.amendment.xsl +398 -118
- data/lib/isodoc/ieee/ieee.standard.xsl +398 -118
- data/lib/isodoc/ieee/word_convert.rb +1 -1
- data/lib/metanorma/ieee/ieee.rng +27 -30
- data/lib/metanorma/ieee/isodoc.rng +12 -6
- data/lib/metanorma/ieee/version.rb +1 -1
- data/metanorma-ieee.gemspec +4 -3
- metadata +26 -12
@@ -1,4 +1,4 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ieee="https://www.metanorma.org/ns/
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ieee="https://www.metanorma.org/ns/standoc" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:java="http://xml.apache.org/xalan/java" xmlns:barcode="http://barcode4j.krysalis.org/ns" xmlns:redirect="http://xml.apache.org/xalan/redirect" exclude-result-prefixes="java" extension-element-prefixes="redirect" version="1.0">
|
2
2
|
|
3
3
|
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
|
4
4
|
|
@@ -12,9 +12,9 @@
|
|
12
12
|
|
13
13
|
<!-- mandatory variable -->
|
14
14
|
<xsl:variable name="contents_">
|
15
|
-
<xsl:variable name="bundle" select="count(//ieee:
|
16
|
-
<xsl:for-each select="//ieee:
|
17
|
-
<xsl:variable name="num"><xsl:number level="any" count="ieee:
|
15
|
+
<xsl:variable name="bundle" select="count(//ieee:metanorma) > 1"/>
|
16
|
+
<xsl:for-each select="//ieee:metanorma">
|
17
|
+
<xsl:variable name="num"><xsl:number level="any" count="ieee:metanorma"/></xsl:variable>
|
18
18
|
<xsl:variable name="docnumber"><xsl:value-of select="ieee:bibdata/ieee:docidentifier[@type = 'IEEE']"/></xsl:variable>
|
19
19
|
<!-- <xsl:variable name="current_document">
|
20
20
|
<xsl:copy-of select="."/>
|
@@ -41,13 +41,13 @@
|
|
41
41
|
</xsl:for-each>
|
42
42
|
</xsl:variable>
|
43
43
|
|
44
|
-
<xsl:variable name="doctype" select="(//ieee:
|
44
|
+
<xsl:variable name="doctype" select="(//ieee:metanorma)[1]/ieee:bibdata/ieee:ext/ieee:doctype[normalize-space(@language) = '']"/> <!-- values standard, guide, recommended-practice -->
|
45
45
|
|
46
|
-
<xsl:variable name="doctype_localized" select="(//ieee:
|
46
|
+
<xsl:variable name="doctype_localized" select="(//ieee:metanorma)[1]/ieee:bibdata/ieee:ext/ieee:doctype[@language = $lang]"/>
|
47
47
|
|
48
|
-
<xsl:variable name="subdoctype" select="(//ieee:
|
48
|
+
<xsl:variable name="subdoctype" select="(//ieee:metanorma)[1]/ieee:bibdata/ieee:ext/ieee:subdoctype[normalize-space(@language) = '']"/> <!-- has values amendment, corrigendum, erratum -->
|
49
49
|
|
50
|
-
<xsl:variable name="stage_" select="normalize-space((//ieee:
|
50
|
+
<xsl:variable name="stage_" select="normalize-space((//ieee:metanorma)[1]/ieee:bibdata/ieee:status/ieee:stage)"/>
|
51
51
|
|
52
52
|
<xsl:variable name="stage">
|
53
53
|
<xsl:choose>
|
@@ -69,7 +69,7 @@
|
|
69
69
|
</xsl:choose>
|
70
70
|
</xsl:variable>
|
71
71
|
|
72
|
-
<xsl:variable name="trial_use" select="(//ieee:
|
72
|
+
<xsl:variable name="trial_use" select="(//ieee:metanorma)[1]/ieee:bibdata/ieee:ext/ieee:trial-use[normalize-space(@language) = '']"/>
|
73
73
|
|
74
74
|
<xsl:variable name="current_template">
|
75
75
|
<xsl:choose>
|
@@ -126,7 +126,7 @@
|
|
126
126
|
<xsl:with-param name="root-style" select="$root-style"/>
|
127
127
|
</xsl:call-template>
|
128
128
|
|
129
|
-
<xsl:if test="$stage = 'draft'"> <!-- //ieee:
|
129
|
+
<xsl:if test="$stage = 'draft'"> <!-- //ieee:metanorma/ieee:bibdata[ieee:ext/ieee:doctype = 'international-standard' and ieee:version/ieee:draft] -->
|
130
130
|
<xsl:processing-instruction name="add_line_numbers">true</xsl:processing-instruction>
|
131
131
|
</xsl:if>
|
132
132
|
|
@@ -305,22 +305,28 @@
|
|
305
305
|
</xsl:variable>
|
306
306
|
<!-- DEBUG: updated_xml_step2=<xsl:copy-of select="$updated_xml_step2"/> -->
|
307
307
|
|
308
|
-
<xsl:
|
309
|
-
<
|
308
|
+
<xsl:if test="$debug = 'true'">
|
309
|
+
<redirect:write file="updated_xml.xml">
|
310
|
+
<xsl:copy-of select="$updated_xml_step2"/>
|
311
|
+
</redirect:write>
|
312
|
+
</xsl:if>
|
313
|
+
|
314
|
+
<xsl:for-each select="xalan:nodeset($updated_xml_step2)//ieee:metanorma">
|
315
|
+
<xsl:variable name="num"><xsl:number level="any" count="ieee:metanorma"/></xsl:variable>
|
310
316
|
|
311
317
|
<xsl:for-each select=".">
|
312
318
|
|
313
|
-
<xsl:variable name="copyright_year" select="/ieee:
|
319
|
+
<xsl:variable name="copyright_year" select="/ieee:metanorma/ieee:bibdata/ieee:copyright/ieee:from"/>
|
314
320
|
|
315
|
-
<xsl:variable name="approved_date_year" select="substring(normalize-space(/ieee:
|
321
|
+
<xsl:variable name="approved_date_year" select="substring(normalize-space(/ieee:metanorma/ieee:bibdata/ieee:date[@type = 'issued']),1,4)"/>
|
316
322
|
|
317
323
|
<!-- IEEE Std 802.1X™-2020 -->
|
318
|
-
<xsl:variable name="standard_number">IEEE Std <xsl:value-of select="/ieee:
|
319
|
-
<!-- <xsl:value-of select="substring(/ieee:
|
324
|
+
<xsl:variable name="standard_number">IEEE Std <xsl:value-of select="/ieee:metanorma/ieee:bibdata/ieee:docidentifier[@type = 'IEEE']"/>-<xsl:value-of select="$approved_date_year"/></xsl:variable>
|
325
|
+
<!-- <xsl:value-of select="substring(/ieee:metanorma/ieee:bibdata/ieee:date[@type = 'published'],1,4)"/> -->
|
320
326
|
|
321
|
-
<xsl:variable name="designation" select="/ieee:
|
322
|
-
<xsl:variable name="draft_number" select="/ieee:
|
323
|
-
<xsl:variable name="revision_month" select="/ieee:
|
327
|
+
<xsl:variable name="designation" select="/ieee:metanorma/ieee:bibdata/ieee:docnumber"/>
|
328
|
+
<xsl:variable name="draft_number" select="/ieee:metanorma/ieee:bibdata/ieee:version/ieee:draft"/>
|
329
|
+
<xsl:variable name="revision_month" select="/ieee:metanorma/ieee:bibdata/ieee:version/ieee:revision-date"/>
|
324
330
|
<xsl:variable name="draft_month">
|
325
331
|
<xsl:call-template name="getMonthLocalizedByNum">
|
326
332
|
<xsl:with-param name="num" select="substring($revision_month, 6, 2)"/>
|
@@ -330,16 +336,16 @@
|
|
330
336
|
|
331
337
|
<xsl:variable name="title_intro">
|
332
338
|
<!-- Example Local and Metropolitan Area Networks— -->
|
333
|
-
<xsl:apply-templates select="/ieee:
|
334
|
-
<!-- <xsl:apply-templates select="/ieee:
|
335
|
-
<xsl:if test="not(/ieee:
|
339
|
+
<xsl:apply-templates select="/ieee:metanorma/ieee:bibdata/ieee:title[@language = 'en']/node()"/>
|
340
|
+
<!-- <xsl:apply-templates select="/ieee:metanorma/ieee:bibdata/ieee:title[@language = 'intro' or @language = 'intro-en']/node()"/>
|
341
|
+
<xsl:if test="not(/ieee:metanorma/ieee:bibdata/ieee:title[@language = 'intro' or @language = 'intro-en'])">
|
336
342
|
</xsl:if>
|
337
|
-
<xsl:if test="/ieee:
|
343
|
+
<xsl:if test="/ieee:metanorma/ieee:bibdata/ieee:title[@language = 'intro' or @language = 'intro-en' or @language = 'en'] and /ieee:metanorma/ieee:bibdata/ieee:title[@language = 'main' or @language = 'main-en']">—</xsl:if> -->
|
338
344
|
</xsl:variable>
|
339
345
|
|
340
346
|
<xsl:variable name="title_main">
|
341
347
|
<!-- Example: Port-Based Network Access Control -->
|
342
|
-
<!-- <xsl:apply-templates select="/ieee:
|
348
|
+
<!-- <xsl:apply-templates select="/ieee:metanorma/ieee:bibdata/ieee:title[@language = 'main' or @language = 'main-en']/node()"/> -->
|
343
349
|
</xsl:variable>
|
344
350
|
|
345
351
|
<xsl:variable name="title">
|
@@ -349,7 +355,7 @@
|
|
349
355
|
<xsl:copy-of select="$title_main"/>
|
350
356
|
</xsl:when>
|
351
357
|
<xsl:otherwise>
|
352
|
-
<xsl:apply-templates select="/ieee:
|
358
|
+
<xsl:apply-templates select="/ieee:metanorma/ieee:bibdata/ieee:title[1]/node()"/>
|
353
359
|
|
354
360
|
<!-- Example: Amendment # -->
|
355
361
|
<xsl:if test="contains('amendment corrigendum erratum', $subdoctype) and $subdoctype != ''">
|
@@ -364,11 +370,11 @@
|
|
364
370
|
</xsl:choose>
|
365
371
|
</xsl:variable>
|
366
372
|
|
367
|
-
<xsl:variable name="copyright_abbreviation" select="normalize-space(/ieee:
|
373
|
+
<xsl:variable name="copyright_abbreviation" select="normalize-space(/ieee:metanorma/ieee:bibdata/ieee:copyright/ieee:owner/ieee:organization/ieee:abbreviation)"/>
|
368
374
|
<xsl:variable name="copyright_holder">
|
369
375
|
<xsl:value-of select="$copyright_abbreviation"/>
|
370
376
|
<xsl:if test="$copyright_abbreviation = ''">
|
371
|
-
<xsl:for-each select="/ieee:
|
377
|
+
<xsl:for-each select="/ieee:metanorma/ieee:bibdata/ieee:contributor[ieee:role/@type = 'publisher']/ieee:organization/ieee:abbreviation">
|
372
378
|
<xsl:value-of select="."/>
|
373
379
|
<xsl:if test="position() != last()">, </xsl:if>
|
374
380
|
</xsl:for-each>
|
@@ -396,28 +402,28 @@
|
|
396
402
|
</xsl:choose>
|
397
403
|
</xsl:variable>
|
398
404
|
|
399
|
-
<xsl:variable name="society" select="/ieee:
|
405
|
+
<xsl:variable name="society" select="/ieee:metanorma/ieee:bibdata/ieee:ext/ieee:editorialgroup/ieee:society"/>
|
400
406
|
|
401
|
-
<xsl:variable name="committee" select="/ieee:
|
407
|
+
<xsl:variable name="committee" select="/ieee:metanorma/ieee:bibdata/ieee:ext/ieee:editorialgroup/ieee:committee"/>
|
402
408
|
|
403
409
|
<xsl:variable name="approved_by">IEEE SA Standards Board</xsl:variable>
|
404
410
|
<xsl:variable name="approved_date">
|
405
411
|
<xsl:call-template name="convertDate">
|
406
|
-
<xsl:with-param name="date" select="normalize-space(/ieee:
|
412
|
+
<xsl:with-param name="date" select="normalize-space(/ieee:metanorma/ieee:bibdata/ieee:date[@type = 'issued'])"/>
|
407
413
|
<xsl:with-param name="format" select="'ddMMyyyy'"/>
|
408
414
|
</xsl:call-template>
|
409
415
|
</xsl:variable>
|
410
416
|
|
411
417
|
<xsl:variable name="cutoff_date">
|
412
418
|
<xsl:call-template name="convertDate">
|
413
|
-
<xsl:with-param name="date" select="normalize-space(/ieee:
|
419
|
+
<xsl:with-param name="date" select="normalize-space(/ieee:metanorma/ieee:bibdata/ieee:date[@type = 'feedback-ended'])"/>
|
414
420
|
<xsl:with-param name="format" select="'ddMMyyyy'"/>
|
415
421
|
</xsl:call-template>
|
416
422
|
</xsl:variable>
|
417
423
|
|
418
424
|
<xsl:variable name="expiration_date">
|
419
425
|
<xsl:call-template name="convertDate">
|
420
|
-
<xsl:with-param name="date" select="normalize-space(/ieee:
|
426
|
+
<xsl:with-param name="date" select="normalize-space(/ieee:metanorma/ieee:bibdata/ieee:date[@type = 'obsoleted'])"/>
|
421
427
|
<xsl:with-param name="format" select="'ddMMyyyy'"/>
|
422
428
|
</xsl:call-template>
|
423
429
|
</xsl:variable>
|
@@ -426,10 +432,10 @@
|
|
426
432
|
Incorporating IEEE Std 802.1Xbx™-2014
|
427
433
|
and IEEE Std 802.1Xck™-2018 -->
|
428
434
|
<xsl:variable name="history_">
|
429
|
-
<xsl:for-each select="/ieee:
|
435
|
+
<xsl:for-each select="/ieee:metanorma/ieee:bibdata/ieee:relation[@type = 'updates']">
|
430
436
|
<revision_of><xsl:value-of select="ieee:bibitem/ieee:docidentifier"/></revision_of>
|
431
437
|
</xsl:for-each>
|
432
|
-
<xsl:for-each select="/ieee:
|
438
|
+
<xsl:for-each select="/ieee:metanorma/ieee:bibdata/ieee:relation[@type = 'merges']">
|
433
439
|
<incorporating><xsl:value-of select="ieee:bibitem/ieee:docidentifier"/></incorporating>
|
434
440
|
</xsl:for-each>
|
435
441
|
</xsl:variable>
|
@@ -541,9 +547,9 @@
|
|
541
547
|
</xsl:if>
|
542
548
|
</fo:block>
|
543
549
|
|
544
|
-
<xsl:apply-templates select="/ieee:
|
550
|
+
<xsl:apply-templates select="/ieee:metanorma/ieee:boilerplate/ieee:copyright-statement"/>
|
545
551
|
|
546
|
-
<xsl:apply-templates select="/ieee:
|
552
|
+
<xsl:apply-templates select="/ieee:metanorma/ieee:boilerplate/ieee:license-statement"/>
|
547
553
|
|
548
554
|
<fo:block break-after="page"/>
|
549
555
|
|
@@ -557,17 +563,17 @@
|
|
557
563
|
</xsl:call-template>
|
558
564
|
<xsl:text>: </xsl:text>
|
559
565
|
</fo:inline>
|
560
|
-
<xsl:apply-templates select="/ieee:
|
566
|
+
<xsl:apply-templates select="/ieee:metanorma/ieee:preface/ieee:abstract/node()[not(self::ieee:title)] | /ieee:metanorma/ieee:preface/ieee:clause[@id = '_abstract' or ieee:title = 'Abstract']/node()[not(self::ieee:title)]"/>
|
561
567
|
</fo:block>
|
562
568
|
<fo:block> </fo:block>
|
563
569
|
<fo:block>
|
564
570
|
<fo:inline font-weight="bold">Keywords: </fo:inline>
|
565
|
-
<xsl:for-each select="/ieee:
|
571
|
+
<xsl:for-each select="/ieee:metanorma/ieee:bibdata/ieee:keyword">
|
566
572
|
<xsl:value-of select="."/>
|
567
573
|
<xsl:if test="position() != last()">, </xsl:if>
|
568
574
|
</xsl:for-each>
|
569
575
|
</fo:block>
|
570
|
-
<xsl:apply-templates select="/ieee:
|
576
|
+
<xsl:apply-templates select="/ieee:metanorma/ieee:preface/ieee:acknowledgements"/>
|
571
577
|
</fo:block>
|
572
578
|
|
573
579
|
<!-- Example:
|
@@ -577,7 +583,7 @@
|
|
577
583
|
PDF: ISBN 978-0-XXXX-XXXX-X STDXXXXX
|
578
584
|
Print: ISBN 978-0-XXXX-XXXX-X STDPDXXXXX
|
579
585
|
-->
|
580
|
-
<xsl:apply-templates select="/ieee:
|
586
|
+
<xsl:apply-templates select="/ieee:metanorma/ieee:boilerplate/ieee:feedback-statement"/>
|
581
587
|
|
582
588
|
</fo:block-container>
|
583
589
|
</fo:flow>
|
@@ -663,7 +669,7 @@
|
|
663
669
|
IEEE Standards documents are made available for use subject to important notices and legal disclaimers. These notices and disclaimers, or a reference to this page (https://standards.ieee.org/ipr/disclaimers.html), appear in all standards and may be found under the heading “Important Notices and Disclaimers Concerning IEEE Standards Documents.”
|
664
670
|
...
|
665
671
|
-->
|
666
|
-
<xsl:apply-templates select="/ieee:
|
672
|
+
<xsl:apply-templates select="/ieee:metanorma/ieee:boilerplate/ieee:legal-statement"/>
|
667
673
|
</fo:block>
|
668
674
|
</fo:flow>
|
669
675
|
|
@@ -720,17 +726,17 @@
|
|
720
726
|
</xsl:call-template>
|
721
727
|
<xsl:text>: </xsl:text>
|
722
728
|
</fo:inline>
|
723
|
-
<xsl:apply-templates select="/ieee:
|
729
|
+
<xsl:apply-templates select="/ieee:metanorma/ieee:preface/ieee:abstract/node()[not(self::ieee:title)] | /ieee:metanorma/ieee:preface/ieee:clause[@id = '_abstract' or ieee:title = 'Abstract']/node()[not(self::ieee:title)]"/>
|
724
730
|
</fo:block>
|
725
731
|
<fo:block> </fo:block>
|
726
732
|
<fo:block>
|
727
733
|
<fo:inline font-weight="bold">Keywords: </fo:inline>
|
728
|
-
<xsl:for-each select="/ieee:
|
734
|
+
<xsl:for-each select="/ieee:metanorma/ieee:bibdata/ieee:keyword">
|
729
735
|
<xsl:value-of select="."/>
|
730
736
|
<xsl:if test="position() != last()">, </xsl:if>
|
731
737
|
</xsl:for-each>
|
732
738
|
</fo:block>
|
733
|
-
<xsl:apply-templates select="/ieee:
|
739
|
+
<xsl:apply-templates select="/ieee:metanorma/ieee:preface/ieee:acknowledgements"/>
|
734
740
|
</fo:block>
|
735
741
|
|
736
742
|
<!-- Example:
|
@@ -740,7 +746,7 @@
|
|
740
746
|
PDF: ISBN 978-0-XXXX-XXXX-X STDXXXXX
|
741
747
|
Print: ISBN 978-0-XXXX-XXXX-X STDPDXXXXX
|
742
748
|
-->
|
743
|
-
<xsl:apply-templates select="/ieee:
|
749
|
+
<xsl:apply-templates select="/ieee:metanorma/ieee:boilerplate/ieee:feedback-statement"/>
|
744
750
|
|
745
751
|
</fo:flow>
|
746
752
|
</fo:page-sequence>
|
@@ -763,7 +769,7 @@
|
|
763
769
|
IEEE Standards documents are made available for use subject to important notices and legal disclaimers. These notices and disclaimers, or a reference to this page (https://standards.ieee.org/ipr/disclaimers.html), appear in all standards and may be found under the heading “Important Notices and Disclaimers Concerning IEEE Standards Documents.”
|
764
770
|
...
|
765
771
|
-->
|
766
|
-
<xsl:apply-templates select="/ieee:
|
772
|
+
<xsl:apply-templates select="/ieee:metanorma/ieee:boilerplate/ieee:legal-statement"/>
|
767
773
|
</fo:block>
|
768
774
|
</fo:flow>
|
769
775
|
</fo:page-sequence>
|
@@ -785,7 +791,7 @@
|
|
785
791
|
<fo:block>
|
786
792
|
<!-- TRADEMARKS AND DISCLAIMERS -->
|
787
793
|
<!-- ACKNOWLEDGEMENTS -->
|
788
|
-
<xsl:apply-templates select="/ieee:
|
794
|
+
<xsl:apply-templates select="/ieee:metanorma/ieee:boilerplate/ieee:legal-statement/*[@id = 'boilerplate-tm' or ieee:title = 'Trademarks and Disclaimers' or @id = 'boilerplate-participants' or ieee:title = 'Acknowledgements']" mode="whitepaper"/>
|
789
795
|
</fo:block>
|
790
796
|
|
791
797
|
<!-- Example:
|
@@ -794,12 +800,12 @@
|
|
794
800
|
PDF: STDXXXXX ISBN 978-0-XXXX-XXXX-X
|
795
801
|
-->
|
796
802
|
<fo:block font-style="italic">
|
797
|
-
<xsl:apply-templates select="/ieee:
|
803
|
+
<xsl:apply-templates select="/ieee:metanorma/ieee:boilerplate/ieee:feedback-statement"/>
|
798
804
|
</fo:block>
|
799
805
|
|
800
806
|
<!-- NOTICE AND DISCLAIMER OF LIABILITY CONCERNING THE USE OF IEEE SA DOCUMENTS -->
|
801
807
|
<fo:block break-after="page"/>
|
802
|
-
<xsl:apply-templates select="/ieee:
|
808
|
+
<xsl:apply-templates select="/ieee:metanorma/ieee:boilerplate/ieee:legal-statement/*[not(@id = 'boilerplate-tm') and not(ieee:title = 'Trademarks and Disclaimers') and not(@id = 'boilerplate-participants') and not(ieee:title = 'Acknowledgements')]"/>
|
803
809
|
|
804
810
|
</fo:block-container>
|
805
811
|
</fo:flow>
|
@@ -934,15 +940,15 @@
|
|
934
940
|
<xsl:when test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
|
935
941
|
|
936
942
|
<item>
|
937
|
-
<xsl:apply-templates select="/ieee:
|
943
|
+
<xsl:apply-templates select="/ieee:metanorma/ieee:preface/ieee:introduction" mode="flatxml"/>
|
938
944
|
</item>
|
939
945
|
|
940
946
|
<item>
|
941
|
-
<xsl:apply-templates select="/ieee:
|
947
|
+
<xsl:apply-templates select="/ieee:metanorma/ieee:preface/ieee:acknowledgements" mode="flatxml"/>
|
942
948
|
</item>
|
943
949
|
|
944
950
|
<item>
|
945
|
-
<xsl:apply-templates select="/ieee:
|
951
|
+
<xsl:apply-templates select="/ieee:metanorma/ieee:preface/ieee:abstract" mode="flatxml"/>
|
946
952
|
</item>
|
947
953
|
|
948
954
|
<xsl:for-each select="/*/*[local-name()='sections']/*"> <!-- each section starts with a new page -->
|
@@ -988,7 +994,7 @@
|
|
988
994
|
<!-- page break before each section -->
|
989
995
|
<xsl:variable name="structured_xml">
|
990
996
|
<xsl:for-each select="xalan:nodeset($structured_xml_)/item[*]">
|
991
|
-
<xsl:element name="pagebreak" namespace="
|
997
|
+
<xsl:element name="pagebreak" namespace="{$namespace_full}"/>
|
992
998
|
<xsl:copy-of select="./*"/>
|
993
999
|
</xsl:for-each>
|
994
1000
|
</xsl:variable>
|
@@ -1001,6 +1007,12 @@
|
|
1001
1007
|
</xsl:call-template>
|
1002
1008
|
</xsl:variable>
|
1003
1009
|
|
1010
|
+
<xsl:if test="$debug = 'true'">
|
1011
|
+
<redirect:write file="paged_xml.xml">
|
1012
|
+
<xsl:copy-of select="$paged_xml"/>
|
1013
|
+
</redirect:write>
|
1014
|
+
</xsl:if>
|
1015
|
+
|
1004
1016
|
<!-- paged_xml=<xsl:copy-of select="$paged_xml"/> -->
|
1005
1017
|
|
1006
1018
|
<xsl:for-each select="xalan:nodeset($paged_xml)/*[local-name()='page'][*]">
|
@@ -1130,9 +1142,9 @@
|
|
1130
1142
|
</xsl:if>
|
1131
1143
|
|
1132
1144
|
</xsl:for-each>
|
1133
|
-
</xsl:for-each> <!-- END of //ieee-standard iteration -->
|
1145
|
+
</xsl:for-each> <!-- END of //metanorma (former ieee-standard) iteration -->
|
1134
1146
|
|
1135
|
-
<xsl:if test="not(//ieee:
|
1147
|
+
<xsl:if test="not(//ieee:metanorma)">
|
1136
1148
|
<fo:page-sequence master-reference="document-nonstandard" force-page-count="no-force">
|
1137
1149
|
<fo:flow flow-name="xsl-region-body">
|
1138
1150
|
<fo:block><!-- prevent fop error for empty document --></fo:block>
|
@@ -1654,7 +1666,7 @@
|
|
1654
1666
|
</xsl:template>
|
1655
1667
|
|
1656
1668
|
<!-- for 'draft' -->
|
1657
|
-
<xsl:template match="ieee:preface/ieee:abstract/ieee:p[1] | /ieee:
|
1669
|
+
<xsl:template match="ieee:preface/ieee:abstract/ieee:p[1] | /ieee:metanorma/ieee:preface/ieee:clause[@id = '_abstract' or ieee:title = 'Abstract']/ieee:p[1]" priority="2">
|
1658
1670
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
1659
1671
|
</xsl:template>
|
1660
1672
|
|
@@ -1723,7 +1735,7 @@
|
|
1723
1735
|
<xsl:param name="structured_xml"/>
|
1724
1736
|
<xsl:choose>
|
1725
1737
|
<xsl:when test="not(xalan:nodeset($structured_xml)/*[local-name()='pagebreak'])">
|
1726
|
-
<xsl:element name="page" namespace="
|
1738
|
+
<xsl:element name="page" namespace="{$namespace_full}">
|
1727
1739
|
<xsl:copy-of select="xalan:nodeset($structured_xml)"/>
|
1728
1740
|
</xsl:element>
|
1729
1741
|
</xsl:when>
|
@@ -1734,7 +1746,7 @@
|
|
1734
1746
|
<!-- <xsl:variable name="pagebreak_previous_orientation" select="normalize-space(preceding-sibling::ieee:pagebreak[1]/@orientation)"/> -->
|
1735
1747
|
|
1736
1748
|
<!-- copy elements before pagebreak -->
|
1737
|
-
<xsl:element name="page" namespace="
|
1749
|
+
<xsl:element name="page" namespace="{$namespace_full}">
|
1738
1750
|
<xsl:if test="not(preceding-sibling::ieee:pagebreak)">
|
1739
1751
|
<xsl:copy-of select="../@*"/>
|
1740
1752
|
</xsl:if>
|
@@ -1748,7 +1760,7 @@
|
|
1748
1760
|
|
1749
1761
|
<!-- copy elements after last page break -->
|
1750
1762
|
<xsl:if test="position() = last() and following-sibling::node()">
|
1751
|
-
<xsl:element name="page" namespace="
|
1763
|
+
<xsl:element name="page" namespace="{$namespace_full}">
|
1752
1764
|
<xsl:copy-of select="@orientation"/>
|
1753
1765
|
<xsl:copy-of select="following-sibling::node()"/>
|
1754
1766
|
</xsl:element>
|
@@ -2170,7 +2182,7 @@
|
|
2170
2182
|
</xsl:variable>
|
2171
2183
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
2172
2184
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
2173
|
-
<xsl:variable name="lang" select="ancestor::*[
|
2185
|
+
<xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
2174
2186
|
<xsl:variable name="reference_">
|
2175
2187
|
<xsl:value-of select="@reference"/>
|
2176
2188
|
<xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
|
@@ -3593,7 +3605,7 @@
|
|
3593
3605
|
<xsl:text>IEEE CONFORMITY ASSESSMENT PROGRAM (ICAP)</xsl:text>
|
3594
3606
|
</xsl:when>
|
3595
3607
|
<xsl:otherwise> <!-- PROGRAM TITLE TO GO HERE -->
|
3596
|
-
<xsl:value-of select="/ieee:
|
3608
|
+
<xsl:value-of select="/ieee:metanorma/ieee:bibdata/ieee:ext/ieee:program"/>
|
3597
3609
|
</xsl:otherwise>
|
3598
3610
|
</xsl:choose>
|
3599
3611
|
</fo:block>
|
@@ -3607,7 +3619,7 @@
|
|
3607
3619
|
<fo:block font-style="italic">Title</fo:block>
|
3608
3620
|
<fo:block>Firstname Lastname</fo:block>
|
3609
3621
|
<fo:block font-style="italic">Title</fo:block> -->
|
3610
|
-
<xsl:for-each select="/ieee:
|
3622
|
+
<xsl:for-each select="/ieee:metanorma/ieee:bibdata/ieee:contributor[ieee:role[@type = 'author']]">
|
3611
3623
|
<fo:block><xsl:value-of select="concat(ieee:person/ieee:name/ieee:forename, ' ', ieee:person/ieee:name/ieee:surname)"/></fo:block>
|
3612
3624
|
<fo:block font-style="italic"><xsl:value-of select="ieee:person/ieee:affiliation/ieee:name"/></fo:block>
|
3613
3625
|
</xsl:for-each>
|
@@ -3800,21 +3812,21 @@
|
|
3800
3812
|
|
3801
3813
|
<xsl:variable name="namespace_full_">
|
3802
3814
|
<xsl:choose>
|
3803
|
-
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[
|
3804
|
-
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/
|
3815
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[local-name() = 'metanorma'][1])"/></xsl:when>
|
3816
|
+
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/standoc -->
|
3805
3817
|
</xsl:choose>
|
3806
3818
|
</xsl:variable>
|
3807
3819
|
<xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
|
3808
3820
|
|
3809
3821
|
<xsl:variable name="root_element_">
|
3810
3822
|
<xsl:choose>
|
3811
|
-
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[
|
3812
|
-
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
|
3823
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[local-name() = 'metanorma'][1])"/></xsl:when>
|
3824
|
+
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: metanorma (former iso-standard) -->
|
3813
3825
|
</xsl:choose>
|
3814
3826
|
</xsl:variable>
|
3815
3827
|
<xsl:variable name="root_element" select="normalize-space($root_element_)"/>
|
3816
3828
|
|
3817
|
-
<xsl:variable name="document_scheme" select="normalize-space(//*[
|
3829
|
+
<xsl:variable name="document_scheme" select="normalize-space(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'document-scheme']/*[local-name() = 'value'])"/>
|
3818
3830
|
|
3819
3831
|
<!-- external parameters -->
|
3820
3832
|
|
@@ -3915,7 +3927,7 @@
|
|
3915
3927
|
</metanorma-extension>
|
3916
3928
|
-->
|
3917
3929
|
|
3918
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[
|
3930
|
+
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/>
|
3919
3931
|
<xsl:variable name="papersize_width_">
|
3920
3932
|
<xsl:choose>
|
3921
3933
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
@@ -3977,7 +3989,7 @@
|
|
3977
3989
|
<xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/>
|
3978
3990
|
|
3979
3991
|
<xsl:variable name="layout_columns_default">1</xsl:variable>
|
3980
|
-
<xsl:variable name="layout_columns_" select="normalize-space((//*[
|
3992
|
+
<xsl:variable name="layout_columns_" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'layout-columns'])"/>
|
3981
3993
|
<xsl:variable name="layout_columns">
|
3982
3994
|
<xsl:choose>
|
3983
3995
|
<xsl:when test="$layout_columns_ != ''"><xsl:value-of select="$layout_columns_"/></xsl:when>
|
@@ -4038,7 +4050,7 @@
|
|
4038
4050
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
4039
4051
|
|
4040
4052
|
<xsl:variable name="title-list-tables">
|
4041
|
-
<xsl:variable name="toc_table_title" select="//*[
|
4053
|
+
<xsl:variable name="toc_table_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
4042
4054
|
<xsl:value-of select="$toc_table_title"/>
|
4043
4055
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
4044
4056
|
<xsl:call-template name="getLocalizedString">
|
@@ -4048,7 +4060,7 @@
|
|
4048
4060
|
</xsl:variable>
|
4049
4061
|
|
4050
4062
|
<xsl:variable name="title-list-figures">
|
4051
|
-
<xsl:variable name="toc_figure_title" select="//*[
|
4063
|
+
<xsl:variable name="toc_figure_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
4052
4064
|
<xsl:value-of select="$toc_figure_title"/>
|
4053
4065
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
4054
4066
|
<xsl:call-template name="getLocalizedString">
|
@@ -4058,7 +4070,7 @@
|
|
4058
4070
|
</xsl:variable>
|
4059
4071
|
|
4060
4072
|
<xsl:variable name="title-list-recommendations">
|
4061
|
-
<xsl:variable name="toc_requirement_title" select="//*[
|
4073
|
+
<xsl:variable name="toc_requirement_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
4062
4074
|
<xsl:value-of select="$toc_requirement_title"/>
|
4063
4075
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
4064
4076
|
<xsl:call-template name="getLocalizedString">
|
@@ -4068,8 +4080,8 @@
|
|
4068
4080
|
</xsl:variable>
|
4069
4081
|
|
4070
4082
|
<xsl:variable name="bibdata">
|
4071
|
-
<xsl:copy-of select="//*[
|
4072
|
-
<xsl:copy-of select="//*[
|
4083
|
+
<xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']"/>
|
4084
|
+
<xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'localized-strings']"/>
|
4073
4085
|
</xsl:variable>
|
4074
4086
|
|
4075
4087
|
<!-- Characters -->
|
@@ -4134,7 +4146,7 @@
|
|
4134
4146
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
4135
4147
|
|
4136
4148
|
<xsl:variable name="additional_fonts_">
|
4137
|
-
<xsl:for-each select="//*[
|
4149
|
+
<xsl:for-each select="//*[local-name() = 'metanorma'][1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[local-name() = 'metanorma'][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
|
4138
4150
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
4139
4151
|
</xsl:for-each>
|
4140
4152
|
</xsl:variable>
|
@@ -5532,10 +5544,10 @@
|
|
5532
5544
|
|
5533
5545
|
<xsl:template name="processTablesFigures_Contents">
|
5534
5546
|
<xsl:param name="always"/>
|
5535
|
-
<xsl:if test="(//*[
|
5547
|
+
<xsl:if test="(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
5536
5548
|
<xsl:call-template name="processTables_Contents"/>
|
5537
5549
|
</xsl:if>
|
5538
|
-
<xsl:if test="(//*[
|
5550
|
+
<xsl:if test="(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
5539
5551
|
<xsl:call-template name="processFigures_Contents"/>
|
5540
5552
|
</xsl:if>
|
5541
5553
|
</xsl:template>
|
@@ -5615,7 +5627,7 @@
|
|
5615
5627
|
</xsl:template><!-- END: processMainSectionsDefault -->
|
5616
5628
|
|
5617
5629
|
<!-- Example:
|
5618
|
-
<
|
5630
|
+
<metanorma>
|
5619
5631
|
<preface>
|
5620
5632
|
<page_sequence>
|
5621
5633
|
<clause...
|
@@ -5638,7 +5650,7 @@
|
|
5638
5650
|
<page_sequence>
|
5639
5651
|
<annex ..
|
5640
5652
|
</page_sequence>
|
5641
|
-
</
|
5653
|
+
</metanorma>
|
5642
5654
|
-->
|
5643
5655
|
<xsl:template name="processPrefaceAndMainSectionsDefault_items">
|
5644
5656
|
|
@@ -5681,15 +5693,8 @@
|
|
5681
5693
|
</xsl:template> <!-- END: insertPrefaceSectionsPageSequences -->
|
5682
5694
|
|
5683
5695
|
<xsl:template name="insertMainSectionsPageSequences">
|
5684
|
-
<xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
|
5685
|
-
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
5686
|
-
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
5687
|
-
<xsl:sort select="@displayorder" data-type="number"/>
|
5688
|
-
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
5689
5696
|
|
5690
|
-
|
5691
|
-
</xsl:element>
|
5692
|
-
</xsl:element>
|
5697
|
+
<xsl:call-template name="insertSectionsInPageSequence"/>
|
5693
5698
|
|
5694
5699
|
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
5695
5700
|
<xsl:for-each select="/*/*[local-name()='annex']">
|
@@ -5708,6 +5713,18 @@
|
|
5708
5713
|
</xsl:element>
|
5709
5714
|
</xsl:template> <!-- END: insertMainSectionsPageSequences -->
|
5710
5715
|
|
5716
|
+
<xsl:template name="insertSectionsInPageSequence">
|
5717
|
+
<xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
|
5718
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
5719
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
5720
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
5721
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
5722
|
+
|
5723
|
+
</xsl:for-each>
|
5724
|
+
</xsl:element>
|
5725
|
+
</xsl:element>
|
5726
|
+
</xsl:template>
|
5727
|
+
|
5711
5728
|
<xsl:template name="insertMainSectionsInSeparatePageSequences">
|
5712
5729
|
<xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
|
5713
5730
|
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
@@ -7244,7 +7261,7 @@
|
|
7244
7261
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
7245
7262
|
|
7246
7263
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
7247
|
-
<xsl:variable name="lang" select="ancestor::*[
|
7264
|
+
<xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
7248
7265
|
<xsl:variable name="reference_">
|
7249
7266
|
<xsl:value-of select="@reference"/>
|
7250
7267
|
<xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
|
@@ -7365,13 +7382,13 @@
|
|
7365
7382
|
footnotes in bibliography
|
7366
7383
|
footnotes in document's body (except table's head/body/foot and figure text)
|
7367
7384
|
-->
|
7368
|
-
<xsl:for-each select="ancestor::*[
|
7385
|
+
<xsl:for-each select="ancestor::*[local-name() = 'metanorma']/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
7369
7386
|
<fn gen_id="{generate-id(.)}">
|
7370
7387
|
<xsl:copy-of select="@*"/>
|
7371
7388
|
<xsl:copy-of select="node()"/>
|
7372
7389
|
</fn>
|
7373
7390
|
</xsl:for-each>
|
7374
|
-
<xsl:for-each select="ancestor::*[
|
7391
|
+
<xsl:for-each select="ancestor::*[local-name() = 'metanorma']/*[local-name()='boilerplate']/* | ancestor::*[local-name() = 'metanorma']//*[local-name()='preface']/* | ancestor::*[local-name() = 'metanorma']//*[local-name()='sections']/* | ancestor::*[local-name() = 'metanorma']//*[local-name()='annex'] | ancestor::*[local-name() = 'metanorma']//*[local-name()='bibliography']/*">
|
7375
7392
|
<xsl:sort select="@displayorder" data-type="number"/>
|
7376
7393
|
<!-- commented:
|
7377
7394
|
.//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
|
@@ -9730,6 +9747,8 @@
|
|
9730
9747
|
<!-- ======================================= -->
|
9731
9748
|
<!-- math -->
|
9732
9749
|
<!-- ======================================= -->
|
9750
|
+
<xsl:template match="*[local-name() = 'stem'][following-sibling::*[1][local-name() = 'fmt-stem']]"/> <!-- for tablesonly.xml generated by mn2pdf -->
|
9751
|
+
|
9733
9752
|
<xsl:template match="mathml:math">
|
9734
9753
|
<xsl:variable name="isAdded" select="@added"/>
|
9735
9754
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -10091,10 +10110,10 @@
|
|
10091
10110
|
<xsl:template match="*[local-name()='localityStack']"/>
|
10092
10111
|
|
10093
10112
|
<xsl:variable name="pdfAttachmentsList_">
|
10094
|
-
<xsl:for-each select="//*[
|
10113
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
10095
10114
|
<attachment filename="{@name}"/>
|
10096
10115
|
</xsl:for-each>
|
10097
|
-
<xsl:if test="not(//*[
|
10116
|
+
<xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
10098
10117
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
10099
10118
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
10100
10119
|
<attachment filename="{$attachment_path}"/>
|
@@ -11560,7 +11579,9 @@
|
|
11560
11579
|
<xsl:apply-templates mode="bookmarks"/>
|
11561
11580
|
</xsl:template>
|
11562
11581
|
|
11563
|
-
<xsl:template match="*[local-name() = '
|
11582
|
+
<xsl:template match="*[local-name() = 'stem']" mode="contents"/>
|
11583
|
+
|
11584
|
+
<xsl:template match="*[local-name() = 'title' or local-name() = 'name' or local-name() = 'fmt-title' or local-name() = 'fmt-name']//*[local-name() = 'fmt-stem']" mode="contents">
|
11564
11585
|
<xsl:apply-templates select="."/>
|
11565
11586
|
</xsl:template>
|
11566
11587
|
|
@@ -11577,7 +11598,15 @@
|
|
11577
11598
|
<xsl:apply-templates mode="contents"/>
|
11578
11599
|
</xsl:template>
|
11579
11600
|
|
11580
|
-
<xsl:template match="*[local-name() = '
|
11601
|
+
<xsl:template match="*[local-name() = 'concept']" mode="contents"/>
|
11602
|
+
<xsl:template match="*[local-name() = 'eref']" mode="contents"/>
|
11603
|
+
<xsl:template match="*[local-name() = 'xref']" mode="contents"/>
|
11604
|
+
<xsl:template match="*[local-name() = 'link']" mode="contents"/>
|
11605
|
+
<xsl:template match="*[local-name() = 'origin']" mode="contents"/>
|
11606
|
+
<xsl:template match="*[local-name() = 'erefstack ']" mode="contents"/>
|
11607
|
+
|
11608
|
+
<xsl:template match="*[local-name() = 'stem']" mode="bookmarks"/>
|
11609
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="bookmarks">
|
11581
11610
|
<xsl:apply-templates mode="bookmarks"/>
|
11582
11611
|
</xsl:template>
|
11583
11612
|
|
@@ -11590,6 +11619,13 @@
|
|
11590
11619
|
<xsl:apply-templates mode="bookmarks"/>
|
11591
11620
|
</xsl:template>
|
11592
11621
|
|
11622
|
+
<xsl:template match="*[local-name() = 'concept']" mode="bookmarks"/>
|
11623
|
+
<xsl:template match="*[local-name() = 'eref']" mode="bookmarks"/>
|
11624
|
+
<xsl:template match="*[local-name() = 'xref']" mode="bookmarks"/>
|
11625
|
+
<xsl:template match="*[local-name() = 'link']" mode="bookmarks"/>
|
11626
|
+
<xsl:template match="*[local-name() = 'origin']" mode="bookmarks"/>
|
11627
|
+
<xsl:template match="*[local-name() = 'erefstack ']" mode="bookmarks"/>
|
11628
|
+
|
11593
11629
|
<!-- Bookmarks -->
|
11594
11630
|
<xsl:template name="addBookmarks">
|
11595
11631
|
<xsl:param name="contents"/>
|
@@ -11874,6 +11910,13 @@
|
|
11874
11910
|
|
11875
11911
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="contents_item"/>
|
11876
11912
|
|
11913
|
+
<xsl:template match="*[local-name() = 'concept']" mode="contents_item"/>
|
11914
|
+
<xsl:template match="*[local-name() = 'eref']" mode="contents_item"/>
|
11915
|
+
<xsl:template match="*[local-name() = 'xref']" mode="contents_item"/>
|
11916
|
+
<xsl:template match="*[local-name() = 'link']" mode="contents_item"/>
|
11917
|
+
<xsl:template match="*[local-name() = 'origin']" mode="contents_item"/>
|
11918
|
+
<xsl:template match="*[local-name() = 'erefstack ']" mode="contents_item"/>
|
11919
|
+
|
11877
11920
|
<xsl:template name="getSection">
|
11878
11921
|
<xsl:choose>
|
11879
11922
|
<xsl:when test="*[local-name() = 'fmt-title']">
|
@@ -11993,7 +12036,8 @@
|
|
11993
12036
|
</xsl:copy>
|
11994
12037
|
</xsl:template>
|
11995
12038
|
|
11996
|
-
<xsl:template match="*[local-name() = 'stem']" mode="contents_item"
|
12039
|
+
<xsl:template match="*[local-name() = 'stem']" mode="contents_item"/>
|
12040
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="contents_item">
|
11997
12041
|
<xsl:copy-of select="."/>
|
11998
12042
|
</xsl:template>
|
11999
12043
|
|
@@ -12057,7 +12101,7 @@
|
|
12057
12101
|
<!-- sourcecode -->
|
12058
12102
|
<!-- =============== -->
|
12059
12103
|
|
12060
|
-
<xsl:variable name="source-highlighter-css_" select="//*[
|
12104
|
+
<xsl:variable name="source-highlighter-css_" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
12061
12105
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
12062
12106
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
12063
12107
|
|
@@ -13507,7 +13551,7 @@
|
|
13507
13551
|
|
13508
13552
|
</xsl:template> <!-- sections_element_style -->
|
13509
13553
|
|
13510
|
-
<xsl:template match="//*[
|
13554
|
+
<xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
|
13511
13555
|
|
13512
13556
|
<fo:block break-after="page"/>
|
13513
13557
|
|
@@ -13611,7 +13655,7 @@
|
|
13611
13655
|
<fo:block id="{@id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@id}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
13612
13656
|
</xsl:when>
|
13613
13657
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
13614
|
-
<xsl:when test="ancestor::*[
|
13658
|
+
<xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
|
13615
13659
|
<fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
13616
13660
|
</xsl:when>
|
13617
13661
|
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
@@ -15007,7 +15051,7 @@
|
|
15007
15051
|
<xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
|
15008
15052
|
|
15009
15053
|
<!-- move section 'Normative references' inside 'sections' -->
|
15010
|
-
<xsl:for-each select="* | ancestor::*[
|
15054
|
+
<xsl:for-each select="* | ancestor::*[local-name() = 'metanorma']/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | ancestor::*[local-name() = 'metanorma']/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
|
15011
15055
|
<xsl:sort select="@displayorder" data-type="number"/>
|
15012
15056
|
|
15013
15057
|
<!-- process Section's title -->
|
@@ -15068,10 +15112,126 @@
|
|
15068
15112
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
|
15069
15113
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_pres"/>
|
15070
15114
|
|
15071
|
-
<xsl:template match="*[local-name() = 'stem']
|
15115
|
+
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_step1"/>
|
15116
|
+
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_pres"/>
|
15117
|
+
|
15118
|
+
<xsl:template match="*[local-name() = 'fmt-stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])]" mode="update_xml_step1">
|
15119
|
+
<xsl:element name="stem" namespace="{$namespace_full}">
|
15120
|
+
<xsl:copy-of select="@*"/>
|
15121
|
+
<xsl:choose>
|
15122
|
+
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
15123
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
15124
|
+
</xsl:when>
|
15125
|
+
<xsl:otherwise>
|
15126
|
+
<xsl:copy-of select="node()"/>
|
15127
|
+
</xsl:otherwise>
|
15128
|
+
</xsl:choose>
|
15129
|
+
</xsl:element>
|
15130
|
+
</xsl:template>
|
15131
|
+
<xsl:template match="*[local-name() = 'fmt-stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])]" mode="update_xml_pres">
|
15132
|
+
<xsl:element name="stem" namespace="{$namespace_full}">
|
15133
|
+
<xsl:copy-of select="@*"/>
|
15134
|
+
<xsl:choose>
|
15135
|
+
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
15136
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
15137
|
+
</xsl:when>
|
15138
|
+
<xsl:otherwise>
|
15139
|
+
<xsl:copy-of select="node()"/>
|
15140
|
+
</xsl:otherwise>
|
15141
|
+
</xsl:choose>
|
15142
|
+
</xsl:element>
|
15143
|
+
</xsl:template>
|
15144
|
+
|
15145
|
+
<xsl:template match="*[local-name() = 'image'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'bibdata'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
|
15072
15146
|
<xsl:copy-of select="."/>
|
15073
15147
|
</xsl:template>
|
15074
15148
|
|
15149
|
+
<!-- https://github.com/metanorma/isodoc/issues/651 -->
|
15150
|
+
<!-- *[local-name() = 'sourcecode'][not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])] -->
|
15151
|
+
<xsl:template match="*[local-name() = 'sourcecode']" mode="update_xml_step1">
|
15152
|
+
<xsl:copy>
|
15153
|
+
<xsl:copy-of select="@*"/>
|
15154
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
|
15155
|
+
<xsl:choose>
|
15156
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode']">
|
15157
|
+
<xsl:choose>
|
15158
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode'][not(.//*[local-name() = 'passthrough'])] and not(.//*[local-name() = 'fmt-name'])">
|
15159
|
+
<xsl:copy-of select="*[local-name() = 'fmt-sourcecode']/node()"/>
|
15160
|
+
</xsl:when>
|
15161
|
+
<xsl:otherwise>
|
15162
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-sourcecode']/node()" mode="update_xml_step1"/>
|
15163
|
+
</xsl:otherwise>
|
15164
|
+
</xsl:choose>
|
15165
|
+
</xsl:when>
|
15166
|
+
<xsl:otherwise> <!-- If fmt-sourcecode is not present -->
|
15167
|
+
<xsl:choose>
|
15168
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])">
|
15169
|
+
<xsl:copy-of select="node()"/>
|
15170
|
+
</xsl:when>
|
15171
|
+
<xsl:otherwise>
|
15172
|
+
<xsl:apply-templates select="node()[not(local-name() = 'fmt-name')]" mode="update_xml_step1"/>
|
15173
|
+
</xsl:otherwise>
|
15174
|
+
</xsl:choose>
|
15175
|
+
</xsl:otherwise>
|
15176
|
+
</xsl:choose>
|
15177
|
+
</xsl:copy>
|
15178
|
+
</xsl:template>
|
15179
|
+
<xsl:template match="*[local-name() = 'sourcecode']" mode="update_xml_pres">
|
15180
|
+
<xsl:copy>
|
15181
|
+
<xsl:copy-of select="@*"/>
|
15182
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_pres"/>
|
15183
|
+
<xsl:choose>
|
15184
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode']">
|
15185
|
+
<xsl:choose>
|
15186
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode'][not(.//*[local-name() = 'passthrough'])] and not(.//*[local-name() = 'fmt-name'])">
|
15187
|
+
<xsl:copy-of select="*[local-name() = 'fmt-sourcecode']/node()"/>
|
15188
|
+
</xsl:when>
|
15189
|
+
<xsl:otherwise>
|
15190
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-sourcecode']/node()" mode="update_xml_pres"/>
|
15191
|
+
</xsl:otherwise>
|
15192
|
+
</xsl:choose>
|
15193
|
+
</xsl:when>
|
15194
|
+
<xsl:otherwise> <!-- If fmt-sourcecode is not present -->
|
15195
|
+
<xsl:choose>
|
15196
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])">
|
15197
|
+
<xsl:copy-of select="node()"/>
|
15198
|
+
</xsl:when>
|
15199
|
+
<xsl:otherwise>
|
15200
|
+
<xsl:apply-templates select="node()[not(local-name() = 'fmt-name')]" mode="update_xml_pres"/>
|
15201
|
+
</xsl:otherwise>
|
15202
|
+
</xsl:choose>
|
15203
|
+
</xsl:otherwise>
|
15204
|
+
</xsl:choose>
|
15205
|
+
</xsl:copy>
|
15206
|
+
</xsl:template>
|
15207
|
+
|
15208
|
+
<!-- https://github.com/metanorma/isodoc/issues/651 -->
|
15209
|
+
<xsl:template match="*[local-name() = 'figure'][*[local-name() = 'fmt-figure']]" mode="update_xml_step1" priority="2">
|
15210
|
+
<xsl:copy>
|
15211
|
+
<xsl:copy-of select="@*"/>
|
15212
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
|
15213
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-figure']/node()" mode="update_xml_step1"/>
|
15214
|
+
</xsl:copy>
|
15215
|
+
</xsl:template>
|
15216
|
+
<xsl:template match="*[local-name() = 'figure'][*[local-name() = 'fmt-figure']]" mode="update_xml_pres" priority="2">
|
15217
|
+
<xsl:copy>
|
15218
|
+
<xsl:copy-of select="@*"/>
|
15219
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_pres"/>
|
15220
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-figure']/node()" mode="update_xml_pres"/>
|
15221
|
+
</xsl:copy>
|
15222
|
+
</xsl:template>
|
15223
|
+
|
15224
|
+
<!-- https://github.com/metanorma/isodoc/issues/652 -->
|
15225
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']"/>
|
15226
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']"/>
|
15227
|
+
<xsl:template match="*[local-name() = 'amend']"/>
|
15228
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']" mode="update_xml_step1"/>
|
15229
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_step1"/>
|
15230
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']" mode="update_xml_pres"/>
|
15231
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
|
15232
|
+
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
|
15233
|
+
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
|
15234
|
+
|
15075
15235
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
15076
15236
|
<xsl:copy>
|
15077
15237
|
<xsl:copy-of select="@*"/>
|
@@ -15102,7 +15262,7 @@
|
|
15102
15262
|
<!-- add @id - first element with @id plus '_element_name' -->
|
15103
15263
|
<xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
|
15104
15264
|
<xsl:variable name="prefix_id"><xsl:value-of select="$prefix_id_"/><xsl:if test="normalize-space($prefix_id_) = ''"><xsl:value-of select="generate-id()"/></xsl:if></xsl:variable>
|
15105
|
-
<xsl:variable name="document_suffix" select="ancestor::*[
|
15265
|
+
<xsl:variable name="document_suffix" select="ancestor::*[local-name() = 'metanorma']/@document_suffix"/>
|
15106
15266
|
<xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
|
15107
15267
|
</xsl:if>
|
15108
15268
|
</xsl:template>
|
@@ -15352,6 +15512,126 @@
|
|
15352
15512
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_step1"/>
|
15353
15513
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_pres"/>
|
15354
15514
|
|
15515
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="update_xml_step1">
|
15516
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15517
|
+
</xsl:template>
|
15518
|
+
|
15519
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="update_xml_pres">
|
15520
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15521
|
+
</xsl:template>
|
15522
|
+
|
15523
|
+
<xsl:template match="*[local-name() = 'requirement']/*[not(starts-with(local-name(), 'fmt-'))] | *[local-name() = 'recommendation']/*[not(starts-with(local-name(), 'fmt-'))] | *[local-name() = 'permission']/*[not(starts-with(local-name(), 'fmt-'))]" mode="update_xml_step1"/>
|
15524
|
+
|
15525
|
+
<xsl:template match="*[local-name() = 'requirement']/*[not(starts-with(local-name(), 'fmt-'))] | *[local-name() = 'recommendation']/*[not(starts-with(local-name(), 'fmt-'))] | *[local-name() = 'permission']/*[not(starts-with(local-name(), 'fmt-'))]" mode="update_xml_pres"/>
|
15526
|
+
|
15527
|
+
<xsl:template match="*[local-name() = 'fmt-provision']" mode="update_xml_step1">
|
15528
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15529
|
+
</xsl:template>
|
15530
|
+
<xsl:template match="*[local-name() = 'fmt-provision']" mode="update_xml_pres">
|
15531
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15532
|
+
</xsl:template>
|
15533
|
+
|
15534
|
+
<xsl:template match="*[local-name() = 'identifier']" mode="update_xml_step1"/>
|
15535
|
+
<xsl:template match="*[local-name() = 'identifier']" mode="update_xml_pres"/>
|
15536
|
+
<xsl:template match="*[local-name() = 'fmt-identifier']" mode="update_xml_step1">
|
15537
|
+
<xsl:element name="identifier" namespace="{$namespace_full}">
|
15538
|
+
<xsl:copy-of select="@*"/>
|
15539
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15540
|
+
</xsl:element>
|
15541
|
+
</xsl:template>
|
15542
|
+
<xsl:template match="*[local-name() = 'fmt-identifier']" mode="update_xml_pres">
|
15543
|
+
<xsl:element name="identifier" namespace="{$namespace_full}">
|
15544
|
+
<xsl:copy-of select="@*"/>
|
15545
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15546
|
+
</xsl:element>
|
15547
|
+
</xsl:template>
|
15548
|
+
|
15549
|
+
<xsl:template match="*[local-name() = 'concept']"/>
|
15550
|
+
<xsl:template match="*[local-name() = 'concept']" mode="update_xml_step1"/>
|
15551
|
+
<xsl:template match="*[local-name() = 'concept']" mode="update_xml_pres"/>
|
15552
|
+
|
15553
|
+
<xsl:template match="*[local-name() = 'fmt-concept']">
|
15554
|
+
<xsl:apply-templates/>
|
15555
|
+
</xsl:template>
|
15556
|
+
<xsl:template match="*[local-name() = 'fmt-concept']" mode="update_xml_step1">
|
15557
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15558
|
+
</xsl:template>
|
15559
|
+
<xsl:template match="*[local-name() = 'fmt-concept']" mode="update_xml_pres">
|
15560
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15561
|
+
</xsl:template>
|
15562
|
+
|
15563
|
+
<xsl:template match="*[local-name() = 'eref']" mode="update_xml_step1"/>
|
15564
|
+
<xsl:template match="*[local-name() = 'eref']" mode="update_xml_pres"/>
|
15565
|
+
|
15566
|
+
<xsl:template match="*[local-name() = 'fmt-eref']" mode="update_xml_step1">
|
15567
|
+
<xsl:element name="eref" namespace="{$namespace_full}">
|
15568
|
+
<xsl:copy-of select="@*"/>
|
15569
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15570
|
+
</xsl:element>
|
15571
|
+
</xsl:template>
|
15572
|
+
<xsl:template match="*[local-name() = 'fmt-eref']" mode="update_xml_pres">
|
15573
|
+
<xsl:element name="eref" namespace="{$namespace_full}">
|
15574
|
+
<xsl:copy-of select="@*"/>
|
15575
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15576
|
+
</xsl:element>
|
15577
|
+
</xsl:template>
|
15578
|
+
|
15579
|
+
<xsl:template match="*[local-name() = 'xref']" mode="update_xml_step1"/>
|
15580
|
+
<xsl:template match="*[local-name() = 'xref']" mode="update_xml_pres"/>
|
15581
|
+
|
15582
|
+
<xsl:template match="*[local-name() = 'fmt-xref']" mode="update_xml_step1">
|
15583
|
+
<xsl:element name="xref" namespace="{$namespace_full}">
|
15584
|
+
<xsl:copy-of select="@*"/>
|
15585
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15586
|
+
</xsl:element>
|
15587
|
+
</xsl:template>
|
15588
|
+
<xsl:template match="*[local-name() = 'fmt-xref']" mode="update_xml_pres">
|
15589
|
+
<xsl:element name="xref" namespace="{$namespace_full}">
|
15590
|
+
<xsl:copy-of select="@*"/>
|
15591
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15592
|
+
</xsl:element>
|
15593
|
+
</xsl:template>
|
15594
|
+
|
15595
|
+
<xsl:template match="*[local-name() = 'link']" mode="update_xml_step1"/>
|
15596
|
+
<xsl:template match="*[local-name() = 'link']" mode="update_xml_pres"/>
|
15597
|
+
|
15598
|
+
<xsl:template match="*[local-name() = 'fmt-link']" mode="update_xml_step1">
|
15599
|
+
<xsl:element name="link" namespace="{$namespace_full}">
|
15600
|
+
<xsl:copy-of select="@*"/>
|
15601
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15602
|
+
</xsl:element>
|
15603
|
+
</xsl:template>
|
15604
|
+
<xsl:template match="*[local-name() = 'fmt-link']" mode="update_xml_pres">
|
15605
|
+
<xsl:element name="link" namespace="{$namespace_full}">
|
15606
|
+
<xsl:copy-of select="@*"/>
|
15607
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15608
|
+
</xsl:element>
|
15609
|
+
</xsl:template>
|
15610
|
+
|
15611
|
+
<xsl:template match="*[local-name() = 'origin']" mode="update_xml_step1"/>
|
15612
|
+
<xsl:template match="*[local-name() = 'origin']" mode="update_xml_pres"/>
|
15613
|
+
|
15614
|
+
<xsl:template match="*[local-name() = 'fmt-origin']" mode="update_xml_step1">
|
15615
|
+
<xsl:element name="origin" namespace="{$namespace_full}">
|
15616
|
+
<xsl:copy-of select="@*"/>
|
15617
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15618
|
+
</xsl:element>
|
15619
|
+
</xsl:template>
|
15620
|
+
<xsl:template match="*[local-name() = 'fmt-origin']" mode="update_xml_pres">
|
15621
|
+
<xsl:element name="origin" namespace="{$namespace_full}">
|
15622
|
+
<xsl:copy-of select="@*"/>
|
15623
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15624
|
+
</xsl:element>
|
15625
|
+
</xsl:template>
|
15626
|
+
|
15627
|
+
<xsl:template match="*[local-name() = 'erefstack']"/>
|
15628
|
+
<xsl:template match="*[local-name() = 'erefstack']" mode="update_xml_step1"/>
|
15629
|
+
<xsl:template match="*[local-name() = 'erefstack']" mode="update_xml_pres"/>
|
15630
|
+
|
15631
|
+
<xsl:template match="*[local-name() = 'svgmap']"/>
|
15632
|
+
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_step1"/>
|
15633
|
+
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_pres"/>
|
15634
|
+
|
15355
15635
|
<!-- END: update new Presentation XML -->
|
15356
15636
|
|
15357
15637
|
<!-- =========================================================================== -->
|
@@ -15424,7 +15704,7 @@
|
|
15424
15704
|
|
15425
15705
|
<xsl:choose>
|
15426
15706
|
<xsl:when test="$page_sequence_at_top = 'true'">
|
15427
|
-
<xsl:for-each select="ancestor::*[ancestor::*[
|
15707
|
+
<xsl:for-each select="ancestor::*[ancestor::*[local-name() = 'metanorma']]">
|
15428
15708
|
<element pos="{position()}">
|
15429
15709
|
<xsl:copy-of select="@*[local-name() != 'id']"/>
|
15430
15710
|
<xsl:value-of select="name()"/>
|
@@ -15956,7 +16236,7 @@
|
|
15956
16236
|
</xsl:when>
|
15957
16237
|
<xsl:when test="contains($text, $replace)">
|
15958
16238
|
<xsl:value-of select="substring-before($text,$replace)"/>
|
15959
|
-
<xsl:element name="inlineChar" namespace="https://www.metanorma.org/ns/
|
16239
|
+
<xsl:element name="inlineChar" namespace="https://www.metanorma.org/ns/standoc"><xsl:value-of select="$by"/></xsl:element>
|
15960
16240
|
<xsl:call-template name="replaceChar">
|
15961
16241
|
<xsl:with-param name="text" select="substring-after($text,$replace)"/>
|
15962
16242
|
<xsl:with-param name="replace" select="$replace"/>
|
@@ -15993,7 +16273,7 @@
|
|
15993
16273
|
</xsl:variable>
|
15994
16274
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
15995
16275
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
15996
|
-
<xsl:variable name="lang" select="ancestor::*[
|
16276
|
+
<xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
15997
16277
|
<xsl:variable name="reference" select="@reference"/>
|
15998
16278
|
<!-- fn sequence number in document -->
|
15999
16279
|
<xsl:variable name="current_fn_number" select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
@@ -16038,7 +16318,7 @@
|
|
16038
16318
|
</xsl:template>
|
16039
16319
|
|
16040
16320
|
<xsl:template name="printEdition">
|
16041
|
-
<xsl:variable name="edition_i18n" select="normalize-space((//*[
|
16321
|
+
<xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
16042
16322
|
|
16043
16323
|
<xsl:choose>
|
16044
16324
|
<xsl:when test="$edition_i18n != ''">
|
@@ -16048,7 +16328,7 @@
|
|
16048
16328
|
</xsl:call-template>
|
16049
16329
|
</xsl:when>
|
16050
16330
|
<xsl:otherwise>
|
16051
|
-
<xsl:variable name="edition" select="normalize-space((//*[
|
16331
|
+
<xsl:variable name="edition" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'])"/>
|
16052
16332
|
<xsl:if test="$edition != ''"> <!-- Example: 1.3 -->
|
16053
16333
|
<xsl:call-template name="capitalize">
|
16054
16334
|
<xsl:with-param name="str">
|
@@ -16182,7 +16462,7 @@
|
|
16182
16462
|
<xsl:param name="charDelim" select="', '"/>
|
16183
16463
|
<xsl:choose>
|
16184
16464
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
16185
|
-
<xsl:for-each select="//*[
|
16465
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
16186
16466
|
<xsl:sort data-type="text" order="ascending"/>
|
16187
16467
|
<xsl:call-template name="insertKeyword">
|
16188
16468
|
<xsl:with-param name="meta" select="$meta"/>
|
@@ -16192,7 +16472,7 @@
|
|
16192
16472
|
</xsl:for-each>
|
16193
16473
|
</xsl:when>
|
16194
16474
|
<xsl:otherwise>
|
16195
|
-
<xsl:for-each select="//*[
|
16475
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
16196
16476
|
<xsl:call-template name="insertKeyword">
|
16197
16477
|
<xsl:with-param name="meta" select="$meta"/>
|
16198
16478
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -16267,7 +16547,7 @@
|
|
16267
16547
|
<!-- Dublin Core properties go here -->
|
16268
16548
|
<dc:title>
|
16269
16549
|
<xsl:variable name="title">
|
16270
|
-
<xsl:for-each select="(//*[
|
16550
|
+
<xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
|
16271
16551
|
|
16272
16552
|
<xsl:value-of select="$title_prefix"/>
|
16273
16553
|
<xsl:value-of select="*[local-name() = 'title']"/>
|
@@ -16288,7 +16568,7 @@
|
|
16288
16568
|
</rdf:Alt>
|
16289
16569
|
</dc:title>
|
16290
16570
|
<xsl:variable name="dc_creator">
|
16291
|
-
<xsl:for-each select="(//*[
|
16571
|
+
<xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
|
16292
16572
|
|
16293
16573
|
<rdf:Seq>
|
16294
16574
|
<rdf:li>
|
@@ -16307,7 +16587,7 @@
|
|
16307
16587
|
<xsl:variable name="dc_description">
|
16308
16588
|
<xsl:variable name="abstract">
|
16309
16589
|
|
16310
|
-
<xsl:copy-of select="//*[
|
16590
|
+
<xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'fmt-title']) and not(ancestor::*[local-name() = 'title']) and not(ancestor::*[local-name() = 'fmt-xref-label'])]"/>
|
16311
16591
|
|
16312
16592
|
</xsl:variable>
|
16313
16593
|
<rdf:Alt>
|
@@ -16335,7 +16615,7 @@
|
|
16335
16615
|
</rdf:RDF>
|
16336
16616
|
</x:xmpmeta>
|
16337
16617
|
<!-- add attachments -->
|
16338
|
-
<xsl:for-each select="//*[
|
16618
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
16339
16619
|
<xsl:variable name="bibitem_attachment_" select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]"/>
|
16340
16620
|
<xsl:variable name="bibitem_attachment" select="xalan:nodeset($bibitem_attachment_)"/>
|
16341
16621
|
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
|
@@ -16369,7 +16649,7 @@
|
|
16369
16649
|
</pdf:embedded-file>
|
16370
16650
|
</xsl:for-each>
|
16371
16651
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
16372
|
-
<xsl:if test="not(//*[
|
16652
|
+
<xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
16373
16653
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
16374
16654
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
16375
16655
|
<xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
|
@@ -16573,9 +16853,9 @@
|
|
16573
16853
|
<xsl:value-of select="document('')//*/namespace::ieee"/>
|
16574
16854
|
|
16575
16855
|
</xsl:variable>
|
16576
|
-
<xsl:if test="$documentNS != $XSLNS">
|
16856
|
+
<!-- <xsl:if test="$documentNS != $XSLNS">
|
16577
16857
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
16578
|
-
</xsl:if>
|
16858
|
+
</xsl:if> -->
|
16579
16859
|
</xsl:template> <!-- namespaceCheck -->
|
16580
16860
|
|
16581
16861
|
<xsl:template name="getLanguage">
|
@@ -16654,10 +16934,10 @@
|
|
16654
16934
|
|
16655
16935
|
<xsl:variable name="data_value">
|
16656
16936
|
<xsl:choose>
|
16657
|
-
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) !=
|
16937
|
+
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != 0">
|
16658
16938
|
<xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
16659
16939
|
</xsl:when>
|
16660
|
-
<xsl:when test="string-length($bibdata_updated) !=
|
16940
|
+
<xsl:when test="string-length($bibdata_updated) != 0">
|
16661
16941
|
<xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
16662
16942
|
</xsl:when>
|
16663
16943
|
<xsl:when test="$formatted = 'true'">
|
@@ -16795,7 +17075,7 @@
|
|
16795
17075
|
<!-- background image -->
|
16796
17076
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
16797
17077
|
<fo:block>
|
16798
|
-
<xsl:for-each select="/*[
|
17078
|
+
<xsl:for-each select="/*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = $name][1]/*[local-name() = 'value']/*[local-name() = 'image'][$num]">
|
16799
17079
|
<xsl:choose>
|
16800
17080
|
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
16801
17081
|
<fo:instream-foreign-object fox:alt-text="Image Front">
|