metanorma-m3aawg 1.5.0 → 1.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/m3aawg/basicdoc.rng +23 -0
- data/lib/asciidoctor/m3aawg/converter.rb +3 -32
- data/lib/asciidoctor/m3aawg/isodoc.rng +124 -15
- data/lib/asciidoctor/m3aawg/m3d.rng +7 -0
- data/lib/isodoc/m3aawg/html/header.html +5 -4
- data/lib/isodoc/m3aawg/html/html_m3d_intro.html +2 -1
- data/lib/isodoc/m3aawg/html/html_m3d_titlepage.html +3 -4
- data/lib/isodoc/m3aawg/html/htmlstyle.css +4 -1
- data/lib/isodoc/m3aawg/html/htmlstyle.scss +3 -0
- data/lib/isodoc/m3aawg/html/m3d.css +16 -4
- data/lib/isodoc/m3aawg/html/m3d.scss +18 -4
- data/lib/isodoc/m3aawg/html/word_m3d_intro.html +3 -1
- data/lib/isodoc/m3aawg/html/word_m3d_titlepage.html +6 -0
- data/lib/isodoc/m3aawg/html_convert.rb +12 -6
- data/lib/isodoc/m3aawg/m3d.report.xsl +1075 -238
- data/lib/metanorma/m3aawg/version.rb +1 -1
- data/metanorma-m3d.gemspec +1 -1
- metadata +4 -4
@@ -534,7 +534,7 @@ table.dl
|
|
534
534
|
margin-right:0cm;
|
535
535
|
margin-bottom:11.0pt;
|
536
536
|
margin-left:20.15pt;}
|
537
|
-
table.MsoISOTable
|
537
|
+
table.MsoISOTable, table.MsoISOTableBig
|
538
538
|
{mso-style-name:"Table ISO";
|
539
539
|
mso-tstyle-rowband-size:0;
|
540
540
|
mso-tstyle-colband-size:0;
|
@@ -554,15 +554,15 @@ table.MsoISOTable
|
|
554
554
|
mso-border-insidev:.75pt solid windowtext;
|
555
555
|
font-size:10.0pt;
|
556
556
|
font-family:$bodyfont;}
|
557
|
-
table.MsoISOTable th
|
557
|
+
table.MsoISOTable th, table.MsoISOTableBig th
|
558
558
|
{border:solid windowtext 1pt;
|
559
559
|
mso-border-alt:solid windowtext 1pt;
|
560
560
|
padding:0cm 2.85pt 0cm 2.85pt;}
|
561
|
-
table.MsoISOTable td
|
561
|
+
table.MsoISOTable td, table.MsoISOTableBig td
|
562
562
|
{border:solid windowtext 1pt;
|
563
563
|
mso-border-alt:solid windowtext 1pt;
|
564
564
|
padding:0cm 2.85pt 0cm 2.85pt;}
|
565
|
-
table.MsoISOTable p
|
565
|
+
table.MsoISOTable p, table.MsoISOTableBig p
|
566
566
|
{font-size:10.0pt; }
|
567
567
|
table.MsoTableGrid
|
568
568
|
{mso-style-name:"Table Grid";
|
@@ -733,6 +733,20 @@ div.example p.MsoListParagraph {
|
|
733
733
|
|
734
734
|
div.Note p.MsoListParagraph {
|
735
735
|
font-size: 10.0pt;
|
736
|
+
margin-left: 1.0cm;
|
737
|
+
}
|
738
|
+
|
739
|
+
div.Note span.stem {
|
740
|
+
font-size: 10.0pt; }
|
741
|
+
|
742
|
+
div.Note p.Sourcecode, div.Note pre.Sourcecode {
|
743
|
+
font-size: 8.0pt;
|
744
|
+
margin-left: 1.0cm;
|
745
|
+
}
|
746
|
+
|
747
|
+
div.Note table.dl {
|
748
|
+
font-size: 10.0pt;
|
749
|
+
margin-left: 1.0cm;
|
736
750
|
}
|
737
751
|
|
738
752
|
span.note_label, span.example_label, td.example_label, td.note_label
|
@@ -1,7 +1,9 @@
|
|
1
1
|
<div class="coverpage">
|
2
2
|
<p class="zzSTDPreTitle">Messaging, Malware and Mobile Anti-Abuse Working Group</p>
|
3
3
|
<p class="zzSTDTitle1">{{doctitle}}</p>
|
4
|
-
<p><b>{{
|
4
|
+
{% if edition %}<p><b>Version {{edition}}</b></p>{% endif %}
|
5
|
+
{% if revdate_monthyear %}<p><b>{{revdate_monthyear}}</b></p>{% endif %}
|
6
|
+
{% if url %}<p align='center' style="margin-top:12pt;">The direct URL to this paper is: <a href="{{url}}">{{url}}</a></p>{% endif %}
|
5
7
|
</div>
|
6
8
|
|
7
9
|
|
@@ -26,6 +26,12 @@ lang="EN-GB" style='font-size:40.0pt'>{% if unpublished %}{{ stage }}{% endif %}
|
|
26
26
|
|
27
27
|
</div>
|
28
28
|
|
29
|
+
{% if url %}
|
30
|
+
<p class="MsoNormal" align="center" style='text-align:center'><span
|
31
|
+
lang="EN-GB" style='font-size:12.0pt'>The direct URL to this paper is: <a href='{{url}}'>{{url}}</a></span></p>
|
32
|
+
{% endif %}
|
33
|
+
|
34
|
+
|
29
35
|
<p class="MsoNormal" style='margin-bottom:6.0pt'><span lang="EN-GB"><o:p> </o:p></span></p>
|
30
36
|
|
31
37
|
{% if unpublished %}
|
@@ -14,8 +14,10 @@ module IsoDoc
|
|
14
14
|
|
15
15
|
def default_fonts(options)
|
16
16
|
{
|
17
|
-
bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' :
|
18
|
-
|
17
|
+
bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' :
|
18
|
+
'"Overpass",sans-serif'),
|
19
|
+
headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' :
|
20
|
+
'"Overpass",sans-serif'),
|
19
21
|
monospacefont: '"Space Mono",monospace'
|
20
22
|
}
|
21
23
|
end
|
@@ -33,9 +35,12 @@ module IsoDoc
|
|
33
35
|
def colophon(body, docxml)
|
34
36
|
body.div **{ class: "colophon" } do |div|
|
35
37
|
div << <<~"COLOPHON"
|
36
|
-
<p>As with all
|
37
|
-
|
38
|
-
<
|
38
|
+
<p>As with all M<sup>3</sup>AAWG documents that we publish,
|
39
|
+
please check the M<sup>3</sup>AAWG website
|
40
|
+
(<a href="http://www.m3aawg.org">www.m3aawg.org</a>) for updates to
|
41
|
+
this paper.</p>
|
42
|
+
<p>© #{@meta.get[:docyear]} copyright by the Messaging, Malware
|
43
|
+
and Mobile Anti-Abuse Working Group (M<sup>3</sup>AAWG)</p>
|
39
44
|
COLOPHON
|
40
45
|
end
|
41
46
|
end
|
@@ -48,7 +53,8 @@ module IsoDoc
|
|
48
53
|
end
|
49
54
|
|
50
55
|
def make_body(xml, docxml)
|
51
|
-
body_attr = { lang: "EN-US", link: "blue", vlink: "#954F72",
|
56
|
+
body_attr = { lang: "EN-US", link: "blue", vlink: "#954F72",
|
57
|
+
"xml:lang": "EN-US", class: "container" }
|
52
58
|
xml.body **body_attr do |body|
|
53
59
|
make_body1(body, docxml)
|
54
60
|
make_body2(body, docxml)
|
@@ -22,21 +22,8 @@
|
|
22
22
|
-->
|
23
23
|
<xsl:variable name="contents">
|
24
24
|
<contents>
|
25
|
-
<xsl:
|
26
|
-
|
27
|
-
<xsl:apply-templates select="/m3d:m3d-standard/m3d:sections/m3d:clause[1]" mode="contents"/> <!-- [@id = '_scope'] -->
|
28
|
-
|
29
|
-
<!-- Normative references -->
|
30
|
-
<xsl:apply-templates select="/m3d:m3d-standard/m3d:bibliography/m3d:references[1]" mode="contents"/> <!-- [@id = '_normative_references'] -->
|
31
|
-
|
32
|
-
<xsl:apply-templates select="/m3d:m3d-standard/m3d:sections/*[position() > 1]" mode="contents"/> <!-- @id != '_scope' -->
|
33
|
-
|
34
|
-
<xsl:apply-templates select="/m3d:m3d-standard/m3d:annex" mode="contents"/>
|
35
|
-
|
36
|
-
<!-- Bibliography -->
|
37
|
-
<xsl:apply-templates select="/m3d:m3d-standard/m3d:bibliography/m3d:references[position() > 1]" mode="contents"/> <!-- @id = '_bibliography' -->
|
38
|
-
|
39
|
-
|
25
|
+
<xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
|
26
|
+
<xsl:call-template name="processMainSectionsDefault_Contents"/>
|
40
27
|
</contents>
|
41
28
|
</xsl:variable>
|
42
29
|
|
@@ -88,6 +75,10 @@
|
|
88
75
|
|
89
76
|
<xsl:call-template name="addPDFUAmeta"/>
|
90
77
|
|
78
|
+
<xsl:call-template name="addBookmarks">
|
79
|
+
<xsl:with-param name="contents" select="$contents"/>
|
80
|
+
</xsl:call-template>
|
81
|
+
|
91
82
|
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
92
83
|
|
93
84
|
<fo:static-content flow-name="cover-header">
|
@@ -231,17 +222,17 @@
|
|
231
222
|
<fo:table-column column-width="25mm"/>
|
232
223
|
<fo:table-column column-width="155mm"/>
|
233
224
|
<fo:table-body>
|
234
|
-
<xsl:for-each select="xalan:nodeset($contents)//item
|
225
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
235
226
|
<fo:table-row height="6mm">
|
236
227
|
<fo:table-cell>
|
237
228
|
<fo:block font-weight="bold">
|
238
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{
|
229
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
239
230
|
<xsl:choose>
|
240
231
|
<xsl:when test="@section = ''">
|
241
|
-
<xsl:apply-templates/>
|
232
|
+
<xsl:apply-templates select="title"/>
|
242
233
|
</xsl:when>
|
243
234
|
<xsl:when test="@type = 'references' and @section = ''">
|
244
|
-
<xsl:apply-templates/>
|
235
|
+
<xsl:apply-templates select="title"/>
|
245
236
|
</xsl:when>
|
246
237
|
<xsl:when test="@level = 1">
|
247
238
|
<xsl:value-of select="@section"/>
|
@@ -256,12 +247,12 @@
|
|
256
247
|
<xsl:if test="@level = 1">
|
257
248
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
258
249
|
</xsl:if>
|
259
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{
|
250
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
260
251
|
<xsl:choose>
|
261
252
|
<xsl:when test="@section = ''"/>
|
262
253
|
<xsl:when test="@type = 'references' and @section = ''"/>
|
263
254
|
<xsl:otherwise>
|
264
|
-
<xsl:apply-templates/>
|
255
|
+
<xsl:apply-templates select="title"/>
|
265
256
|
</xsl:otherwise>
|
266
257
|
</xsl:choose>
|
267
258
|
|
@@ -285,29 +276,14 @@
|
|
285
276
|
</fo:block>
|
286
277
|
|
287
278
|
<!-- Foreword, Introduction -->
|
288
|
-
<fo:block>
|
289
|
-
<xsl:
|
279
|
+
<fo:block>
|
280
|
+
<xsl:call-template name="processPrefaceSectionsDefault"/>
|
290
281
|
</fo:block>
|
291
282
|
|
292
283
|
<fo:block break-after="page"/>
|
293
284
|
|
294
|
-
<xsl:
|
295
|
-
|
296
|
-
<!-- Normative references -->
|
297
|
-
<xsl:if test="/m3d:m3d-standard/m3d:bibliography/m3d:references[1]">
|
298
|
-
<fo:block break-after="page"/>
|
299
|
-
<xsl:apply-templates select="/m3d:m3d-standard/m3d:bibliography/m3d:references[1]"/>
|
300
|
-
</xsl:if>
|
301
|
-
|
302
|
-
<!-- Main sections -->
|
303
|
-
<xsl:apply-templates select="/m3d:m3d-standard/m3d:sections/*[position() > 1]"/>
|
304
|
-
|
305
|
-
<!-- Annex(s) -->
|
306
|
-
<xsl:apply-templates select="/m3d:m3d-standard/m3d:annex"/>
|
285
|
+
<xsl:call-template name="processMainSectionsDefault"/>
|
307
286
|
|
308
|
-
<!-- Bibliography -->
|
309
|
-
<xsl:apply-templates select="/m3d:m3d-standard/m3d:bibliography/m3d:references[position() > 1]"/>
|
310
|
-
|
311
287
|
</fo:flow>
|
312
288
|
</fo:page-sequence>
|
313
289
|
|
@@ -342,9 +318,7 @@
|
|
342
318
|
</xsl:variable>
|
343
319
|
|
344
320
|
<xsl:variable name="display">
|
345
|
-
<xsl:choose>
|
346
|
-
<xsl:when test="ancestor-or-self::m3d:bibitem">false</xsl:when>
|
347
|
-
<xsl:when test="ancestor-or-self::m3d:term">false</xsl:when>
|
321
|
+
<xsl:choose>
|
348
322
|
<xsl:when test="ancestor-or-self::m3d:preface and $level >= 2">false</xsl:when>
|
349
323
|
<xsl:when test="ancestor::m3d:annex and $level >= 3">false</xsl:when>
|
350
324
|
<xsl:when test="$level <= 3">true</xsl:when>
|
@@ -352,8 +326,15 @@
|
|
352
326
|
</xsl:choose>
|
353
327
|
</xsl:variable>
|
354
328
|
|
329
|
+
<xsl:variable name="skip">
|
330
|
+
<xsl:choose>
|
331
|
+
<xsl:when test="ancestor-or-self::m3d:bibitem">true</xsl:when>
|
332
|
+
<xsl:when test="ancestor-or-self::m3d:term">true</xsl:when>
|
333
|
+
<xsl:otherwise>false</xsl:otherwise>
|
334
|
+
</xsl:choose>
|
335
|
+
</xsl:variable>
|
355
336
|
|
356
|
-
<xsl:if test="$
|
337
|
+
<xsl:if test="$skip = 'false'">
|
357
338
|
|
358
339
|
<xsl:variable name="section">
|
359
340
|
<xsl:call-template name="getSection"/>
|
@@ -367,12 +348,13 @@
|
|
367
348
|
<xsl:value-of select="local-name()"/>
|
368
349
|
</xsl:variable>
|
369
350
|
|
370
|
-
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}">
|
371
|
-
<
|
351
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
|
352
|
+
<title>
|
353
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
354
|
+
</title>
|
355
|
+
<xsl:apply-templates mode="contents"/>
|
372
356
|
</item>
|
373
|
-
<xsl:apply-templates mode="contents"/>
|
374
357
|
</xsl:if>
|
375
|
-
|
376
358
|
</xsl:template>
|
377
359
|
|
378
360
|
|
@@ -584,13 +566,13 @@
|
|
584
566
|
<fo:inline font-size="7pt" keep-with-previous.within-line="always" vertical-align="super">
|
585
567
|
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
586
568
|
<!-- <xsl:value-of select="@reference"/> -->
|
587
|
-
<xsl:value-of select="$number + count(//m3d:bibitem[ancestor::m3d:references[@
|
569
|
+
<xsl:value-of select="$number + count(//m3d:bibitem[ancestor::m3d:references[@normative='true' or not(preceding-sibling::m3d:references)]]/m3d:note)"/>
|
588
570
|
</fo:basic-link>
|
589
571
|
</fo:inline>
|
590
572
|
<fo:footnote-body>
|
591
573
|
<fo:block font-size="9pt" margin-bottom="12pt">
|
592
574
|
<fo:inline font-size="6pt" id="footnote_{@reference}_{$number}" keep-with-next.within-line="always" vertical-align="super" padding-right="1mm">
|
593
|
-
<xsl:value-of select="$number + count(//m3d:bibitem[ancestor::m3d:references[@
|
575
|
+
<xsl:value-of select="$number + count(//m3d:bibitem[ancestor::m3d:references[@normative='true' or not(preceding-sibling::m3d:references)]]/m3d:note)"/>
|
594
576
|
</fo:inline>
|
595
577
|
<xsl:for-each select="m3d:p">
|
596
578
|
<xsl:apply-templates/>
|
@@ -663,7 +645,7 @@
|
|
663
645
|
|
664
646
|
|
665
647
|
|
666
|
-
<xsl:template match="m3d:ul | m3d:ol">
|
648
|
+
<xsl:template match="m3d:ul | m3d:ol" mode="ul_ol">
|
667
649
|
<fo:block-container margin-left="6mm">
|
668
650
|
<fo:block-container margin-left="0mm">
|
669
651
|
<fo:list-block margin-bottom="12pt" provisional-distance-between-starts="6mm"> <!-- margin-bottom="8pt" -->
|
@@ -701,7 +683,9 @@
|
|
701
683
|
</fo:list-item>
|
702
684
|
</xsl:template>
|
703
685
|
|
704
|
-
|
686
|
+
<xsl:template match="m3d:note" mode="process">
|
687
|
+
<xsl:call-template name="note"/>
|
688
|
+
</xsl:template>
|
705
689
|
|
706
690
|
<xsl:template match="m3d:preferred">
|
707
691
|
|
@@ -737,7 +721,7 @@
|
|
737
721
|
|
738
722
|
|
739
723
|
<!-- <xsl:template match="m3d:references[@id = '_bibliography']"> -->
|
740
|
-
<xsl:template match="m3d:references[
|
724
|
+
<xsl:template match="m3d:references[not(@normative='true')]">
|
741
725
|
<fo:block break-after="page"/>
|
742
726
|
<fo:block id="{@id}">
|
743
727
|
<xsl:apply-templates/>
|
@@ -752,7 +736,7 @@
|
|
752
736
|
|
753
737
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
754
738
|
<!-- <xsl:template match="m3d:references[@id = '_bibliography']/m3d:bibitem"> -->
|
755
|
-
<xsl:template match="m3d:references[
|
739
|
+
<xsl:template match="m3d:references[not(@normative='true')]/m3d:bibitem">
|
756
740
|
<fo:list-block margin-bottom="12pt" provisional-distance-between-starts="12mm">
|
757
741
|
<fo:list-item>
|
758
742
|
<fo:list-item-label end-indent="label-end()">
|
@@ -791,10 +775,10 @@
|
|
791
775
|
</xsl:template>
|
792
776
|
|
793
777
|
<!-- <xsl:template match="m3d:references[@id = '_bibliography']/m3d:bibitem" mode="contents"/> -->
|
794
|
-
<xsl:template match="m3d:references[
|
778
|
+
<xsl:template match="m3d:references[not(@normative='true')]/m3d:bibitem" mode="contents"/>
|
795
779
|
|
796
780
|
<!-- <xsl:template match="m3d:references[@id = '_bibliography']/m3d:bibitem/m3d:title"> -->
|
797
|
-
<xsl:template match="m3d:references[
|
781
|
+
<xsl:template match="m3d:references[not(@normative='true')]/m3d:bibitem/m3d:title">
|
798
782
|
<fo:inline font-style="italic">
|
799
783
|
<xsl:apply-templates/>
|
800
784
|
</fo:inline>
|
@@ -805,8 +789,12 @@
|
|
805
789
|
|
806
790
|
<xsl:template match="mathml:math" priority="2">
|
807
791
|
<fo:inline font-family="Cambria Math">
|
792
|
+
<xsl:variable name="mathml">
|
793
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
794
|
+
</xsl:variable>
|
808
795
|
<fo:instream-foreign-object fox:alt-text="Math">
|
809
|
-
<xsl:copy-of select="."/>
|
796
|
+
<!-- <xsl:copy-of select="."/> -->
|
797
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
810
798
|
</fo:instream-foreign-object>
|
811
799
|
</fo:inline>
|
812
800
|
</xsl:template>
|
@@ -839,9 +827,9 @@
|
|
839
827
|
|
840
828
|
<xsl:template match="m3d:formula/m3d:stem">
|
841
829
|
<fo:block margin-top="14pt" margin-bottom="14pt">
|
842
|
-
<fo:table table-layout="fixed" width="
|
843
|
-
<fo:table-column column-width="
|
844
|
-
<fo:table-column column-width="
|
830
|
+
<fo:table table-layout="fixed" width="100%"> <!-- 170mm -->
|
831
|
+
<fo:table-column column-width="95%"/> <!-- 165mm -->
|
832
|
+
<fo:table-column column-width="5%"/> <!-- 5mm -->
|
845
833
|
<fo:table-body>
|
846
834
|
<fo:table-row>
|
847
835
|
<fo:table-cell display-align="center">
|
@@ -881,6 +869,12 @@
|
|
881
869
|
|
882
870
|
</title-edition>
|
883
871
|
|
872
|
+
<title-edition lang="fr">
|
873
|
+
|
874
|
+
<xsl:text>Édition </xsl:text>
|
875
|
+
|
876
|
+
</title-edition>
|
877
|
+
|
884
878
|
|
885
879
|
<title-toc lang="en">
|
886
880
|
|
@@ -889,7 +883,12 @@
|
|
889
883
|
|
890
884
|
|
891
885
|
</title-toc>
|
892
|
-
<title-toc lang="fr">
|
886
|
+
<title-toc lang="fr">
|
887
|
+
|
888
|
+
<xsl:text>Sommaire</xsl:text>
|
889
|
+
|
890
|
+
|
891
|
+
</title-toc>
|
893
892
|
|
894
893
|
<title-toc lang="zh">Contents</title-toc>
|
895
894
|
|
@@ -923,7 +922,12 @@
|
|
923
922
|
|
924
923
|
|
925
924
|
|
926
|
-
<title-source lang="en">
|
925
|
+
<title-source lang="en">
|
926
|
+
|
927
|
+
<xsl:text>SOURCE</xsl:text>
|
928
|
+
|
929
|
+
|
930
|
+
</title-source>
|
927
931
|
|
928
932
|
<title-keywords lang="en">Keywords</title-keywords>
|
929
933
|
|
@@ -966,12 +970,25 @@
|
|
966
970
|
<title-warning lang="zh">警告</title-warning>
|
967
971
|
|
968
972
|
<title-amendment lang="en">AMENDMENT</title-amendment>
|
973
|
+
|
974
|
+
<title-continued lang="en">(continued)</title-continued>
|
975
|
+
<title-continued lang="fr">(continué)</title-continued>
|
976
|
+
|
969
977
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
970
978
|
<xsl:param name="name"/>
|
971
|
-
<xsl:
|
972
|
-
|
979
|
+
<xsl:param name="lang"/>
|
980
|
+
<xsl:variable name="lang_">
|
981
|
+
<xsl:choose>
|
982
|
+
<xsl:when test="$lang != ''">
|
983
|
+
<xsl:value-of select="$lang"/>
|
984
|
+
</xsl:when>
|
985
|
+
<xsl:otherwise>
|
986
|
+
<xsl:call-template name="getLang"/>
|
987
|
+
</xsl:otherwise>
|
988
|
+
</xsl:choose>
|
973
989
|
</xsl:variable>
|
974
|
-
<xsl:variable name="
|
990
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
991
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
975
992
|
<xsl:choose>
|
976
993
|
<xsl:when test="normalize-space($title_) != ''">
|
977
994
|
<xsl:value-of select="$title_"/>
|
@@ -980,12 +997,15 @@
|
|
980
997
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
981
998
|
</xsl:otherwise>
|
982
999
|
</xsl:choose>
|
983
|
-
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="
|
1000
|
+
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="root-style">
|
1001
|
+
|
1002
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
984
1003
|
|
985
1004
|
<xsl:attribute name="color">blue</xsl:attribute>
|
986
1005
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
987
1006
|
|
988
1007
|
|
1008
|
+
|
989
1009
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
990
1010
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
991
1011
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -1000,6 +1020,7 @@
|
|
1000
1020
|
|
1001
1021
|
|
1002
1022
|
|
1023
|
+
|
1003
1024
|
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
1004
1025
|
|
1005
1026
|
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
@@ -1048,9 +1069,11 @@
|
|
1048
1069
|
|
1049
1070
|
|
1050
1071
|
|
1072
|
+
|
1051
1073
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1052
1074
|
|
1053
1075
|
|
1076
|
+
|
1054
1077
|
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
1055
1078
|
|
1056
1079
|
|
@@ -1069,6 +1092,9 @@
|
|
1069
1092
|
|
1070
1093
|
|
1071
1094
|
|
1095
|
+
|
1096
|
+
|
1097
|
+
|
1072
1098
|
|
1073
1099
|
</xsl:attribute-set><xsl:attribute-set name="example-p-style">
|
1074
1100
|
|
@@ -1085,6 +1111,8 @@
|
|
1085
1111
|
|
1086
1112
|
|
1087
1113
|
|
1114
|
+
|
1115
|
+
|
1088
1116
|
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
1089
1117
|
|
1090
1118
|
|
@@ -1109,6 +1137,8 @@
|
|
1109
1137
|
|
1110
1138
|
|
1111
1139
|
|
1140
|
+
|
1141
|
+
|
1112
1142
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1113
1143
|
|
1114
1144
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
@@ -1128,11 +1158,13 @@
|
|
1128
1158
|
|
1129
1159
|
</xsl:attribute-set><xsl:attribute-set name="xref-style">
|
1130
1160
|
|
1131
|
-
|
1161
|
+
|
1162
|
+
|
1132
1163
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1133
1164
|
|
1134
1165
|
|
1135
1166
|
|
1167
|
+
|
1136
1168
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1137
1169
|
|
1138
1170
|
|
@@ -1152,9 +1184,7 @@
|
|
1152
1184
|
|
1153
1185
|
|
1154
1186
|
|
1155
|
-
|
1156
|
-
|
1157
|
-
</xsl:attribute-set><xsl:attribute-set name="note-name-style">
|
1187
|
+
</xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
|
1158
1188
|
|
1159
1189
|
|
1160
1190
|
|
@@ -1166,7 +1196,9 @@
|
|
1166
1196
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
1167
1197
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1168
1198
|
|
1169
|
-
|
1199
|
+
|
1200
|
+
|
1201
|
+
|
1170
1202
|
|
1171
1203
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1172
1204
|
|
@@ -1191,6 +1223,8 @@
|
|
1191
1223
|
|
1192
1224
|
|
1193
1225
|
|
1226
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1227
|
+
|
1194
1228
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1195
1229
|
|
1196
1230
|
|
@@ -1217,6 +1251,7 @@
|
|
1217
1251
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1218
1252
|
|
1219
1253
|
|
1254
|
+
|
1220
1255
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1221
1256
|
|
1222
1257
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -1228,6 +1263,7 @@
|
|
1228
1263
|
|
1229
1264
|
|
1230
1265
|
|
1266
|
+
|
1231
1267
|
|
1232
1268
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1233
1269
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1240,7 +1276,7 @@
|
|
1240
1276
|
|
1241
1277
|
|
1242
1278
|
|
1243
|
-
|
1279
|
+
|
1244
1280
|
</xsl:attribute-set><xsl:attribute-set name="formula-style">
|
1245
1281
|
|
1246
1282
|
</xsl:attribute-set><xsl:attribute-set name="image-style">
|
@@ -1266,14 +1302,16 @@
|
|
1266
1302
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1267
1303
|
|
1268
1304
|
|
1269
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1270
|
-
|
1305
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1306
|
+
|
1271
1307
|
|
1272
1308
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
1273
1309
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1274
1310
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1275
1311
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1276
1312
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1313
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1314
|
+
|
1277
1315
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
1278
1316
|
|
1279
1317
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
@@ -1284,7 +1322,47 @@
|
|
1284
1322
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1285
1323
|
|
1286
1324
|
|
1287
|
-
</xsl:attribute-set><xsl:template
|
1325
|
+
</xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1326
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1327
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1328
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1329
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1330
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1331
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1332
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1333
|
+
|
1334
|
+
<!-- Normative references -->
|
1335
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
|
1336
|
+
<!-- Terms and definitions -->
|
1337
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
|
1338
|
+
<!-- Another main sections -->
|
1339
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
|
1340
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
|
1341
|
+
<!-- Bibliography -->
|
1342
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
|
1343
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1344
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1345
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1346
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1347
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1348
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1349
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1350
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1351
|
+
|
1352
|
+
<xsl:if test="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1353
|
+
<fo:block break-after="page"/>
|
1354
|
+
</xsl:if>
|
1355
|
+
|
1356
|
+
<!-- Normative references -->
|
1357
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
|
1358
|
+
<!-- Terms and definitions -->
|
1359
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]"/>
|
1360
|
+
<!-- Another main sections -->
|
1361
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]"/>
|
1362
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1363
|
+
<!-- Bibliography -->
|
1364
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1365
|
+
</xsl:template><xsl:template match="text()">
|
1288
1366
|
<xsl:value-of select="."/>
|
1289
1367
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
1290
1368
|
<xsl:value-of select="$linebreak"/>
|
@@ -1301,6 +1379,10 @@
|
|
1301
1379
|
|
1302
1380
|
|
1303
1381
|
|
1382
|
+
|
1383
|
+
|
1384
|
+
<!-- $namespace = 'iso' or -->
|
1385
|
+
|
1304
1386
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1305
1387
|
|
1306
1388
|
|
@@ -1336,6 +1418,7 @@
|
|
1336
1418
|
<xsl:with-param name="table" select="$simple-table"/>
|
1337
1419
|
</xsl:call-template>
|
1338
1420
|
</xsl:variable>
|
1421
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1339
1422
|
|
1340
1423
|
<!-- <xsl:variable name="colwidths2">
|
1341
1424
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1357,23 +1440,49 @@
|
|
1357
1440
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1358
1441
|
|
1359
1442
|
|
1443
|
+
|
1444
|
+
|
1445
|
+
|
1446
|
+
|
1447
|
+
|
1448
|
+
|
1449
|
+
|
1360
1450
|
|
1361
1451
|
|
1362
1452
|
|
1363
1453
|
|
1364
1454
|
|
1365
1455
|
|
1366
|
-
<
|
1367
|
-
|
1368
|
-
|
1456
|
+
<xsl:variable name="table_attributes">
|
1457
|
+
<attribute name="table-layout">fixed</attribute>
|
1458
|
+
<attribute name="width">100%</attribute>
|
1459
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1460
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1369
1461
|
|
1370
1462
|
|
1371
1463
|
|
1372
1464
|
|
1465
|
+
|
1466
|
+
|
1467
|
+
|
1373
1468
|
|
1469
|
+
|
1374
1470
|
|
1471
|
+
</xsl:variable>
|
1472
|
+
|
1473
|
+
|
1474
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1375
1475
|
|
1476
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1477
|
+
<xsl:attribute name="{@name}">
|
1478
|
+
<xsl:value-of select="."/>
|
1479
|
+
</xsl:attribute>
|
1480
|
+
</xsl:for-each>
|
1376
1481
|
|
1482
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1483
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1484
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1485
|
+
</xsl:if>
|
1377
1486
|
|
1378
1487
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1379
1488
|
<xsl:choose>
|
@@ -1397,6 +1506,33 @@
|
|
1397
1506
|
|
1398
1507
|
</fo:table>
|
1399
1508
|
|
1509
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1510
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1511
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1512
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1513
|
+
</xsl:call-template>
|
1514
|
+
</xsl:for-each>
|
1515
|
+
|
1516
|
+
<!-- insert footer as table -->
|
1517
|
+
<!-- <fo:table>
|
1518
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1519
|
+
<xsl:attribute name="{@name}">
|
1520
|
+
<xsl:value-of select="."/>
|
1521
|
+
</xsl:attribute>
|
1522
|
+
</xsl:for-each>
|
1523
|
+
|
1524
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1525
|
+
<xsl:choose>
|
1526
|
+
<xsl:when test=". = 1 or . = 0">
|
1527
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1528
|
+
</xsl:when>
|
1529
|
+
<xsl:otherwise>
|
1530
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1531
|
+
</xsl:otherwise>
|
1532
|
+
</xsl:choose>
|
1533
|
+
</xsl:for-each>
|
1534
|
+
</fo:table>-->
|
1535
|
+
|
1400
1536
|
|
1401
1537
|
|
1402
1538
|
|
@@ -1405,8 +1541,9 @@
|
|
1405
1541
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1406
1542
|
<xsl:if test="normalize-space() != ''">
|
1407
1543
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1408
|
-
|
1409
|
-
|
1544
|
+
|
1545
|
+
<xsl:apply-templates/>
|
1546
|
+
</fo:block>
|
1410
1547
|
</xsl:if>
|
1411
1548
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
1412
1549
|
<xsl:param name="table-row"/>
|
@@ -1460,6 +1597,13 @@
|
|
1460
1597
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
1461
1598
|
<xsl:variable name="td_text">
|
1462
1599
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1600
|
+
|
1601
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1602
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
1603
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
1604
|
+
</xsl:for-each>
|
1605
|
+
</xsl:if> -->
|
1606
|
+
|
1463
1607
|
</xsl:variable>
|
1464
1608
|
<xsl:variable name="words">
|
1465
1609
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -1519,13 +1663,31 @@
|
|
1519
1663
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
1520
1664
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1521
1665
|
<xsl:value-of select="@target"/>
|
1666
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
1667
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
1668
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1522
1669
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1523
1670
|
<xsl:param name="cols-count"/>
|
1524
1671
|
<!-- font-weight="bold" -->
|
1525
|
-
<fo:table-header>
|
1672
|
+
<fo:table-header>
|
1526
1673
|
|
1527
1674
|
<xsl:apply-templates/>
|
1528
1675
|
</fo:table-header>
|
1676
|
+
</xsl:template><xsl:template name="table-header-title">
|
1677
|
+
<xsl:param name="cols-count"/>
|
1678
|
+
<!-- row for title -->
|
1679
|
+
<fo:table-row>
|
1680
|
+
<fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
|
1681
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
1682
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1683
|
+
<xsl:call-template name="fn_name_display"/>
|
1684
|
+
</xsl:for-each>
|
1685
|
+
<fo:block text-align="right" font-style="italic">
|
1686
|
+
<xsl:text> </xsl:text>
|
1687
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1688
|
+
</fo:block>
|
1689
|
+
</fo:table-cell>
|
1690
|
+
</fo:table-row>
|
1529
1691
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
1530
1692
|
<fo:table-body>
|
1531
1693
|
<xsl:apply-templates/>
|
@@ -1533,6 +1695,13 @@
|
|
1533
1695
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
1534
1696
|
<xsl:apply-templates/>
|
1535
1697
|
</xsl:template><xsl:template name="insertTableFooter">
|
1698
|
+
<xsl:param name="cols-count"/>
|
1699
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
1700
|
+
<fo:table-footer>
|
1701
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
1702
|
+
</fo:table-footer>
|
1703
|
+
</xsl:if>
|
1704
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
1536
1705
|
<xsl:param name="cols-count"/>
|
1537
1706
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1538
1707
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -1554,11 +1723,15 @@
|
|
1554
1723
|
<!-- fn will be processed inside 'note' processing -->
|
1555
1724
|
|
1556
1725
|
|
1557
|
-
|
1726
|
+
|
1727
|
+
<!-- except gb and bipm -->
|
1558
1728
|
|
1559
1729
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1560
1730
|
|
1561
1731
|
|
1732
|
+
|
1733
|
+
|
1734
|
+
|
1562
1735
|
<!-- horizontal row separator -->
|
1563
1736
|
|
1564
1737
|
|
@@ -1572,6 +1745,84 @@
|
|
1572
1745
|
</fo:table-footer>
|
1573
1746
|
|
1574
1747
|
</xsl:if>
|
1748
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
1749
|
+
<xsl:param name="table_attributes"/>
|
1750
|
+
<xsl:param name="colwidths"/>
|
1751
|
+
|
1752
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1753
|
+
|
1754
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1755
|
+
|
1756
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
|
1757
|
+
|
1758
|
+
<fo:table keep-with-previous="always">
|
1759
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1760
|
+
<xsl:choose>
|
1761
|
+
<xsl:when test="@name = 'border-top'">
|
1762
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
1763
|
+
</xsl:when>
|
1764
|
+
<xsl:when test="@name = 'border'">
|
1765
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
1766
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
1767
|
+
</xsl:when>
|
1768
|
+
<xsl:otherwise>
|
1769
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
1770
|
+
</xsl:otherwise>
|
1771
|
+
</xsl:choose>
|
1772
|
+
</xsl:for-each>
|
1773
|
+
|
1774
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1775
|
+
<xsl:choose>
|
1776
|
+
<xsl:when test=". = 1 or . = 0">
|
1777
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1778
|
+
</xsl:when>
|
1779
|
+
<xsl:otherwise>
|
1780
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1781
|
+
</xsl:otherwise>
|
1782
|
+
</xsl:choose>
|
1783
|
+
</xsl:for-each>
|
1784
|
+
|
1785
|
+
<fo:table-body>
|
1786
|
+
<fo:table-row>
|
1787
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
1788
|
+
|
1789
|
+
|
1790
|
+
|
1791
|
+
<!-- fn will be processed inside 'note' processing -->
|
1792
|
+
|
1793
|
+
|
1794
|
+
|
1795
|
+
<!-- except gb and bipm -->
|
1796
|
+
|
1797
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1798
|
+
|
1799
|
+
|
1800
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1801
|
+
<xsl:choose>
|
1802
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
1803
|
+
show Note under table in preface (ex. abstract) sections
|
1804
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1805
|
+
</xsl:when>
|
1806
|
+
<xsl:otherwise>
|
1807
|
+
empty, because notes show at page side in main sections
|
1808
|
+
<fo:block/>
|
1809
|
+
</xsl:otherwise>
|
1810
|
+
</xsl:choose>
|
1811
|
+
</xsl:if> -->
|
1812
|
+
|
1813
|
+
|
1814
|
+
<!-- horizontal row separator -->
|
1815
|
+
|
1816
|
+
|
1817
|
+
<!-- fn processing -->
|
1818
|
+
<xsl:call-template name="fn_display"/>
|
1819
|
+
|
1820
|
+
</fo:table-cell>
|
1821
|
+
</fo:table-row>
|
1822
|
+
</fo:table-body>
|
1823
|
+
|
1824
|
+
</fo:table>
|
1825
|
+
</xsl:if>
|
1575
1826
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
1576
1827
|
|
1577
1828
|
<xsl:variable name="cols-count">
|
@@ -1589,6 +1840,8 @@
|
|
1589
1840
|
</xsl:choose>
|
1590
1841
|
</xsl:variable>
|
1591
1842
|
|
1843
|
+
|
1844
|
+
|
1592
1845
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
1593
1846
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1594
1847
|
</xsl:apply-templates>
|
@@ -1598,6 +1851,8 @@
|
|
1598
1851
|
</xsl:call-template>
|
1599
1852
|
|
1600
1853
|
<fo:table-body>
|
1854
|
+
|
1855
|
+
|
1601
1856
|
<xsl:apply-templates/>
|
1602
1857
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
1603
1858
|
|
@@ -1621,10 +1876,23 @@
|
|
1621
1876
|
</xsl:if>
|
1622
1877
|
|
1623
1878
|
|
1879
|
+
|
1880
|
+
|
1624
1881
|
<xsl:apply-templates/>
|
1625
1882
|
</fo:table-row>
|
1626
1883
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
1627
1884
|
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
1885
|
+
<xsl:attribute name="text-align">
|
1886
|
+
<xsl:choose>
|
1887
|
+
<xsl:when test="@align">
|
1888
|
+
<xsl:value-of select="@align"/>
|
1889
|
+
</xsl:when>
|
1890
|
+
<xsl:otherwise>center</xsl:otherwise>
|
1891
|
+
</xsl:choose>
|
1892
|
+
</xsl:attribute>
|
1893
|
+
|
1894
|
+
|
1895
|
+
|
1628
1896
|
|
1629
1897
|
|
1630
1898
|
|
@@ -1643,16 +1911,38 @@
|
|
1643
1911
|
<xsl:value-of select="@rowspan"/>
|
1644
1912
|
</xsl:attribute>
|
1645
1913
|
</xsl:if>
|
1914
|
+
<xsl:call-template name="display-align"/>
|
1646
1915
|
<fo:block>
|
1647
1916
|
<xsl:apply-templates/>
|
1648
1917
|
</fo:block>
|
1649
1918
|
</fo:table-cell>
|
1919
|
+
</xsl:template><xsl:template name="display-align">
|
1920
|
+
<xsl:if test="@valign">
|
1921
|
+
<xsl:attribute name="display-align">
|
1922
|
+
<xsl:choose>
|
1923
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
1924
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
1925
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
1926
|
+
<xsl:otherwise>before</xsl:otherwise>
|
1927
|
+
</xsl:choose>
|
1928
|
+
</xsl:attribute>
|
1929
|
+
</xsl:if>
|
1650
1930
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
1651
1931
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
1932
|
+
<xsl:attribute name="text-align">
|
1933
|
+
<xsl:choose>
|
1934
|
+
<xsl:when test="@align">
|
1935
|
+
<xsl:value-of select="@align"/>
|
1936
|
+
</xsl:when>
|
1937
|
+
<xsl:otherwise>left</xsl:otherwise>
|
1938
|
+
</xsl:choose>
|
1939
|
+
</xsl:attribute>
|
1940
|
+
|
1941
|
+
|
1942
|
+
|
1652
1943
|
|
1653
1944
|
|
1654
1945
|
|
1655
|
-
|
1656
1946
|
|
1657
1947
|
|
1658
1948
|
|
@@ -1668,8 +1958,8 @@
|
|
1668
1958
|
<xsl:value-of select="@rowspan"/>
|
1669
1959
|
</xsl:attribute>
|
1670
1960
|
</xsl:if>
|
1671
|
-
<
|
1672
|
-
|
1961
|
+
<xsl:call-template name="display-align"/>
|
1962
|
+
<fo:block>
|
1673
1963
|
<xsl:apply-templates/>
|
1674
1964
|
</fo:block>
|
1675
1965
|
</fo:table-cell>
|
@@ -1681,14 +1971,17 @@
|
|
1681
1971
|
|
1682
1972
|
|
1683
1973
|
|
1974
|
+
|
1975
|
+
|
1684
1976
|
<fo:inline padding-right="2mm">
|
1685
1977
|
|
1686
1978
|
|
1687
1979
|
|
1688
|
-
|
1980
|
+
|
1689
1981
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
1690
1982
|
|
1691
1983
|
</fo:inline>
|
1984
|
+
|
1692
1985
|
<xsl:apply-templates mode="process"/>
|
1693
1986
|
</fo:block>
|
1694
1987
|
|
@@ -1712,6 +2005,7 @@
|
|
1712
2005
|
|
1713
2006
|
|
1714
2007
|
|
2008
|
+
|
1715
2009
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
1716
2010
|
|
1717
2011
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -1721,12 +2015,15 @@
|
|
1721
2015
|
|
1722
2016
|
|
1723
2017
|
|
2018
|
+
|
1724
2019
|
<xsl:value-of select="@reference"/>
|
1725
2020
|
|
2021
|
+
|
1726
2022
|
</fo:inline>
|
1727
2023
|
<fo:inline>
|
1728
2024
|
|
1729
|
-
<xsl:apply-templates/>
|
2025
|
+
<!-- <xsl:apply-templates /> -->
|
2026
|
+
<xsl:copy-of select="./node()"/>
|
1730
2027
|
</fo:inline>
|
1731
2028
|
</fo:block>
|
1732
2029
|
</xsl:if>
|
@@ -1763,7 +2060,20 @@
|
|
1763
2060
|
<xsl:variable name="following_dl_colwidths">
|
1764
2061
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
1765
2062
|
<xsl:variable name="html-table">
|
1766
|
-
<xsl:variable name="
|
2063
|
+
<xsl:variable name="doc_ns">
|
2064
|
+
|
2065
|
+
</xsl:variable>
|
2066
|
+
<xsl:variable name="ns">
|
2067
|
+
<xsl:choose>
|
2068
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2069
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2070
|
+
</xsl:when>
|
2071
|
+
<xsl:otherwise>
|
2072
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2073
|
+
</xsl:otherwise>
|
2074
|
+
</xsl:choose>
|
2075
|
+
</xsl:variable>
|
2076
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
1767
2077
|
<xsl:element name="{$ns}:table">
|
1768
2078
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
1769
2079
|
<tbody>
|
@@ -1828,7 +2138,8 @@
|
|
1828
2138
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
1829
2139
|
</xsl:if>
|
1830
2140
|
|
1831
|
-
<xsl:apply-templates/>
|
2141
|
+
<!-- <xsl:apply-templates /> -->
|
2142
|
+
<xsl:copy-of select="./node()"/>
|
1832
2143
|
</fo:block>
|
1833
2144
|
</fo:table-cell>
|
1834
2145
|
</fo:table-row>
|
@@ -1846,9 +2157,13 @@
|
|
1846
2157
|
|
1847
2158
|
|
1848
2159
|
|
2160
|
+
|
2161
|
+
|
1849
2162
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
1850
2163
|
|
2164
|
+
|
1851
2165
|
<xsl:value-of select="@reference"/>
|
2166
|
+
|
1852
2167
|
</fo:basic-link>
|
1853
2168
|
</fo:inline>
|
1854
2169
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -1856,115 +2171,142 @@
|
|
1856
2171
|
<xsl:apply-templates/>
|
1857
2172
|
</fo:inline>
|
1858
2173
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
1859
|
-
<
|
1860
|
-
|
1861
|
-
|
1862
|
-
|
1863
|
-
|
1864
|
-
|
1865
|
-
|
1866
|
-
|
1867
|
-
|
1868
|
-
|
1869
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
1870
|
-
|
1871
|
-
<xsl:variable name="title-where">
|
1872
|
-
<xsl:call-template name="getTitle">
|
1873
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
1874
|
-
</xsl:call-template>
|
1875
|
-
</xsl:variable>
|
1876
|
-
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
1877
|
-
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
1878
|
-
<xsl:text/>
|
1879
|
-
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
1880
|
-
</fo:block>
|
1881
|
-
|
1882
|
-
</xsl:when>
|
1883
|
-
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
1884
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
1885
|
-
|
1886
|
-
|
1887
|
-
|
1888
|
-
|
1889
|
-
<xsl:variable name="title-where">
|
1890
|
-
<xsl:call-template name="getTitle">
|
1891
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
1892
|
-
</xsl:call-template>
|
1893
|
-
</xsl:variable>
|
1894
|
-
<xsl:value-of select="$title-where"/>
|
1895
|
-
</fo:block>
|
1896
|
-
</xsl:when>
|
1897
|
-
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
1898
|
-
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
1899
|
-
|
1900
|
-
|
1901
|
-
|
1902
|
-
<xsl:variable name="title-key">
|
1903
|
-
<xsl:call-template name="getTitle">
|
1904
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
1905
|
-
</xsl:call-template>
|
1906
|
-
</xsl:variable>
|
1907
|
-
<xsl:value-of select="$title-key"/>
|
1908
|
-
</fo:block>
|
1909
|
-
</xsl:when>
|
1910
|
-
</xsl:choose>
|
1911
|
-
|
1912
|
-
<!-- a few components -->
|
1913
|
-
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
1914
|
-
<fo:block>
|
2174
|
+
<fo:block-container margin-left="0mm">
|
2175
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
2176
|
+
<xsl:attribute name="margin-left">
|
2177
|
+
<xsl:choose>
|
2178
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2179
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2180
|
+
</xsl:choose>
|
2181
|
+
</xsl:attribute>
|
1915
2182
|
|
2183
|
+
</xsl:if>
|
2184
|
+
<fo:block-container margin-left="0mm">
|
2185
|
+
|
2186
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
1916
2187
|
|
2188
|
+
<xsl:variable name="key_iso">
|
2189
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
2190
|
+
</xsl:variable>
|
1917
2191
|
|
2192
|
+
<xsl:choose>
|
2193
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
2194
|
+
|
2195
|
+
|
2196
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2197
|
+
|
2198
|
+
<xsl:variable name="title-where">
|
2199
|
+
<xsl:call-template name="getTitle">
|
2200
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2201
|
+
</xsl:call-template>
|
2202
|
+
</xsl:variable>
|
2203
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2204
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2205
|
+
<xsl:text/>
|
2206
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2207
|
+
</fo:block>
|
2208
|
+
|
2209
|
+
</xsl:when>
|
2210
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2211
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2212
|
+
|
2213
|
+
|
2214
|
+
|
2215
|
+
|
2216
|
+
<xsl:variable name="title-where">
|
2217
|
+
<xsl:call-template name="getTitle">
|
2218
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2219
|
+
</xsl:call-template>
|
2220
|
+
</xsl:variable>
|
2221
|
+
<xsl:value-of select="$title-where"/>
|
2222
|
+
</fo:block>
|
2223
|
+
</xsl:when>
|
2224
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2225
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2226
|
+
|
2227
|
+
|
2228
|
+
|
2229
|
+
<xsl:variable name="title-key">
|
2230
|
+
<xsl:call-template name="getTitle">
|
2231
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
2232
|
+
</xsl:call-template>
|
2233
|
+
</xsl:variable>
|
2234
|
+
<xsl:value-of select="$title-key"/>
|
2235
|
+
</fo:block>
|
2236
|
+
</xsl:when>
|
2237
|
+
</xsl:choose>
|
1918
2238
|
|
1919
|
-
|
1920
|
-
|
1921
|
-
|
1922
|
-
|
1923
|
-
|
1924
|
-
<fo:table width="95%" table-layout="fixed">
|
2239
|
+
<!-- a few components -->
|
2240
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2241
|
+
<fo:block>
|
1925
2242
|
|
1926
|
-
|
1927
|
-
|
1928
|
-
|
1929
|
-
|
1930
|
-
|
1931
|
-
|
2243
|
+
|
2244
|
+
|
2245
|
+
|
2246
|
+
<fo:block>
|
2247
|
+
|
2248
|
+
|
2249
|
+
|
2250
|
+
|
2251
|
+
<fo:table width="95%" table-layout="fixed">
|
1932
2252
|
|
1933
|
-
|
1934
|
-
|
1935
|
-
|
1936
|
-
|
1937
|
-
|
1938
|
-
|
1939
|
-
|
1940
|
-
|
1941
|
-
</
|
1942
|
-
|
1943
|
-
|
1944
|
-
|
1945
|
-
|
1946
|
-
|
1947
|
-
|
1948
|
-
|
1949
|
-
|
1950
|
-
|
1951
|
-
|
1952
|
-
|
1953
|
-
|
1954
|
-
|
1955
|
-
|
1956
|
-
|
1957
|
-
|
1958
|
-
|
1959
|
-
|
1960
|
-
|
1961
|
-
|
1962
|
-
|
1963
|
-
|
1964
|
-
|
1965
|
-
|
1966
|
-
|
1967
|
-
|
2253
|
+
<xsl:choose>
|
2254
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
2255
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2256
|
+
</xsl:when>
|
2257
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2258
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2259
|
+
|
2260
|
+
</xsl:when>
|
2261
|
+
</xsl:choose>
|
2262
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
2263
|
+
<xsl:variable name="html-table">
|
2264
|
+
<xsl:variable name="doc_ns">
|
2265
|
+
|
2266
|
+
</xsl:variable>
|
2267
|
+
<xsl:variable name="ns">
|
2268
|
+
<xsl:choose>
|
2269
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2270
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2271
|
+
</xsl:when>
|
2272
|
+
<xsl:otherwise>
|
2273
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2274
|
+
</xsl:otherwise>
|
2275
|
+
</xsl:choose>
|
2276
|
+
</xsl:variable>
|
2277
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2278
|
+
<xsl:element name="{$ns}:table">
|
2279
|
+
<tbody>
|
2280
|
+
<xsl:apply-templates mode="dl"/>
|
2281
|
+
</tbody>
|
2282
|
+
</xsl:element>
|
2283
|
+
</xsl:variable>
|
2284
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2285
|
+
<xsl:variable name="colwidths">
|
2286
|
+
<xsl:call-template name="calculate-column-widths">
|
2287
|
+
<xsl:with-param name="cols-count" select="2"/>
|
2288
|
+
<xsl:with-param name="table" select="$html-table"/>
|
2289
|
+
</xsl:call-template>
|
2290
|
+
</xsl:variable>
|
2291
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
2292
|
+
<xsl:variable name="maxlength_dt">
|
2293
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
2294
|
+
</xsl:variable>
|
2295
|
+
<xsl:call-template name="setColumnWidth_dl">
|
2296
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2297
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
2298
|
+
</xsl:call-template>
|
2299
|
+
<fo:table-body>
|
2300
|
+
<xsl:apply-templates>
|
2301
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
2302
|
+
</xsl:apply-templates>
|
2303
|
+
</fo:table-body>
|
2304
|
+
</fo:table>
|
2305
|
+
</fo:block>
|
2306
|
+
</fo:block>
|
2307
|
+
</xsl:if>
|
2308
|
+
</fo:block-container>
|
2309
|
+
</fo:block-container>
|
1968
2310
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
1969
2311
|
<xsl:param name="colwidths"/>
|
1970
2312
|
<xsl:param name="maxlength_dt"/>
|
@@ -2061,6 +2403,7 @@
|
|
2061
2403
|
<xsl:param name="key_iso"/>
|
2062
2404
|
|
2063
2405
|
<fo:table-row>
|
2406
|
+
|
2064
2407
|
<fo:table-cell>
|
2065
2408
|
|
2066
2409
|
<fo:block margin-top="6pt">
|
@@ -2075,6 +2418,7 @@
|
|
2075
2418
|
|
2076
2419
|
|
2077
2420
|
|
2421
|
+
|
2078
2422
|
<xsl:apply-templates/>
|
2079
2423
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2080
2424
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2086,14 +2430,36 @@
|
|
2086
2430
|
<fo:table-cell>
|
2087
2431
|
<fo:block>
|
2088
2432
|
|
2089
|
-
|
2433
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2434
|
+
<xsl:if test="local-name(*[1]) != 'stem'">
|
2435
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2436
|
+
</xsl:if>
|
2437
|
+
</xsl:if> -->
|
2090
2438
|
|
2091
2439
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2092
2440
|
|
2093
2441
|
</fo:block>
|
2094
2442
|
</fo:table-cell>
|
2095
2443
|
</fo:table-row>
|
2096
|
-
|
2444
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2445
|
+
<xsl:if test="local-name(*[1]) = 'stem'">
|
2446
|
+
<fo:table-row>
|
2447
|
+
<fo:table-cell>
|
2448
|
+
<fo:block margin-top="6pt">
|
2449
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2450
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2451
|
+
</xsl:if>
|
2452
|
+
<xsl:text> </xsl:text>
|
2453
|
+
</fo:block>
|
2454
|
+
</fo:table-cell>
|
2455
|
+
<fo:table-cell>
|
2456
|
+
<fo:block>
|
2457
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2458
|
+
</fo:block>
|
2459
|
+
</fo:table-cell>
|
2460
|
+
</fo:table-row>
|
2461
|
+
</xsl:if>
|
2462
|
+
</xsl:if> -->
|
2097
2463
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
2098
2464
|
<xsl:apply-templates/>
|
2099
2465
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
@@ -2118,6 +2484,36 @@
|
|
2118
2484
|
</fo:inline>
|
2119
2485
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2120
2486
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
2487
|
+
<xsl:variable name="_font-size">
|
2488
|
+
|
2489
|
+
|
2490
|
+
|
2491
|
+
|
2492
|
+
|
2493
|
+
|
2494
|
+
|
2495
|
+
|
2496
|
+
<xsl:choose>
|
2497
|
+
<xsl:when test="not(ancestor::*[local-name()='note'])">10</xsl:when>
|
2498
|
+
<xsl:otherwise>11</xsl:otherwise>
|
2499
|
+
</xsl:choose>
|
2500
|
+
|
2501
|
+
|
2502
|
+
|
2503
|
+
|
2504
|
+
|
2505
|
+
|
2506
|
+
|
2507
|
+
</xsl:variable>
|
2508
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
2509
|
+
<xsl:if test="$font-size != ''">
|
2510
|
+
<xsl:attribute name="font-size">
|
2511
|
+
<xsl:choose>
|
2512
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
2513
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
2514
|
+
</xsl:choose>
|
2515
|
+
</xsl:attribute>
|
2516
|
+
</xsl:if>
|
2121
2517
|
<xsl:apply-templates/>
|
2122
2518
|
</fo:inline>
|
2123
2519
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -2443,11 +2839,24 @@
|
|
2443
2839
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
2444
2840
|
<xsl:value-of select="substring($str, 2)"/>
|
2445
2841
|
</xsl:template><xsl:template match="mathml:math">
|
2446
|
-
<fo:inline font-family="
|
2447
|
-
<
|
2448
|
-
<xsl:
|
2449
|
-
</
|
2842
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
2843
|
+
<xsl:variable name="mathml">
|
2844
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
2845
|
+
</xsl:variable>
|
2846
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
2847
|
+
<!-- <xsl:copy-of select="."/> -->
|
2848
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
2849
|
+
</fo:instream-foreign-object>
|
2450
2850
|
</fo:inline>
|
2851
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
2852
|
+
<xsl:copy>
|
2853
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
2854
|
+
</xsl:copy>
|
2855
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
2856
|
+
<xsl:copy>
|
2857
|
+
<!-- replace start and end spaces to non-break space -->
|
2858
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
2859
|
+
</xsl:copy>
|
2451
2860
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
2452
2861
|
<xsl:variable name="target">
|
2453
2862
|
<xsl:choose>
|
@@ -2524,13 +2933,26 @@
|
|
2524
2933
|
<xsl:apply-templates/>
|
2525
2934
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
2526
2935
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
2527
|
-
|
2936
|
+
|
2528
2937
|
<xsl:apply-templates/>
|
2529
2938
|
</fo:basic-link>
|
2530
2939
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
2531
|
-
<fo:block
|
2532
|
-
<xsl:
|
2533
|
-
|
2940
|
+
<fo:block-container margin-left="0mm">
|
2941
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
2942
|
+
<xsl:attribute name="margin-left">
|
2943
|
+
<xsl:choose>
|
2944
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2945
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2946
|
+
</xsl:choose>
|
2947
|
+
</xsl:attribute>
|
2948
|
+
|
2949
|
+
</xsl:if>
|
2950
|
+
<fo:block-container margin-left="0mm">
|
2951
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
2952
|
+
<xsl:apply-templates/>
|
2953
|
+
</fo:block>
|
2954
|
+
</fo:block-container>
|
2955
|
+
</fo:block-container>
|
2534
2956
|
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
2535
2957
|
<fo:inline>
|
2536
2958
|
<xsl:apply-templates/>
|
@@ -2590,7 +3012,9 @@
|
|
2590
3012
|
</xsl:choose>
|
2591
3013
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
2592
3014
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
2593
|
-
<xsl:
|
3015
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3016
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3017
|
+
</fo:inline>
|
2594
3018
|
<xsl:apply-templates/>
|
2595
3019
|
</fo:block>
|
2596
3020
|
</xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name'] | *[local-name() = 'termnote']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']" mode="presentation">
|
@@ -2691,15 +3115,109 @@
|
|
2691
3115
|
|
2692
3116
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
2693
3117
|
</fo:block>
|
2694
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
3118
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
2695
3119
|
<xsl:apply-templates mode="contents"/>
|
2696
3120
|
<xsl:text> </xsl:text>
|
2697
|
-
</xsl:template><xsl:template match="
|
3121
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
3122
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3123
|
+
<xsl:text> </xsl:text>
|
3124
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3125
|
+
<xsl:value-of select="."/>
|
3126
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
2698
3127
|
<xsl:value-of select="."/>
|
2699
|
-
</xsl:template><xsl:template match="
|
3128
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
3129
|
+
<xsl:apply-templates mode="contents"/>
|
3130
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3131
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3132
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3133
|
+
<xsl:apply-templates select="."/>
|
3134
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3135
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3136
|
+
</xsl:template><xsl:template name="addBookmarks">
|
3137
|
+
<xsl:param name="contents"/>
|
3138
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
3139
|
+
<fo:bookmark-tree>
|
3140
|
+
<xsl:choose>
|
3141
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
3142
|
+
<xsl:choose>
|
3143
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
3144
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3145
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
3146
|
+
<fo:bookmark-title>
|
3147
|
+
<xsl:variable name="bookmark-title_">
|
3148
|
+
<xsl:call-template name="getLangVersion">
|
3149
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3150
|
+
</xsl:call-template>
|
3151
|
+
</xsl:variable>
|
3152
|
+
<xsl:choose>
|
3153
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
3154
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
3155
|
+
</xsl:when>
|
3156
|
+
<xsl:otherwise>
|
3157
|
+
<xsl:choose>
|
3158
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
3159
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
3160
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3161
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3162
|
+
</xsl:choose>
|
3163
|
+
</xsl:otherwise>
|
3164
|
+
</xsl:choose>
|
3165
|
+
</fo:bookmark-title>
|
3166
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3167
|
+
</fo:bookmark>
|
3168
|
+
|
3169
|
+
</xsl:for-each>
|
3170
|
+
</xsl:when>
|
3171
|
+
<xsl:otherwise>
|
3172
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3173
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3174
|
+
</xsl:for-each>
|
3175
|
+
</xsl:otherwise>
|
3176
|
+
</xsl:choose>
|
3177
|
+
</xsl:when>
|
3178
|
+
<xsl:otherwise>
|
3179
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
3180
|
+
</xsl:otherwise>
|
3181
|
+
</xsl:choose>
|
3182
|
+
|
3183
|
+
|
3184
|
+
|
3185
|
+
|
3186
|
+
|
3187
|
+
|
3188
|
+
|
3189
|
+
|
3190
|
+
</fo:bookmark-tree>
|
3191
|
+
</xsl:if>
|
3192
|
+
</xsl:template><xsl:template name="getLangVersion">
|
3193
|
+
<xsl:param name="lang"/>
|
3194
|
+
<xsl:choose>
|
3195
|
+
<xsl:when test="$lang = 'en'">
|
3196
|
+
|
3197
|
+
|
3198
|
+
</xsl:when>
|
3199
|
+
<xsl:when test="$lang = 'fr'">
|
3200
|
+
|
3201
|
+
|
3202
|
+
</xsl:when>
|
3203
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
3204
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
3205
|
+
</xsl:choose>
|
3206
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
3207
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
3208
|
+
<fo:bookmark-title>
|
3209
|
+
<xsl:if test="@section != ''">
|
3210
|
+
<xsl:value-of select="@section"/>
|
3211
|
+
<xsl:text> </xsl:text>
|
3212
|
+
</xsl:if>
|
3213
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3214
|
+
</fo:bookmark-title>
|
3215
|
+
<xsl:apply-templates mode="bookmark"/>
|
3216
|
+
</fo:bookmark>
|
3217
|
+
</xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
2700
3218
|
<xsl:if test="normalize-space() != ''">
|
2701
3219
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
2702
|
-
|
3220
|
+
|
2703
3221
|
<xsl:apply-templates/>
|
2704
3222
|
</fo:block>
|
2705
3223
|
</xsl:if>
|
@@ -2754,7 +3272,7 @@
|
|
2754
3272
|
<xsl:apply-templates/>
|
2755
3273
|
</xsl:otherwise>
|
2756
3274
|
</xsl:choose>
|
2757
|
-
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
3275
|
+
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
2758
3276
|
<xsl:text> </xsl:text>
|
2759
3277
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
2760
3278
|
<xsl:copy>
|
@@ -2763,21 +3281,61 @@
|
|
2763
3281
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
2764
3282
|
<xsl:text> </xsl:text>
|
2765
3283
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
2766
|
-
|
2767
|
-
|
2768
|
-
|
2769
|
-
|
2770
|
-
|
3284
|
+
|
3285
|
+
<fo:block-container margin-left="0mm">
|
3286
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3287
|
+
<xsl:attribute name="margin-left">
|
3288
|
+
<xsl:choose>
|
3289
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3290
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3291
|
+
</xsl:choose>
|
3292
|
+
</xsl:attribute>
|
3293
|
+
|
3294
|
+
</xsl:if>
|
3295
|
+
<fo:block-container margin-left="0mm">
|
3296
|
+
|
3297
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3298
|
+
<xsl:variable name="_font-size">
|
3299
|
+
|
3300
|
+
|
3301
|
+
|
3302
|
+
|
3303
|
+
|
3304
|
+
|
3305
|
+
|
3306
|
+
|
3307
|
+
|
3308
|
+
|
3309
|
+
|
3310
|
+
|
3311
|
+
|
3312
|
+
|
3313
|
+
</xsl:variable>
|
3314
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3315
|
+
<xsl:if test="$font-size != ''">
|
3316
|
+
<xsl:attribute name="font-size">
|
3317
|
+
<xsl:choose>
|
3318
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3319
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3320
|
+
</xsl:choose>
|
3321
|
+
</xsl:attribute>
|
3322
|
+
</xsl:if>
|
3323
|
+
<xsl:apply-templates/>
|
3324
|
+
</fo:block>
|
3325
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3326
|
+
|
3327
|
+
</fo:block-container>
|
3328
|
+
</fo:block-container>
|
3329
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
2771
3330
|
<xsl:variable name="text">
|
2772
3331
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
2773
3332
|
</xsl:variable>
|
2774
|
-
<xsl:call-template name="add-zero-spaces">
|
3333
|
+
<xsl:call-template name="add-zero-spaces-java">
|
2775
3334
|
<xsl:with-param name="text" select="$text"/>
|
2776
3335
|
</xsl:call-template>
|
2777
3336
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
2778
3337
|
<xsl:if test="normalize-space() != ''">
|
2779
|
-
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
2780
|
-
|
3338
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
2781
3339
|
<xsl:apply-templates/>
|
2782
3340
|
</fo:block>
|
2783
3341
|
</xsl:if>
|
@@ -2845,6 +3403,145 @@
|
|
2845
3403
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
2846
3404
|
<xsl:apply-templates/>
|
2847
3405
|
</fo:block>
|
3406
|
+
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3407
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
3408
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3409
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
3410
|
+
</xsl:if>
|
3411
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
3412
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
3413
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3414
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
3415
|
+
</xsl:if>
|
3416
|
+
<xsl:variable name="simple-table">
|
3417
|
+
<xsl:call-template name="getSimpleTable"/>
|
3418
|
+
</xsl:variable>
|
3419
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
3420
|
+
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
3421
|
+
<!-- <fo:table-column column-width="35mm"/>
|
3422
|
+
<fo:table-column column-width="115mm"/> -->
|
3423
|
+
<fo:table-column column-width="30%"/>
|
3424
|
+
<fo:table-column column-width="70%"/>
|
3425
|
+
</xsl:if>
|
3426
|
+
<xsl:apply-templates mode="requirement"/>
|
3427
|
+
</fo:table>
|
3428
|
+
<!-- fn processing -->
|
3429
|
+
<xsl:if test=".//*[local-name() = 'fn']">
|
3430
|
+
<xsl:for-each select="*[local-name() = 'tbody']">
|
3431
|
+
<fo:block font-size="90%" border-bottom="1pt solid black">
|
3432
|
+
<xsl:call-template name="fn_display"/>
|
3433
|
+
</fo:block>
|
3434
|
+
</xsl:for-each>
|
3435
|
+
</xsl:if>
|
3436
|
+
</fo:block-container>
|
3437
|
+
</fo:block-container>
|
3438
|
+
</xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
|
3439
|
+
<fo:table-header>
|
3440
|
+
<xsl:apply-templates mode="requirement"/>
|
3441
|
+
</fo:table-header>
|
3442
|
+
</xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
|
3443
|
+
<fo:table-body>
|
3444
|
+
<xsl:apply-templates mode="requirement"/>
|
3445
|
+
</fo:table-body>
|
3446
|
+
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
3447
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
3448
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
3449
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
3450
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
3451
|
+
</xsl:if>
|
3452
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
3453
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
3454
|
+
</xsl:if>
|
3455
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
3456
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
3457
|
+
</xsl:if>
|
3458
|
+
<xsl:apply-templates mode="requirement"/>
|
3459
|
+
</fo:table-row>
|
3460
|
+
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
3461
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3462
|
+
<xsl:attribute name="text-align">
|
3463
|
+
<xsl:choose>
|
3464
|
+
<xsl:when test="@align">
|
3465
|
+
<xsl:value-of select="@align"/>
|
3466
|
+
</xsl:when>
|
3467
|
+
<xsl:otherwise>left</xsl:otherwise>
|
3468
|
+
</xsl:choose>
|
3469
|
+
</xsl:attribute>
|
3470
|
+
<xsl:if test="@colspan">
|
3471
|
+
<xsl:attribute name="number-columns-spanned">
|
3472
|
+
<xsl:value-of select="@colspan"/>
|
3473
|
+
</xsl:attribute>
|
3474
|
+
</xsl:if>
|
3475
|
+
<xsl:if test="@rowspan">
|
3476
|
+
<xsl:attribute name="number-rows-spanned">
|
3477
|
+
<xsl:value-of select="@rowspan"/>
|
3478
|
+
</xsl:attribute>
|
3479
|
+
</xsl:if>
|
3480
|
+
<xsl:call-template name="display-align"/>
|
3481
|
+
|
3482
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3483
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3484
|
+
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
3485
|
+
</xsl:if>
|
3486
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
3487
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3488
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3489
|
+
</xsl:if> -->
|
3490
|
+
|
3491
|
+
<fo:block>
|
3492
|
+
<xsl:apply-templates/>
|
3493
|
+
</fo:block>
|
3494
|
+
</fo:table-cell>
|
3495
|
+
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
3496
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3497
|
+
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3498
|
+
<xsl:attribute name="padding">0mm</xsl:attribute>
|
3499
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
3500
|
+
</xsl:if>
|
3501
|
+
<xsl:attribute name="text-align">
|
3502
|
+
<xsl:choose>
|
3503
|
+
<xsl:when test="@align">
|
3504
|
+
<xsl:value-of select="@align"/>
|
3505
|
+
</xsl:when>
|
3506
|
+
<xsl:otherwise>left</xsl:otherwise>
|
3507
|
+
</xsl:choose>
|
3508
|
+
</xsl:attribute>
|
3509
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
3510
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3511
|
+
</xsl:if>
|
3512
|
+
<xsl:if test="@colspan">
|
3513
|
+
<xsl:attribute name="number-columns-spanned">
|
3514
|
+
<xsl:value-of select="@colspan"/>
|
3515
|
+
</xsl:attribute>
|
3516
|
+
</xsl:if>
|
3517
|
+
<xsl:if test="@rowspan">
|
3518
|
+
<xsl:attribute name="number-rows-spanned">
|
3519
|
+
<xsl:value-of select="@rowspan"/>
|
3520
|
+
</xsl:attribute>
|
3521
|
+
</xsl:if>
|
3522
|
+
<xsl:call-template name="display-align"/>
|
3523
|
+
|
3524
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3525
|
+
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
3526
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3527
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
3528
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3529
|
+
</xsl:if>
|
3530
|
+
</xsl:if> -->
|
3531
|
+
<!-- 2nd line and below -->
|
3532
|
+
|
3533
|
+
<fo:block>
|
3534
|
+
<xsl:apply-templates/>
|
3535
|
+
</fo:block>
|
3536
|
+
</fo:table-cell>
|
3537
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
3538
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
3539
|
+
<xsl:apply-templates/>
|
3540
|
+
</fo:block>
|
3541
|
+
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
3542
|
+
<fo:block> <!-- margin-bottom="10pt" -->
|
3543
|
+
<xsl:apply-templates/>
|
3544
|
+
</fo:block>
|
2848
3545
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
2849
3546
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
2850
3547
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -2864,12 +3561,13 @@
|
|
2864
3561
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2865
3562
|
|
2866
3563
|
<xsl:variable name="element">
|
2867
|
-
|
3564
|
+
|
2868
3565
|
inline
|
3566
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
2869
3567
|
</xsl:variable>
|
2870
3568
|
|
2871
3569
|
<xsl:choose>
|
2872
|
-
<xsl:when test="normalize-space($element)
|
3570
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
2873
3571
|
<fo:block xsl:use-attribute-sets="example-body-style">
|
2874
3572
|
<xsl:apply-templates/>
|
2875
3573
|
</fo:block>
|
@@ -2906,25 +3604,44 @@
|
|
2906
3604
|
</xsl:otherwise>
|
2907
3605
|
</xsl:choose>
|
2908
3606
|
|
2909
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
2910
|
-
|
3607
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3608
|
+
|
3609
|
+
<xsl:variable name="element">
|
3610
|
+
block
|
2911
3611
|
|
2912
|
-
|
2913
|
-
|
3612
|
+
</xsl:variable>
|
3613
|
+
<xsl:choose>
|
3614
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
3615
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
3616
|
+
|
3617
|
+
<xsl:apply-templates/>
|
3618
|
+
</fo:block>
|
3619
|
+
</xsl:when>
|
3620
|
+
<xsl:otherwise>
|
3621
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
3622
|
+
<xsl:apply-templates/>
|
3623
|
+
</fo:inline>
|
3624
|
+
</xsl:otherwise>
|
3625
|
+
</xsl:choose>
|
2914
3626
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
2915
3627
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
2916
3628
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
2917
3629
|
<xsl:variable name="termsource_text">
|
2918
3630
|
<xsl:apply-templates/>
|
2919
3631
|
</xsl:variable>
|
3632
|
+
|
2920
3633
|
<xsl:choose>
|
2921
3634
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
2922
3635
|
<xsl:apply-templates/>
|
2923
3636
|
</xsl:when>
|
2924
|
-
<xsl:otherwise>
|
2925
|
-
|
2926
|
-
|
2927
|
-
|
3637
|
+
<xsl:otherwise>
|
3638
|
+
|
3639
|
+
<xsl:text>[</xsl:text>
|
3640
|
+
|
3641
|
+
<xsl:apply-templates/>
|
3642
|
+
|
3643
|
+
<xsl:text>]</xsl:text>
|
3644
|
+
|
2928
3645
|
</xsl:otherwise>
|
2929
3646
|
</xsl:choose>
|
2930
3647
|
</fo:block>
|
@@ -2945,18 +3662,29 @@
|
|
2945
3662
|
<xsl:if test="normalize-space() != ''">
|
2946
3663
|
<xsl:value-of select="."/>
|
2947
3664
|
</xsl:if>
|
2948
|
-
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3665
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3666
|
+
<fo:block-container margin-left="0mm">
|
3667
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3668
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
3669
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3670
|
+
</xsl:if>
|
3671
|
+
</xsl:if>
|
3672
|
+
|
3673
|
+
<fo:block-container margin-left="0mm">
|
2949
3674
|
|
2950
|
-
|
2951
|
-
|
2952
|
-
|
2953
|
-
|
2954
|
-
|
2955
|
-
|
2956
|
-
|
2957
|
-
|
2958
|
-
|
2959
|
-
|
3675
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
3676
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
3677
|
+
</fo:block>
|
3678
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
3679
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
3680
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
3681
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
3682
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
3683
|
+
</fo:block>
|
3684
|
+
</xsl:if>
|
3685
|
+
|
3686
|
+
</fo:block-container>
|
3687
|
+
</fo:block-container>
|
2960
3688
|
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
2961
3689
|
<xsl:if test="../*[local-name() = 'author']">
|
2962
3690
|
<xsl:text>, </xsl:text>
|
@@ -2984,6 +3712,7 @@
|
|
2984
3712
|
<xsl:if test="@type = 'inline'">
|
2985
3713
|
|
2986
3714
|
|
3715
|
+
|
2987
3716
|
</xsl:if>
|
2988
3717
|
|
2989
3718
|
|
@@ -3024,6 +3753,7 @@
|
|
3024
3753
|
|
3025
3754
|
|
3026
3755
|
|
3756
|
+
|
3027
3757
|
</xsl:variable>
|
3028
3758
|
|
3029
3759
|
<xsl:variable name="padding-right">
|
@@ -3121,13 +3851,14 @@
|
|
3121
3851
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3122
3852
|
<fo:block>
|
3123
3853
|
<xsl:call-template name="setId"/>
|
3854
|
+
|
3124
3855
|
<xsl:apply-templates/>
|
3125
3856
|
</fo:block>
|
3126
3857
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
3127
3858
|
<fo:block id="{@id}">
|
3128
3859
|
<xsl:apply-templates/>
|
3129
3860
|
</fo:block>
|
3130
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@
|
3861
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
3131
3862
|
|
3132
3863
|
<fo:block id="{@id}">
|
3133
3864
|
<xsl:apply-templates/>
|
@@ -3145,6 +3876,31 @@
|
|
3145
3876
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
3146
3877
|
<!-- 0xA0 to space replacement -->
|
3147
3878
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
3879
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
3880
|
+
<xsl:choose>
|
3881
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
3882
|
+
<fo:block-container>
|
3883
|
+
<xsl:attribute name="margin-left">
|
3884
|
+
<xsl:choose>
|
3885
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3886
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3887
|
+
</xsl:choose>
|
3888
|
+
</xsl:attribute>
|
3889
|
+
|
3890
|
+
|
3891
|
+
<fo:block-container margin-left="0mm">
|
3892
|
+
<fo:block>
|
3893
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
3894
|
+
</fo:block>
|
3895
|
+
</fo:block-container>
|
3896
|
+
</fo:block-container>
|
3897
|
+
</xsl:when>
|
3898
|
+
<xsl:otherwise>
|
3899
|
+
<fo:block>
|
3900
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
3901
|
+
</fo:block>
|
3902
|
+
</xsl:otherwise>
|
3903
|
+
</xsl:choose>
|
3148
3904
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3149
3905
|
<!-- <row>
|
3150
3906
|
<date>05-07-2013</date>
|
@@ -3176,6 +3932,65 @@
|
|
3176
3932
|
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
3177
3933
|
<fo:block><xsl:apply-templates/></fo:block>
|
3178
3934
|
</fo:table-cell>
|
3935
|
+
</xsl:template><xsl:template name="processBibitem">
|
3936
|
+
|
3937
|
+
|
3938
|
+
|
3939
|
+
|
3940
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
3941
|
+
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
3942
|
+
<xsl:choose>
|
3943
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
3944
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
3945
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
3946
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
3947
|
+
</xsl:if>
|
3948
|
+
<xsl:value-of select="$_doc_ident"/>
|
3949
|
+
</xsl:when>
|
3950
|
+
<xsl:otherwise>
|
3951
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
3952
|
+
<xsl:if test="$type != ''">
|
3953
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
3954
|
+
</xsl:if>
|
3955
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
3956
|
+
</xsl:otherwise>
|
3957
|
+
</xsl:choose>
|
3958
|
+
</xsl:template><xsl:template name="processPersonalAuthor">
|
3959
|
+
<xsl:choose>
|
3960
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
3961
|
+
<author>
|
3962
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
3963
|
+
</author>
|
3964
|
+
</xsl:when>
|
3965
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
|
3966
|
+
<author>
|
3967
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
3968
|
+
<xsl:text> </xsl:text>
|
3969
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
3970
|
+
</author>
|
3971
|
+
</xsl:when>
|
3972
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
3973
|
+
<author>
|
3974
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
3975
|
+
<xsl:text> </xsl:text>
|
3976
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
3977
|
+
</author>
|
3978
|
+
</xsl:when>
|
3979
|
+
<xsl:otherwise>
|
3980
|
+
<xsl:apply-templates/>
|
3981
|
+
</xsl:otherwise>
|
3982
|
+
</xsl:choose>
|
3983
|
+
</xsl:template><xsl:template name="renderDate">
|
3984
|
+
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
3985
|
+
<xsl:value-of select="*[local-name() = 'on']"/>
|
3986
|
+
</xsl:if>
|
3987
|
+
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
3988
|
+
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
3989
|
+
</xsl:if>
|
3990
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
3991
|
+
<xsl:value-of select="translate(.,'. ','')"/>
|
3992
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
3993
|
+
<xsl:value-of select="substring(.,1,1)"/>
|
3179
3994
|
</xsl:template><xsl:template name="convertDate">
|
3180
3995
|
<xsl:param name="date"/>
|
3181
3996
|
<xsl:param name="format" select="'short'"/>
|
@@ -3256,6 +4071,7 @@
|
|
3256
4071
|
|
3257
4072
|
|
3258
4073
|
|
4074
|
+
|
3259
4075
|
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title']"/>
|
3260
4076
|
|
3261
4077
|
|
@@ -3274,6 +4090,7 @@
|
|
3274
4090
|
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
3275
4091
|
|
3276
4092
|
|
4093
|
+
|
3277
4094
|
</dc:creator>
|
3278
4095
|
<dc:description>
|
3279
4096
|
<xsl:variable name="abstract">
|
@@ -3281,6 +4098,7 @@
|
|
3281
4098
|
|
3282
4099
|
|
3283
4100
|
|
4101
|
+
|
3284
4102
|
</xsl:variable>
|
3285
4103
|
<xsl:value-of select="normalize-space($abstract)"/>
|
3286
4104
|
</dc:description>
|
@@ -3379,7 +4197,9 @@
|
|
3379
4197
|
<xsl:value-of select="document('')//*/namespace::m3d"/>
|
3380
4198
|
|
3381
4199
|
|
3382
|
-
|
4200
|
+
|
4201
|
+
|
4202
|
+
|
3383
4203
|
</xsl:variable>
|
3384
4204
|
<xsl:if test="$documentNS != $XSLNS">
|
3385
4205
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -3405,4 +4225,21 @@
|
|
3405
4225
|
</xsl:otherwise>
|
3406
4226
|
</xsl:choose>
|
3407
4227
|
</xsl:attribute>
|
4228
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
4229
|
+
<xsl:param name="text"/>
|
4230
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
4231
|
+
<xsl:if test="string-length($text) > 0">
|
4232
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
4233
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
4234
|
+
<xsl:if test="$char = '®'">
|
4235
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
4236
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
4237
|
+
</xsl:if>
|
4238
|
+
<xsl:value-of select="$char"/>
|
4239
|
+
</fo:inline>
|
4240
|
+
<xsl:call-template name="add-letter-spacing">
|
4241
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
4242
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
4243
|
+
</xsl:call-template>
|
4244
|
+
</xsl:if>
|
3408
4245
|
</xsl:template></xsl:stylesheet>
|