metanorma-iec 1.2.12 → 1.2.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +9 -32
- data/.gitignore +2 -0
- data/.rubocop.yml +6 -2
- data/lib/asciidoctor/iec/basicdoc.rng +5 -3
- data/lib/asciidoctor/iec/biblio.rng +4 -6
- data/lib/asciidoctor/iec/converter.rb +3 -0
- data/lib/asciidoctor/iec/front.rb +17 -51
- data/lib/asciidoctor/iec/iec.rng +11 -0
- data/lib/asciidoctor/iec/isodoc.rng +108 -2
- data/lib/asciidoctor/iec/isostandard.rng +17 -97
- data/lib/isodoc/iec/html/html_iec_intro.html +1 -1
- data/lib/isodoc/iec/html/word_iec_intro.html +1 -1
- data/lib/isodoc/iec/html_convert.rb +2 -2
- data/lib/isodoc/iec/iec.international-standard.xsl +720 -299
- data/lib/isodoc/iec/word_convert.rb +2 -2
- data/lib/metanorma/iec/version.rb +1 -1
- data/metanorma-iec.gemspec +4 -4
- data/spec/asciidoctor-iec/base_spec.rb +15 -2
- data/spec/asciidoctor-iec/validate_spec.rb +22 -21
- data/spec/isodoc/iso_spec.rb +2 -2
- data/spec/spec_helper.rb +6 -0
- metadata +12 -12
@@ -13,8 +13,8 @@ module IsoDoc
|
|
13
13
|
|
14
14
|
def default_fonts(options)
|
15
15
|
{
|
16
|
-
bodyfont: (options[:script] == "Hans" ? '"
|
17
|
-
headerfont: (options[:script] == "Hans" ? '"
|
16
|
+
bodyfont: (options[:script] == "Hans" ? '"Source Han Sans",serif' : '"Arial",sans-serif'),
|
17
|
+
headerfont: (options[:script] == "Hans" ? '"Source Han Sans",sans-serif' : '"Arial",sans-serif'),
|
18
18
|
monospacefont: ('"Courier New",monospace'),
|
19
19
|
monospacefontsize: "1.0em",
|
20
20
|
footnotefontsize: "0.9em",
|
@@ -3,6 +3,7 @@
|
|
3
3
|
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
|
4
4
|
|
5
5
|
<xsl:param name="svg_images"/>
|
6
|
+
<xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
|
6
7
|
<xsl:variable name="images" select="document($svg_images)"/>
|
7
8
|
|
8
9
|
|
@@ -215,7 +216,9 @@
|
|
215
216
|
</fo:simple-page-master>
|
216
217
|
</fo:layout-master-set>
|
217
218
|
|
218
|
-
<
|
219
|
+
<fo:declarations>
|
220
|
+
<xsl:call-template name="addPDFUAmeta"/>
|
221
|
+
</fo:declarations>
|
219
222
|
|
220
223
|
<xsl:call-template name="addBookmarks">
|
221
224
|
<xsl:with-param name="contents" select="$contents"/>
|
@@ -335,7 +338,7 @@
|
|
335
338
|
</fo:block-container>
|
336
339
|
</fo:block>
|
337
340
|
|
338
|
-
<xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:feedback-statement"/>
|
341
|
+
<xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:feedback-statement"/> <!-- //iec:clause[not(@id) or @id != 'boilerplate-cenelec-attention'] -->
|
339
342
|
<fo:block span="all" border-bottom="0.5pt solid black"/>
|
340
343
|
<xsl:if test="(//iec:iec-standard)[2]/iec:boilerplate/iec:feedback-statement">
|
341
344
|
<xsl:apply-templates select="(//iec:iec-standard)[2]/iec:boilerplate/iec:feedback-statement"/>
|
@@ -584,7 +587,10 @@
|
|
584
587
|
<fo:static-content flow-name="footer-FDIS">
|
585
588
|
<fo:block-container background-color="rgb(236, 232, 232)" padding="2mm" border="1.5pt solid white">
|
586
589
|
<fo:block font-size="8pt" margin-bottom="6pt">
|
587
|
-
|
590
|
+
|
591
|
+
<xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:copyright-statement/iec:clause/iec:p[not(@id)]"/>
|
592
|
+
|
593
|
+
<!-- <fo:inline font-weight="bold">
|
588
594
|
<xsl:call-template name="addLetterSpacing">
|
589
595
|
<xsl:with-param name="text">
|
590
596
|
<xsl:for-each select="(//iec:iec-standard)[1]/iec:bibdata/iec:copyright">
|
@@ -599,7 +605,7 @@
|
|
599
605
|
<xsl:text>. All rights reserved. It is permitted to download this electronic file, to make a copy and to print out the content for the sole purpose of preparing National Committee positions. You may not copy or "mirror" the file or printed version of the document, or any part of it, for any other purpose without permission in writing from IEC.</xsl:text>
|
600
606
|
</xsl:with-param>
|
601
607
|
</xsl:call-template>
|
602
|
-
</fo:inline>
|
608
|
+
</fo:inline> -->
|
603
609
|
</fo:block>
|
604
610
|
</fo:block-container>
|
605
611
|
</fo:static-content>
|
@@ -611,7 +617,8 @@
|
|
611
617
|
<fo:inline font-size="8pt" padding-left="0.5mm" color="{$color_blue}">®</fo:inline>
|
612
618
|
</xsl:if>
|
613
619
|
<fo:inline keep-together.within-line="always" font-size="18pt" font-weight="bold" baseline-shift="10mm"><fo:leader leader-pattern="space"/>
|
614
|
-
|
620
|
+
<!-- Ex: 34D/1511/FDIS -->
|
621
|
+
<xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:docidentifier[@type='iso-tc']"/>
|
615
622
|
<xsl:text> </xsl:text>
|
616
623
|
</fo:inline>
|
617
624
|
</fo:block>
|
@@ -672,7 +679,8 @@
|
|
672
679
|
</fo:block>
|
673
680
|
<fo:block font-size="9pt" font-weight="bold">
|
674
681
|
<xsl:call-template name="addLetterSpacing">
|
675
|
-
|
682
|
+
<!-- 2019-12-06 -->
|
683
|
+
<xsl:with-param name="text"><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:date[@type='vote-ended']/iec:on"/></xsl:with-param>
|
676
684
|
</xsl:call-template>
|
677
685
|
</fo:block>
|
678
686
|
</fo:table-cell>
|
@@ -686,7 +694,8 @@
|
|
686
694
|
</fo:block>
|
687
695
|
<fo:block font-size="9pt" font-weight="bold">
|
688
696
|
<xsl:variable name="supersedes_documents">
|
689
|
-
<xsl:for-each select="//iec:iec-standard/iec:bibdata/iec:relation[@type='supersedes']/iec:bibitem/iec:docnumber">
|
697
|
+
<!-- <xsl:for-each select="//iec:iec-standard/iec:bibdata/iec:relation[@type='supersedes']/iec:bibitem/iec:docnumber"> -->
|
698
|
+
<xsl:for-each select="//iec:iec-standard/iec:bibdata/iec:relation[@type='obsoletes']/iec:bibitem/iec:docidentifier">
|
690
699
|
<xsl:value-of select="."/>
|
691
700
|
<xsl:if test="position() != last()">,</xsl:if>
|
692
701
|
</xsl:for-each>
|
@@ -712,22 +721,26 @@
|
|
712
721
|
<fo:table-row height="4mm">
|
713
722
|
<fo:table-cell number-columns-spanned="2" border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
|
714
723
|
<fo:block>
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
724
|
+
<!-- If //bibdata/ext/editorialgroup/subcommittee exists, use "IEC SC" + //bibdata/ext/editorialgroup/subcommittee/@number + //bibdata/ext/editorialgroup/subcommittee,
|
725
|
+
else use "IEC TC" + //bibdata/ext/editorialgroup/technical-committee/@number + //bibdata/ext/editorialgroup/technical-committee -->
|
726
|
+
<xsl:choose>
|
727
|
+
<xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:subcommittee">
|
728
|
+
<fo:block font-size="6.5pt">
|
729
|
+
<fo:inline font-size="8pt">IEC SC <xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:subcommittee/@number"/> : </fo:inline>
|
730
|
+
<xsl:call-template name="addLetterSpacingSmallCaps">
|
731
|
+
<xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:subcommittee"/>
|
732
|
+
</xsl:call-template>
|
733
|
+
</fo:block>
|
734
|
+
</xsl:when>
|
735
|
+
<xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:technical-committee">
|
736
|
+
<fo:block font-size="6.5pt">
|
737
|
+
<fo:inline font-size="8pt">IEC TC <xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:technical-committee/@number"/> : </fo:inline>
|
738
|
+
<xsl:call-template name="addLetterSpacingSmallCaps">
|
739
|
+
<xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:editorialgroup/iec:technical-committee"/>
|
740
|
+
</xsl:call-template>
|
741
|
+
</fo:block>
|
742
|
+
</xsl:when>
|
743
|
+
</xsl:choose>
|
731
744
|
</fo:block>
|
732
745
|
</fo:table-cell>
|
733
746
|
</fo:table-row>
|
@@ -751,8 +764,9 @@
|
|
751
764
|
</xsl:call-template>
|
752
765
|
</fo:block>
|
753
766
|
<fo:block font-size="9pt">
|
767
|
+
<!-- Example: Ms Shanti Conn -->
|
754
768
|
<xsl:call-template name="addLetterSpacing">
|
755
|
-
<xsl:with-param name="text" select="
|
769
|
+
<xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:secretary"/>
|
756
770
|
</xsl:call-template>
|
757
771
|
</fo:block>
|
758
772
|
</fo:table-cell>
|
@@ -767,6 +781,11 @@
|
|
767
781
|
<xsl:with-param name="text" select="'Of interest to the following committees:'"/>
|
768
782
|
</xsl:call-template>
|
769
783
|
</fo:block>
|
784
|
+
<fo:block font-size="9pt">
|
785
|
+
<xsl:call-template name="addLetterSpacing">
|
786
|
+
<xsl:with-param name="text" select="//iec:iec-standard/iec:bibdata/iec:ext/iec:interest-to-committees"/>
|
787
|
+
</xsl:call-template>
|
788
|
+
</fo:block>
|
770
789
|
</fo:table-cell>
|
771
790
|
<xsl:if test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD'">
|
772
791
|
<fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
|
@@ -782,9 +801,15 @@
|
|
782
801
|
</xsl:call-template>
|
783
802
|
</xsl:if>
|
784
803
|
</fo:block>
|
785
|
-
|
786
804
|
<fo:block>
|
787
|
-
<xsl:
|
805
|
+
<xsl:choose>
|
806
|
+
<xsl:when test="//iec:iec-standard/iec:bibdata/iec:ext/iec:horizontal = 'true'">
|
807
|
+
<xsl:call-template name="insertCheckBoxOn"/>
|
808
|
+
</xsl:when>
|
809
|
+
<xsl:otherwise>
|
810
|
+
<xsl:call-template name="insertCheckBoxOff"/>
|
811
|
+
</xsl:otherwise>
|
812
|
+
</xsl:choose>
|
788
813
|
</fo:block>
|
789
814
|
|
790
815
|
<xsl:if test="$stage-abbreviation = 'CDV' or $stage-abbreviation = 'CD'">
|
@@ -885,13 +910,10 @@
|
|
885
910
|
<xsl:with-param name="text" select="'Submitted for CENELEC parallel voting'"/>
|
886
911
|
</xsl:call-template>
|
887
912
|
</fo:block>
|
888
|
-
<fo:block font-size="8pt" font-weight="bold" margin-bottom="10pt">
|
889
|
-
<xsl:call-template name="addLetterSpacing">
|
890
|
-
<xsl:with-param name="text" select="'Attention IEC-CENELEC parallel voting'"/>
|
891
|
-
</xsl:call-template>
|
892
|
-
</fo:block>
|
893
913
|
|
894
|
-
<
|
914
|
+
<xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:feedback-statement/iec:clause[@id = 'boilerplate-cenelec-attention']"/>
|
915
|
+
|
916
|
+
<!-- <fo:block font-size="8pt" margin-bottom="10pt" text-align="justify">
|
895
917
|
<xsl:if test="$stage-abbreviation = 'FDIS'">
|
896
918
|
<xsl:call-template name="addLetterSpacing">
|
897
919
|
<xsl:with-param name="text" select="'The attention of IEC National Committees, members of CENELEC, is drawn to the fact that this Final Draft International Standard (FDIS) is submitted for parallel voting.'"/>
|
@@ -907,7 +929,8 @@
|
|
907
929
|
<xsl:call-template name="addLetterSpacing">
|
908
930
|
<xsl:with-param name="text" select="'The CENELEC members are invited to vote through the CENELEC online voting system.'"/>
|
909
931
|
</xsl:call-template>
|
910
|
-
</fo:block>
|
932
|
+
</fo:block> -->
|
933
|
+
|
911
934
|
</fo:table-cell>
|
912
935
|
<fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
|
913
936
|
<fo:block font-size="6.5pt" margin-bottom="6pt">
|
@@ -932,7 +955,10 @@
|
|
932
955
|
</fo:block-container>
|
933
956
|
|
934
957
|
<fo:block-container font-size="8pt" background-color="rgb(236, 232, 232)" margin-top="5mm" padding="2mm" text-align="justify" border="1.5pt solid white">
|
935
|
-
<
|
958
|
+
<fo:block>
|
959
|
+
<xsl:apply-templates select="(//iec:iec-standard)[1]/iec:boilerplate/iec:license-statement" mode="cover-page-internal"/>
|
960
|
+
</fo:block>
|
961
|
+
<!-- <xsl:if test="$stage-abbreviation = 'FDIS'">
|
936
962
|
<fo:block margin-bottom="6pt">
|
937
963
|
<xsl:call-template name="addLetterSpacing">
|
938
964
|
<xsl:with-param name="text">This document is a draft distributed for approval. It may not be referred to as an International Standard until published as such.</xsl:with-param>
|
@@ -949,7 +975,17 @@
|
|
949
975
|
</xsl:call-template>
|
950
976
|
</fo:block>
|
951
977
|
</xsl:if>
|
952
|
-
<xsl:if test="$stage-abbreviation = 'NWIP' or
|
978
|
+
<xsl:if test="$stage-abbreviation = 'NWIP' or
|
979
|
+
$stage-abbreviation = 'PWI' or
|
980
|
+
$stage-abbreviation = 'NP' or
|
981
|
+
$stage-abbreviation = 'AWI' or
|
982
|
+
$stage-abbreviation = 'WD' or
|
983
|
+
$stage-abbreviation = 'CD' or
|
984
|
+
$stage-abbreviation = 'CDV' or
|
985
|
+
$stage-abbreviation = 'CD-TSTR' or
|
986
|
+
$stage-abbreviation = 'DTS' or
|
987
|
+
$stage-abbreviation = 'DTR' or
|
988
|
+
$stage-abbreviation = 'DPAS'">
|
953
989
|
<fo:block margin-bottom="6pt">
|
954
990
|
<xsl:call-template name="addLetterSpacing">
|
955
991
|
<xsl:with-param name="text">This document is still under study and subject to change. It should not be used for reference purposes.</xsl:with-param>
|
@@ -960,7 +996,7 @@
|
|
960
996
|
<xsl:with-param name="text">Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</xsl:with-param>
|
961
997
|
</xsl:call-template>
|
962
998
|
</fo:block>
|
963
|
-
</xsl:if>
|
999
|
+
</xsl:if> -->
|
964
1000
|
</fo:block-container>
|
965
1001
|
|
966
1002
|
<fo:block-container background-color="rgb(219, 229, 241)" margin-top="4mm" padding="2mm" padding-top="1mm" border="1.5pt solid white">
|
@@ -984,24 +1020,24 @@
|
|
984
1020
|
<xsl:text>PROPOSED STABILITY DATE: </xsl:text>
|
985
1021
|
</xsl:with-param>
|
986
1022
|
</xsl:call-template>
|
987
|
-
|
1023
|
+
<!-- 2023 -->
|
1024
|
+
<fo:inline font-size="9pt"><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:date[@type='unchanged']/iec:on"/></fo:inline>
|
988
1025
|
</fo:block>
|
989
1026
|
</fo:block-container>
|
990
1027
|
</xsl:if>
|
991
1028
|
|
992
|
-
<fo:block-container border="1.5 solid" border-color="rgb(221, 213, 213)"
|
1029
|
+
<fo:block-container border="1.5 solid" border-color="rgb(221, 213, 213)" padding="1mm" margin-top="3mm">
|
993
1030
|
<fo:block font-size="6.5pt" margin-bottom="6pt">
|
994
1031
|
<xsl:call-template name="addLetterSpacingSmallCaps">
|
995
1032
|
<xsl:with-param name="text">Note from TC/SC officers:</xsl:with-param>
|
996
1033
|
</xsl:call-template>
|
997
1034
|
</fo:block>
|
998
|
-
<!--
|
1035
|
+
<!-- Example: This FDIS is the result of the discussion between the IEC SC21A experts WG 3 during the meeting held in -->
|
1036
|
+
<xsl:apply-templates select="(//iec:iec-standard)[1]/iec:bibdata/iec:ext/iec:tc-sc-officers-note"/>
|
999
1037
|
</fo:block-container>
|
1000
1038
|
|
1001
|
-
|
1002
|
-
|
1003
|
-
<xsl:if test="$stage-abbreviation = 'FDIS'">
|
1004
|
-
<fo:block-container font-size="9pt" border="1.5 solid" border-color="rgb(221, 213, 213)" height="13mm" padding="1mm" margin-top="3mm">
|
1039
|
+
<!-- <xsl:if test="$stage-abbreviation = 'FDIS'">
|
1040
|
+
<fo:block-container font-size="9pt" border="1.5 solid" border-color="rgb(221, 213, 213)" height="13mm" padding="1mm" margin-top="3mm">
|
1005
1041
|
<fo:block margin-bottom="6pt">
|
1006
1042
|
<xsl:call-template name="addLetterSpacing">
|
1007
1043
|
<xsl:with-param name="text">
|
@@ -1017,7 +1053,7 @@
|
|
1017
1053
|
</xsl:call-template>
|
1018
1054
|
</fo:block>
|
1019
1055
|
</fo:block-container>
|
1020
|
-
</xsl:if>
|
1056
|
+
</xsl:if> -->
|
1021
1057
|
|
1022
1058
|
</fo:flow>
|
1023
1059
|
</fo:page-sequence>
|
@@ -1191,6 +1227,10 @@
|
|
1191
1227
|
</fo:root>
|
1192
1228
|
</xsl:template>
|
1193
1229
|
|
1230
|
+
<xsl:template match="iec:tc-sc-officers-note/iec:p">
|
1231
|
+
<fo:block><xsl:apply-templates/></fo:block>
|
1232
|
+
</xsl:template>
|
1233
|
+
|
1194
1234
|
<xsl:template name="insertCoverPart1">
|
1195
1235
|
<xsl:variable name="lang_second">
|
1196
1236
|
<xsl:choose>
|
@@ -1574,6 +1614,39 @@
|
|
1574
1614
|
</xsl:template>
|
1575
1615
|
|
1576
1616
|
|
1617
|
+
<xsl:template match="iec:feedback-statement/iec:clause[@id = 'boilerplate-cenelec-attention']" priority="3">
|
1618
|
+
<fo:block font-size="8pt" margin-bottom="10pt" text-align="justify">
|
1619
|
+
<xsl:apply-templates/>
|
1620
|
+
</fo:block>
|
1621
|
+
</xsl:template>
|
1622
|
+
|
1623
|
+
<xsl:template match="iec:feedback-statement/iec:clause[@id = 'boilerplate-cenelec-attention']//iec:title" priority="3">
|
1624
|
+
<fo:block font-size="8pt" font-weight="bold" margin-bottom="10pt">
|
1625
|
+
<xsl:apply-templates/>
|
1626
|
+
</fo:block>
|
1627
|
+
</xsl:template>
|
1628
|
+
|
1629
|
+
<xsl:template match="iec:feedback-statement/iec:clause[@id = 'boilerplate-cenelec-attention']//iec:p" priority="3">
|
1630
|
+
<fo:block font-size="8pt" margin-bottom="10pt" text-align="justify">
|
1631
|
+
<xsl:apply-templates/>
|
1632
|
+
</fo:block>
|
1633
|
+
</xsl:template>
|
1634
|
+
|
1635
|
+
<xsl:template match="iec:feedback-statement/iec:clause[@id = 'boilerplate-cenelec-attention']//text()" priority="3">
|
1636
|
+
<!-- Example: Attention IEC-CENELEC parallel voting -->
|
1637
|
+
<xsl:if test="normalize-space() ! = ''">
|
1638
|
+
<xsl:call-template name="addLetterSpacing">
|
1639
|
+
<xsl:with-param name="text" select="."/>
|
1640
|
+
</xsl:call-template>
|
1641
|
+
</xsl:if>
|
1642
|
+
</xsl:template>
|
1643
|
+
|
1644
|
+
<xsl:template match="iec:boilerplate/iec:feedback-statement">
|
1645
|
+
<fo:block margin-top="6pt" font-size="1pt" span="all">
|
1646
|
+
</fo:block>
|
1647
|
+
<xsl:apply-templates select="*[not(@id) or @id != 'boilerplate-cenelec-attention']"/>
|
1648
|
+
</xsl:template>
|
1649
|
+
|
1577
1650
|
<xsl:template match="iec:feedback-statement//iec:clause/iec:title" priority="2">
|
1578
1651
|
<fo:block font-weight="bold" keep-with-next="always"><xsl:apply-templates/></fo:block>
|
1579
1652
|
</xsl:template>
|
@@ -1584,9 +1657,9 @@
|
|
1584
1657
|
|
1585
1658
|
<xsl:template match="iec:feedback-statement/iec:clause[not(iec:clause)]" priority="2">
|
1586
1659
|
<fo:block span="all" text-align="justify">
|
1587
|
-
<xsl:if test="not(preceding-sibling::iec:clause)">
|
1660
|
+
<!-- <xsl:if test="not(preceding-sibling::iec:clause)">
|
1588
1661
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1589
|
-
</xsl:if>
|
1662
|
+
</xsl:if> -->
|
1590
1663
|
<xsl:apply-templates/>
|
1591
1664
|
</fo:block>
|
1592
1665
|
</xsl:template>
|
@@ -1693,6 +1766,23 @@
|
|
1693
1766
|
</fo:block>
|
1694
1767
|
</xsl:template>
|
1695
1768
|
|
1769
|
+
<xsl:template match="iec:license-statement//iec:title" mode="cover-page-internal">
|
1770
|
+
<fo:block text-align="center" font-weight="bold">
|
1771
|
+
<xsl:apply-templates/>
|
1772
|
+
</fo:block>
|
1773
|
+
</xsl:template>
|
1774
|
+
<xsl:template match="iec:license-statement//iec:p" mode="cover-page-internal">
|
1775
|
+
<fo:block margin-bottom="6pt">
|
1776
|
+
<xsl:apply-templates mode="cover-page-internal"/>
|
1777
|
+
</fo:block>
|
1778
|
+
</xsl:template>
|
1779
|
+
<xsl:template match="iec:license-statement//iec:p//text()" mode="cover-page-internal">
|
1780
|
+
<xsl:call-template name="addLetterSpacing">
|
1781
|
+
<xsl:with-param name="text"><xsl:value-of select="."/></xsl:with-param>
|
1782
|
+
</xsl:call-template>
|
1783
|
+
</xsl:template>
|
1784
|
+
|
1785
|
+
|
1696
1786
|
<!-- <fo:block margin-bottom="12pt">© ISO 2019, Published in Switzerland.</fo:block>
|
1697
1787
|
<fo:block font-size="10pt" margin-bottom="12pt">All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting on the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address below or ISO’s member body in the country of the requester.</fo:block>
|
1698
1788
|
<fo:block font-size="10pt" text-indent="7.1mm">
|
@@ -1728,6 +1818,15 @@
|
|
1728
1818
|
<xsl:apply-templates/>
|
1729
1819
|
</fo:block>
|
1730
1820
|
</xsl:template>
|
1821
|
+
|
1822
|
+
<!-- copyright text in footer internal footer -->
|
1823
|
+
<xsl:template match="iec:copyright-statement//iec:p[not(@id)]//text()">
|
1824
|
+
<xsl:if test="normalize-space() ! = ''">
|
1825
|
+
<xsl:call-template name="addLetterSpacing">
|
1826
|
+
<xsl:with-param name="text" select="normalize-space(.)"/>
|
1827
|
+
</xsl:call-template>
|
1828
|
+
</xsl:if>
|
1829
|
+
</xsl:template>
|
1731
1830
|
|
1732
1831
|
|
1733
1832
|
<xsl:template match="iec:iec-standard/iec:preface/iec:foreword" priority="3">
|
@@ -2054,13 +2153,22 @@
|
|
2054
2153
|
<xsl:otherwise> <!-- for ordered lists -->
|
2055
2154
|
<xsl:choose>
|
2056
2155
|
<xsl:when test="../@type = 'arabic'">
|
2057
|
-
<xsl:number format="
|
2156
|
+
<xsl:number format="1)"/>
|
2058
2157
|
</xsl:when>
|
2059
2158
|
<xsl:when test="../@type = 'alphabet'">
|
2060
2159
|
<xsl:number format="a)" lang="en"/>
|
2061
2160
|
</xsl:when>
|
2161
|
+
<xsl:when test="../@type = 'alphabet_upper'">
|
2162
|
+
<xsl:number format="A." lang="en"/>
|
2163
|
+
</xsl:when>
|
2164
|
+
<xsl:when test="../@type = 'roman'">
|
2165
|
+
<xsl:number format="i)" lang="en"/>
|
2166
|
+
</xsl:when>
|
2167
|
+
<xsl:when test="../@type = 'roman_upper'">
|
2168
|
+
<xsl:number format="I." lang="en"/>
|
2169
|
+
</xsl:when>
|
2062
2170
|
<xsl:otherwise>
|
2063
|
-
<xsl:number format="
|
2171
|
+
<xsl:number format="a)" lang="en"/>
|
2064
2172
|
</xsl:otherwise>
|
2065
2173
|
</xsl:choose>
|
2066
2174
|
</xsl:otherwise>
|
@@ -2631,6 +2739,7 @@
|
|
2631
2739
|
|
2632
2740
|
|
2633
2741
|
|
2742
|
+
|
2634
2743
|
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
2635
2744
|
|
2636
2745
|
<xsl:attribute name="padding-right">10mm</xsl:attribute>
|
@@ -2748,6 +2857,7 @@
|
|
2748
2857
|
|
2749
2858
|
|
2750
2859
|
|
2860
|
+
|
2751
2861
|
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
2752
2862
|
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
2753
2863
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
@@ -2898,203 +3008,237 @@
|
|
2898
3008
|
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
2899
3009
|
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
2900
3010
|
<xsl:call-template name="add-zero-spaces-java"/>
|
2901
|
-
</xsl:template><xsl:template match="*[local-name()='table']">
|
3011
|
+
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
2902
3012
|
|
2903
|
-
<xsl:variable name="
|
2904
|
-
<xsl:call-template name="getSimpleTable"/>
|
2905
|
-
</xsl:variable>
|
3013
|
+
<xsl:variable name="table">
|
2906
3014
|
|
2907
|
-
|
2908
|
-
|
2909
|
-
|
2910
|
-
|
2911
|
-
<!-- <xsl:if test="$namespace = 'bipm'">
|
2912
|
-
<fo:block> </fo:block>
|
2913
|
-
</xsl:if> -->
|
2914
|
-
|
2915
|
-
<!-- $namespace = 'iso' or -->
|
2916
|
-
|
2917
|
-
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2918
|
-
|
2919
|
-
|
2920
|
-
|
2921
|
-
<xsl:call-template name="fn_name_display"/>
|
3015
|
+
<xsl:variable name="simple-table">
|
3016
|
+
<xsl:call-template name="getSimpleTable"/>
|
3017
|
+
</xsl:variable>
|
2922
3018
|
|
2923
3019
|
|
2924
|
-
|
2925
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
2926
|
-
|
2927
|
-
<!-- <xsl:variable name="cols-count">
|
2928
|
-
<xsl:choose>
|
2929
|
-
<xsl:when test="*[local-name()='thead']">
|
2930
|
-
<xsl:call-template name="calculate-columns-numbers">
|
2931
|
-
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
2932
|
-
</xsl:call-template>
|
2933
|
-
</xsl:when>
|
2934
|
-
<xsl:otherwise>
|
2935
|
-
<xsl:call-template name="calculate-columns-numbers">
|
2936
|
-
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
2937
|
-
</xsl:call-template>
|
2938
|
-
</xsl:otherwise>
|
2939
|
-
</xsl:choose>
|
2940
|
-
</xsl:variable> -->
|
2941
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
2942
|
-
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
2943
|
-
|
2944
|
-
|
2945
|
-
|
2946
|
-
<xsl:variable name="colwidths">
|
2947
|
-
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
2948
|
-
<xsl:call-template name="calculate-column-widths">
|
2949
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2950
|
-
<xsl:with-param name="table" select="$simple-table"/>
|
2951
|
-
</xsl:call-template>
|
2952
|
-
</xsl:if>
|
2953
|
-
</xsl:variable>
|
2954
|
-
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2955
|
-
|
2956
|
-
<!-- <xsl:variable name="colwidths2">
|
2957
|
-
<xsl:call-template name="calculate-column-widths">
|
2958
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2959
|
-
</xsl:call-template>
|
2960
|
-
</xsl:variable> -->
|
2961
|
-
|
2962
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
2963
|
-
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
2964
|
-
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
2965
|
-
|
2966
|
-
<xsl:variable name="margin-left">
|
2967
|
-
<xsl:choose>
|
2968
|
-
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
2969
|
-
<xsl:otherwise>0</xsl:otherwise>
|
2970
|
-
</xsl:choose>
|
2971
|
-
</xsl:variable>
|
2972
|
-
|
2973
|
-
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
2974
3020
|
|
2975
3021
|
|
2976
3022
|
|
2977
|
-
|
2978
|
-
<
|
2979
|
-
|
2980
|
-
<xsl:attribute name="space-after">16pt</xsl:attribute>
|
2981
|
-
</xsl:if>
|
2982
|
-
|
2983
|
-
|
2984
|
-
|
3023
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
3024
|
+
<fo:block> </fo:block>
|
3025
|
+
</xsl:if> -->
|
2985
3026
|
|
3027
|
+
<!-- $namespace = 'iso' or -->
|
2986
3028
|
|
2987
|
-
|
3029
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3030
|
+
|
3031
|
+
|
3032
|
+
|
3033
|
+
<xsl:call-template name="fn_name_display"/>
|
3034
|
+
|
3035
|
+
|
3036
|
+
|
3037
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
3038
|
+
|
3039
|
+
<!-- <xsl:variable name="cols-count">
|
3040
|
+
<xsl:choose>
|
3041
|
+
<xsl:when test="*[local-name()='thead']">
|
3042
|
+
<xsl:call-template name="calculate-columns-numbers">
|
3043
|
+
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
3044
|
+
</xsl:call-template>
|
3045
|
+
</xsl:when>
|
3046
|
+
<xsl:otherwise>
|
3047
|
+
<xsl:call-template name="calculate-columns-numbers">
|
3048
|
+
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
3049
|
+
</xsl:call-template>
|
3050
|
+
</xsl:otherwise>
|
3051
|
+
</xsl:choose>
|
3052
|
+
</xsl:variable> -->
|
3053
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
3054
|
+
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
2988
3055
|
|
2989
3056
|
|
2990
3057
|
|
3058
|
+
<xsl:variable name="colwidths">
|
3059
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
3060
|
+
<xsl:call-template name="calculate-column-widths">
|
3061
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
3062
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
3063
|
+
</xsl:call-template>
|
3064
|
+
</xsl:if>
|
3065
|
+
</xsl:variable>
|
3066
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2991
3067
|
|
3068
|
+
<!-- <xsl:variable name="colwidths2">
|
3069
|
+
<xsl:call-template name="calculate-column-widths">
|
3070
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
3071
|
+
</xsl:call-template>
|
3072
|
+
</xsl:variable> -->
|
2992
3073
|
|
3074
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
3075
|
+
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
3076
|
+
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
2993
3077
|
|
3078
|
+
<xsl:variable name="margin-left">
|
3079
|
+
<xsl:choose>
|
3080
|
+
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
3081
|
+
<xsl:otherwise>0</xsl:otherwise>
|
3082
|
+
</xsl:choose>
|
3083
|
+
</xsl:variable>
|
2994
3084
|
|
2995
|
-
<
|
2996
|
-
<attribute name="table-layout">fixed</attribute>
|
2997
|
-
<attribute name="width">
|
2998
|
-
<xsl:choose>
|
2999
|
-
<xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
|
3000
|
-
<xsl:otherwise>100%</xsl:otherwise>
|
3001
|
-
</xsl:choose>
|
3002
|
-
</attribute>
|
3003
|
-
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
3004
|
-
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
3085
|
+
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
3005
3086
|
|
3006
3087
|
|
3007
|
-
<attribute name="border">0.5pt solid black</attribute>
|
3008
3088
|
|
3089
|
+
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
3090
|
+
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
3091
|
+
<xsl:if test="ancestor::*[local-name() = 'preface']">
|
3092
|
+
<xsl:attribute name="space-after">16pt</xsl:attribute>
|
3093
|
+
</xsl:if>
|
3094
|
+
|
3095
|
+
|
3096
|
+
|
3009
3097
|
|
3010
3098
|
|
3011
|
-
|
3012
|
-
|
3013
|
-
|
3099
|
+
|
3014
3100
|
|
3015
|
-
|
3016
3101
|
|
3017
|
-
</xsl:variable>
|
3018
|
-
|
3019
|
-
|
3020
|
-
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
3021
3102
|
|
3022
|
-
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
3023
|
-
<xsl:attribute name="{@name}">
|
3024
|
-
<xsl:value-of select="."/>
|
3025
|
-
</xsl:attribute>
|
3026
|
-
</xsl:for-each>
|
3027
3103
|
|
3028
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
3029
|
-
<xsl:if test="$isNoteOrFnExist = 'true'">
|
3030
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
3031
|
-
</xsl:if>
|
3032
3104
|
|
3033
|
-
<xsl:choose>
|
3034
|
-
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
3035
|
-
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
3036
|
-
<fo:table-column column-width="{@width}"/>
|
3037
|
-
</xsl:for-each>
|
3038
|
-
</xsl:when>
|
3039
|
-
<xsl:otherwise>
|
3040
|
-
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
3041
|
-
<xsl:choose>
|
3042
|
-
<xsl:when test=". = 1 or . = 0">
|
3043
|
-
<fo:table-column column-width="proportional-column-width(2)"/>
|
3044
|
-
</xsl:when>
|
3045
|
-
<xsl:otherwise>
|
3046
|
-
<fo:table-column column-width="proportional-column-width({.})"/>
|
3047
|
-
</xsl:otherwise>
|
3048
|
-
</xsl:choose>
|
3049
|
-
</xsl:for-each>
|
3050
|
-
</xsl:otherwise>
|
3051
|
-
</xsl:choose>
|
3052
3105
|
|
3053
|
-
<xsl:
|
3054
|
-
|
3055
|
-
|
3056
|
-
|
3057
|
-
|
3058
|
-
|
3059
|
-
</xsl:otherwise>
|
3060
|
-
</xsl:choose>
|
3106
|
+
<xsl:variable name="table_width">
|
3107
|
+
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
3108
|
+
100%
|
3109
|
+
|
3110
|
+
|
3111
|
+
</xsl:variable>
|
3061
3112
|
|
3062
|
-
|
3063
|
-
|
3064
|
-
|
3065
|
-
|
3066
|
-
|
3067
|
-
|
3068
|
-
|
3069
|
-
|
3070
|
-
|
3071
|
-
|
3072
|
-
|
3073
|
-
|
3074
|
-
|
3075
|
-
|
3076
|
-
|
3077
|
-
|
3078
|
-
|
3079
|
-
</xsl:
|
3113
|
+
<xsl:variable name="table_attributes">
|
3114
|
+
<attribute name="table-layout">fixed</attribute>
|
3115
|
+
<attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
|
3116
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
3117
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
3118
|
+
|
3119
|
+
|
3120
|
+
<attribute name="border">0.5pt solid black</attribute>
|
3121
|
+
|
3122
|
+
|
3123
|
+
|
3124
|
+
|
3125
|
+
|
3126
|
+
|
3127
|
+
|
3128
|
+
|
3129
|
+
|
3130
|
+
</xsl:variable>
|
3080
3131
|
|
3081
|
-
|
3132
|
+
|
3133
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
3134
|
+
|
3135
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
3136
|
+
<xsl:attribute name="{@name}">
|
3137
|
+
<xsl:value-of select="."/>
|
3138
|
+
</xsl:attribute>
|
3139
|
+
</xsl:for-each>
|
3140
|
+
|
3141
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
3142
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
3143
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
3144
|
+
</xsl:if>
|
3145
|
+
|
3082
3146
|
<xsl:choose>
|
3083
|
-
<xsl:when test="
|
3084
|
-
<
|
3147
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
3148
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
3149
|
+
<fo:table-column column-width="{@width}"/>
|
3150
|
+
</xsl:for-each>
|
3085
3151
|
</xsl:when>
|
3086
3152
|
<xsl:otherwise>
|
3087
|
-
<
|
3153
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
3154
|
+
<xsl:choose>
|
3155
|
+
<xsl:when test=". = 1 or . = 0">
|
3156
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
3157
|
+
</xsl:when>
|
3158
|
+
<xsl:otherwise>
|
3159
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
3160
|
+
</xsl:otherwise>
|
3161
|
+
</xsl:choose>
|
3162
|
+
</xsl:for-each>
|
3088
3163
|
</xsl:otherwise>
|
3089
3164
|
</xsl:choose>
|
3165
|
+
|
3166
|
+
<xsl:choose>
|
3167
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
3168
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
3169
|
+
</xsl:when>
|
3170
|
+
<xsl:otherwise>
|
3171
|
+
<xsl:apply-templates/>
|
3172
|
+
</xsl:otherwise>
|
3173
|
+
</xsl:choose>
|
3174
|
+
|
3175
|
+
</fo:table>
|
3176
|
+
|
3177
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
3178
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
3179
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
3180
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
3181
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
3182
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
3183
|
+
</xsl:call-template>
|
3090
3184
|
</xsl:for-each>
|
3091
|
-
|
3092
|
-
|
3093
|
-
|
3094
|
-
|
3095
|
-
|
3096
|
-
|
3097
|
-
|
3185
|
+
|
3186
|
+
<!-- insert footer as table -->
|
3187
|
+
<!-- <fo:table>
|
3188
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
3189
|
+
<xsl:attribute name="{@name}">
|
3190
|
+
<xsl:value-of select="."/>
|
3191
|
+
</xsl:attribute>
|
3192
|
+
</xsl:for-each>
|
3193
|
+
|
3194
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
3195
|
+
<xsl:choose>
|
3196
|
+
<xsl:when test=". = 1 or . = 0">
|
3197
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
3198
|
+
</xsl:when>
|
3199
|
+
<xsl:otherwise>
|
3200
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
3201
|
+
</xsl:otherwise>
|
3202
|
+
</xsl:choose>
|
3203
|
+
</xsl:for-each>
|
3204
|
+
</fo:table>-->
|
3205
|
+
|
3206
|
+
|
3207
|
+
|
3208
|
+
|
3209
|
+
|
3210
|
+
</fo:block-container>
|
3211
|
+
</xsl:variable>
|
3212
|
+
|
3213
|
+
|
3214
|
+
|
3215
|
+
<xsl:choose>
|
3216
|
+
<xsl:when test="@width">
|
3217
|
+
|
3218
|
+
<!-- centered table when table name is centered (see table-name-style) -->
|
3219
|
+
|
3220
|
+
<fo:table table-layout="fixed" width="100%">
|
3221
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
3222
|
+
<fo:table-column column-width="{@width}"/>
|
3223
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
3224
|
+
<fo:table-body>
|
3225
|
+
<fo:table-row>
|
3226
|
+
<fo:table-cell column-number="2">
|
3227
|
+
<fo:block><xsl:copy-of select="$table"/></fo:block>
|
3228
|
+
</fo:table-cell>
|
3229
|
+
</fo:table-row>
|
3230
|
+
</fo:table-body>
|
3231
|
+
</fo:table>
|
3232
|
+
|
3233
|
+
|
3234
|
+
|
3235
|
+
|
3236
|
+
</xsl:when>
|
3237
|
+
<xsl:otherwise>
|
3238
|
+
<xsl:copy-of select="$table"/>
|
3239
|
+
</xsl:otherwise>
|
3240
|
+
</xsl:choose>
|
3241
|
+
|
3098
3242
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
3099
3243
|
<xsl:if test="normalize-space() != ''">
|
3100
3244
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -3222,7 +3366,15 @@
|
|
3222
3366
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
3223
3367
|
<xsl:value-of select="@target"/>
|
3224
3368
|
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
3225
|
-
<xsl:variable name="
|
3369
|
+
<xsl:variable name="mathml">
|
3370
|
+
<xsl:for-each select="*">
|
3371
|
+
<xsl:if test="local-name() != 'unit' and local-name() != 'prefix' and local-name() != 'dimension' and local-name() != 'quantity'">
|
3372
|
+
<xsl:copy-of select="."/>
|
3373
|
+
</xsl:if>
|
3374
|
+
</xsl:for-each>
|
3375
|
+
</xsl:variable>
|
3376
|
+
|
3377
|
+
<xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
|
3226
3378
|
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
3227
3379
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
3228
3380
|
<xsl:param name="cols-count"/>
|
@@ -3996,7 +4148,7 @@
|
|
3996
4148
|
<xsl:with-param name="table" select="$html-table"/>
|
3997
4149
|
</xsl:call-template>
|
3998
4150
|
</xsl:variable>
|
3999
|
-
<!-- colwidths=<xsl:
|
4151
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
4000
4152
|
<xsl:variable name="maxlength_dt">
|
4001
4153
|
<xsl:call-template name="getMaxLength_dt"/>
|
4002
4154
|
</xsl:variable>
|
@@ -4025,13 +4177,22 @@
|
|
4025
4177
|
</xsl:when>
|
4026
4178
|
<xsl:otherwise>
|
4027
4179
|
<xsl:choose>
|
4180
|
+
<!-- to set width check most wide chars like `W` -->
|
4028
4181
|
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
|
4029
|
-
<fo:table-column column-width="
|
4030
|
-
<fo:table-column column-width="
|
4182
|
+
<fo:table-column column-width="7%"/>
|
4183
|
+
<fo:table-column column-width="93%"/>
|
4184
|
+
</xsl:when>
|
4185
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 5"> <!-- if dt contains short text like ABC, etc -->
|
4186
|
+
<fo:table-column column-width="15%"/>
|
4187
|
+
<fo:table-column column-width="85%"/>
|
4188
|
+
</xsl:when>
|
4189
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 7"> <!-- if dt contains short text like ABCDEF, etc -->
|
4190
|
+
<fo:table-column column-width="20%"/>
|
4191
|
+
<fo:table-column column-width="80%"/>
|
4031
4192
|
</xsl:when>
|
4032
|
-
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <=
|
4033
|
-
<fo:table-column column-width="
|
4034
|
-
<fo:table-column column-width="
|
4193
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
|
4194
|
+
<fo:table-column column-width="25%"/>
|
4195
|
+
<fo:table-column column-width="75%"/>
|
4035
4196
|
</xsl:when>
|
4036
4197
|
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
4037
4198
|
<fo:table-column column-width="60%"/>
|
@@ -4231,6 +4392,7 @@
|
|
4231
4392
|
|
4232
4393
|
|
4233
4394
|
|
4395
|
+
|
4234
4396
|
|
4235
4397
|
</xsl:variable>
|
4236
4398
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -4252,6 +4414,10 @@
|
|
4252
4414
|
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
4253
4415
|
<xsl:apply-templates/>
|
4254
4416
|
</fo:inline>
|
4417
|
+
</xsl:template><xsl:template match="*[local-name()='hi']">
|
4418
|
+
<fo:inline background-color="yellow">
|
4419
|
+
<xsl:apply-templates/>
|
4420
|
+
</fo:inline>
|
4255
4421
|
</xsl:template><xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
4256
4422
|
<xsl:variable name="text" select="normalize-space(.)"/>
|
4257
4423
|
<fo:inline font-size="75%">
|
@@ -4341,6 +4507,10 @@
|
|
4341
4507
|
<xsl:param name="text" select="."/>
|
4342
4508
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
4343
4509
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1')"/>
|
4510
|
+
</xsl:template><xsl:template name="add-zero-spaces-link-java">
|
4511
|
+
<xsl:param name="text" select="."/>
|
4512
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
4513
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1')"/>
|
4344
4514
|
</xsl:template><xsl:template name="add-zero-spaces">
|
4345
4515
|
<xsl:param name="text" select="."/>
|
4346
4516
|
<xsl:variable name="zero-space-after-chars">-</xsl:variable>
|
@@ -4588,6 +4758,7 @@
|
|
4588
4758
|
<xsl:apply-templates select="." mode="mathml"/>
|
4589
4759
|
</xsl:variable>
|
4590
4760
|
<fo:instream-foreign-object fox:alt-text="Math">
|
4761
|
+
|
4591
4762
|
<!-- <xsl:copy-of select="."/> -->
|
4592
4763
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
4593
4764
|
</fo:instream-foreign-object>
|
@@ -4601,7 +4772,12 @@
|
|
4601
4772
|
<!-- replace start and end spaces to non-break space -->
|
4602
4773
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
4603
4774
|
</xsl:copy>
|
4604
|
-
</xsl:template><xsl:template match="
|
4775
|
+
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
4776
|
+
<xsl:copy>
|
4777
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
4778
|
+
</xsl:copy>
|
4779
|
+
<mathml:mspace width="0.5ex"/>
|
4780
|
+
</xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
4605
4781
|
<xsl:variable name="target">
|
4606
4782
|
<xsl:choose>
|
4607
4783
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
@@ -4626,7 +4802,10 @@
|
|
4626
4802
|
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
4627
4803
|
<xsl:choose>
|
4628
4804
|
<xsl:when test="normalize-space(.) = ''">
|
4629
|
-
<xsl:value-of select="$target"/>
|
4805
|
+
<!-- <xsl:value-of select="$target"/> -->
|
4806
|
+
<xsl:call-template name="add-zero-spaces-link-java">
|
4807
|
+
<xsl:with-param name="text" select="$target"/>
|
4808
|
+
</xsl:call-template>
|
4630
4809
|
</xsl:when>
|
4631
4810
|
<xsl:otherwise>
|
4632
4811
|
<xsl:apply-templates/>
|
@@ -4636,8 +4815,6 @@
|
|
4636
4815
|
</xsl:otherwise>
|
4637
4816
|
</xsl:choose>
|
4638
4817
|
</fo:inline>
|
4639
|
-
</xsl:template><xsl:template match="*[local-name()='bookmark']">
|
4640
|
-
<fo:inline id="{@id}"/>
|
4641
4818
|
</xsl:template><xsl:template match="*[local-name()='appendix']">
|
4642
4819
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
4643
4820
|
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
|
@@ -4830,7 +5007,7 @@
|
|
4830
5007
|
</xsl:if> -->
|
4831
5008
|
</fo:inline>
|
4832
5009
|
</xsl:if>
|
4833
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
5010
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
4834
5011
|
<fo:block-container id="{@id}">
|
4835
5012
|
|
4836
5013
|
<fo:block>
|
@@ -4846,6 +5023,7 @@
|
|
4846
5023
|
<fo:block id="{@id}">
|
4847
5024
|
<xsl:apply-templates/>
|
4848
5025
|
</fo:block>
|
5026
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4849
5027
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
|
4850
5028
|
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
4851
5029
|
<xsl:apply-templates/>
|
@@ -5037,6 +5215,12 @@
|
|
5037
5215
|
<!-- <xsl:text> </xsl:text> -->
|
5038
5216
|
</xsl:template><xsl:template name="getSection">
|
5039
5217
|
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
5218
|
+
<!--
|
5219
|
+
<xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
|
5220
|
+
<xsl:value-of select="."/>
|
5221
|
+
</xsl:for-each>
|
5222
|
+
-->
|
5223
|
+
|
5040
5224
|
</xsl:template><xsl:template name="getName">
|
5041
5225
|
<xsl:choose>
|
5042
5226
|
<xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
|
@@ -5089,6 +5273,12 @@
|
|
5089
5273
|
<xsl:copy>
|
5090
5274
|
<xsl:apply-templates mode="contents_item"/>
|
5091
5275
|
</xsl:copy>
|
5276
|
+
</xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
|
5277
|
+
<xsl:copy>
|
5278
|
+
<xsl:apply-templates mode="contents_item"/>
|
5279
|
+
</xsl:copy>
|
5280
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
|
5281
|
+
<xsl:copy-of select="."/>
|
5092
5282
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
5093
5283
|
<xsl:text> </xsl:text>
|
5094
5284
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
@@ -5114,6 +5304,7 @@
|
|
5114
5304
|
|
5115
5305
|
|
5116
5306
|
|
5307
|
+
|
5117
5308
|
|
5118
5309
|
|
5119
5310
|
|
@@ -5416,10 +5607,11 @@
|
|
5416
5607
|
</xsl:choose>
|
5417
5608
|
|
5418
5609
|
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
5419
|
-
|
5610
|
+
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
5420
5611
|
<xsl:variable name="element">
|
5421
5612
|
block
|
5422
5613
|
|
5614
|
+
|
5423
5615
|
</xsl:variable>
|
5424
5616
|
<xsl:choose>
|
5425
5617
|
<xsl:when test="normalize-space($element) = 'block'">
|
@@ -5494,11 +5686,13 @@
|
|
5494
5686
|
</xsl:if>
|
5495
5687
|
</xsl:if>
|
5496
5688
|
|
5689
|
+
|
5497
5690
|
<fo:block-container margin-left="0mm">
|
5498
5691
|
|
5499
5692
|
<fo:block xsl:use-attribute-sets="quote-style">
|
5500
5693
|
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
5501
|
-
|
5694
|
+
|
5695
|
+
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
5502
5696
|
</fo:block>
|
5503
5697
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
5504
5698
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -5521,29 +5715,47 @@
|
|
5521
5715
|
<xsl:text>— </xsl:text>
|
5522
5716
|
<xsl:apply-templates/>
|
5523
5717
|
</xsl:template><xsl:template match="*[local-name() = 'eref']">
|
5524
|
-
|
5525
|
-
|
5526
|
-
|
5527
|
-
|
5528
|
-
|
5529
|
-
|
5530
|
-
|
5531
|
-
|
5532
|
-
|
5533
|
-
|
5534
|
-
|
5535
|
-
|
5536
|
-
|
5537
|
-
|
5538
|
-
|
5539
|
-
|
5540
|
-
|
5541
|
-
|
5542
|
-
|
5543
|
-
|
5544
|
-
|
5545
|
-
|
5546
|
-
|
5718
|
+
|
5719
|
+
<xsl:variable name="bibitemid">
|
5720
|
+
<xsl:choose>
|
5721
|
+
<xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"/>
|
5722
|
+
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
|
5723
|
+
<xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
|
5724
|
+
</xsl:choose>
|
5725
|
+
</xsl:variable>
|
5726
|
+
|
5727
|
+
<xsl:choose>
|
5728
|
+
<xsl:when test="normalize-space($bibitemid) != ''">
|
5729
|
+
<fo:inline xsl:use-attribute-sets="eref-style">
|
5730
|
+
<xsl:if test="@type = 'footnote'">
|
5731
|
+
|
5732
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
5733
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
5734
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
5735
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
5736
|
+
|
5737
|
+
|
5738
|
+
</xsl:if>
|
5739
|
+
|
5740
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
5741
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
5742
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
5743
|
+
</xsl:if>
|
5744
|
+
<xsl:if test="@type = 'inline'">
|
5745
|
+
|
5746
|
+
|
5747
|
+
|
5748
|
+
</xsl:if>
|
5749
|
+
|
5750
|
+
<xsl:apply-templates/>
|
5751
|
+
</fo:basic-link>
|
5752
|
+
|
5753
|
+
</fo:inline>
|
5754
|
+
</xsl:when>
|
5755
|
+
<xsl:otherwise>
|
5756
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
5757
|
+
</xsl:otherwise>
|
5758
|
+
</xsl:choose>
|
5547
5759
|
</xsl:template><xsl:template match="*[local-name() = 'tab']">
|
5548
5760
|
<!-- zero-space char -->
|
5549
5761
|
<xsl:variable name="depth">
|
@@ -5651,6 +5863,7 @@
|
|
5651
5863
|
|
5652
5864
|
|
5653
5865
|
|
5866
|
+
|
5654
5867
|
|
5655
5868
|
|
5656
5869
|
|
@@ -5662,7 +5875,7 @@
|
|
5662
5875
|
|
5663
5876
|
|
5664
5877
|
|
5665
|
-
</xsl:template><xsl:template match="
|
5878
|
+
</xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
|
5666
5879
|
<fo:block break-after="page"/>
|
5667
5880
|
<fo:block>
|
5668
5881
|
<xsl:call-template name="setId"/>
|
@@ -5670,7 +5883,8 @@
|
|
5670
5883
|
</fo:block>
|
5671
5884
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
5672
5885
|
<fo:block>
|
5673
|
-
<xsl:call-template name="setId"/>
|
5886
|
+
<xsl:call-template name="setId"/>
|
5887
|
+
|
5674
5888
|
|
5675
5889
|
<xsl:apply-templates/>
|
5676
5890
|
</fo:block>
|
@@ -5721,6 +5935,153 @@
|
|
5721
5935
|
</fo:block>
|
5722
5936
|
</xsl:otherwise>
|
5723
5937
|
</xsl:choose>
|
5938
|
+
</xsl:template><xsl:variable name="index" select="document($external_index)"/><xsl:variable name="dash" select="'–'"/><xsl:variable name="bookmark_in_fn">
|
5939
|
+
<xsl:for-each select="//*[local-name() = 'bookmark'][ancestor::*[local-name() = 'fn']]">
|
5940
|
+
<bookmark><xsl:value-of select="@id"/></bookmark>
|
5941
|
+
</xsl:for-each>
|
5942
|
+
</xsl:variable><xsl:template match="@*|node()" mode="index_add_id">
|
5943
|
+
<xsl:copy>
|
5944
|
+
<xsl:apply-templates select="@*|node()" mode="index_add_id"/>
|
5945
|
+
</xsl:copy>
|
5946
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
|
5947
|
+
<xsl:variable name="id">
|
5948
|
+
<xsl:call-template name="generateIndexXrefId"/>
|
5949
|
+
</xsl:variable>
|
5950
|
+
<xsl:copy> <!-- add id to xref -->
|
5951
|
+
<xsl:apply-templates select="@*" mode="index_add_id"/>
|
5952
|
+
<xsl:attribute name="id">
|
5953
|
+
<xsl:value-of select="$id"/>
|
5954
|
+
</xsl:attribute>
|
5955
|
+
<xsl:apply-templates mode="index_add_id"/>
|
5956
|
+
</xsl:copy>
|
5957
|
+
<!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
|
5958
|
+
<xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
|
5959
|
+
<xsl:if test="@to">
|
5960
|
+
<xsl:value-of select="$dash"/>
|
5961
|
+
<xsl:copy>
|
5962
|
+
<xsl:copy-of select="@*"/>
|
5963
|
+
<xsl:attribute name="target"><xsl:value-of select="@to"/></xsl:attribute>
|
5964
|
+
<xsl:attribute name="id">
|
5965
|
+
<xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
|
5966
|
+
</xsl:attribute>
|
5967
|
+
<xsl:apply-templates mode="index_add_id"/>
|
5968
|
+
</xsl:copy>
|
5969
|
+
</xsl:if>
|
5970
|
+
</xsl:template><xsl:template match="@*|node()" mode="index_update">
|
5971
|
+
<xsl:copy>
|
5972
|
+
<xsl:apply-templates select="@*|node()" mode="index_update"/>
|
5973
|
+
</xsl:copy>
|
5974
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" mode="index_update">
|
5975
|
+
<xsl:copy>
|
5976
|
+
<xsl:apply-templates select="@*" mode="index_update"/>
|
5977
|
+
<xsl:apply-templates select="node()[1]" mode="process_li_element"/>
|
5978
|
+
</xsl:copy>
|
5979
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']/node()" mode="process_li_element" priority="2">
|
5980
|
+
<xsl:param name="element"/>
|
5981
|
+
<xsl:param name="remove" select="'false'"/>
|
5982
|
+
<xsl:param name="target"/>
|
5983
|
+
<!-- <node></node> -->
|
5984
|
+
<xsl:choose>
|
5985
|
+
<xsl:when test="self::text() and (normalize-space(.) = ',' or normalize-space(.) = $dash) and $remove = 'true'">
|
5986
|
+
<!-- skip text (i.e. remove it) and process next element -->
|
5987
|
+
<!-- [removed_<xsl:value-of select="."/>] -->
|
5988
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
5989
|
+
<xsl:with-param name="target"><xsl:value-of select="$target"/></xsl:with-param>
|
5990
|
+
</xsl:apply-templates>
|
5991
|
+
</xsl:when>
|
5992
|
+
<xsl:when test="self::text()">
|
5993
|
+
<xsl:value-of select="."/>
|
5994
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
5995
|
+
</xsl:when>
|
5996
|
+
<xsl:when test="self::* and local-name(.) = 'xref'">
|
5997
|
+
<xsl:variable name="id" select="@id"/>
|
5998
|
+
<xsl:variable name="page" select="$index//item[@id = $id]"/>
|
5999
|
+
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
6000
|
+
<xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
|
6001
|
+
|
6002
|
+
<xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
|
6003
|
+
<xsl:variable name="page_prev" select="$index//item[@id = $id_prev]"/>
|
6004
|
+
|
6005
|
+
<xsl:choose>
|
6006
|
+
<!-- 2nd pass -->
|
6007
|
+
<!-- if page is equal to page for next and page is not the end of range -->
|
6008
|
+
<xsl:when test="$page != '' and $page_next != '' and $page = $page_next and not(contains($page, '_to'))"> <!-- case: 12, 12-14 -->
|
6009
|
+
<!-- skip element (i.e. remove it) and remove next text ',' -->
|
6010
|
+
<!-- [removed_xref] -->
|
6011
|
+
|
6012
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
6013
|
+
<xsl:with-param name="remove">true</xsl:with-param>
|
6014
|
+
<xsl:with-param name="target">
|
6015
|
+
<xsl:choose>
|
6016
|
+
<xsl:when test="$target != ''"><xsl:value-of select="$target"/></xsl:when>
|
6017
|
+
<xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise>
|
6018
|
+
</xsl:choose>
|
6019
|
+
</xsl:with-param>
|
6020
|
+
</xsl:apply-templates>
|
6021
|
+
</xsl:when>
|
6022
|
+
|
6023
|
+
<xsl:when test="$page != '' and $page_prev != '' and $page = $page_prev and contains($page_prev, '_to')"> <!-- case: 12-14, 14, ... -->
|
6024
|
+
<!-- remove xref -->
|
6025
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
6026
|
+
<xsl:with-param name="remove">true</xsl:with-param>
|
6027
|
+
</xsl:apply-templates>
|
6028
|
+
</xsl:when>
|
6029
|
+
|
6030
|
+
<xsl:otherwise>
|
6031
|
+
<xsl:apply-templates select="." mode="xref_copy">
|
6032
|
+
<xsl:with-param name="target" select="$target"/>
|
6033
|
+
</xsl:apply-templates>
|
6034
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
6035
|
+
</xsl:otherwise>
|
6036
|
+
</xsl:choose>
|
6037
|
+
</xsl:when>
|
6038
|
+
<xsl:when test="self::* and local-name(.) = 'ul'">
|
6039
|
+
<!-- ul -->
|
6040
|
+
<xsl:apply-templates select="." mode="index_update"/>
|
6041
|
+
</xsl:when>
|
6042
|
+
<xsl:otherwise>
|
6043
|
+
<xsl:apply-templates select="." mode="xref_copy">
|
6044
|
+
<xsl:with-param name="target" select="$target"/>
|
6045
|
+
</xsl:apply-templates>
|
6046
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
6047
|
+
</xsl:otherwise>
|
6048
|
+
</xsl:choose>
|
6049
|
+
</xsl:template><xsl:template match="@*|node()" mode="xref_copy">
|
6050
|
+
<xsl:param name="target"/>
|
6051
|
+
<xsl:copy>
|
6052
|
+
<xsl:apply-templates select="@*" mode="xref_copy"/>
|
6053
|
+
<xsl:if test="$target != '' and not(xalan:nodeset($bookmark_in_fn)//bookmark[. = $target])">
|
6054
|
+
<xsl:attribute name="target"><xsl:value-of select="$target"/></xsl:attribute>
|
6055
|
+
</xsl:if>
|
6056
|
+
<xsl:apply-templates select="node()" mode="xref_copy"/>
|
6057
|
+
</xsl:copy>
|
6058
|
+
</xsl:template><xsl:template name="generateIndexXrefId">
|
6059
|
+
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
6060
|
+
|
6061
|
+
<xsl:variable name="docid">
|
6062
|
+
<xsl:call-template name="getDocumentId"/>
|
6063
|
+
</xsl:variable>
|
6064
|
+
<xsl:variable name="item_number">
|
6065
|
+
<xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
|
6066
|
+
</xsl:variable>
|
6067
|
+
<xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
|
6068
|
+
<xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
6069
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'clause']" priority="4">
|
6070
|
+
<xsl:apply-templates/>
|
6071
|
+
<fo:block>
|
6072
|
+
<xsl:if test="following-sibling::*[local-name() = 'clause']">
|
6073
|
+
<fo:block> </fo:block>
|
6074
|
+
</xsl:if>
|
6075
|
+
</fo:block>
|
6076
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'ul']" priority="4">
|
6077
|
+
<xsl:apply-templates/>
|
6078
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
6079
|
+
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
6080
|
+
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
6081
|
+
<xsl:apply-templates/>
|
6082
|
+
</fo:block>
|
6083
|
+
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
6084
|
+
<fo:inline id="{@id}" font-size="1pt"/>
|
5724
6085
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
5725
6086
|
<!-- <row>
|
5726
6087
|
<date>05-07-2013</date>
|
@@ -5842,6 +6203,57 @@
|
|
5842
6203
|
</xsl:variable>
|
5843
6204
|
<xsl:variable name="result">
|
5844
6205
|
<xsl:choose>
|
6206
|
+
<xsl:when test="$format = 'ddMMyyyy'">
|
6207
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
6208
|
+
<xsl:text> </xsl:text>
|
6209
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
|
6210
|
+
</xsl:when>
|
6211
|
+
<xsl:when test="$format = 'ddMM'">
|
6212
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
6213
|
+
<xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
|
6214
|
+
</xsl:when>
|
6215
|
+
<xsl:when test="$format = 'short' or $day = ''">
|
6216
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
6217
|
+
</xsl:when>
|
6218
|
+
<xsl:otherwise>
|
6219
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
|
6220
|
+
</xsl:otherwise>
|
6221
|
+
</xsl:choose>
|
6222
|
+
</xsl:variable>
|
6223
|
+
<xsl:value-of select="$result"/>
|
6224
|
+
</xsl:template><xsl:template name="convertDateLocalized">
|
6225
|
+
<xsl:param name="date"/>
|
6226
|
+
<xsl:param name="format" select="'short'"/>
|
6227
|
+
<xsl:variable name="year" select="substring($date, 1, 4)"/>
|
6228
|
+
<xsl:variable name="month" select="substring($date, 6, 2)"/>
|
6229
|
+
<xsl:variable name="day" select="substring($date, 9, 2)"/>
|
6230
|
+
<xsl:variable name="monthStr">
|
6231
|
+
<xsl:choose>
|
6232
|
+
<xsl:when test="$month = '01'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_january</xsl:with-param></xsl:call-template></xsl:when>
|
6233
|
+
<xsl:when test="$month = '02'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_february</xsl:with-param></xsl:call-template></xsl:when>
|
6234
|
+
<xsl:when test="$month = '03'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_march</xsl:with-param></xsl:call-template></xsl:when>
|
6235
|
+
<xsl:when test="$month = '04'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_april</xsl:with-param></xsl:call-template></xsl:when>
|
6236
|
+
<xsl:when test="$month = '05'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_may</xsl:with-param></xsl:call-template></xsl:when>
|
6237
|
+
<xsl:when test="$month = '06'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_june</xsl:with-param></xsl:call-template></xsl:when>
|
6238
|
+
<xsl:when test="$month = '07'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_july</xsl:with-param></xsl:call-template></xsl:when>
|
6239
|
+
<xsl:when test="$month = '08'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_august</xsl:with-param></xsl:call-template></xsl:when>
|
6240
|
+
<xsl:when test="$month = '09'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_september</xsl:with-param></xsl:call-template></xsl:when>
|
6241
|
+
<xsl:when test="$month = '10'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_october</xsl:with-param></xsl:call-template></xsl:when>
|
6242
|
+
<xsl:when test="$month = '11'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_november</xsl:with-param></xsl:call-template></xsl:when>
|
6243
|
+
<xsl:when test="$month = '12'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_december</xsl:with-param></xsl:call-template></xsl:when>
|
6244
|
+
</xsl:choose>
|
6245
|
+
</xsl:variable>
|
6246
|
+
<xsl:variable name="result">
|
6247
|
+
<xsl:choose>
|
6248
|
+
<xsl:when test="$format = 'ddMMyyyy'">
|
6249
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
6250
|
+
<xsl:text> </xsl:text>
|
6251
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
|
6252
|
+
</xsl:when>
|
6253
|
+
<xsl:when test="$format = 'ddMM'">
|
6254
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
6255
|
+
<xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
|
6256
|
+
</xsl:when>
|
5845
6257
|
<xsl:when test="$format = 'short' or $day = ''">
|
5846
6258
|
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
5847
6259
|
</xsl:when>
|
@@ -5857,7 +6269,7 @@
|
|
5857
6269
|
<xsl:param name="charDelim" select="', '"/>
|
5858
6270
|
<xsl:choose>
|
5859
6271
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
5860
|
-
<xsl:for-each select="
|
6272
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
5861
6273
|
<xsl:sort data-type="text" order="ascending"/>
|
5862
6274
|
<xsl:call-template name="insertKeyword">
|
5863
6275
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -5866,7 +6278,7 @@
|
|
5866
6278
|
</xsl:for-each>
|
5867
6279
|
</xsl:when>
|
5868
6280
|
<xsl:otherwise>
|
5869
|
-
<xsl:for-each select="
|
6281
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
5870
6282
|
<xsl:call-template name="insertKeyword">
|
5871
6283
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
5872
6284
|
<xsl:with-param name="charDelim" select="$charDelim"/>
|
@@ -5883,63 +6295,71 @@
|
|
5883
6295
|
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
5884
6296
|
</xsl:choose>
|
5885
6297
|
</xsl:template><xsl:template name="addPDFUAmeta">
|
5886
|
-
<
|
5887
|
-
<
|
5888
|
-
|
5889
|
-
|
5890
|
-
|
5891
|
-
|
5892
|
-
|
5893
|
-
|
5894
|
-
|
5895
|
-
|
5896
|
-
|
5897
|
-
|
6298
|
+
<xsl:variable name="lang">
|
6299
|
+
<xsl:call-template name="getLang"/>
|
6300
|
+
</xsl:variable>
|
6301
|
+
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
6302
|
+
<pdf:dictionary type="normal" key="ViewerPreferences">
|
6303
|
+
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
6304
|
+
</pdf:dictionary>
|
6305
|
+
</pdf:catalog>
|
6306
|
+
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
6307
|
+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
6308
|
+
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
6309
|
+
<!-- Dublin Core properties go here -->
|
6310
|
+
<dc:title>
|
6311
|
+
<xsl:variable name="title">
|
6312
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
6313
|
+
|
6314
|
+
<xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
|
5898
6315
|
|
5899
|
-
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en' and @type = 'main']"/>
|
5900
6316
|
|
5901
6317
|
|
5902
6318
|
|
5903
6319
|
|
5904
6320
|
|
5905
|
-
</xsl:
|
5906
|
-
|
5907
|
-
|
5908
|
-
|
5909
|
-
|
5910
|
-
|
5911
|
-
|
5912
|
-
</xsl:
|
5913
|
-
</xsl:
|
5914
|
-
</
|
5915
|
-
|
6321
|
+
</xsl:for-each>
|
6322
|
+
</xsl:variable>
|
6323
|
+
<xsl:choose>
|
6324
|
+
<xsl:when test="normalize-space($title) != ''">
|
6325
|
+
<xsl:value-of select="$title"/>
|
6326
|
+
</xsl:when>
|
6327
|
+
<xsl:otherwise>
|
6328
|
+
<xsl:text> </xsl:text>
|
6329
|
+
</xsl:otherwise>
|
6330
|
+
</xsl:choose>
|
6331
|
+
</dc:title>
|
6332
|
+
<dc:creator>
|
6333
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
5916
6334
|
|
6335
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
6336
|
+
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
6337
|
+
<xsl:if test="position() != last()">; </xsl:if>
|
6338
|
+
</xsl:for-each>
|
5917
6339
|
|
5918
6340
|
|
5919
|
-
|
5920
|
-
|
5921
|
-
|
5922
|
-
|
5923
|
-
|
5924
|
-
|
5925
|
-
|
5926
|
-
|
5927
|
-
|
5928
|
-
|
5929
|
-
|
5930
|
-
|
5931
|
-
|
5932
|
-
<
|
5933
|
-
|
5934
|
-
|
5935
|
-
|
5936
|
-
|
5937
|
-
|
5938
|
-
|
5939
|
-
|
5940
|
-
|
5941
|
-
</x:xmpmeta>
|
5942
|
-
</fo:declarations>
|
6341
|
+
|
6342
|
+
</xsl:for-each>
|
6343
|
+
</dc:creator>
|
6344
|
+
<dc:description>
|
6345
|
+
<xsl:variable name="abstract">
|
6346
|
+
|
6347
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
6348
|
+
|
6349
|
+
|
6350
|
+
</xsl:variable>
|
6351
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
6352
|
+
</dc:description>
|
6353
|
+
<pdf:Keywords>
|
6354
|
+
<xsl:call-template name="insertKeywords"/>
|
6355
|
+
</pdf:Keywords>
|
6356
|
+
</rdf:Description>
|
6357
|
+
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
|
6358
|
+
<!-- XMP properties go here -->
|
6359
|
+
<xmp:CreatorTool/>
|
6360
|
+
</rdf:Description>
|
6361
|
+
</rdf:RDF>
|
6362
|
+
</x:xmpmeta>
|
5943
6363
|
</xsl:template><xsl:template name="getId">
|
5944
6364
|
<xsl:choose>
|
5945
6365
|
<xsl:when test="../@id">
|
@@ -6036,6 +6456,7 @@
|
|
6036
6456
|
|
6037
6457
|
|
6038
6458
|
|
6459
|
+
|
6039
6460
|
</xsl:variable>
|
6040
6461
|
<xsl:if test="$documentNS != $XSLNS">
|
6041
6462
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|