metanorma-un 0.7.3 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,6 +7,8 @@
7
7
  <xsl:variable name="images" select="document($svg_images)"/>
8
8
  <xsl:param name="basepath"/>
9
9
 
10
+ <xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" use="@reference"/>
11
+
10
12
 
11
13
 
12
14
 
@@ -43,7 +45,7 @@
43
45
 
44
46
  <xsl:template match="/">
45
47
  <xsl:call-template name="namespaceCheck"/>
46
- <fo:root font-family="Times New Roman, STIX Two Math, Source Han Sans" font-size="10pt" xml:lang="{$lang}">
48
+ <fo:root xsl:use-attribute-sets="root-style" xml:lang="{$lang}">
47
49
  <fo:layout-master-set>
48
50
  <!-- Cover page -->
49
51
  <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
@@ -323,9 +325,6 @@
323
325
  <!-- ============================= -->
324
326
  <!-- CONTENTS -->
325
327
  <!-- ============================= -->
326
- <xsl:template match="node()" mode="contents">
327
- <xsl:apply-templates mode="contents"/>
328
- </xsl:template>
329
328
 
330
329
  <!-- element with title -->
331
330
  <xsl:template match="*[un:title]" mode="contents">
@@ -337,7 +336,7 @@
337
336
 
338
337
  <xsl:variable name="display">
339
338
  <xsl:choose>
340
- <xsl:when test="$level &gt; 3">false</xsl:when>
339
+ <xsl:when test="$level &gt; $toc_level">false</xsl:when>
341
340
  <xsl:otherwise>true</xsl:otherwise>
342
341
  </xsl:choose>
343
342
  </xsl:variable>
@@ -374,7 +373,6 @@
374
373
  </xsl:if>
375
374
 
376
375
  </xsl:template>
377
- <xsl:template match="un:references[not(@normative='true')]/un:bibitem" mode="contents"/>
378
376
  <!-- ============================= -->
379
377
  <!-- ============================= -->
380
378
 
@@ -392,12 +390,9 @@
392
390
  <fo:table-body>
393
391
  <fo:table-row>
394
392
  <fo:table-cell padding-left="6mm" padding-top="2.5mm">
395
- <xsl:variable name="title-summary">
396
- <xsl:call-template name="getTitle">
397
- <xsl:with-param name="name" select="'title-summary'"/>
398
- </xsl:call-template>
399
- </xsl:variable>
400
- <fo:block font-size="12pt" font-style="italic" margin-bottom="6pt"><xsl:value-of select="$title-summary"/></fo:block>
393
+ <fo:block font-size="12pt" font-style="italic" margin-bottom="6pt" role="H2">
394
+ <xsl:apply-templates select="un:title/node()"/>
395
+ </fo:block>
401
396
  </fo:table-cell>
402
397
  <fo:table-cell>
403
398
  <fo:block> </fo:block>
@@ -411,7 +406,7 @@
411
406
  <fo:block> </fo:block>
412
407
  </fo:table-cell>
413
408
  <fo:table-cell text-align="justify" padding-bottom="12pt" padding-right="3mm">
414
- <fo:block font-size="10pt" line-height="120%"><xsl:apply-templates/></fo:block>
409
+ <fo:block font-size="10pt" line-height="120%"><xsl:apply-templates select="node()[not(self::un:title)]"/></fo:block>
415
410
  </fo:table-cell>
416
411
  <fo:table-cell>
417
412
  <fo:block> </fo:block>
@@ -553,31 +548,6 @@
553
548
  </xsl:template>
554
549
 
555
550
 
556
- <xsl:template match="un:title/un:fn | un:p/un:fn[not(ancestor::un:table)] | un:figure/un:name/un:fn" priority="2">
557
- <fo:footnote keep-with-previous.within-line="always">
558
- <xsl:variable name="number">
559
- <xsl:number level="any" count="un:fn[not(ancestor::un:table)]"/>
560
- </xsl:variable>
561
- <fo:inline font-size="60%" keep-with-previous.within-line="always" vertical-align="super">
562
- <fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
563
- <xsl:value-of select="$number + count(//un:bibitem/un:note)"/>
564
- </fo:basic-link>
565
- </fo:inline>
566
- <fo:footnote-body>
567
- <fo:block-container margin-left="-8mm">
568
- <fo:block font-size="9pt" text-align="justify" line-height="125%" font-weight="normal" text-indent="0" margin-left="8mm">
569
- <fo:inline id="footnote_{@reference}_{$number}" font-size="60%" keep-with-next.within-line="always" vertical-align="super" padding-right="8mm"> <!-- alignment-baseline="hanging" -->
570
- <xsl:value-of select="$number + count(//un:bibitem/un:note)"/>
571
- </fo:inline>
572
- <xsl:for-each select="un:p">
573
- <xsl:apply-templates/>
574
- </xsl:for-each>
575
- </fo:block>
576
- </fo:block-container>
577
- </fo:footnote-body>
578
- </fo:footnote>
579
- </xsl:template>
580
-
581
551
  <xsl:template match="un:fn/un:p">
582
552
  <fo:block>
583
553
  <xsl:apply-templates/>
@@ -597,7 +567,7 @@
597
567
  <xsl:template match="un:ul//un:note/un:name | un:ol//un:note/un:name" mode="process" priority="2"/>
598
568
  <xsl:template match="un:ul//un:note/un:p | un:ol//un:note/un:p" mode="process" priority="2">
599
569
  <fo:block margin-top="4pt">
600
- <xsl:apply-templates select="../un:name" mode="presentation"/>
570
+ <xsl:apply-templates select="../un:name"/>
601
571
  <xsl:apply-templates/>
602
572
  </fo:block>
603
573
  </xsl:template>
@@ -614,8 +584,9 @@
614
584
  <fo:list-item-label end-indent="label-end()">
615
585
  <fo:block>
616
586
  <xsl:choose>
617
- <!-- <xsl:when test="local-name(..) = 'ul'">&#x2014;</xsl:when> --> <!-- dash -->
618
- <xsl:when test="local-name(..) = 'ul'">•</xsl:when>
587
+ <xsl:when test="local-name(..) = 'ul'">
588
+ <xsl:call-template name="setULLabel"/>
589
+ </xsl:when>
619
590
  <xsl:otherwise> <!-- for ordered lists -->
620
591
  <xsl:choose>
621
592
  <xsl:when test="../@type = 'arabic'">
@@ -670,32 +641,6 @@
670
641
  </xsl:template>
671
642
 
672
643
 
673
- <xsl:template match="un:admonition">
674
- <fo:block text-align="center" font-style="italic" keep-with-next="always" margin-bottom="6pt">
675
- <xsl:apply-templates select="un:name" mode="process"/>
676
- </fo:block>
677
- <fo:block-container border="0.25pt solid black" margin-left="-3mm" margin-right="-3mm" padding-top="4mm">
678
- <fo:block id="{@id}" font-weight="bold" margin-left="6mm" margin-right="6mm" keep-with-next="always">
679
- <xsl:apply-templates select="un:name" mode="process"/>
680
- </fo:block>
681
- <fo:block-container margin-left="2mm" margin-right="2mm">
682
- <fo:block-container margin-left="0mm" margin-right="0mm">
683
- <xsl:apply-templates/>
684
- </fo:block-container>
685
- </fo:block-container>
686
- </fo:block-container>
687
- <fo:block margin-bottom="4pt"> </fo:block>
688
- </xsl:template>
689
-
690
- <xsl:template match="un:admonition/un:name"/>
691
- <xsl:template match="un:admonition/un:name" mode="process">
692
- <xsl:apply-templates/>
693
- </xsl:template>
694
-
695
- <xsl:template match="un:admonition/un:p">
696
- <fo:block text-align="justify" margin-bottom="6pt" line-height="122%"><xsl:apply-templates/></fo:block>
697
- </xsl:template>
698
-
699
644
  <!-- ============================= -->
700
645
  <!-- ============================= -->
701
646
 
@@ -756,7 +701,7 @@
756
701
 
757
702
  <xsl:template match="un:title[parent::un:clause[@inline-header = 'true']]" priority="3"/>
758
703
 
759
- <xsl:template match="un:title">
704
+ <xsl:template match="un:title" name="title">
760
705
 
761
706
  <xsl:variable name="level">
762
707
  <xsl:call-template name="getLevel"/>
@@ -836,42 +781,13 @@
836
781
  <!-- for further use -->
837
782
  <!-- ============================ -->
838
783
 
839
-
840
-
841
- <xsl:template match="un:bibitem">
842
- <fo:block id="{@id}" margin-top="6pt" margin-left="14mm" text-indent="-14mm">
843
- <fo:inline padding-right="5mm">[<xsl:value-of select="un:docidentifier"/>]</fo:inline><xsl:value-of select="un:docidentifier"/>
844
- <xsl:if test="un:title">
845
- <fo:inline font-style="italic">
846
- <xsl:text>, </xsl:text>
847
- <xsl:choose>
848
- <xsl:when test="un:title[@type = 'main' and @language = 'en']">
849
- <xsl:value-of select="un:title[@type = 'main' and @language = 'en']"/>
850
- </xsl:when>
851
- <xsl:otherwise>
852
- <xsl:value-of select="un:title"/>
853
- </xsl:otherwise>
854
- </xsl:choose>
855
- </fo:inline>
856
- </xsl:if>
857
- <xsl:apply-templates select="un:formattedref"/>
858
- </fo:block>
859
- </xsl:template>
860
- <xsl:template match="un:bibitem/un:docidentifier"/>
861
-
862
- <xsl:template match="un:bibitem/un:title"/>
863
-
864
- <xsl:template match="un:formattedref">
865
- <xsl:text>, </xsl:text><xsl:apply-templates/>
866
- </xsl:template>
867
-
868
784
 
869
785
  <xsl:template match="un:figure" priority="2">
870
786
  <fo:block-container id="{@id}">
871
787
  <fo:block>
872
- <xsl:apply-templates/>
788
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
873
789
  </fo:block>
874
- <xsl:apply-templates select="un:name" mode="presentation"/>
790
+ <xsl:apply-templates select="un:name"/>
875
791
  <!-- <xsl:call-template name="fn_display_figure"/> -->
876
792
  <xsl:for-each select="un:note">
877
793
  <xsl:call-template name="note"/>
@@ -909,7 +825,7 @@
909
825
  </xsl:when>
910
826
  <xsl:otherwise>
911
827
  <xsl:apply-templates select="un:formattedref"/>
912
- <xsl:apply-templates select="un:docidentifier[@type != 'metanorma' or not(@type)]" mode="process"/>
828
+ <xsl:apply-templates select="un:docidentifier[(@type != 'metanorma' and @type != 'metanorma-ordinal') or not(@type)]" mode="process"/>
913
829
  </xsl:otherwise>
914
830
  </xsl:choose>
915
831
  </xsl:if>
@@ -949,10 +865,10 @@
949
865
  <xsl:apply-templates/>
950
866
  </xsl:template>
951
867
 
952
- <xsl:template match="un:docidentifier[@type = 'metanorma']" mode="process">
868
+ <xsl:template match="un:docidentifier[@type = 'metanorma' or @type = 'metanorma-ordinal']" mode="process">
953
869
  <xsl:apply-templates/>
954
870
  </xsl:template>
955
- <xsl:template match="un:docidentifier[@type != 'metanorma' or not(@type)]" mode="process">
871
+ <xsl:template match="un:docidentifier[(@type != 'metanorma' and @type != 'metanorma-ordinal') or not(@type)]" mode="process">
956
872
  <xsl:text> [</xsl:text><xsl:apply-templates/><xsl:text>]</xsl:text>
957
873
  </xsl:template>
958
874
  <xsl:template match="un:docidentifier"/>
@@ -982,12 +898,12 @@
982
898
  <xsl:attribute name="text-align">left</xsl:attribute>
983
899
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
984
900
  </xsl:if>
985
- <xsl:apply-templates/>
901
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
986
902
  </fo:block>
987
903
  </fo:table-cell>
988
904
  <fo:table-cell> <!-- display-align="center" -->
989
905
  <fo:block text-align="right">
990
- <xsl:apply-templates select="un:name" mode="presentation"/>
906
+ <xsl:apply-templates select="un:name"/>
991
907
  </fo:block>
992
908
  </fo:table-cell>
993
909
  </fo:table-row>
@@ -1005,15 +921,6 @@
1005
921
  </xsl:template>
1006
922
 
1007
923
 
1008
-
1009
- <xsl:template match="un:references">
1010
- <fo:block>
1011
- <xsl:if test="not(un:title)">
1012
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
1013
- </xsl:if>
1014
- <xsl:apply-templates/>
1015
- </fo:block>
1016
- </xsl:template>
1017
924
 
1018
925
  <xsl:template match="un:dl" priority="2">
1019
926
  <fo:block-container margin-left="0mm">
@@ -1115,51 +1022,32 @@
1115
1022
  <xsl:text>iVBORw0KGgoAAAANSUhEUgAAAJkAAAAmCAYAAADXwDkaAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA+lpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDE0IDc5LjE1Njc5NywgMjAxNC8wOC8yMC0wOTo1MzowMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJNaWNyb3NvZnTCriBXb3JkIDIwMTYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzM0NUVBQ0U2RUMzMTFFQUIzQjg4RDg3OEE1NEI2QzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzM0NUVBQ0Y2RUMzMTFFQUIzQjg4RDg3OEE1NEI2QzAiPiA8ZGM6Y3JlYXRvcj4gPHJkZjpTZXE+IDxyZGY6bGk+RGhhbmplZTwvcmRmOmxpPiA8L3JkZjpTZXE+IDwvZGM6Y3JlYXRvcj4gPGRjOnRpdGxlPiA8cmRmOkFsdD4gPHJkZjpsaSB4bWw6bGFuZz0ieC1kZWZhdWx0Ij4xODAxNzYzPC9yZGY6bGk+IDwvcmRmOkFsdD4gPC9kYzp0aXRsZT4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MzM0NUVBQ0M2RUMzMTFFQUIzQjg4RDg3OEE1NEI2QzAiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MzM0NUVBQ0Q2RUMzMTFFQUIzQjg4RDg3OEE1NEI2QzAiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7tDS20AAAS3ElEQVR42uxcCXhU5bn+t3POZJkkBBKSycxkQcF9YXPjuuJGFRSsgFJb0Xq9el163epWl7pWa6tQq7UqFG/Veotgr9arVlxRqTxK0UurkpCZCdlYE0gyZ875/77/mUkYkkwW7X2eW5if539y5sy/ft/7f9/7fecMgmTL3lqquGneRxU9XlGygypSSBkdpZSy8d0XipDcDP0oJaRYEfWOa9vz8LktK8ps6a+UCtNcK4R5O65Ho/pQi5lhXMZN6yvC+bfwWaTu91dHAqAvGKa5JCvKbOm3cMNYAID9uN/vuDkXAPoKl4WDDFNsmFYdEeLoXvcLiWFMzEp5by4ABazYKpLZHRJhWH8ShvHgYEPB8l0pLGvFrqHFaRj7I875tKyg92IjBgC9Qbg5e+BmxkSAZQcuDhl0PMt6C4D8OazfYsPyKWFaL2fFvHf7yYu0ldLkfRB3+h2ARQJoy4dgGY/RPI4b5iJuWE24c2hW0HtvKQJwPgMojhuk3Uhwrc/AzWYDZJ+CpJ07hLFNZpp3wJo9nRXz3kzFTPPHqL8ftJ1hPASwPJM0aeY5AObnuMofPB1i1eLvPllJ773lQIBg4xBAcGAKLDW7wGm9Civ1o4Hdq7kE4PxZVsx7d0R5IsBTDzA8lQ6gfqzdi6j39Op7Au5tw1VlhiDhCK5TGcl8W7bs5SWgORMs01+FMG/A55xeYDrF0IlYcLf0lAT6vKRJfaaUBwKJN4Wwrkl9PABc7vzebWhW9ntKKRxByHYXF3FURpIZ+279qtR9qXNYlImrCFV5jkseJK79X549Ms2PXaWekInE4/h0mDDpLZSyWUopRIxqse6bGrOnKEVKMcG+TsIGdzP/DdPNwe2go+QJJJH4KAuyPS07wfkZlPEbKaUVAEYrobQJ0MrTX6U1k9C4je9biFQrKKdXAX3/S5VqRvsjHds+xgMk56czKg4gVLZ7/RXNZ2njSG8c2gGU5TJKywHYowCljY4t72CCTmOcTnXi8RNT4M6WPaoYxpFwh39E3cqEuB53xmjL0qvWwOp8gMhxhnaZwks9WOu1uxzmbAebpvk7nYzFWLPS7ufC7a7l3Lgwq5A926qdCeW3gk/NzNBghpczI8RK3fEPY/gx3DB+qYEJgN7SH1fjydTHF2SAR1fZ8k9v0cgkcKy1uApnaEF1agIBwE3DBrBh/Qp9Y5mjzZ6A4HVm9v8QPlv2hIQF3CEzjMsHQeKkVOqhfJgIngiQ/S3ligcbvz6b2tgjXaV+7mj+GZfmEKzSL1EXDhvFpvkA6rIhjP8LuNbHslrZs0qeMH0fksFftWEIDK7TOS0jyZ0OHMYcOiMxwusnxGmDtB0NMG4iFcXFwZqamsIUCdTVV4QyatQof6/wl0yYMMEI+P2jutv1zptkyzcqvnA4PCJNtvxrRJeTU1ZsEAtjzBeGuUW/Hatfz9FR4hBnGI96VMpizk+9l2YOzM3M92lVKDSHUnYOo3RfJRVRlEiqSK0ipIJSwpUiqxzHfjra2PixBqNKJK6lhE3X30kln6uLRu/K4uObl5KSkjK/L/duQukkohSVRN6yIRpdPsxhKsGXXnHs+Bm4rsvQpgxW6EMl3Usdx/mSG+bNlNJ5ynVmua77hwG5nmG96kjnEeK6L5Hku2krsM7nZCLxaGbXaq1l2MhzSsn3BeeHcMH1S2qHSuk8wKi6HEDLMw1xmWlab1YGg6fX1tZul677ImP0EITJB1LGqrPw+MeU1tbWJijsDc7owULwg6hSJV9jmHqi5GtG7+ePu1kx816YkjUA2Kv4uN5N2PMd6U5TjFV5cWlGI2nMp4yehEPQmbrlOgn3JkbZVbguzdBtMmqQpT5slVLiACntcHc61N68PhJZ7Ur3Hhf3GWN+zsSN2pdLzm2pVJduS5K/bMmWf1RRaivkDYeiPQp1vs4QTiJxN2jTZCHECX1NEe5ReqJj29/fvZPzBqzRAlwlMgxbLim7HuvSzzY70jq+h6XqVMW1/fQZC7A/J6V7v0juTe3m/7krRIoeNgF8EiBj2LZGKw4YHGqGh1GlpaWjc03fbMZImXLJurqGyG814tN5ByziNLjbQ9DGUpJ8Xjw68vzq1bs2V1VWVkUNax4h0kek/JQoZtdtjOpT1wPo6oqKc0BcD1dSbnY7O5+t37SpMdPBDQaDU3gqKYiFNMRisb9Uh8PnYtP7dDnOfzY2Nuowm1RUVBxmMnGm5kRKua9viMXe7jVWbnWwci5lagzO3TY3oV6JNkc/Ky8vrzQ5H09d2gFyAdlQxQzjQ1gKhntHUyYNKHV9rLlZ562I5rvFfv95aBfEGlp3xOMvtbS0rO9PD+klFAqNMSjVLxD6AcT36mOxVzI03eQq+QBUdi+uj0mTv4A+fwbVdWJ950C5qUSsTEhJW3Q7eCfP6Lgy0Q7gvYvLnako8VaiyJtYockZu4xwU+fI9CMjV1G1hVN2KzHNLhCt7V5kQOU+6HUOzNZO6cAr9o0dKPopzyTiy/EaYFT/0k6R91IL7hdiUPyh/py8dxgl8yQhzZTThVCmfkkuJ6XEsTXhqrc55RfDFbfgqM40DLFkS0v4hZLUS3Gh0tAYBteM6c4GKWkgjF+HcR7tDjA0J6wJVb5IuXhcuqQRXPI8kZv/drisLFN0JH2MlXLGlxvCeEVQfh/W9ASun/eZvrt9wrzAIzKh0GUWNz7QfAWbz2NcrKgOhq/oHiQQCISw9hUQzQ/xsR3u7H7Tx98NB8InC9cVEPxNwhKvGsL8I1A2F7TC7ohEHM7UGdjvL6hp+jxzUF6+/8jCwncVZRcTSRIgNQ/5fTnvVFZUHDUg0QoGZ5qMf4A+43HGOwQXL1eFw/dlag+r9ISnP8O4JI3sfw+qOxB6jDDCZkO3M3XFgf825/QiVLSVF8HdXgJ5Pa5VmnKUR0DjJ7uJ+M2uJG8kjQ+Zmqqngr9XwA4t0g/KcQAnQf+nAy9hGJFRrqu0K3VZPyZbKGEdUx2qvEZQdr8GGHz2W7Zsv92bUluyPoHq6DzKjSWA49iEo67dEIk8jFO5DMqcMSYc/o5uYjF+I/jdZCy4sDYafRSbvVO7BZyeGVZZ0PsJFTfp+TDp1Ziypbas9Nd10ciJcOBRADQnZdZvAjc4CxzyqbpY/ULpyDvBI/flpnl38kz03U17JKJPfJcnG0pOhFBEwkkssZ1EvSudlZWByvE4iQspUVvqovWXY+0/0BQJ/OPBUGmpl3DMFeKnANZkrOuB2kjkXvDStVhHkRD0giisEKzW1R59SFlr1M5NAKOkpA7WdkE0Gv2zjsxzDPNXjPGDsP47a2OR2xzX3QyXEoAMMv6wAxFnDZT+JPQyoq2rYz7WeBcc6mrB+A3VodCxGbq5jpTXgS/pvYzyIlXKbiBS3eEk4qegHof6L7oCPMe5dvz0npqIw5qrT7ujW2Gw+7Heh7VMiGs/49r2+ZrHoV6UVi/E/bmoczDmVFjGt6Dbl9F+OcmgGMEpmYZTe5B05X12wp5VV19/akPDlljmkMZ3PAB2MKKTLi5IRVVFxZEaTNgk9kW852dwt58lXLnde0NAh71Meb+EwSlwAWQraUS1NwasKDutpnXz6qpgcGJCuRc0NDTsTKZU6PmaO2prq+eggh6Q5JF0ellZ2ch+oxu/Xytdpg5QS2008q91kcgF2+t3HBxpaPgTiMD3oGRtqhtrAoEpUOpUkCIcfMPklnVKoLg4JBU9G0BStqM2eBpU8nbHTizHyX5Wf45s3Pg+FL9c7xJ7OKsyEDg8lVA6mpjitx6xb2ycDJcwBTKSTkJt9fau5PUJjJNIqIyvRcMDz8T6irCB1jwrb2KoPHQs9utDoKbVNyMzOXPehWxWCdO8Xv9YF4eozXHsBzIZv1RVKV6m+WAHhHAhCJIByzichGoFrNj3XVve3KODfhrF7a6O22KtrV8NnbDKSg+vsIIwxWcSTrU73Gg79pNwDfpBLKmLRn8aKA78zpfLjq2prFwGAYzUAFFJcHkg6HLs3+RQ87sQ6hgdZUHEbxpSXY2vFuTk5OwDpZXqHvh7BGWC4zLHcdwngeU4lDd4XonStd3cbhPZlHyNhZL99ItRktAAfMocAxNIqpa6jsPBDdZb+fn7YX1CW3TO5QgvhIvFluLP0l4ZyoXgStPBLizF+Xy4wKW41wTXGUlaUUTuHu1QxGDJQ1Ufjeo3VZ/qX+1UpcbdXwsJxw/BF/02xnexxPdhiT/EzU8H2i4szA8BstfgXs8EoB8hyXfKBk2jJfmZNQ7LvQJe7MoU6Ib2xAHRKza5DFhdMxDI9I8JhpVkxWJU6oLhwD8d2Rh5vXebgoKCYivfQGhNZzlKXsqUgqGjk+kuN0M0CQ+WBE8zc8hj4DkneQEHJY/UBGo+caizUXWbXkk+qY3VXzPs4I3Qbk6pem4l72klOrBy13a71jTCPcOk3kHA3OwI3Hq+v7EnRCIrVocrNa87Gq7pPHDoA1zXuWsXC0lyWb0nh6nDcPna0JetFw0hG/y+uhRoh1hiMPxLYKjvQdC6bhiCigNq34VwGmAR3xv68yZxEqz1xIQd3+1X5Szlptx04s9SliUDolTva8npl9oqaQHCXV7cI3hQOJzob+m/I4uKHjaEmAf/+EkkEvkNTqrVY9kJ3ZkMHsLnckP6ayP1Ux1X3gLX2MG0apgDHUa0cJu9CTk7OxDwnjwkg45QaLoGcf/LpaqPCNPtBVF/TTZkQRDs89PI/n5w10ckEok12FunZ3Upma2DgJ55A4Fx3Qf1BR2UaWuB0QVjxVh20eSGhnd2Tequ6eZtkO9FByez+91zjeutB8qTLh4Gba2HUM7yofD53d+DPpTDtZ88mN6lYy9E//WYcziPjkzY8/+BbKqG8cjJwL7vgQx+guttfUCGzefrk6orrnNdpfIGeHClJWV5EadMPlKA/rX/X8m0S2H8XESAT0Jh520NhRbBIpWuTlqMKZ6QGT28OhReBL99uWcdKOMWU3M0wcUCChBxPQUBBkBwNZn/SJtJSeQaD4tSPem5LcbCPjFieVUgNAcBiv45/fS2traO/ta7gzHZs95d70/t4gbSXYz92rA80CN/qCYU+o/qYOXFiDwfgY/obGpq2gChLNZ7Aw8K+ISxtCoYvhJR6uPwDbvlmzZEo8ukcj/31izdx15IS9+At30ErveiJyPBx+4gZDkixKsgi8U+IWamToQvGcyjv1IF+pbt7FgKN9yi++HfzTXB8G2IfOf5c3IXkaG9edoODvlzTumlQ3wM6GIi4SYSb0NwS4VpPTgUhDFhXYH1x9FvcR8XqgWGjc3FdT4sRxdUEYc9ChUWFPBtbW3r0jeCEzcKfOkmbLZGJ2QB0Ty0q0O7v+Xm57/HvF8P03KMNxFtToCZWAoupp/yyyJ/oZb9BP36L9qsx7ALIfRDcVPToG1ddvz3ULMPup5lCuOU4sKiKRD2JNDkBRtisUVexrht+6pCf0ER2o/DGvfFWNOx3ta461zd3t7e578w0haUlIz+AazhBKw3jvHMAn9h5/a27X/p3hf6NRUW+L/E5SFYd4Aydiq+GoMTeXskFlup2/iLClciwirDIdkXbaow58novC6+zflRu92+I11BBQVFGs2TOrduuXKHbacDX+b65RuM+GowTjUAPQam8XjA6SNE23chcKnAvm/Fd/q/b+pCZF+Sl+P7vKGxdZ0/P/8TWFodKJUxzk/ABIcq6S4AN1w2JO8n5WfQ24WU8ynKdVem8l80QzUwx2y0exd1OefiZp2SwkH7fIApxnIhHgN/uwSnK9rHMGlTzW27fbttd6WZ4vyOjg6GU1zf67RY5eXlZTt37mz3PliWCaHL5ubmlm7QhsvK9sMi/W48Holu2rQxfTIvEVlcrPTjqe4EZ7CgwBdra9uSmtcPt6eta6FynHEJKYGv2Jd90s86AQpAwNJsRuT5xUAHrKK4IkCd9g6NQAQPIi8vz4f5o72tANZVgO/GMpe59RvrtQvt7JMQLS0dAyI9sst1m7uTuL28gqwJBqfh8pTaWOTqTIvSblYxVtTe2RnbvHlzg/fsEofcLK4oasda9edCs9An49viDe3tm3sS2YHA/gAL39Le/tU2lGFS0mphWYsBlhI432690j5UQnnB0DjXjuv/Pkr/knwu5fQOx46PR+RzPKz5FG+vOtVFmJn08mQq/ix17K4bM722kS3f8O0J0IOnwddK6jo7zqrx5f7EdckzAOrK/5erFeIorlh4YH/pthHXfac7449A8DVAaRXYTgUQ4wdj/xgw8ytFk7xSqrdd135+AIqVLd+k6ICjZETxZhgY8HLnv3VGvTZa/+9kz/qlzuHctP4A89UE73L1sCJO8nXeWcqW3QOHeLyryF/Q4L3BoEhzW+fOO0A12vewbTZxj6/yWeCqz4J31WY1ny3/F6UYkeY68LIzhtsxa8myZailU1K6HlxN/x9kjcPp+HcBBgAS2JZd+kqHSQAAAABJRU5ErkJggg==</xsl:text>
1116
1023
  </xsl:variable>
1117
1024
 
1118
- <xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
1119
-
1120
- <title-annex lang="en">Annex </title-annex>
1121
- <title-annex lang="fr">Annexe </title-annex>
1122
-
1123
- <title-annex lang="zh">Annex </title-annex>
1124
-
1125
-
1025
+ <xsl:variable name="titles_">
1126
1026
 
1127
1027
  <title-edition lang="en">
1128
1028
 
1129
- <xsl:text>Edition </xsl:text>
1130
-
1131
-
1029
+ <xsl:text>Edition </xsl:text>
1030
+
1132
1031
  </title-edition>
1133
1032
 
1134
1033
  <title-edition lang="fr">
1135
-
1136
- <xsl:text>Édition </xsl:text>
1137
-
1034
+ <xsl:text>Édition </xsl:text>
1138
1035
  </title-edition>
1139
1036
 
1140
-
1037
+ <!-- These titles of Table of contents renders different than determined in localized-strings -->
1141
1038
  <title-toc lang="en">
1142
1039
 
1143
1040
 
1144
1041
 
1145
1042
  </title-toc>
1146
1043
  <title-toc lang="fr">
1044
+ <xsl:text>Sommaire</xsl:text>
1045
+ </title-toc>
1046
+ <title-toc lang="zh">
1147
1047
 
1148
-
1149
- </title-toc>
1150
-
1151
- <title-toc lang="zh">Contents</title-toc>
1152
-
1153
-
1154
-
1155
- <title-page lang="en">Page</title-page>
1156
- <title-page lang="fr">Page</title-page>
1157
-
1158
- <title-key lang="en">Key</title-key>
1159
- <title-key lang="fr">Légende</title-key>
1160
-
1161
- <title-where lang="en">where</title-where>
1162
- <title-where lang="fr">où</title-where>
1048
+ <xsl:text>Contents</xsl:text>
1049
+
1050
+ </title-toc>
1163
1051
 
1164
1052
  <title-descriptors lang="en">Descriptors</title-descriptors>
1165
1053
 
@@ -1175,32 +1063,9 @@
1175
1063
  </title-part>
1176
1064
  <title-part lang="zh">第 # 部分:</title-part>
1177
1065
 
1178
- <title-subpart lang="en">
1179
-
1180
- </title-subpart>
1181
- <title-subpart lang="fr">
1182
-
1183
- </title-subpart>
1184
-
1185
- <title-modified lang="en">modified</title-modified>
1186
- <title-modified lang="fr">modifiée</title-modified>
1187
-
1188
- <title-modified lang="zh">modified</title-modified>
1189
-
1190
-
1191
-
1192
- <title-source lang="en">
1193
-
1194
- <xsl:text>SOURCE</xsl:text>
1195
-
1196
-
1197
- </title-source>
1198
-
1199
- <title-keywords lang="en">Keywords</title-keywords>
1066
+ <title-subpart lang="en">Sub-part #</title-subpart>
1067
+ <title-subpart lang="fr">Partie de sub #</title-subpart>
1200
1068
 
1201
- <title-deprecated lang="en">DEPRECATED</title-deprecated>
1202
- <title-deprecated lang="fr">DEPRECATED</title-deprecated>
1203
-
1204
1069
  <title-list-tables lang="en">List of Tables</title-list-tables>
1205
1070
 
1206
1071
  <title-list-figures lang="en">List of Figures</title-list-figures>
@@ -1209,41 +1074,12 @@
1209
1074
 
1210
1075
  <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
1211
1076
 
1212
- <title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
1213
-
1214
- <title-abstract lang="en">Abstract</title-abstract>
1215
-
1216
1077
  <title-summary lang="en">Summary</title-summary>
1217
1078
 
1218
- <title-in lang="en">in </title-in>
1219
-
1220
- <title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
1221
- <title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
1222
-
1223
- <title-completion-date lang="en">Completion date for this manuscript</title-completion-date>
1224
- <title-completion-date lang="zh">本稿完成日期</title-completion-date>
1225
-
1226
- <title-issuance-date lang="en">Issuance Date: #</title-issuance-date>
1227
- <title-issuance-date lang="zh"># 发布</title-issuance-date>
1228
-
1229
- <title-implementation-date lang="en">Implementation Date: #</title-implementation-date>
1230
- <title-implementation-date lang="zh"># 实施</title-implementation-date>
1231
-
1232
- <title-obligation-normative lang="en">normative</title-obligation-normative>
1233
- <title-obligation-normative lang="zh">规范性附录</title-obligation-normative>
1234
-
1235
- <title-caution lang="en">CAUTION</title-caution>
1236
- <title-caution lang="zh">注意</title-caution>
1237
-
1238
- <title-warning lang="en">WARNING</title-warning>
1239
- <title-warning lang="zh">警告</title-warning>
1240
-
1241
- <title-amendment lang="en">AMENDMENT</title-amendment>
1242
-
1243
1079
  <title-continued lang="en">(continued)</title-continued>
1244
1080
  <title-continued lang="fr">(continué)</title-continued>
1245
1081
 
1246
- </xsl:variable><xsl:variable name="bibdata">
1082
+ </xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="bibdata">
1247
1083
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
1248
1084
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
1249
1085
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
@@ -1272,12 +1108,32 @@
1272
1108
  </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="'&#8232;'"/><xsl:attribute-set name="root-style">
1273
1109
 
1274
1110
 
1111
+
1112
+
1113
+
1114
+
1115
+
1116
+
1117
+
1118
+
1119
+
1120
+
1121
+
1122
+
1123
+
1124
+
1125
+ <xsl:attribute name="font-family">Times New Roman, STIX Two Math, Source Han Sans</xsl:attribute>
1126
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1127
+
1275
1128
  </xsl:attribute-set><xsl:attribute-set name="link-style">
1276
1129
 
1277
1130
 
1278
1131
 
1279
1132
 
1280
1133
 
1134
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-container-style">
1135
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1136
+
1281
1137
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1282
1138
  <xsl:attribute name="white-space">pre</xsl:attribute>
1283
1139
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -1287,14 +1143,21 @@
1287
1143
 
1288
1144
 
1289
1145
 
1290
- <xsl:attribute name="font-family">Courier New</xsl:attribute>
1291
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
1292
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1146
+
1147
+
1148
+
1149
+
1293
1150
 
1294
1151
 
1295
1152
 
1296
1153
 
1297
1154
 
1155
+
1156
+
1157
+ <xsl:attribute name="font-family">Courier New</xsl:attribute>
1158
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1159
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1160
+
1298
1161
  </xsl:attribute-set><xsl:attribute-set name="permission-style">
1299
1162
 
1300
1163
  </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
@@ -1343,11 +1206,14 @@
1343
1206
 
1344
1207
 
1345
1208
 
1209
+
1346
1210
  </xsl:attribute-set><xsl:attribute-set name="example-body-style">
1347
1211
 
1348
1212
 
1349
1213
 
1214
+
1350
1215
  </xsl:attribute-set><xsl:attribute-set name="example-name-style">
1216
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1351
1217
 
1352
1218
 
1353
1219
 
@@ -1364,7 +1230,6 @@
1364
1230
  <xsl:attribute name="font-size">10pt</xsl:attribute>
1365
1231
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1366
1232
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1367
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1368
1233
 
1369
1234
 
1370
1235
 
@@ -1382,6 +1247,7 @@
1382
1247
 
1383
1248
 
1384
1249
 
1250
+
1385
1251
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1386
1252
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
1387
1253
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
@@ -1398,60 +1264,50 @@
1398
1264
 
1399
1265
  </xsl:attribute-set><xsl:variable name="table-border_">
1400
1266
 
1401
- </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-name-style">
1402
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1403
-
1404
-
1405
-
1267
+ </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-container-style">
1268
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1269
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1406
1270
 
1407
1271
 
1408
-
1409
1272
 
1410
1273
 
1411
1274
 
1412
1275
 
1413
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1414
- <xsl:attribute name="font-weight">normal</xsl:attribute>
1415
- <xsl:attribute name="font-style">italic</xsl:attribute>
1416
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1417
- <xsl:attribute name="text-align">left</xsl:attribute>
1418
- <xsl:attribute name="text-indent">0mm</xsl:attribute>
1419
-
1420
1276
 
1421
1277
 
1422
1278
 
1423
1279
 
1424
- </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
1425
1280
 
1426
- </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1427
1281
 
1428
1282
 
1429
1283
 
1430
- </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
1431
1284
 
1432
1285
 
1433
1286
 
1434
- </xsl:attribute-set><xsl:attribute-set name="xref-style">
1435
1287
 
1436
1288
 
1289
+ <xsl:attribute name="margin-bottom">18pt</xsl:attribute>
1290
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
1291
+
1437
1292
 
1438
1293
 
1294
+ </xsl:attribute-set><xsl:attribute-set name="table-style">
1295
+ <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
1296
+ <xsl:attribute name="table-layout">fixed</xsl:attribute>
1297
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1298
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1439
1299
 
1440
- </xsl:attribute-set><xsl:attribute-set name="eref-style">
1441
1300
 
1442
1301
 
1443
1302
 
1444
1303
 
1445
1304
 
1446
- <xsl:attribute name="color">blue</xsl:attribute>
1447
1305
 
1448
1306
 
1449
- </xsl:attribute-set><xsl:attribute-set name="note-style">
1450
1307
 
1451
1308
 
1452
1309
 
1453
1310
 
1454
-
1455
1311
 
1456
1312
 
1457
1313
 
@@ -1459,67 +1315,88 @@
1459
1315
 
1460
1316
 
1461
1317
 
1462
-
1463
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1318
+ <xsl:attribute name="border-top">0.5pt solid black</xsl:attribute>
1464
1319
 
1465
1320
 
1321
+ </xsl:attribute-set><xsl:attribute-set name="table-name-style">
1322
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1323
+
1466
1324
 
1467
1325
 
1468
- </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">
1469
1326
 
1470
1327
 
1328
+
1471
1329
 
1472
1330
 
1473
1331
 
1474
1332
 
1333
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1334
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1335
+ <xsl:attribute name="font-style">italic</xsl:attribute>
1336
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1337
+ <xsl:attribute name="text-align">left</xsl:attribute>
1338
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
1339
+
1475
1340
 
1476
1341
 
1477
1342
 
1478
1343
 
1344
+ </xsl:attribute-set><xsl:attribute-set name="table-row-style">
1345
+ <xsl:attribute name="min-height">4mm</xsl:attribute>
1479
1346
 
1480
1347
 
1481
- <xsl:attribute name="padding-right">4mm</xsl:attribute>
1482
1348
 
1483
1349
 
1484
- </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
1350
+ </xsl:attribute-set><xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
1351
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1485
1352
 
1486
1353
 
1487
1354
 
1488
1355
 
1489
- </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1490
1356
 
1491
1357
 
1492
1358
 
1493
1359
 
1494
1360
 
1361
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
1495
1362
 
1496
1363
 
1497
1364
 
1365
+ </xsl:attribute-set><xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
1366
+
1367
+ </xsl:attribute-set><xsl:attribute-set name="table-header-cell-style">
1368
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1369
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1370
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
1371
+ <xsl:attribute name="display-align">center</xsl:attribute>
1498
1372
 
1499
1373
 
1500
1374
 
1501
-
1502
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1503
- <xsl:attribute name="text-indent">0</xsl:attribute>
1504
1375
 
1505
1376
 
1506
- </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1507
1377
 
1508
1378
 
1509
1379
 
1510
1380
 
1511
-
1512
- <xsl:attribute name="margin-top">4pt</xsl:attribute>
1513
1381
 
1514
1382
 
1515
1383
 
1516
- </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1384
+ <xsl:attribute name="display-align">center</xsl:attribute>
1385
+ <xsl:attribute name="font-style">italic</xsl:attribute>
1386
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1387
+ <xsl:attribute name="padding-top">2mm</xsl:attribute>
1388
+ <xsl:attribute name="padding-left">2mm</xsl:attribute>
1389
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
1390
+ <xsl:attribute name="border-top">solid black 0.2pt</xsl:attribute>
1391
+ <xsl:attribute name="border-bottom">solid black 1.5pt</xsl:attribute>
1392
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
1517
1393
 
1518
-
1519
1394
 
1395
+ </xsl:attribute-set><xsl:attribute-set name="table-cell-style">
1396
+ <xsl:attribute name="display-align">center</xsl:attribute>
1397
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1398
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
1520
1399
 
1521
- </xsl:attribute-set><xsl:attribute-set name="quote-style">
1522
- <xsl:attribute name="role">BlockQuote</xsl:attribute>
1523
1400
 
1524
1401
 
1525
1402
 
@@ -1527,30 +1404,38 @@
1527
1404
 
1528
1405
 
1529
1406
 
1530
- </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
1531
1407
 
1532
-
1533
-
1534
- </xsl:attribute-set><xsl:attribute-set name="termsource-style">
1535
1408
 
1536
1409
 
1537
1410
 
1411
+ <xsl:attribute name="display-align">before</xsl:attribute>
1412
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
1413
+ <xsl:attribute name="padding-top">2mm</xsl:attribute>
1414
+ <xsl:attribute name="padding-bottom">1mm</xsl:attribute>
1415
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
1416
+ <xsl:attribute name="border-bottom">solid black 1.5pt</xsl:attribute>
1417
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
1538
1418
 
1539
1419
 
1420
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
1421
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1422
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
1423
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
1424
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
1540
1425
 
1541
1426
 
1542
- </xsl:attribute-set><xsl:attribute-set name="origin-style">
1543
1427
 
1544
1428
 
1545
1429
 
1546
1430
 
1547
- </xsl:attribute-set><xsl:attribute-set name="term-style">
1548
1431
 
1549
- </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1432
+
1550
1433
 
1551
1434
 
1552
-
1553
1435
 
1436
+ </xsl:attribute-set><xsl:attribute-set name="table-note-style">
1437
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1438
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1554
1439
 
1555
1440
 
1556
1441
 
@@ -1559,116 +1444,576 @@
1559
1444
 
1560
1445
 
1561
1446
 
1447
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-style">
1448
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1562
1449
 
1563
1450
 
1564
1451
 
1565
-
1566
1452
 
1567
- <xsl:attribute name="text-align">center</xsl:attribute>
1568
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1569
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1570
1453
 
1571
1454
 
1455
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-number-style">
1456
+ <xsl:attribute name="font-size">80%</xsl:attribute>
1457
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1572
1458
 
1573
-
1574
- </xsl:attribute-set><xsl:attribute-set name="formula-style">
1575
1459
 
1576
- </xsl:attribute-set><xsl:attribute-set name="image-style">
1577
- <xsl:attribute name="text-align">center</xsl:attribute>
1578
1460
 
1579
1461
 
1580
1462
 
1581
1463
 
1582
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1583
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1584
- <xsl:attribute name="border">2pt solid black</xsl:attribute>
1585
1464
 
1586
1465
 
1587
1466
 
1588
- </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
1589
1467
 
1590
- </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
1591
1468
 
1592
1469
 
1470
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1593
1471
 
1594
- <xsl:attribute name="width">100%</xsl:attribute>
1595
- <xsl:attribute name="content-height">100%</xsl:attribute>
1596
- <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
1597
- <xsl:attribute name="scaling">uniform</xsl:attribute>
1472
+ </xsl:attribute-set><xsl:attribute-set name="fn-container-body-style">
1473
+ <xsl:attribute name="text-indent">0</xsl:attribute>
1474
+ <xsl:attribute name="start-indent">0</xsl:attribute>
1598
1475
 
1599
1476
 
1600
-
1601
-
1602
- </xsl:attribute-set><xsl:attribute-set name="tt-style">
1477
+ <xsl:attribute name="margin-left">-8mm</xsl:attribute>
1603
1478
 
1479
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-body-style">
1604
1480
 
1481
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-number-style">
1482
+ <xsl:attribute name="font-size">80%</xsl:attribute>
1483
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1484
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1605
1485
 
1606
- </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
1607
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1608
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1609
- <xsl:attribute name="text-align">center</xsl:attribute>
1486
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-body-style">
1487
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1610
1488
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1611
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1612
1489
 
1613
- </xsl:attribute-set><xsl:attribute-set name="domain-style">
1614
-
1615
- </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1490
+ </xsl:attribute-set><xsl:attribute-set name="dt-row-style">
1616
1491
 
1617
1492
 
1493
+ </xsl:attribute-set><xsl:attribute-set name="dt-style">
1494
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1618
1495
 
1619
- </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1620
1496
 
1621
1497
 
1622
- </xsl:attribute-set><xsl:attribute-set name="definition-style">
1623
1498
 
1624
1499
 
1625
1500
 
1626
- </xsl:attribute-set><xsl:variable name="color-added-text">
1627
- <xsl:text>rgb(0, 255, 0)</xsl:text>
1628
- </xsl:variable><xsl:attribute-set name="add-style">
1629
- <xsl:attribute name="color">red</xsl:attribute>
1630
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1631
- <!-- <xsl:attribute name="color">black</xsl:attribute>
1632
- <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
1633
- <xsl:attribute name="padding-top">1mm</xsl:attribute>
1634
- <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
1635
- </xsl:attribute-set><xsl:variable name="color-deleted-text">
1636
- <xsl:text>red</xsl:text>
1637
- </xsl:variable><xsl:attribute-set name="del-style">
1638
- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
1639
- <xsl:attribute name="text-decoration">line-through</xsl:attribute>
1640
- </xsl:attribute-set><xsl:attribute-set name="mathml-style">
1641
- <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
1642
1501
 
1643
1502
 
1644
- </xsl:attribute-set><xsl:attribute-set name="list-style">
1645
1503
 
1646
- </xsl:attribute-set><xsl:attribute-set name="toc-style">
1647
- <xsl:attribute name="line-height">135%</xsl:attribute>
1648
- </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
1649
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1650
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
1651
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
1652
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
1653
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
1654
- </xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
1655
- <xsl:for-each select="/*/*[local-name()='preface']/*">
1656
- <xsl:sort select="@displayorder" data-type="number"/>
1657
- <xsl:apply-templates select="." mode="contents"/>
1658
- </xsl:for-each>
1659
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
1660
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
1661
-
1662
- <!-- Normative references -->
1663
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]" mode="contents"/>
1664
- <!-- Terms and definitions -->
1665
- <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"/>
1666
- <!-- Another main sections -->
1667
- <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"/>
1668
- <xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
1669
- <!-- Bibliography -->
1670
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
1671
1504
 
1505
+ </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1506
+
1507
+
1508
+
1509
+ </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
1510
+
1511
+
1512
+
1513
+ </xsl:attribute-set><xsl:attribute-set name="xref-style">
1514
+
1515
+
1516
+
1517
+
1518
+
1519
+ </xsl:attribute-set><xsl:attribute-set name="eref-style">
1520
+
1521
+
1522
+
1523
+
1524
+
1525
+ <xsl:attribute name="color">blue</xsl:attribute>
1526
+
1527
+
1528
+ </xsl:attribute-set><xsl:attribute-set name="note-style">
1529
+
1530
+
1531
+
1532
+
1533
+
1534
+
1535
+
1536
+
1537
+
1538
+
1539
+
1540
+
1541
+
1542
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1543
+
1544
+
1545
+
1546
+
1547
+ </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">
1548
+
1549
+
1550
+
1551
+
1552
+
1553
+
1554
+
1555
+
1556
+
1557
+
1558
+
1559
+
1560
+ <xsl:attribute name="padding-right">4mm</xsl:attribute>
1561
+
1562
+
1563
+ </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
1564
+ <xsl:attribute name="padding-right">2mm</xsl:attribute>
1565
+
1566
+
1567
+
1568
+
1569
+ </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1570
+
1571
+
1572
+
1573
+
1574
+
1575
+
1576
+
1577
+
1578
+
1579
+
1580
+
1581
+
1582
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1583
+ <xsl:attribute name="text-indent">0</xsl:attribute>
1584
+
1585
+
1586
+ </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1587
+
1588
+
1589
+
1590
+
1591
+
1592
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
1593
+
1594
+
1595
+
1596
+ </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1597
+
1598
+
1599
+
1600
+
1601
+ </xsl:attribute-set><xsl:attribute-set name="quote-style">
1602
+ <xsl:attribute name="role">BlockQuote</xsl:attribute>
1603
+
1604
+
1605
+
1606
+
1607
+
1608
+
1609
+
1610
+ </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
1611
+
1612
+
1613
+
1614
+ </xsl:attribute-set><xsl:attribute-set name="termsource-style">
1615
+
1616
+
1617
+
1618
+
1619
+
1620
+
1621
+
1622
+ </xsl:attribute-set><xsl:attribute-set name="termsource-text-style">
1623
+
1624
+
1625
+ </xsl:attribute-set><xsl:attribute-set name="origin-style">
1626
+
1627
+
1628
+
1629
+
1630
+ </xsl:attribute-set><xsl:attribute-set name="term-style">
1631
+
1632
+ </xsl:attribute-set><xsl:attribute-set name="figure-style">
1633
+
1634
+ </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1635
+
1636
+
1637
+
1638
+
1639
+
1640
+
1641
+
1642
+
1643
+
1644
+
1645
+
1646
+
1647
+
1648
+
1649
+
1650
+
1651
+
1652
+ <xsl:attribute name="text-align">center</xsl:attribute>
1653
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1654
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1655
+
1656
+
1657
+
1658
+
1659
+ </xsl:attribute-set><xsl:attribute-set name="formula-style">
1660
+
1661
+ </xsl:attribute-set><xsl:attribute-set name="image-style">
1662
+ <xsl:attribute name="text-align">center</xsl:attribute>
1663
+
1664
+
1665
+
1666
+
1667
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1668
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1669
+ <xsl:attribute name="border">2pt solid black</xsl:attribute>
1670
+
1671
+
1672
+
1673
+ </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
1674
+
1675
+ </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
1676
+
1677
+
1678
+
1679
+ <xsl:attribute name="width">100%</xsl:attribute>
1680
+ <xsl:attribute name="content-height">100%</xsl:attribute>
1681
+ <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
1682
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
1683
+
1684
+
1685
+
1686
+
1687
+ </xsl:attribute-set><xsl:attribute-set name="tt-style">
1688
+
1689
+
1690
+
1691
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
1692
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1693
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1694
+ <xsl:attribute name="text-align">center</xsl:attribute>
1695
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1696
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1697
+
1698
+ </xsl:attribute-set><xsl:attribute-set name="domain-style">
1699
+
1700
+ </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1701
+
1702
+
1703
+
1704
+ </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1705
+
1706
+
1707
+ </xsl:attribute-set><xsl:attribute-set name="definition-style">
1708
+
1709
+
1710
+
1711
+ </xsl:attribute-set><xsl:variable name="color-added-text">
1712
+ <xsl:text>rgb(0, 255, 0)</xsl:text>
1713
+ </xsl:variable><xsl:attribute-set name="add-style">
1714
+ <xsl:attribute name="color">red</xsl:attribute>
1715
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1716
+ <!-- <xsl:attribute name="color">black</xsl:attribute>
1717
+ <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
1718
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
1719
+ <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
1720
+ </xsl:attribute-set><xsl:variable name="color-deleted-text">
1721
+ <xsl:text>red</xsl:text>
1722
+ </xsl:variable><xsl:attribute-set name="del-style">
1723
+ <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
1724
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
1725
+ </xsl:attribute-set><xsl:attribute-set name="mathml-style">
1726
+ <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
1727
+
1728
+
1729
+ </xsl:attribute-set><xsl:attribute-set name="list-style">
1730
+
1731
+ </xsl:attribute-set><xsl:attribute-set name="toc-style">
1732
+ <xsl:attribute name="line-height">135%</xsl:attribute>
1733
+ </xsl:attribute-set><xsl:attribute-set name="fn-reference-style">
1734
+ <xsl:attribute name="font-size">80%</xsl:attribute>
1735
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1736
+
1737
+
1738
+
1739
+
1740
+
1741
+
1742
+
1743
+
1744
+ </xsl:attribute-set><xsl:attribute-set name="fn-style">
1745
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1746
+ </xsl:attribute-set><xsl:attribute-set name="fn-num-style">
1747
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1748
+
1749
+
1750
+
1751
+
1752
+
1753
+
1754
+
1755
+
1756
+
1757
+
1758
+
1759
+
1760
+
1761
+
1762
+
1763
+ <xsl:attribute name="font-size">60%</xsl:attribute>
1764
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1765
+
1766
+
1767
+ </xsl:attribute-set><xsl:attribute-set name="fn-body-style">
1768
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1769
+ <xsl:attribute name="font-style">normal</xsl:attribute>
1770
+ <xsl:attribute name="text-indent">0</xsl:attribute>
1771
+ <xsl:attribute name="start-indent">0</xsl:attribute>
1772
+
1773
+
1774
+
1775
+
1776
+
1777
+
1778
+
1779
+
1780
+
1781
+
1782
+
1783
+
1784
+
1785
+
1786
+
1787
+
1788
+
1789
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
1790
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1791
+ <xsl:attribute name="line-height">125%</xsl:attribute>
1792
+ <xsl:attribute name="margin-left">8mm</xsl:attribute>
1793
+
1794
+
1795
+ </xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
1796
+ <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
1797
+
1798
+
1799
+
1800
+
1801
+
1802
+
1803
+
1804
+
1805
+
1806
+
1807
+
1808
+
1809
+
1810
+
1811
+
1812
+
1813
+ <xsl:attribute name="font-size">60%</xsl:attribute>
1814
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1815
+ <xsl:attribute name="padding-right">8mm</xsl:attribute>
1816
+
1817
+
1818
+ </xsl:attribute-set><xsl:attribute-set name="admonition-style">
1819
+
1820
+
1821
+
1822
+
1823
+
1824
+
1825
+
1826
+
1827
+
1828
+
1829
+
1830
+
1831
+
1832
+ <xsl:attribute name="border">0.25pt solid black</xsl:attribute>
1833
+ <xsl:attribute name="margin-left">-3mm</xsl:attribute>
1834
+ <xsl:attribute name="margin-right">-3mm</xsl:attribute>
1835
+ <xsl:attribute name="padding-top">4mm</xsl:attribute>
1836
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1837
+
1838
+
1839
+ </xsl:attribute-set><xsl:attribute-set name="admonition-container-style">
1840
+
1841
+
1842
+
1843
+
1844
+
1845
+
1846
+
1847
+
1848
+
1849
+ <xsl:attribute name="margin-left">2mm</xsl:attribute>
1850
+ <xsl:attribute name="margin-right">2mm</xsl:attribute>
1851
+
1852
+
1853
+ </xsl:attribute-set><xsl:attribute-set name="admonition-name-style">
1854
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1855
+
1856
+
1857
+
1858
+
1859
+
1860
+
1861
+
1862
+
1863
+
1864
+
1865
+
1866
+
1867
+ <xsl:attribute name="text-align">center</xsl:attribute>
1868
+ <xsl:attribute name="font-style">italic</xsl:attribute>
1869
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1870
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1871
+
1872
+
1873
+ </xsl:attribute-set><xsl:attribute-set name="admonition-p-style">
1874
+
1875
+
1876
+
1877
+
1878
+
1879
+
1880
+
1881
+
1882
+
1883
+
1884
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1885
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1886
+ <xsl:attribute name="line-height">122%</xsl:attribute>
1887
+
1888
+
1889
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-style">
1890
+
1891
+
1892
+
1893
+
1894
+
1895
+
1896
+
1897
+
1898
+
1899
+
1900
+
1901
+
1902
+
1903
+
1904
+
1905
+
1906
+
1907
+
1908
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1909
+ <xsl:attribute name="margin-left">14mm</xsl:attribute>
1910
+ <xsl:attribute name="text-indent">-14mm</xsl:attribute>
1911
+
1912
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-style">
1913
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
1914
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1915
+
1916
+
1917
+
1918
+
1919
+
1920
+
1921
+
1922
+
1923
+
1924
+
1925
+
1926
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-style">
1927
+
1928
+
1929
+
1930
+
1931
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-style">
1932
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
1933
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1934
+
1935
+
1936
+
1937
+
1938
+
1939
+
1940
+
1941
+
1942
+
1943
+
1944
+
1945
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-body-style">
1946
+
1947
+
1948
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-body-style">
1949
+
1950
+
1951
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-style">
1952
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1953
+ <xsl:attribute name="font-size">65%</xsl:attribute>
1954
+
1955
+
1956
+
1957
+
1958
+
1959
+
1960
+
1961
+
1962
+
1963
+
1964
+
1965
+
1966
+
1967
+
1968
+
1969
+
1970
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1971
+
1972
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-number-style">
1973
+ <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
1974
+
1975
+
1976
+
1977
+
1978
+
1979
+
1980
+
1981
+
1982
+
1983
+
1984
+
1985
+
1986
+
1987
+
1988
+
1989
+
1990
+ <xsl:attribute name="font-size">60%</xsl:attribute>
1991
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1992
+
1993
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-body-style">
1994
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1995
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1996
+ <xsl:attribute name="start-indent">0pt</xsl:attribute>
1997
+
1998
+
1999
+
2000
+
2001
+
2002
+
2003
+
2004
+
2005
+
2006
+
2007
+
2008
+ </xsl:attribute-set><xsl:attribute-set name="references-non-normative-style">
2009
+
2010
+
2011
+
2012
+ </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
2013
+ <xsl:for-each select="/*/*[local-name()='preface']/*">
2014
+ <xsl:sort select="@displayorder" data-type="number"/>
2015
+ <xsl:apply-templates select="." mode="contents"/>
2016
+ </xsl:for-each>
1672
2017
  </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
1673
2018
 
1674
2019
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
@@ -1685,29 +2030,11 @@
1685
2030
  <xsl:sort select="@displayorder" data-type="number"/>
1686
2031
  <xsl:apply-templates select="." mode="contents"/>
1687
2032
  </xsl:for-each>
1688
- </xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
1689
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
1690
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
1691
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
1692
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
1693
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
1694
2033
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
1695
2034
  <xsl:for-each select="/*/*[local-name()='preface']/*">
1696
2035
  <xsl:sort select="@displayorder" data-type="number"/>
1697
2036
  <xsl:apply-templates select="."/>
1698
2037
  </xsl:for-each>
1699
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault">
1700
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
1701
-
1702
- <!-- Normative references -->
1703
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
1704
- <!-- Terms and definitions -->
1705
- <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']]"/>
1706
- <!-- Another main sections -->
1707
- <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'])]"/>
1708
- <xsl:apply-templates select="/*/*[local-name()='annex']"/>
1709
- <!-- Bibliography -->
1710
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
1711
2038
  </xsl:template><xsl:template name="processMainSectionsDefault">
1712
2039
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
1713
2040
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -1744,43 +2071,19 @@
1744
2071
  <xsl:call-template name="getSimpleTable"/>
1745
2072
  </xsl:variable>
1746
2073
 
1747
- <!-- <xsl:if test="$namespace = 'bipm'">
1748
- <fo:block>&#xA0;</fo:block>
1749
- </xsl:if> -->
1750
-
1751
2074
 
1752
2075
  <!-- Display table's name before table as standalone block -->
1753
2076
  <!-- $namespace = 'iso' or -->
1754
2077
 
1755
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1756
-
1757
-
1758
-
1759
-
2078
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
2079
+
1760
2080
 
1761
- <xsl:call-template name="fn_name_display"/>
1762
2081
 
2082
+ <xsl:call-template name="table_name_fn_display"/>
1763
2083
 
1764
2084
 
1765
2085
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
1766
2086
 
1767
- <!-- <xsl:variable name="cols-count">
1768
- <xsl:choose>
1769
- <xsl:when test="*[local-name()='thead']">
1770
- <xsl:call-template name="calculate-columns-numbers">
1771
- <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
1772
- </xsl:call-template>
1773
- </xsl:when>
1774
- <xsl:otherwise>
1775
- <xsl:call-template name="calculate-columns-numbers">
1776
- <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
1777
- </xsl:call-template>
1778
- </xsl:otherwise>
1779
- </xsl:choose>
1780
- </xsl:variable> -->
1781
- <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
1782
- <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
1783
-
1784
2087
  <xsl:variable name="colwidths">
1785
2088
  <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1786
2089
  <xsl:call-template name="calculate-column-widths">
@@ -1791,17 +2094,8 @@
1791
2094
  </xsl:variable>
1792
2095
  <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1793
2096
 
1794
- <!-- <xsl:variable name="colwidths2">
1795
- <xsl:call-template name="calculate-column-widths">
1796
- <xsl:with-param name="cols-count" select="$cols-count"/>
1797
- </xsl:call-template>
1798
- </xsl:variable> -->
1799
-
1800
- <!-- cols-count=<xsl:copy-of select="$cols-count"/>
1801
- colwidthsNew=<xsl:copy-of select="$colwidths"/>
1802
- colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
1803
2097
 
1804
- <xsl:variable name="margin-left">
2098
+ <xsl:variable name="margin-side">
1805
2099
  <xsl:choose>
1806
2100
  <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
1807
2101
  <xsl:otherwise>0</xsl:otherwise>
@@ -1809,73 +2103,72 @@
1809
2103
  </xsl:variable>
1810
2104
 
1811
2105
 
1812
- <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1813
-
1814
-
1815
-
1816
-
1817
-
1818
-
1819
- <xsl:attribute name="margin-bottom">18pt</xsl:attribute>
1820
- <xsl:attribute name="font-size">8pt</xsl:attribute>
1821
-
2106
+ <fo:block-container xsl:use-attribute-sets="table-container-style">
2107
+
1822
2108
 
2109
+ <xsl:attribute name="margin-left"><xsl:value-of select="-$margin-side"/>mm</xsl:attribute>
2110
+ <xsl:attribute name="margin-right"><xsl:value-of select="-$margin-side"/>mm</xsl:attribute>
1823
2111
 
1824
-
2112
+
1825
2113
 
2114
+
1826
2115
 
2116
+
1827
2117
 
1828
2118
 
1829
2119
 
2120
+
1830
2121
 
1831
2122
 
1832
2123
 
1833
2124
 
1834
2125
 
2126
+ <!-- end table block-container attributes -->
1835
2127
 
1836
2128
  <!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
1837
2129
 
1838
2130
 
2131
+ <xsl:variable name="table_width_default">100%</xsl:variable>
1839
2132
  <xsl:variable name="table_width">
1840
2133
  <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
1841
2134
 
1842
-
1843
-
1844
- <xsl:choose>
1845
- <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
1846
- <xsl:otherwise>100%</xsl:otherwise>
1847
- </xsl:choose>
1848
-
2135
+ <xsl:choose>
2136
+ <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
2137
+ <xsl:otherwise><xsl:value-of select="$table_width_default"/></xsl:otherwise>
2138
+ </xsl:choose>
2139
+
1849
2140
  </xsl:variable>
1850
2141
 
2142
+
1851
2143
  <xsl:variable name="table_attributes">
1852
- <attribute name="table-layout">fixed</attribute>
1853
- <attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
1854
- <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1855
- <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1856
-
1857
-
1858
-
1859
-
1860
-
1861
-
1862
-
1863
-
1864
-
1865
-
1866
- <attribute name="border-top">0.5pt solid black</attribute>
1867
-
1868
-
1869
-
1870
-
1871
-
2144
+
2145
+ <xsl:element name="table_attributes" use-attribute-sets="table-style">
2146
+ <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
2147
+
2148
+
2149
+ <xsl:attribute name="margin-left"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
2150
+ <xsl:attribute name="margin-right"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
2151
+
2152
+
2153
+
2154
+
2155
+
2156
+
2157
+
2158
+
2159
+
2160
+
2161
+
2162
+
2163
+
2164
+ </xsl:element>
1872
2165
  </xsl:variable>
1873
2166
 
1874
2167
 
1875
- <fo:table id="{@id}" table-omit-footer-at-break="true">
2168
+ <fo:table id="{@id}">
1876
2169
 
1877
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1878
- <xsl:attribute name="{@name}">
2170
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
2171
+ <xsl:attribute name="{local-name()}">
1879
2172
  <xsl:value-of select="."/>
1880
2173
  </xsl:attribute>
1881
2174
  </xsl:for-each>
@@ -1886,7 +2179,6 @@
1886
2179
  </xsl:if>
1887
2180
 
1888
2181
 
1889
-
1890
2182
  <xsl:choose>
1891
2183
  <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1892
2184
  <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
@@ -1912,7 +2204,7 @@
1912
2204
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1913
2205
  </xsl:when>
1914
2206
  <xsl:otherwise>
1915
- <xsl:apply-templates/>
2207
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
1916
2208
  </xsl:otherwise>
1917
2209
  </xsl:choose>
1918
2210
 
@@ -1927,25 +2219,6 @@
1927
2219
  </xsl:call-template>
1928
2220
  </xsl:for-each>
1929
2221
 
1930
- <!-- insert footer as table -->
1931
- <!-- <fo:table>
1932
- <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1933
- <xsl:attribute name="{@name}">
1934
- <xsl:value-of select="."/>
1935
- </xsl:attribute>
1936
- </xsl:for-each>
1937
-
1938
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1939
- <xsl:choose>
1940
- <xsl:when test=". = 1 or . = 0">
1941
- <fo:table-column column-width="proportional-column-width(2)"/>
1942
- </xsl:when>
1943
- <xsl:otherwise>
1944
- <fo:table-column column-width="proportional-column-width({.})"/>
1945
- </xsl:otherwise>
1946
- </xsl:choose>
1947
- </xsl:for-each>
1948
- </fo:table>-->
1949
2222
 
1950
2223
 
1951
2224
 
@@ -2003,18 +2276,17 @@
2003
2276
  </xsl:otherwise>
2004
2277
  </xsl:choose>
2005
2278
 
2006
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
2279
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
2007
2280
  <xsl:param name="continued"/>
2008
2281
  <xsl:if test="normalize-space() != ''">
2009
2282
  <fo:block xsl:use-attribute-sets="table-name-style">
2010
-
2283
+
2011
2284
 
2012
2285
 
2013
2286
 
2014
2287
 
2015
2288
  <xsl:choose>
2016
2289
  <xsl:when test="$continued = 'true'">
2017
- <!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
2018
2290
 
2019
2291
  </xsl:when>
2020
2292
  <xsl:otherwise>
@@ -2077,13 +2349,6 @@
2077
2349
  <xsl:for-each select="xalan:nodeset($table)/*/tr">
2078
2350
  <xsl:variable name="td_text">
2079
2351
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
2080
-
2081
- <!-- <xsl:if test="$namespace = 'bipm'">
2082
- <xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
2083
- <word><xsl:value-of select="normalize-space(.)"/></word>
2084
- </xsl:for-each>
2085
- </xsl:if> -->
2086
-
2087
2352
  </xsl:variable>
2088
2353
  <xsl:variable name="words">
2089
2354
  <xsl:variable name="string_with_added_zerospaces">
@@ -2120,7 +2385,6 @@
2120
2385
  </xsl:otherwise>
2121
2386
  </xsl:choose>
2122
2387
  </xsl:variable>
2123
-
2124
2388
 
2125
2389
  <column>
2126
2390
  <xsl:for-each select="xalan:nodeset($widths)//width">
@@ -2156,7 +2420,6 @@
2156
2420
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
2157
2421
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
2158
2422
  <xsl:param name="cols-count"/>
2159
- <!-- font-weight="bold" -->
2160
2423
  <fo:table-header>
2161
2424
 
2162
2425
 
@@ -2167,86 +2430,27 @@
2167
2430
  <!-- row for title -->
2168
2431
  <fo:table-row>
2169
2432
  <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">
2170
-
2171
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
2172
- <xsl:with-param name="continued">true</xsl:with-param>
2173
- </xsl:apply-templates>
2174
-
2175
-
2176
-
2177
-
2178
- </fo:table-cell>
2179
- </fo:table-row>
2180
- </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
2181
- <fo:table-body>
2182
- <xsl:apply-templates/>
2183
- </fo:table-body>
2184
- </xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
2185
- <xsl:apply-templates/>
2186
- </xsl:template><xsl:template name="insertTableFooter">
2187
- <xsl:param name="cols-count"/>
2188
- <xsl:if test="../*[local-name()='tfoot']">
2189
- <fo:table-footer>
2190
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2191
- </fo:table-footer>
2192
- </xsl:if>
2193
- </xsl:template><xsl:template name="insertTableFooter2">
2194
- <xsl:param name="cols-count"/>
2195
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
2196
- <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
2197
-
2198
- <fo:table-footer>
2199
-
2200
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2201
-
2202
- <!-- if there are note(s) or fn(s) then create footer row -->
2203
- <xsl:if test="$isNoteOrFnExist = 'true'">
2204
-
2205
-
2206
-
2207
- <fo:table-row>
2208
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
2209
-
2210
-
2211
-
2212
- <!-- fn will be processed inside 'note' processing -->
2213
-
2214
-
2215
-
2216
-
2217
-
2218
-
2219
- <!-- except gb -->
2220
-
2221
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2222
-
2223
-
2224
- <!-- show Note under table in preface (ex. abstract) sections -->
2225
- <!-- empty, because notes show at page side in main sections -->
2226
- <!-- <xsl:if test="$namespace = 'bipm'">
2227
- <xsl:choose>
2228
- <xsl:when test="ancestor::*[local-name()='preface']">
2229
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2230
- </xsl:when>
2231
- <xsl:otherwise>
2232
- <fo:block/>
2233
- </xsl:otherwise>
2234
- </xsl:choose>
2235
- </xsl:if> -->
2236
-
2237
-
2238
- <!-- horizontal row separator -->
2239
-
2240
-
2241
- <!-- fn processing -->
2242
- <xsl:call-template name="fn_display"/>
2243
-
2244
- </fo:table-cell>
2245
- </fo:table-row>
2246
-
2247
- </xsl:if>
2433
+
2434
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
2435
+ <xsl:with-param name="continued">true</xsl:with-param>
2436
+ </xsl:apply-templates>
2437
+
2438
+
2439
+
2440
+ </fo:table-cell>
2441
+ </fo:table-row>
2442
+ </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
2443
+ <fo:table-body>
2444
+ <xsl:apply-templates/>
2445
+ </fo:table-body>
2446
+ </xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
2447
+ <xsl:apply-templates/>
2448
+ </xsl:template><xsl:template name="insertTableFooter">
2449
+ <xsl:param name="cols-count"/>
2450
+ <xsl:if test="../*[local-name()='tfoot']">
2451
+ <fo:table-footer>
2452
+ <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2248
2453
  </fo:table-footer>
2249
-
2250
2454
  </xsl:if>
2251
2455
  </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
2252
2456
  <xsl:param name="table_attributes"/>
@@ -2273,17 +2477,18 @@
2273
2477
  </xsl:variable>
2274
2478
 
2275
2479
  <fo:table keep-with-previous="always">
2276
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
2480
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
2481
+ <xsl:variable name="name" select="local-name()"/>
2277
2482
  <xsl:choose>
2278
- <xsl:when test="@name = 'border-top'">
2279
- <xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
2483
+ <xsl:when test="$name = 'border-top'">
2484
+ <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
2280
2485
  </xsl:when>
2281
- <xsl:when test="@name = 'border'">
2282
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
2486
+ <xsl:when test="$name = 'border'">
2487
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
2283
2488
  <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
2284
2489
  </xsl:when>
2285
2490
  <xsl:otherwise>
2286
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
2491
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
2287
2492
  </xsl:otherwise>
2288
2493
  </xsl:choose>
2289
2494
  </xsl:for-each>
@@ -2312,9 +2517,10 @@
2312
2517
 
2313
2518
  <fo:table-body>
2314
2519
  <fo:table-row>
2315
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
2520
+ <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
2316
2521
 
2317
2522
 
2523
+
2318
2524
 
2319
2525
 
2320
2526
  <!-- fn will be processed inside 'note' processing -->
@@ -2324,37 +2530,20 @@
2324
2530
 
2325
2531
 
2326
2532
 
2327
-
2328
-
2329
-
2330
2533
  <!-- for BSI (not PAS) display Notes before footnotes -->
2331
2534
 
2332
2535
 
2333
- <!-- except gb -->
2536
+ <!-- except gb and bsi -->
2334
2537
 
2335
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2336
-
2337
-
2338
- <!-- <xsl:if test="$namespace = 'bipm'">
2339
- <xsl:choose>
2340
- <xsl:when test="ancestor::*[local-name()='preface']">
2341
- show Note under table in preface (ex. abstract) sections
2342
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2343
- </xsl:when>
2344
- <xsl:otherwise>
2345
- empty, because notes show at page side in main sections
2346
- <fo:block/>
2347
- </xsl:otherwise>
2348
- </xsl:choose>
2349
- </xsl:if> -->
2538
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2539
+
2350
2540
 
2351
2541
 
2352
2542
  <!-- horizontal row separator -->
2353
2543
 
2354
2544
 
2355
2545
  <!-- fn processing -->
2356
- <xsl:call-template name="fn_display"/>
2357
-
2546
+ <xsl:call-template name="table_fn_display"/>
2358
2547
 
2359
2548
  <!-- for PAS display Notes after footnotes -->
2360
2549
 
@@ -2396,93 +2585,62 @@
2396
2585
 
2397
2586
 
2398
2587
  <xsl:apply-templates/>
2399
- <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
2400
-
2588
+
2401
2589
  </fo:table-body>
2402
2590
 
2403
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
2404
- <xsl:choose>
2405
- <xsl:when test="substring-after(., '—') != ''">
2406
- <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
2407
- </xsl:when>
2408
- <xsl:otherwise>
2409
- <xsl:value-of select="."/>
2410
- </xsl:otherwise>
2411
- </xsl:choose>
2412
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
2413
- <xsl:apply-templates mode="presentation_name"/>
2414
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
2415
- <xsl:apply-templates select="."/>
2416
- </xsl:template><xsl:template match="*[local-name()='tr']">
2417
- <xsl:variable name="parent-name" select="local-name(..)"/>
2418
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2419
- <fo:table-row min-height="4mm">
2420
- <xsl:if test="$parent-name = 'thead'">
2421
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2422
-
2423
-
2424
-
2425
-
2426
-
2427
-
2428
-
2429
-
2430
- </xsl:if>
2431
- <xsl:if test="$parent-name = 'tfoot'">
2432
-
2433
-
2434
-
2435
- </xsl:if>
2436
-
2437
-
2438
- <xsl:if test="not(*[local-name()='th'])">
2439
- <xsl:attribute name="min-height">8mm</xsl:attribute>
2440
- </xsl:if>
2441
-
2442
-
2443
-
2444
-
2445
-
2446
-
2447
-
2448
-
2449
-
2450
- <!-- <xsl:if test="$namespace = 'bipm'">
2451
- <xsl:attribute name="height">8mm</xsl:attribute>
2452
- </xsl:if> -->
2453
-
2454
- <xsl:apply-templates/>
2455
- </fo:table-row>
2456
- </xsl:template><xsl:template match="*[local-name()='th']">
2457
- <fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
2458
- <xsl:attribute name="text-align">
2459
- <xsl:choose>
2460
- <xsl:when test="@align">
2461
- <xsl:call-template name="setAlignment"/>
2462
- <!-- <xsl:value-of select="@align"/> -->
2463
- </xsl:when>
2464
- <xsl:otherwise>center</xsl:otherwise>
2465
- </xsl:choose>
2466
- </xsl:attribute>
2591
+ </xsl:template><xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
2592
+ <fo:table-row xsl:use-attribute-sets="table-header-row-style">
2593
+
2594
+
2467
2595
 
2468
2596
 
2597
+
2598
+
2599
+
2600
+ <xsl:call-template name="setTableRowAttributes"/>
2601
+
2602
+ <xsl:apply-templates/>
2603
+ </fo:table-row>
2604
+ </xsl:template><xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
2605
+ <fo:table-row xsl:use-attribute-sets="table-footer-row-style">
2469
2606
 
2607
+ <xsl:call-template name="setTableRowAttributes"/>
2608
+ <xsl:apply-templates/>
2609
+ </fo:table-row>
2610
+ </xsl:template><xsl:template match="*[local-name()='tr']">
2611
+ <fo:table-row xsl:use-attribute-sets="table-body-row-style">
2612
+
2470
2613
 
2614
+
2471
2615
 
2616
+
2617
+ <xsl:call-template name="setTableRowAttributes"/>
2618
+ <xsl:apply-templates/>
2619
+ </fo:table-row>
2620
+ </xsl:template><xsl:template name="setTableRowAttributes">
2621
+
2622
+
2623
+
2624
+
2625
+
2626
+
2627
+
2628
+
2629
+ <xsl:if test="not(*[local-name()='th'])">
2630
+ <xsl:attribute name="min-height">8mm</xsl:attribute>
2631
+ </xsl:if>
2632
+
2633
+ </xsl:template><xsl:template match="*[local-name()='th']">
2634
+ <fo:table-cell xsl:use-attribute-sets="table-header-cell-style"> <!-- text-align="{@align}" -->
2635
+ <xsl:call-template name="setTextAlignment">
2636
+ <xsl:with-param name="default">center</xsl:with-param>
2637
+ </xsl:call-template>
2472
2638
 
2473
2639
 
2474
2640
 
2475
2641
 
2642
+
2476
2643
 
2477
- <xsl:attribute name="display-align">center</xsl:attribute>
2478
- <xsl:attribute name="font-style">italic</xsl:attribute>
2479
- <xsl:attribute name="font-weight">normal</xsl:attribute>
2480
- <xsl:attribute name="padding-top">2mm</xsl:attribute>
2481
- <xsl:attribute name="padding-left">2mm</xsl:attribute>
2482
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2483
- <xsl:attribute name="border-top">solid black 0.2pt</xsl:attribute>
2484
- <xsl:attribute name="border-bottom">solid black 1.5pt</xsl:attribute>
2485
- <xsl:attribute name="text-indent">0mm</xsl:attribute>
2486
2644
 
2487
2645
 
2488
2646
 
@@ -2490,21 +2648,25 @@
2490
2648
  <xsl:if test="$lang = 'ar'">
2491
2649
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2492
2650
  </xsl:if>
2493
- <xsl:if test="@colspan">
2494
- <xsl:attribute name="number-columns-spanned">
2495
- <xsl:value-of select="@colspan"/>
2496
- </xsl:attribute>
2497
- </xsl:if>
2498
- <xsl:if test="@rowspan">
2499
- <xsl:attribute name="number-rows-spanned">
2500
- <xsl:value-of select="@rowspan"/>
2501
- </xsl:attribute>
2502
- </xsl:if>
2503
- <xsl:call-template name="display-align"/>
2651
+
2652
+ <xsl:call-template name="setTableCellAttributes"/>
2653
+
2504
2654
  <fo:block>
2505
2655
  <xsl:apply-templates/>
2506
2656
  </fo:block>
2507
2657
  </fo:table-cell>
2658
+ </xsl:template><xsl:template name="setTableCellAttributes">
2659
+ <xsl:if test="@colspan">
2660
+ <xsl:attribute name="number-columns-spanned">
2661
+ <xsl:value-of select="@colspan"/>
2662
+ </xsl:attribute>
2663
+ </xsl:if>
2664
+ <xsl:if test="@rowspan">
2665
+ <xsl:attribute name="number-rows-spanned">
2666
+ <xsl:value-of select="@rowspan"/>
2667
+ </xsl:attribute>
2668
+ </xsl:if>
2669
+ <xsl:call-template name="display-align"/>
2508
2670
  </xsl:template><xsl:template name="display-align">
2509
2671
  <xsl:if test="@valign">
2510
2672
  <xsl:attribute name="display-align">
@@ -2517,22 +2679,18 @@
2517
2679
  </xsl:attribute>
2518
2680
  </xsl:if>
2519
2681
  </xsl:template><xsl:template match="*[local-name()='td']">
2520
- <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
2521
- <xsl:attribute name="text-align">
2522
- <xsl:choose>
2523
- <xsl:when test="@align">
2524
- <xsl:call-template name="setAlignment"/>
2525
- <!-- <xsl:value-of select="@align"/> -->
2526
- </xsl:when>
2527
- <xsl:otherwise>left</xsl:otherwise>
2528
- </xsl:choose>
2529
- </xsl:attribute>
2682
+ <fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
2683
+ <xsl:call-template name="setTextAlignment">
2684
+ <xsl:with-param name="default">left</xsl:with-param>
2685
+ </xsl:call-template>
2686
+
2530
2687
  <xsl:if test="$lang = 'ar'">
2531
2688
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2532
2689
  </xsl:if>
2533
2690
 
2534
2691
 
2535
2692
 
2693
+ <!-- bsi -->
2536
2694
 
2537
2695
 
2538
2696
 
@@ -2541,80 +2699,154 @@
2541
2699
 
2542
2700
 
2543
2701
 
2544
- <xsl:attribute name="display-align">before</xsl:attribute>
2545
- <xsl:attribute name="padding-left">0mm</xsl:attribute>
2546
- <xsl:attribute name="padding-top">2mm</xsl:attribute>
2547
- <xsl:attribute name="padding-bottom">1mm</xsl:attribute>
2548
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2549
- <xsl:attribute name="border-bottom">solid black 1.5pt</xsl:attribute>
2550
- <xsl:attribute name="text-indent">0mm</xsl:attribute>
2702
+
2551
2703
 
2552
2704
 
2553
2705
 
2554
2706
 
2555
2707
 
2556
2708
 
2557
- <xsl:if test=".//*[local-name() = 'table']">
2709
+ <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
2558
2710
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2559
2711
  </xsl:if>
2560
- <xsl:if test="@colspan">
2561
- <xsl:attribute name="number-columns-spanned">
2562
- <xsl:value-of select="@colspan"/>
2563
- </xsl:attribute>
2564
- </xsl:if>
2565
- <xsl:if test="@rowspan">
2566
- <xsl:attribute name="number-rows-spanned">
2567
- <xsl:value-of select="@rowspan"/>
2568
- </xsl:attribute>
2569
- </xsl:if>
2570
- <xsl:call-template name="display-align"/>
2712
+
2713
+ <xsl:call-template name="setTableCellAttributes"/>
2714
+
2571
2715
  <fo:block>
2572
-
2716
+
2717
+
2718
+
2573
2719
  <xsl:apply-templates/>
2574
2720
  </fo:block>
2575
2721
  </fo:table-cell>
2576
2722
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
2723
+
2724
+ <fo:block xsl:use-attribute-sets="table-note-style">
2725
+
2726
+
2727
+
2728
+
2577
2729
 
2578
-
2579
- <fo:block font-size="10pt" margin-bottom="12pt">
2730
+ <!-- Table's note name (NOTE, for example) -->
2731
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
2580
2732
 
2581
2733
 
2582
2734
 
2583
2735
 
2584
2736
 
2585
2737
 
2738
+ <xsl:if test="@type = 'source' or @type = 'abbreviation'">
2739
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
2740
+ </xsl:if>
2586
2741
 
2587
2742
 
2588
- <!-- Table's note name (NOTE, for example) -->
2589
-
2590
- <fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
2591
-
2592
-
2593
-
2594
- <xsl:if test="@type = 'source' or @type = 'abbreviation'">
2595
- <xsl:attribute name="font-size">9pt</xsl:attribute>
2596
- <!-- <fo:inline>
2597
- <xsl:call-template name="capitalize">
2598
- <xsl:with-param name="str" select="@type"/>
2599
- </xsl:call-template>
2600
- <xsl:text>: </xsl:text>
2601
- </fo:inline> -->
2602
- </xsl:if>
2603
-
2604
-
2743
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
2605
2744
 
2606
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2607
-
2608
- </fo:inline>
2609
-
2610
-
2611
-
2612
- <xsl:apply-templates mode="process"/>
2613
- </fo:block>
2745
+ </fo:inline>
2746
+
2747
+
2748
+
2749
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]" mode="process"/>
2750
+ </fo:block>
2614
2751
 
2615
2752
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
2616
2753
  <xsl:apply-templates/>
2617
- </xsl:template><xsl:template name="fn_display">
2754
+ </xsl:template><xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" priority="2" name="fn">
2755
+
2756
+ <!-- list of footnotes to calculate actual footnotes number -->
2757
+ <xsl:variable name="p_fn_">
2758
+ <xsl:choose>
2759
+ <xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
2760
+ <fn gen_id="{generate-id(.)}">
2761
+ <xsl:copy-of select="@*"/>
2762
+ <xsl:copy-of select="node()"/>
2763
+ </fn>
2764
+ </xsl:when>
2765
+ <xsl:otherwise>
2766
+ <!-- itetation for:
2767
+ footnotes in bibdata/title
2768
+ footnotes in bibliography
2769
+ footnotes in document's body (except table's head/body/foot and figure text)
2770
+ -->
2771
+ <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
2772
+ <fn gen_id="{generate-id(.)}">
2773
+ <xsl:copy-of select="@*"/>
2774
+ <xsl:copy-of select="node()"/>
2775
+ </fn>
2776
+ </xsl:for-each>
2777
+ <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
2778
+ <xsl:sort select="@displayorder" data-type="number"/>
2779
+ <xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
2780
+ <!-- copy unique fn -->
2781
+ <fn gen_id="{generate-id(.)}">
2782
+ <xsl:copy-of select="@*"/>
2783
+ <xsl:copy-of select="node()"/>
2784
+ </fn>
2785
+ </xsl:for-each>
2786
+ </xsl:for-each>
2787
+ </xsl:otherwise>
2788
+ </xsl:choose>
2789
+ </xsl:variable>
2790
+ <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
2791
+
2792
+ <xsl:variable name="gen_id" select="generate-id(.)"/>
2793
+ <xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
2794
+ <xsl:variable name="reference" select="@reference"/>
2795
+ <!-- fn sequence number in document -->
2796
+ <xsl:variable name="current_fn_number">
2797
+ <xsl:choose>
2798
+ <xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
2799
+ <xsl:otherwise>
2800
+ <xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
2801
+ </xsl:otherwise>
2802
+ </xsl:choose>
2803
+ </xsl:variable>
2804
+ <xsl:variable name="current_fn_number_text">
2805
+ <xsl:value-of select="$current_fn_number"/>
2806
+
2807
+
2808
+ </xsl:variable>
2809
+
2810
+ <xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
2811
+ <xsl:variable name="footnote_inline">
2812
+ <fo:inline xsl:use-attribute-sets="fn-num-style">
2813
+
2814
+ <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
2815
+ <xsl:value-of select="$current_fn_number_text"/>
2816
+ </fo:basic-link>
2817
+ </fo:inline>
2818
+ </xsl:variable>
2819
+ <!-- DEBUG: p_fn=<xsl:copy-of select="$p_fn"/>
2820
+ gen_id=<xsl:value-of select="$gen_id"/> -->
2821
+ <xsl:choose>
2822
+ <xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
2823
+ <xsl:copy-of select="$footnote_inline"/>
2824
+ </xsl:when>
2825
+ <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
2826
+ <fo:footnote xsl:use-attribute-sets="fn-style">
2827
+ <xsl:copy-of select="$footnote_inline"/>
2828
+ <fo:footnote-body>
2829
+
2830
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
2831
+
2832
+ <fo:block xsl:use-attribute-sets="fn-body-style">
2833
+
2834
+
2835
+ <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
2836
+
2837
+ <xsl:value-of select="$current_fn_number_text"/>
2838
+ </fo:inline>
2839
+ <xsl:apply-templates/>
2840
+ </fo:block>
2841
+ </fo:block-container>
2842
+ </fo:footnote-body>
2843
+ </fo:footnote>
2844
+ </xsl:when>
2845
+ <xsl:otherwise>
2846
+ <xsl:copy-of select="$footnote_inline"/>
2847
+ </xsl:otherwise>
2848
+ </xsl:choose>
2849
+ </xsl:template><xsl:template name="table_fn_display">
2618
2850
  <xsl:variable name="references">
2619
2851
 
2620
2852
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
@@ -2625,33 +2857,26 @@
2625
2857
  <xsl:for-each select="xalan:nodeset($references)//fn">
2626
2858
  <xsl:variable name="reference" select="@reference"/>
2627
2859
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
2628
- <fo:block margin-bottom="12pt">
2860
+ <fo:block xsl:use-attribute-sets="table-fn-style">
2629
2861
 
2630
2862
 
2631
2863
 
2632
-
2633
-
2634
-
2635
-
2636
- <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
2864
+ <fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
2637
2865
 
2638
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2639
2866
 
2640
2867
 
2641
2868
 
2642
2869
 
2870
+ <xsl:value-of select="@reference"/>
2643
2871
 
2644
2872
 
2645
2873
 
2646
2874
 
2647
- <xsl:value-of select="@reference"/>
2648
2875
 
2649
2876
 
2650
2877
 
2651
2878
  </fo:inline>
2652
- <fo:inline>
2653
-
2654
- <!-- <xsl:apply-templates /> -->
2879
+ <fo:inline xsl:use-attribute-sets="table-fn-body-style">
2655
2880
  <xsl:copy-of select="./node()"/>
2656
2881
  </fo:inline>
2657
2882
  </fo:block>
@@ -2663,15 +2888,7 @@
2663
2888
 
2664
2889
  <xsl:apply-templates/>
2665
2890
  </fn>
2666
- </xsl:template><xsl:template name="fn_name_display">
2667
- <!-- <xsl:variable name="references">
2668
- <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
2669
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
2670
- <xsl:apply-templates />
2671
- </fn>
2672
- </xsl:for-each>
2673
- </xsl:variable>
2674
- $references=<xsl:copy-of select="$references"/> -->
2891
+ </xsl:template><xsl:template name="table_name_fn_display">
2675
2892
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
2676
2893
  <xsl:variable name="reference" select="@reference"/>
2677
2894
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
@@ -2680,9 +2897,7 @@
2680
2897
  </fo:block>
2681
2898
  </xsl:for-each>
2682
2899
  </xsl:template><xsl:template name="fn_display_figure">
2683
- <xsl:variable name="key_iso">
2684
- <!-- and (not(@class) or @class !='pseudocode') -->
2685
- </xsl:variable>
2900
+
2686
2901
  <xsl:variable name="references">
2687
2902
  <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
2688
2903
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
@@ -2690,50 +2905,52 @@
2690
2905
  </fn>
2691
2906
  </xsl:for-each>
2692
2907
  </xsl:variable>
2908
+
2909
+ <xsl:if test="xalan:nodeset($references)//fn">
2693
2910
 
2694
- <!-- current hierarchy is 'figure' element -->
2695
- <xsl:variable name="following_dl_colwidths">
2696
- <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
2697
- <xsl:variable name="html-table">
2698
- <xsl:variable name="doc_ns">
2911
+ <xsl:variable name="key_iso">
2912
+
2913
+ </xsl:variable>
2914
+
2915
+ <!-- current hierarchy is 'figure' element -->
2916
+ <xsl:variable name="following_dl_colwidths">
2917
+ <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
2918
+ <xsl:variable name="html-table">
2919
+ <xsl:variable name="doc_ns">
2920
+
2921
+ </xsl:variable>
2922
+ <xsl:variable name="ns">
2923
+ <xsl:choose>
2924
+ <xsl:when test="normalize-space($doc_ns) != ''">
2925
+ <xsl:value-of select="normalize-space($doc_ns)"/>
2926
+ </xsl:when>
2927
+ <xsl:otherwise>
2928
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
2929
+ </xsl:otherwise>
2930
+ </xsl:choose>
2931
+ </xsl:variable>
2699
2932
 
2700
- </xsl:variable>
2701
- <xsl:variable name="ns">
2702
- <xsl:choose>
2703
- <xsl:when test="normalize-space($doc_ns) != ''">
2704
- <xsl:value-of select="normalize-space($doc_ns)"/>
2705
- </xsl:when>
2706
- <xsl:otherwise>
2707
- <xsl:value-of select="substring-before(name(/*), '-')"/>
2708
- </xsl:otherwise>
2709
- </xsl:choose>
2710
- </xsl:variable>
2711
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2712
- <!-- <xsl:element name="{$ns}:table"> -->
2713
2933
  <xsl:for-each select="*[local-name() = 'dl'][1]">
2714
2934
  <tbody>
2715
2935
  <xsl:apply-templates mode="dl"/>
2716
2936
  </tbody>
2717
2937
  </xsl:for-each>
2718
- <!-- </xsl:element> -->
2719
- </xsl:variable>
2720
-
2721
- <xsl:call-template name="calculate-column-widths">
2722
- <xsl:with-param name="cols-count" select="2"/>
2723
- <xsl:with-param name="table" select="$html-table"/>
2724
- </xsl:call-template>
2725
-
2726
- </xsl:if>
2727
- </xsl:variable>
2728
-
2729
-
2730
- <xsl:variable name="maxlength_dt">
2731
- <xsl:for-each select="*[local-name() = 'dl'][1]">
2732
- <xsl:call-template name="getMaxLength_dt"/>
2733
- </xsl:for-each>
2734
- </xsl:variable>
2735
-
2736
- <xsl:if test="xalan:nodeset($references)//fn">
2938
+ </xsl:variable>
2939
+
2940
+ <xsl:call-template name="calculate-column-widths">
2941
+ <xsl:with-param name="cols-count" select="2"/>
2942
+ <xsl:with-param name="table" select="$html-table"/>
2943
+ </xsl:call-template>
2944
+
2945
+ </xsl:if>
2946
+ </xsl:variable>
2947
+
2948
+ <xsl:variable name="maxlength_dt">
2949
+ <xsl:for-each select="*[local-name() = 'dl'][1]">
2950
+ <xsl:call-template name="getMaxLength_dt"/>
2951
+ </xsl:for-each>
2952
+ </xsl:variable>
2953
+
2737
2954
  <fo:block>
2738
2955
  <fo:table width="95%" table-layout="fixed">
2739
2956
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -2760,20 +2977,18 @@
2760
2977
  <fo:table-row>
2761
2978
  <fo:table-cell>
2762
2979
  <fo:block>
2763
- <fo:inline font-size="80%" padding-right="5mm" vertical-align="super" id="{@id}">
2764
-
2980
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
2765
2981
  <xsl:value-of select="@reference"/>
2766
2982
  </fo:inline>
2767
2983
  </fo:block>
2768
2984
  </fo:table-cell>
2769
2985
  <fo:table-cell>
2770
- <fo:block text-align="justify" margin-bottom="12pt">
2771
-
2986
+ <fo:block xsl:use-attribute-sets="figure-fn-body-style">
2772
2987
  <xsl:if test="normalize-space($key_iso) = 'true'">
2773
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
2988
+
2989
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
2990
+
2774
2991
  </xsl:if>
2775
-
2776
- <!-- <xsl:apply-templates /> -->
2777
2992
  <xsl:copy-of select="./node()"/>
2778
2993
  </fo:block>
2779
2994
  </fo:table-cell>
@@ -2786,14 +3001,8 @@
2786
3001
  </xsl:if>
2787
3002
 
2788
3003
  </xsl:template><xsl:template match="*[local-name()='fn']">
2789
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2790
- <fo:inline font-size="80%" keep-with-previous.within-line="always">
2791
-
2792
-
2793
-
2794
-
2795
-
2796
-
3004
+ <fo:inline xsl:use-attribute-sets="fn-reference-style">
3005
+
2797
3006
 
2798
3007
 
2799
3008
 
@@ -2806,6 +3015,8 @@
2806
3015
 
2807
3016
  </fo:basic-link>
2808
3017
  </fo:inline>
3018
+ </xsl:template><xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
3019
+ <fo:inline><xsl:value-of select="."/></fo:inline>
2809
3020
  </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
2810
3021
  <fo:inline>
2811
3022
  <xsl:apply-templates/>
@@ -2815,10 +3026,10 @@
2815
3026
  <xsl:variable name="isDeleted" select="@deleted"/>
2816
3027
  <fo:block-container>
2817
3028
 
2818
- <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
2819
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2820
- </xsl:if>
2821
-
3029
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
3030
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
3031
+ </xsl:if>
3032
+
2822
3033
 
2823
3034
  <xsl:if test="parent::*[local-name() = 'note']">
2824
3035
  <xsl:attribute name="margin-left">
@@ -2835,11 +3046,11 @@
2835
3046
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
2836
3047
  </xsl:call-template>
2837
3048
 
2838
- <fo:block-container>
2839
-
2840
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2841
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
3049
+ <fo:block-container margin-left="0mm">
3050
+
2842
3051
 
3052
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
3053
+
2843
3054
 
2844
3055
  <xsl:variable name="parent" select="local-name(..)"/>
2845
3056
 
@@ -2850,23 +3061,19 @@
2850
3061
  <xsl:choose>
2851
3062
  <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
2852
3063
 
2853
-
2854
- <fo:block margin-bottom="12pt" text-align="left">
2855
-
2856
- <xsl:variable name="title-where">
3064
+ <fo:block margin-bottom="12pt" text-align="left">
2857
3065
 
2858
-
2859
- <xsl:call-template name="getTitle">
2860
- <xsl:with-param name="name" select="'title-where'"/>
3066
+ <xsl:variable name="title-where">
3067
+ <xsl:call-template name="getLocalizedString">
3068
+ <xsl:with-param name="key">where</xsl:with-param>
2861
3069
  </xsl:call-template>
2862
-
2863
- </xsl:variable>
2864
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2865
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
2866
- <xsl:text/>
2867
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
2868
- </fo:block>
2869
-
3070
+ </xsl:variable>
3071
+ <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
3072
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
3073
+ <xsl:text/>
3074
+ <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
3075
+ </fo:block>
3076
+
2870
3077
  </xsl:when>
2871
3078
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
2872
3079
  <fo:block margin-bottom="12pt" text-align="left">
@@ -2875,12 +3082,9 @@
2875
3082
 
2876
3083
 
2877
3084
  <xsl:variable name="title-where">
2878
-
2879
-
2880
- <xsl:call-template name="getTitle">
2881
- <xsl:with-param name="name" select="'title-where'"/>
2882
- </xsl:call-template>
2883
-
3085
+ <xsl:call-template name="getLocalizedString">
3086
+ <xsl:with-param name="key">where</xsl:with-param>
3087
+ </xsl:call-template>
2884
3088
  </xsl:variable>
2885
3089
  <xsl:value-of select="$title-where"/>
2886
3090
  </fo:block>
@@ -2892,12 +3096,9 @@
2892
3096
 
2893
3097
 
2894
3098
  <xsl:variable name="title-key">
2895
-
2896
-
2897
- <xsl:call-template name="getTitle">
2898
- <xsl:with-param name="name" select="'title-key'"/>
2899
- </xsl:call-template>
2900
-
3099
+ <xsl:call-template name="getLocalizedString">
3100
+ <xsl:with-param name="key">key</xsl:with-param>
3101
+ </xsl:call-template>
2901
3102
  </xsl:variable>
2902
3103
  <xsl:value-of select="$title-key"/>
2903
3104
  </fo:block>
@@ -2919,9 +3120,7 @@
2919
3120
  <fo:table width="95%" table-layout="fixed">
2920
3121
 
2921
3122
  <xsl:choose>
2922
- <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
2923
- <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
2924
- </xsl:when>
3123
+ <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
2925
3124
  <xsl:when test="normalize-space($key_iso) = 'true'">
2926
3125
  <xsl:attribute name="font-size">10pt</xsl:attribute>
2927
3126
 
@@ -2942,12 +3141,9 @@
2942
3141
  </xsl:otherwise>
2943
3142
  </xsl:choose>
2944
3143
  </xsl:variable>
2945
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2946
- <!-- <xsl:element name="{$ns}:table"> -->
2947
- <tbody>
2948
- <xsl:apply-templates mode="dl"/>
2949
- </tbody>
2950
- <!-- </xsl:element> -->
3144
+ <tbody>
3145
+ <xsl:apply-templates mode="dl"/>
3146
+ </tbody>
2951
3147
  </xsl:variable>
2952
3148
  <!-- html-table<xsl:copy-of select="$html-table"/> -->
2953
3149
  <xsl:variable name="colwidths">
@@ -3027,8 +3223,6 @@
3027
3223
  </xsl:for-each>
3028
3224
  </xsl:otherwise>
3029
3225
  </xsl:choose>
3030
- <!-- <fo:table-column column-width="15%"/>
3031
- <fo:table-column column-width="85%"/> -->
3032
3226
  </xsl:otherwise>
3033
3227
  </xsl:choose>
3034
3228
  </xsl:template><xsl:template name="getMaxLength_dt">
@@ -3043,12 +3237,6 @@
3043
3237
  </xsl:for-each>
3044
3238
  </xsl:variable>
3045
3239
  <xsl:variable name="maxLength">
3046
- <!-- <xsl:for-each select="*[local-name()='dt']">
3047
- <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
3048
- <xsl:if test="position() = 1">
3049
- <xsl:value-of select="string-length(normalize-space(.))"/>
3050
- </xsl:if>
3051
- </xsl:for-each> -->
3052
3240
  <xsl:for-each select="xalan:nodeset($lengths)/length">
3053
3241
  <xsl:sort select="." data-type="number" order="descending"/>
3054
3242
  <xsl:if test="position() = 1">
@@ -3074,12 +3262,12 @@
3074
3262
  <xsl:if test="normalize-space($key_iso) = 'true'">
3075
3263
  <xsl:attribute name="margin-top">0</xsl:attribute>
3076
3264
  </xsl:if>
3077
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3265
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3078
3266
  </fo:block>
3079
3267
  </fo:table-cell>
3080
3268
  <fo:table-cell>
3081
3269
  <fo:block>
3082
- <xsl:apply-templates/>
3270
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3083
3271
  </fo:block>
3084
3272
  </fo:table-cell>
3085
3273
  </fo:table-row>
@@ -3090,79 +3278,41 @@
3090
3278
  </td>
3091
3279
  <td>
3092
3280
 
3093
-
3094
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3095
-
3281
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3282
+
3096
3283
  </td>
3097
3284
  </tr>
3098
3285
 
3099
3286
  </xsl:template><xsl:template match="*[local-name()='dt']">
3100
3287
  <xsl:param name="key_iso"/>
3101
3288
 
3102
- <fo:table-row>
3103
-
3104
-
3289
+ <fo:table-row xsl:use-attribute-sets="dt-row-style">
3105
3290
  <fo:table-cell>
3106
3291
 
3107
- <fo:block margin-top="6pt">
3292
+ <fo:block xsl:use-attribute-sets="dt-style">
3108
3293
  <xsl:copy-of select="@id"/>
3109
3294
 
3110
-
3111
3295
  <xsl:if test="normalize-space($key_iso) = 'true'">
3112
3296
  <xsl:attribute name="margin-top">0</xsl:attribute>
3113
-
3114
3297
  </xsl:if>
3115
3298
 
3116
3299
 
3117
3300
 
3118
-
3119
-
3120
-
3121
-
3122
3301
  <xsl:apply-templates/>
3123
- <!-- <xsl:if test="$namespace = 'gb'">
3124
- <xsl:if test="ancestor::*[local-name()='formula']">
3125
- <xsl:text>—</xsl:text>
3126
- </xsl:if>
3127
- </xsl:if> -->
3128
3302
  </fo:block>
3129
3303
  </fo:table-cell>
3130
3304
  <fo:table-cell>
3131
3305
  <fo:block>
3132
3306
 
3133
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
3134
- <xsl:if test="local-name(*[1]) != 'stem'">
3135
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3136
- </xsl:if>
3137
- </xsl:if> -->
3138
-
3139
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3140
-
3307
+
3308
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3141
3309
  </fo:block>
3142
3310
  </fo:table-cell>
3143
3311
  </fo:table-row>
3144
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
3145
- <xsl:if test="local-name(*[1]) = 'stem'">
3146
- <fo:table-row>
3147
- <fo:table-cell>
3148
- <fo:block margin-top="6pt">
3149
- <xsl:if test="normalize-space($key_iso) = 'true'">
3150
- <xsl:attribute name="margin-top">0</xsl:attribute>
3151
- </xsl:if>
3152
- <xsl:text>&#xA0;</xsl:text>
3153
- </fo:block>
3154
- </fo:table-cell>
3155
- <fo:table-cell>
3156
- <fo:block>
3157
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3158
- </fo:block>
3159
- </fo:table-cell>
3160
- </fo:table-row>
3161
- </xsl:if>
3162
- </xsl:if> -->
3163
3312
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
3164
3313
  <xsl:apply-templates/>
3165
3314
  </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
3315
+ <xsl:apply-templates select="@language"/>
3166
3316
  <xsl:apply-templates/>
3167
3317
  </xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
3168
3318
  <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
@@ -3187,6 +3337,7 @@
3187
3337
  </fo:inline>
3188
3338
  </xsl:template><xsl:template match="*[local-name()='tt']">
3189
3339
  <fo:inline xsl:use-attribute-sets="tt-style">
3340
+
3190
3341
  <xsl:variable name="_font-size">
3191
3342
 
3192
3343
 
@@ -3223,7 +3374,22 @@
3223
3374
  <xsl:apply-templates/>
3224
3375
  </fo:inline>
3225
3376
  </xsl:template><xsl:template match="*[local-name()='add']">
3377
+ <xsl:param name="skip">true</xsl:param>
3226
3378
  <xsl:choose>
3379
+ <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
3380
+ <xsl:choose>
3381
+ <xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab'])) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
3382
+ <xsl:otherwise>
3383
+ <fo:inline>
3384
+ <xsl:call-template name="insertTag">
3385
+ <xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
3386
+ <xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
3387
+ <xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
3388
+ </xsl:call-template>
3389
+ </fo:inline>
3390
+ </xsl:otherwise>
3391
+ </xsl:choose>
3392
+ </xsl:when>
3227
3393
  <xsl:when test="@amendment">
3228
3394
  <fo:inline>
3229
3395
  <xsl:call-template name="insertTag">
@@ -3258,7 +3424,6 @@
3258
3424
  </fo:inline>
3259
3425
  </xsl:otherwise>
3260
3426
  </xsl:choose>
3261
-
3262
3427
  </xsl:template><xsl:template name="insertTag">
3263
3428
  <xsl:param name="type"/>
3264
3429
  <xsl:param name="kind"/>
@@ -3266,22 +3431,20 @@
3266
3431
  <xsl:variable name="add_width" select="string-length($value) * 20"/>
3267
3432
  <xsl:variable name="maxwidth" select="60 + $add_width"/>
3268
3433
  <fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
3269
- <!-- <xsl:attribute name="width">7mm</xsl:attribute>
3270
- <xsl:attribute name="content-height">100%</xsl:attribute> -->
3271
3434
  <xsl:attribute name="height">5mm</xsl:attribute>
3272
3435
  <xsl:attribute name="content-width">100%</xsl:attribute>
3273
3436
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
3274
3437
  <xsl:attribute name="scaling">uniform</xsl:attribute>
3275
3438
  <svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
3276
3439
  <g>
3277
- <xsl:if test="$type = 'closing'">
3440
+ <xsl:if test="$type = 'closing' or $type = 'end'">
3278
3441
  <xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
3279
3442
  </xsl:if>
3280
3443
  <polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
3281
3444
  <line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
3282
3445
  </g>
3283
3446
  <text font-family="Arial" x="15" y="57" font-size="40pt">
3284
- <xsl:if test="$type = 'closing'">
3447
+ <xsl:if test="$type = 'closing' or $type = 'end'">
3285
3448
  <xsl:attribute name="x">25</xsl:attribute>
3286
3449
  </xsl:if>
3287
3450
  <xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
@@ -3485,14 +3648,6 @@
3485
3648
 
3486
3649
  <xsl:copy-of select="xalan:nodeset($simple-table-rowspan)"/>
3487
3650
 
3488
- <!-- <xsl:choose>
3489
- <xsl:when test="current()//*[local-name()='th'][@colspan] or current()//*[local-name()='td'][@colspan] ">
3490
-
3491
- </xsl:when>
3492
- <xsl:otherwise>
3493
- <xsl:copy-of select="current()"/>
3494
- </xsl:otherwise>
3495
- </xsl:choose> -->
3496
3651
  </xsl:variable>
3497
3652
  <xsl:copy-of select="$simple-table"/>
3498
3653
  </xsl:template><xsl:template match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
@@ -3611,8 +3766,6 @@
3611
3766
  <xsl:choose>
3612
3767
  <xsl:when test="contains($str2, ' ')">
3613
3768
  <xsl:variable name="substr" select="substring-before($str2, ' ')"/>
3614
- <!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
3615
- <xsl:value-of select="substring($substr, 2)"/> -->
3616
3769
  <xsl:call-template name="capitalize">
3617
3770
  <xsl:with-param name="str" select="$substr"/>
3618
3771
  </xsl:call-template>
@@ -3622,8 +3775,6 @@
3622
3775
  </xsl:call-template>
3623
3776
  </xsl:when>
3624
3777
  <xsl:otherwise>
3625
- <!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
3626
- <xsl:value-of select="substring($str2, 2)"/> -->
3627
3778
  <xsl:call-template name="capitalize">
3628
3779
  <xsl:with-param name="str" select="$str2"/>
3629
3780
  </xsl:call-template>
@@ -3651,6 +3802,7 @@
3651
3802
  <xsl:apply-templates select="." mode="mathml"/>
3652
3803
  </xsl:variable>
3653
3804
  <fo:instream-foreign-object fox:alt-text="Math">
3805
+
3654
3806
 
3655
3807
 
3656
3808
  <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
@@ -3682,7 +3834,7 @@
3682
3834
  </xsl:attribute>
3683
3835
 
3684
3836
 
3685
- <!-- <xsl:copy-of select="."/> -->
3837
+
3686
3838
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
3687
3839
  </fo:instream-foreign-object>
3688
3840
  </fo:inline>
@@ -3741,6 +3893,10 @@
3741
3893
 
3742
3894
 
3743
3895
 
3896
+
3897
+
3898
+
3899
+
3744
3900
  <xsl:choose>
3745
3901
  <xsl:when test="$target_text = ''">
3746
3902
  <xsl:apply-templates/>
@@ -3774,9 +3930,9 @@
3774
3930
  <fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
3775
3931
  </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
3776
3932
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
3777
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3933
+ <xsl:apply-templates select="*[local-name()='name']"/>
3778
3934
  </fo:block>
3779
- <xsl:apply-templates/>
3935
+ <xsl:apply-templates select="node()[not(local-name()='name')]"/>
3780
3936
  </xsl:template><xsl:template match="*[local-name() = 'callout']">
3781
3937
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
3782
3938
  </xsl:template><xsl:template match="*[local-name() = 'annotation']">
@@ -3796,25 +3952,8 @@
3796
3952
  <xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
3797
3953
  <xsl:apply-templates/>
3798
3954
  </fo:inline>
3799
- </xsl:template><xsl:template match="*[local-name() = 'modification']">
3800
- <xsl:variable name="title-modified">
3801
-
3802
-
3803
- <xsl:call-template name="getTitle">
3804
- <xsl:with-param name="name" select="'title-modified'"/>
3805
- </xsl:call-template>
3806
-
3807
- </xsl:variable>
3808
-
3809
- <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
3810
- <xsl:choose>
3811
- <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
3812
- <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
3813
- </xsl:choose>
3814
- <xsl:apply-templates/>
3815
3955
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
3816
3956
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
3817
-
3818
3957
  <xsl:apply-templates/>
3819
3958
  </fo:basic-link>
3820
3959
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -3842,58 +3981,73 @@
3842
3981
  <fo:inline>
3843
3982
  <xsl:apply-templates/>
3844
3983
  </fo:inline>
3845
- </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
3984
+ </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="formula_number"> <!-- show by demand -->
3846
3985
  <xsl:if test="normalize-space() != ''">
3847
3986
  <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
3848
3987
  </xsl:if>
3849
3988
  </xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
3850
3989
 
3851
3990
  <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
3991
+
3852
3992
 
3853
3993
 
3854
3994
 
3855
3995
 
3856
3996
 
3997
+
3998
+
3999
+
4000
+
4001
+
3857
4002
  <fo:block-container margin-left="0mm">
4003
+
3858
4004
 
3859
4005
 
3860
4006
 
4007
+
3861
4008
 
3862
-
3863
-
3864
-
3865
-
3866
- <fo:block>
3867
-
3868
-
3869
- <xsl:attribute name="font-size">10pt</xsl:attribute>
3870
- <xsl:attribute name="text-indent">0</xsl:attribute>
3871
- <xsl:attribute name="padding-top">1.5mm</xsl:attribute>
3872
- <xsl:if test="../@type = 'source' or ../@type = 'abbreviation'">
3873
- <xsl:attribute name="font-size">9pt</xsl:attribute>
3874
- <xsl:attribute name="text-align">justify</xsl:attribute>
3875
- <xsl:attribute name="padding-top">0mm</xsl:attribute>
3876
- </xsl:if>
3877
-
3878
-
3879
-
3880
-
4009
+ <fo:block>
4010
+
4011
+
3881
4012
 
3882
- <fo:inline xsl:use-attribute-sets="note-name-style">
3883
4013
 
3884
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3885
- </fo:inline>
3886
- <xsl:apply-templates/>
3887
- </fo:block>
3888
-
3889
-
4014
+
4015
+
4016
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
4017
+ <xsl:attribute name="text-indent">0</xsl:attribute>
4018
+ <xsl:attribute name="padding-top">1.5mm</xsl:attribute>
4019
+ <xsl:if test="../@type = 'source' or ../@type = 'abbreviation'">
4020
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
4021
+ <xsl:attribute name="text-align">justify</xsl:attribute>
4022
+ <xsl:attribute name="padding-top">0mm</xsl:attribute>
4023
+ </xsl:if>
4024
+
4025
+
4026
+ <fo:inline xsl:use-attribute-sets="note-name-style">
4027
+
4028
+
4029
+
4030
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
4031
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
4032
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
4033
+ <xsl:with-param name="skip">false</xsl:with-param>
4034
+ </xsl:apply-templates>
4035
+ </xsl:if>
4036
+
4037
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4038
+
4039
+ </fo:inline>
4040
+
4041
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4042
+ </fo:block>
4043
+
3890
4044
  </fo:block-container>
3891
4045
  </fo:block-container>
3892
4046
 
3893
4047
  </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
3894
4048
  <xsl:variable name="num"><xsl:number/></xsl:variable>
3895
4049
  <xsl:choose>
3896
- <xsl:when test="$num = 1">
4050
+ <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
3897
4051
  <fo:inline xsl:use-attribute-sets="note-p-style">
3898
4052
  <xsl:apply-templates/>
3899
4053
  </fo:inline>
@@ -3908,12 +4062,16 @@
3908
4062
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
3909
4063
 
3910
4064
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
4065
+
4066
+
4067
+
4068
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3911
4069
 
3912
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3913
4070
  </fo:inline>
3914
- <xsl:apply-templates/>
4071
+
4072
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3915
4073
  </fo:block>
3916
- </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">
4074
+ </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']">
3917
4075
  <xsl:param name="sfx"/>
3918
4076
  <xsl:variable name="suffix">
3919
4077
  <xsl:choose>
@@ -3932,7 +4090,7 @@
3932
4090
  <xsl:apply-templates/>
3933
4091
  <xsl:value-of select="$suffix"/>
3934
4092
  </xsl:if>
3935
- </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
4093
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']">
3936
4094
  <xsl:param name="sfx"/>
3937
4095
  <xsl:variable name="suffix">
3938
4096
  <xsl:choose>
@@ -3959,25 +4117,23 @@
3959
4117
  <xsl:apply-templates/>
3960
4118
  </fo:block>
3961
4119
  </xsl:template><xsl:template match="*[local-name() = 'term']">
3962
- <!-- <xsl:message>'term' <xsl:number/> processing, name=<xsl:value-of select="iso:name"/>, preferred=<xsl:value-of select="iso:preferred"/>...</xsl:message> -->
3963
4120
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
3964
4121
 
3965
4122
 
4123
+
4124
+
3966
4125
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
3967
4126
 
3968
4127
  </xsl:if>
3969
- <xsl:apply-templates/>
4128
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3970
4129
  </fo:block>
3971
- </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
4130
+ </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
3972
4131
  <xsl:if test="normalize-space() != ''">
3973
4132
  <xsl:variable name="level">
3974
4133
  <xsl:call-template name="getLevelTermName"/>
3975
4134
  </xsl:variable>
3976
4135
  <fo:inline role="H{$level}">
3977
4136
  <xsl:apply-templates/>
3978
- <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
3979
- <xsl:text>.</xsl:text>
3980
- </xsl:if> -->
3981
4137
  </fo:inline>
3982
4138
  </xsl:if>
3983
4139
  </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
@@ -3990,9 +4146,10 @@
3990
4146
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
3991
4147
  </xsl:call-template>
3992
4148
 
3993
- <fo:block>
3994
-
3995
- <xsl:apply-templates/>
4149
+
4150
+
4151
+ <fo:block xsl:use-attribute-sets="figure-style">
4152
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3996
4153
  </fo:block>
3997
4154
  <xsl:call-template name="fn_display_figure"/>
3998
4155
  <xsl:for-each select="*[local-name() = 'note']">
@@ -4000,14 +4157,15 @@
4000
4157
  </xsl:for-each>
4001
4158
 
4002
4159
 
4003
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4160
+ <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
4161
+
4004
4162
 
4005
4163
  </fo:block-container>
4006
4164
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
4007
4165
  <fo:block id="{@id}">
4008
- <xsl:apply-templates/>
4166
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4009
4167
  </fo:block>
4010
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4168
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4011
4169
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
4012
4170
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
4013
4171
  <xsl:apply-templates/>
@@ -4114,9 +4272,7 @@
4114
4272
  <xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
4115
4273
  <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
4116
4274
  <xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
4117
- <!-- width=<xsl:value-of select="$width"/> -->
4118
4275
  <xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
4119
- <!-- height=<xsl:value-of select="$height"/> -->
4120
4276
  <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
4121
4277
  <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
4122
4278
  <xsl:call-template name="svg_cross">
@@ -4386,7 +4542,7 @@
4386
4542
  </fo:basic-link>
4387
4543
  </fo:block>
4388
4544
  </fo:block-container>
4389
- </xsl:template><xsl:template match="*[local-name() = 'emf']"/><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">
4545
+ </xsl:template><xsl:template match="*[local-name() = 'emf']"/><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">
4390
4546
  <xsl:apply-templates mode="contents"/>
4391
4547
  <xsl:text> </xsl:text>
4392
4548
  </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'] | *[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="bookmarks">
@@ -4398,11 +4554,58 @@
4398
4554
  <xsl:value-of select="."/>
4399
4555
  </xsl:template><xsl:template match="node()" mode="contents">
4400
4556
  <xsl:apply-templates mode="contents"/>
4557
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="2" mode="contents">
4558
+ <xsl:variable name="level">
4559
+ <xsl:call-template name="getLevel">
4560
+ <xsl:with-param name="depth" select="@depth"/>
4561
+ </xsl:call-template>
4562
+ </xsl:variable>
4563
+
4564
+ <xsl:variable name="section">
4565
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4566
+ </xsl:variable>
4567
+
4568
+ <xsl:variable name="type">floating-title</xsl:variable>
4569
+
4570
+ <xsl:variable name="display">
4571
+ <xsl:choose>
4572
+ <xsl:when test="normalize-space(@id) = ''">false</xsl:when>
4573
+ <xsl:when test="$level &lt;= $toc_level">true</xsl:when>
4574
+ <xsl:otherwise>false</xsl:otherwise>
4575
+ </xsl:choose>
4576
+ </xsl:variable>
4577
+
4578
+ <xsl:variable name="skip">false</xsl:variable>
4579
+
4580
+ <xsl:if test="$skip = 'false'">
4581
+
4582
+ <xsl:variable name="title">
4583
+ <xsl:choose>
4584
+ <xsl:when test="*[local-name() = 'tab']">
4585
+ <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
4586
+ </xsl:when>
4587
+ <xsl:otherwise>
4588
+ <xsl:copy-of select="node()"/>
4589
+ </xsl:otherwise>
4590
+ </xsl:choose>
4591
+ </xsl:variable>
4592
+
4593
+ <xsl:variable name="root">
4594
+ <xsl:if test="ancestor-or-self::*[local-name() = 'preface']">preface</xsl:if>
4595
+ <xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
4596
+ </xsl:variable>
4597
+
4598
+ <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
4599
+ <title>
4600
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
4601
+ </title>
4602
+ </item>
4603
+ </xsl:if>
4401
4604
  </xsl:template><xsl:template match="node()" mode="bookmarks">
4402
4605
  <xsl:apply-templates mode="bookmarks"/>
4403
4606
  </xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
4404
4607
  <xsl:apply-templates select="."/>
4405
- </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
4608
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
4406
4609
  <xsl:apply-templates mode="bookmarks"/>
4407
4610
  </xsl:template><xsl:template name="addBookmarks">
4408
4611
  <xsl:param name="contents"/>
@@ -4492,8 +4695,6 @@
4492
4695
 
4493
4696
 
4494
4697
 
4495
-
4496
-
4497
4698
  </fo:bookmark-tree>
4498
4699
  </xsl:if>
4499
4700
  </xsl:template><xsl:template name="insertFigureBookmarks">
@@ -4564,7 +4765,7 @@
4564
4765
  <xsl:apply-templates mode="bookmark"/>
4565
4766
  </xsl:otherwise>
4566
4767
  </xsl:choose>
4567
- </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">
4768
+ </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']">
4568
4769
  <xsl:if test="normalize-space() != ''">
4569
4770
  <fo:block xsl:use-attribute-sets="figure-name-style">
4570
4771
 
@@ -4573,16 +4774,13 @@
4573
4774
  </fo:block>
4574
4775
  </xsl:if>
4575
4776
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']"/><xsl:template match="*[local-name() = 'title']" mode="contents_item">
4576
- <xsl:apply-templates mode="contents_item"/>
4777
+ <xsl:param name="mode">bookmarks</xsl:param>
4778
+ <xsl:apply-templates mode="contents_item">
4779
+ <xsl:with-param name="mode" select="$mode"/>
4780
+ </xsl:apply-templates>
4577
4781
  <!-- <xsl:text> </xsl:text> -->
4578
4782
  </xsl:template><xsl:template name="getSection">
4579
4783
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4580
- <!--
4581
- <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
4582
- <xsl:value-of select="."/>
4583
- </xsl:for-each>
4584
- -->
4585
-
4586
4784
  </xsl:template><xsl:template name="getName">
4587
4785
  <xsl:choose>
4588
4786
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -4646,9 +4844,26 @@
4646
4844
  <xsl:copy-of select="."/>
4647
4845
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
4648
4846
  <xsl:text> </xsl:text>
4847
+ </xsl:template><xsl:template match="*[local-name() = 'name']" mode="contents_item">
4848
+ <xsl:param name="mode">bookmarks</xsl:param>
4849
+ <xsl:apply-templates mode="contents_item">
4850
+ <xsl:with-param name="mode" select="$mode"/>
4851
+ </xsl:apply-templates>
4852
+ </xsl:template><xsl:template match="*[local-name() = 'add']" mode="contents_item">
4853
+ <xsl:param name="mode">bookmarks</xsl:param>
4854
+ <xsl:choose>
4855
+ <xsl:when test="starts-with(text(), $ace_tag)">
4856
+ <xsl:if test="$mode = 'contents'">
4857
+ <xsl:copy>
4858
+ <xsl:apply-templates mode="contents_item"/>
4859
+ </xsl:copy>
4860
+ </xsl:if>
4861
+ </xsl:when>
4862
+ <xsl:otherwise><xsl:apply-templates mode="contents_item"/></xsl:otherwise>
4863
+ </xsl:choose>
4649
4864
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
4650
4865
 
4651
- <fo:block-container margin-left="0mm">
4866
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
4652
4867
  <xsl:copy-of select="@id"/>
4653
4868
 
4654
4869
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -4685,6 +4900,7 @@
4685
4900
 
4686
4901
  10
4687
4902
  </xsl:variable>
4903
+
4688
4904
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
4689
4905
  <xsl:if test="$font-size != ''">
4690
4906
  <xsl:attribute name="font-size">
@@ -4701,11 +4917,11 @@
4701
4917
 
4702
4918
 
4703
4919
 
4704
- <xsl:apply-templates/>
4920
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4705
4921
  </fo:block>
4706
4922
 
4707
4923
 
4708
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4924
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
4709
4925
 
4710
4926
 
4711
4927
 
@@ -4719,7 +4935,7 @@
4719
4935
  <xsl:call-template name="add-zero-spaces-java">
4720
4936
  <xsl:with-param name="text" select="$text"/>
4721
4937
  </xsl:call-template>
4722
- </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
4938
+ </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']">
4723
4939
  <xsl:if test="normalize-space() != ''">
4724
4940
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
4725
4941
  <xsl:apply-templates/>
@@ -4727,10 +4943,10 @@
4727
4943
  </xsl:if>
4728
4944
  </xsl:template><xsl:template match="*[local-name() = 'permission']">
4729
4945
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
4730
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4731
- <xsl:apply-templates/>
4946
+ <xsl:apply-templates select="*[local-name()='name']"/>
4947
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4732
4948
  </fo:block>
4733
- </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
4949
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
4734
4950
  <xsl:if test="normalize-space() != ''">
4735
4951
  <fo:block xsl:use-attribute-sets="permission-name-style">
4736
4952
  <xsl:apply-templates/>
@@ -4743,13 +4959,13 @@
4743
4959
  </fo:block>
4744
4960
  </xsl:template><xsl:template match="*[local-name() = 'requirement']">
4745
4961
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
4746
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4747
- <xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
4748
- <xsl:apply-templates select="@obligation" mode="presentation"/>
4749
- <xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
4750
- <xsl:apply-templates/>
4962
+ <xsl:apply-templates select="*[local-name()='name']"/>
4963
+ <xsl:apply-templates select="*[local-name()='label']"/>
4964
+ <xsl:apply-templates select="@obligation"/>
4965
+ <xsl:apply-templates select="*[local-name()='subject']"/>
4966
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'label') and not(local-name() = 'subject')]"/>
4751
4967
  </fo:block>
4752
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
4968
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
4753
4969
  <xsl:if test="normalize-space() != ''">
4754
4970
  <fo:block xsl:use-attribute-sets="requirement-name-style">
4755
4971
 
@@ -4757,20 +4973,24 @@
4757
4973
 
4758
4974
  </fo:block>
4759
4975
  </xsl:if>
4760
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
4976
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']">
4761
4977
  <fo:block xsl:use-attribute-sets="requirement-label-style">
4762
4978
  <xsl:apply-templates/>
4763
4979
  </fo:block>
4764
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
4980
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation">
4765
4981
  <fo:block>
4766
4982
  <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
4767
4983
  </fo:block>
4984
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2">
4985
+ <fo:block xsl:use-attribute-sets="subject-style">
4986
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
4987
+ </fo:block>
4768
4988
  </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
4769
4989
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
4770
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4771
- <xsl:apply-templates/>
4990
+ <xsl:apply-templates select="*[local-name()='name']"/>
4991
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4772
4992
  </fo:block>
4773
- </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
4993
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
4774
4994
  <xsl:if test="normalize-space() != ''">
4775
4995
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
4776
4996
  <xsl:apply-templates/>
@@ -4781,10 +5001,6 @@
4781
5001
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
4782
5002
  <xsl:apply-templates/>
4783
5003
  </fo:block>
4784
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
4785
- <fo:block xsl:use-attribute-sets="subject-style">
4786
- <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
4787
- </fo:block>
4788
5004
  </xsl:template><xsl:template match="*[local-name() = 'subject']">
4789
5005
  <fo:block xsl:use-attribute-sets="subject-style">
4790
5006
  <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
@@ -4828,8 +5044,6 @@
4828
5044
  </xsl:variable>
4829
5045
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
4830
5046
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
4831
- <!-- <fo:table-column column-width="35mm"/>
4832
- <fo:table-column column-width="115mm"/> -->
4833
5047
  <fo:table-column column-width="30%"/>
4834
5048
  <fo:table-column column-width="70%"/>
4835
5049
  </xsl:if>
@@ -4839,7 +5053,7 @@
4839
5053
  <xsl:if test=".//*[local-name() = 'fn']">
4840
5054
  <xsl:for-each select="*[local-name() = 'tbody']">
4841
5055
  <fo:block font-size="90%" border-bottom="1pt solid black">
4842
- <xsl:call-template name="fn_display"/>
5056
+ <xsl:call-template name="table_fn_display"/>
4843
5057
  </fo:block>
4844
5058
  </xsl:for-each>
4845
5059
  </xsl:if>
@@ -4856,7 +5070,6 @@
4856
5070
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
4857
5071
  <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
4858
5072
  <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
4859
- <!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
4860
5073
  <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
4861
5074
  </xsl:if>
4862
5075
  <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
@@ -4869,34 +5082,11 @@
4869
5082
  </fo:table-row>
4870
5083
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
4871
5084
  <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
4872
- <xsl:attribute name="text-align">
4873
- <xsl:choose>
4874
- <xsl:when test="@align">
4875
- <xsl:value-of select="@align"/>
4876
- </xsl:when>
4877
- <xsl:otherwise>left</xsl:otherwise>
4878
- </xsl:choose>
4879
- </xsl:attribute>
4880
- <xsl:if test="@colspan">
4881
- <xsl:attribute name="number-columns-spanned">
4882
- <xsl:value-of select="@colspan"/>
4883
- </xsl:attribute>
4884
- </xsl:if>
4885
- <xsl:if test="@rowspan">
4886
- <xsl:attribute name="number-rows-spanned">
4887
- <xsl:value-of select="@rowspan"/>
4888
- </xsl:attribute>
4889
- </xsl:if>
4890
- <xsl:call-template name="display-align"/>
5085
+ <xsl:call-template name="setTextAlignment">
5086
+ <xsl:with-param name="default">left</xsl:with-param>
5087
+ </xsl:call-template>
4891
5088
 
4892
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
4893
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
4894
- <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
4895
- </xsl:if>
4896
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
4897
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
4898
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
4899
- </xsl:if> -->
5089
+ <xsl:call-template name="setTableCellAttributes"/>
4900
5090
 
4901
5091
  <fo:block>
4902
5092
  <xsl:apply-templates/>
@@ -4908,37 +5098,15 @@
4908
5098
  <xsl:attribute name="padding">0mm</xsl:attribute>
4909
5099
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
4910
5100
  </xsl:if>
4911
- <xsl:attribute name="text-align">
4912
- <xsl:choose>
4913
- <xsl:when test="@align">
4914
- <xsl:value-of select="@align"/>
4915
- </xsl:when>
4916
- <xsl:otherwise>left</xsl:otherwise>
4917
- </xsl:choose>
4918
- </xsl:attribute>
5101
+ <xsl:call-template name="setTextAlignment">
5102
+ <xsl:with-param name="default">left</xsl:with-param>
5103
+ </xsl:call-template>
5104
+
4919
5105
  <xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
4920
5106
  <xsl:attribute name="font-weight">bold</xsl:attribute>
4921
5107
  </xsl:if>
4922
- <xsl:if test="@colspan">
4923
- <xsl:attribute name="number-columns-spanned">
4924
- <xsl:value-of select="@colspan"/>
4925
- </xsl:attribute>
4926
- </xsl:if>
4927
- <xsl:if test="@rowspan">
4928
- <xsl:attribute name="number-rows-spanned">
4929
- <xsl:value-of select="@rowspan"/>
4930
- </xsl:attribute>
4931
- </xsl:if>
4932
- <xsl:call-template name="display-align"/>
4933
5108
 
4934
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
4935
- <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
4936
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
4937
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
4938
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
4939
- </xsl:if>
4940
- </xsl:if> -->
4941
- <!-- 2nd line and below -->
5109
+ <xsl:call-template name="setTableCellAttributes"/>
4942
5110
 
4943
5111
  <fo:block>
4944
5112
  <xsl:apply-templates/>
@@ -4950,15 +5118,15 @@
4950
5118
  <xsl:apply-templates/>
4951
5119
  </fo:block>
4952
5120
  </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
4953
- <fo:block> <!-- margin-bottom="10pt" -->
5121
+ <fo:block>
4954
5122
  <xsl:apply-templates/>
4955
5123
  </fo:block>
4956
5124
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
4957
5125
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
4958
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4959
- <xsl:apply-templates/>
5126
+ <xsl:apply-templates select="*[local-name()='name']"/>
5127
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4960
5128
  </fo:block>
4961
- </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
5129
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
4962
5130
  <xsl:if test="normalize-space() != ''">
4963
5131
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
4964
5132
  <xsl:apply-templates/>
@@ -4982,42 +5150,46 @@
4982
5150
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
4983
5151
 
4984
5152
 
4985
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4986
-
4987
- <xsl:variable name="element">
4988
- block
4989
-
4990
- <xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
5153
+ <xsl:variable name="fo_element">
5154
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
5155
+ block
4991
5156
  </xsl:variable>
4992
5157
 
5158
+ <!-- display 'EXAMPLE' -->
5159
+ <xsl:apply-templates select="*[local-name()='name']">
5160
+ <xsl:with-param name="fo_element" select="$fo_element"/>
5161
+ </xsl:apply-templates>
5162
+
4993
5163
  <xsl:choose>
4994
- <xsl:when test="contains(normalize-space($element), 'block')">
4995
- <fo:block xsl:use-attribute-sets="example-body-style">
4996
- <xsl:apply-templates/>
4997
- </fo:block>
5164
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
5165
+ <fo:block-container xsl:use-attribute-sets="example-body-style">
5166
+ <fo:block-container margin-left="0mm" margin-right="0mm">
5167
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
5168
+ <xsl:with-param name="fo_element" select="$fo_element"/>
5169
+ </xsl:apply-templates>
5170
+ </fo:block-container>
5171
+ </fo:block-container>
4998
5172
  </xsl:when>
4999
5173
  <xsl:otherwise>
5000
5174
  <fo:inline>
5001
- <xsl:apply-templates/>
5175
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
5176
+ <xsl:with-param name="fo_element" select="$fo_element"/>
5177
+ </xsl:apply-templates>
5002
5178
  </fo:inline>
5003
5179
  </xsl:otherwise>
5004
5180
  </xsl:choose>
5005
5181
 
5006
5182
  </fo:block>
5007
- </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']" mode="presentation">
5008
-
5009
- <xsl:variable name="element">
5010
- block
5011
-
5012
- <xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
5013
- </xsl:variable>
5183
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
5184
+ <xsl:param name="fo_element">block</xsl:param>
5185
+
5014
5186
  <xsl:choose>
5015
5187
  <xsl:when test="ancestor::*[local-name() = 'appendix']">
5016
5188
  <fo:inline>
5017
5189
  <xsl:apply-templates/>
5018
5190
  </fo:inline>
5019
5191
  </xsl:when>
5020
- <xsl:when test="contains(normalize-space($element), 'block')">
5192
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
5021
5193
  <fo:block xsl:use-attribute-sets="example-name-style">
5022
5194
  <xsl:apply-templates/>
5023
5195
  </fo:block>
@@ -5030,17 +5202,17 @@
5030
5202
  </xsl:choose>
5031
5203
 
5032
5204
  </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
5205
+ <xsl:param name="fo_element">block</xsl:param>
5206
+
5033
5207
  <xsl:variable name="num"><xsl:number/></xsl:variable>
5034
5208
  <xsl:variable name="element">
5035
- block
5036
-
5037
5209
 
5210
+ <xsl:value-of select="$fo_element"/>
5038
5211
  </xsl:variable>
5039
5212
  <xsl:choose>
5040
- <xsl:when test="normalize-space($element) = 'block'">
5213
+ <xsl:when test="starts-with(normalize-space($element), 'block')">
5041
5214
  <fo:block xsl:use-attribute-sets="example-p-style">
5042
5215
 
5043
- <xsl:variable name="num"><xsl:number/></xsl:variable>
5044
5216
  <xsl:if test="$num = 1">
5045
5217
  <xsl:attribute name="margin-left">5mm</xsl:attribute>
5046
5218
  </xsl:if>
@@ -5057,49 +5229,70 @@
5057
5229
  </xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
5058
5230
  <fo:block xsl:use-attribute-sets="termsource-style">
5059
5231
 
5232
+
5233
+
5060
5234
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
5061
5235
  <xsl:variable name="termsource_text">
5062
5236
  <xsl:apply-templates/>
5063
5237
  </xsl:variable>
5064
-
5065
- <xsl:choose>
5238
+ <xsl:copy-of select="$termsource_text"/>
5239
+ <!-- <xsl:choose>
5066
5240
  <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
5067
- <!-- <xsl:apply-templates /> -->
5068
5241
  <xsl:copy-of select="$termsource_text"/>
5069
5242
  </xsl:when>
5070
5243
  <xsl:otherwise>
5071
-
5072
-
5244
+ <xsl:if test="$namespace = 'bsi'">
5245
+ <xsl:choose>
5246
+ <xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>{</xsl:text></xsl:when>
5247
+ <xsl:otherwise><xsl:text>[</xsl:text></xsl:otherwise>
5248
+ </xsl:choose>
5249
+ </xsl:if>
5250
+ <xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
5073
5251
  <xsl:text>[</xsl:text>
5074
-
5075
- <!-- <xsl:apply-templates /> -->
5252
+ </xsl:if>
5076
5253
  <xsl:copy-of select="$termsource_text"/>
5077
-
5078
-
5254
+ <xsl:if test="$namespace = 'bsi'">
5255
+ <xsl:choose>
5256
+ <xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>}</xsl:text></xsl:when>
5257
+ <xsl:otherwise><xsl:text>]</xsl:text></xsl:otherwise>
5258
+ </xsl:choose>
5259
+ </xsl:if>
5260
+ <xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
5079
5261
  <xsl:text>]</xsl:text>
5080
-
5262
+ </xsl:if>
5081
5263
  </xsl:otherwise>
5082
- </xsl:choose>
5264
+ </xsl:choose> -->
5083
5265
  </fo:block>
5084
5266
  </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
5085
5267
  <xsl:if test="normalize-space() != ''">
5086
5268
  <xsl:value-of select="."/>
5087
5269
  </xsl:if>
5088
- </xsl:template><xsl:variable name="localized.source">
5089
- <xsl:call-template name="getLocalizedString">
5090
- <xsl:with-param name="key">source</xsl:with-param>
5091
- </xsl:call-template>
5092
- </xsl:variable><xsl:template match="*[local-name() = 'origin']">
5270
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
5271
+ <fo:inline xsl:use-attribute-sets="termsource-text-style">
5272
+ <xsl:value-of select="."/>
5273
+ </fo:inline>
5274
+ </xsl:template><xsl:template match="*[local-name() = 'origin']">
5093
5275
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
5094
5276
  <xsl:if test="normalize-space(@citeas) = ''">
5095
5277
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
5096
5278
  </xsl:if>
5097
-
5098
5279
  <fo:inline xsl:use-attribute-sets="origin-style">
5099
5280
  <xsl:apply-templates/>
5100
5281
  </fo:inline>
5101
-
5102
- </fo:basic-link>
5282
+ </fo:basic-link>
5283
+ </xsl:template><xsl:template match="*[local-name() = 'modification']">
5284
+ <xsl:variable name="title-modified">
5285
+ <xsl:call-template name="getLocalizedString">
5286
+ <xsl:with-param name="key">modified</xsl:with-param>
5287
+ </xsl:call-template>
5288
+ </xsl:variable>
5289
+
5290
+ <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
5291
+ <xsl:choose>
5292
+ <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
5293
+ <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
5294
+ </xsl:choose>
5295
+ <xsl:apply-templates/>
5103
5296
  </xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
5104
5297
  <fo:inline><xsl:apply-templates/></fo:inline>
5105
5298
  </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
@@ -5118,7 +5311,6 @@
5118
5311
  <fo:block-container margin-left="0mm">
5119
5312
 
5120
5313
  <fo:block xsl:use-attribute-sets="quote-style">
5121
- <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
5122
5314
 
5123
5315
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
5124
5316
  </fo:block>
@@ -5161,15 +5353,13 @@
5161
5353
  </xsl:variable>
5162
5354
 
5163
5355
  <xsl:choose>
5164
- <xsl:when test="normalize-space($bibitemid) != ''">
5356
+ <xsl:when test="normalize-space($bibitemid) != ''"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link -->
5165
5357
  <fo:inline xsl:use-attribute-sets="eref-style">
5166
5358
  <xsl:if test="@type = 'footnote'">
5167
-
5168
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
5169
- <xsl:attribute name="font-size">80%</xsl:attribute>
5170
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5171
- <xsl:attribute name="vertical-align">super</xsl:attribute>
5172
-
5359
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
5360
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5361
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
5362
+ <xsl:attribute name="font-size">80%</xsl:attribute>
5173
5363
 
5174
5364
  </xsl:if>
5175
5365
 
@@ -5186,7 +5376,6 @@
5186
5376
 
5187
5377
 
5188
5378
 
5189
-
5190
5379
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
5191
5380
 
5192
5381
  </xsl:if>
@@ -5246,8 +5435,6 @@
5246
5435
  </xsl:choose>
5247
5436
  </xsl:variable>
5248
5437
 
5249
- <!-- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/> -->
5250
-
5251
5438
  <xsl:choose>
5252
5439
  <xsl:when test="$lang = 'zh'">
5253
5440
  <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
@@ -5282,12 +5469,9 @@
5282
5469
  </fo:block>
5283
5470
  </xsl:template><xsl:template match="*[local-name() = 'deprecates']">
5284
5471
  <xsl:variable name="title-deprecated">
5285
-
5286
-
5287
- <xsl:call-template name="getTitle">
5288
- <xsl:with-param name="name" select="'title-deprecated'"/>
5289
- </xsl:call-template>
5290
-
5472
+ <xsl:call-template name="getLocalizedString">
5473
+ <xsl:with-param name="key">deprecated</xsl:with-param>
5474
+ </xsl:call-template>
5291
5475
  </xsl:variable>
5292
5476
  <fo:block xsl:use-attribute-sets="deprecates-style">
5293
5477
  <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
@@ -5296,6 +5480,8 @@
5296
5480
  <xsl:if test="*[local-name() = 'strong']">
5297
5481
  <xsl:attribute name="font-weight">normal</xsl:attribute>
5298
5482
  </xsl:if>
5483
+ </xsl:template><xsl:template match="*[local-name() = 'preferred']/text()[contains(., ';')] | *[local-name() = 'preferred']/*[local-name() = 'strong']/text()[contains(., ';')]">
5484
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
5299
5485
  </xsl:template><xsl:template match="*[local-name() = 'definition']">
5300
5486
  <fo:block xsl:use-attribute-sets="definition-style">
5301
5487
  <xsl:apply-templates/>
@@ -5304,7 +5490,6 @@
5304
5490
  <xsl:apply-templates/>
5305
5491
  </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
5306
5492
  <fo:inline> <xsl:apply-templates/></fo:inline>
5307
- <!-- <fo:block>&#xA0;</fo:block> -->
5308
5493
  <fo:block/>
5309
5494
  </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
5310
5495
 
@@ -5345,11 +5530,6 @@
5345
5530
  <xsl:apply-templates/>
5346
5531
  </fo:block>
5347
5532
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
5348
- <fo:block id="{@id}">
5349
- <xsl:apply-templates/>
5350
- </fo:block>
5351
- </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
5352
-
5353
5533
  <fo:block id="{@id}">
5354
5534
  <xsl:apply-templates/>
5355
5535
  </fo:block>
@@ -5371,6 +5551,51 @@
5371
5551
  </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
5372
5552
  <!-- 0xA0 to space replacement -->
5373
5553
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
5554
+ </xsl:template><xsl:variable name="ul_labels_">
5555
+
5556
+
5557
+
5558
+
5559
+
5560
+
5561
+
5562
+
5563
+
5564
+
5565
+
5566
+
5567
+
5568
+
5569
+
5570
+
5571
+ <label>•</label>
5572
+
5573
+
5574
+ </xsl:variable><xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/><xsl:template name="setULLabel">
5575
+ <xsl:variable name="list_level_" select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
5576
+ <xsl:variable name="list_level">
5577
+ <xsl:choose>
5578
+ <xsl:when test="$list_level_ &lt;= 3"><xsl:value-of select="$list_level_"/></xsl:when>
5579
+ <xsl:otherwise><xsl:value-of select="$list_level_ mod 3"/></xsl:otherwise>
5580
+ </xsl:choose>
5581
+ </xsl:variable>
5582
+ <xsl:choose>
5583
+ <xsl:when test="$ul_labels/label[not(@level)]"> <!-- one label for all levels -->
5584
+ <xsl:apply-templates select="$ul_labels/label[not(@level)]" mode="ul_labels"/>
5585
+ </xsl:when>
5586
+ <xsl:when test="$list_level mod 3 = 0">
5587
+ <xsl:apply-templates select="$ul_labels/label[@level = 3]" mode="ul_labels"/>
5588
+ </xsl:when>
5589
+ <xsl:when test="$list_level mod 2 = 0">
5590
+ <xsl:apply-templates select="$ul_labels/label[@level = 2]" mode="ul_labels"/>
5591
+ </xsl:when>
5592
+ <xsl:otherwise>
5593
+ <xsl:apply-templates select="$ul_labels/label[@level = 1]" mode="ul_labels"/>
5594
+ </xsl:otherwise>
5595
+ </xsl:choose>
5596
+ </xsl:template><xsl:template match="label" mode="ul_labels">
5597
+ <xsl:copy-of select="@*[not(local-name() = 'level')]"/>
5598
+ <xsl:value-of select="."/>
5374
5599
  </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
5375
5600
  <xsl:choose>
5376
5601
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
@@ -5577,20 +5802,70 @@
5577
5802
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
5578
5803
  <fo:block><xsl:apply-templates/></fo:block>
5579
5804
  </fo:table-cell>
5580
- </xsl:template><xsl:template name="processBibitem">
5805
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/><xsl:template match="*[local-name() = 'references'][@normative='true']" priority="2">
5806
+
5807
+
5808
+
5809
+ <fo:block id="{@id}">
5810
+ <xsl:apply-templates/>
5811
+ </fo:block>
5812
+ </xsl:template><xsl:template match="*[local-name() = 'references']">
5813
+ <xsl:if test="not(ancestor::*[local-name() = 'annex'])">
5814
+
5815
+ </xsl:if>
5816
+
5817
+ <!-- <xsl:if test="ancestor::*[local-name() = 'annex']">
5818
+ <xsl:if test="$namespace = 'csa' or $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iso' or $namespace = 'itu'">
5819
+ <fo:block break-after="page"/>
5820
+ </xsl:if>
5821
+ </xsl:if> -->
5822
+
5823
+ <fo:block id="{@id}" xsl:use-attribute-sets="references-non-normative-style">
5824
+ <xsl:apply-templates/>
5825
+ </fo:block>
5581
5826
 
5582
5827
 
5583
5828
 
5584
-
5585
5829
 
5830
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']">
5831
+ <xsl:call-template name="bibitem"/>
5832
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
5833
+
5834
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
5835
+ <xsl:call-template name="processBibitem"/>
5836
+ </fo:block>
5837
+
5838
+
5839
+ </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
5586
5840
 
5587
-
5588
5841
 
5842
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
5843
+ <xsl:call-template name="processBibitem"/>
5844
+ </fo:block>
5845
+
5589
5846
 
5847
+ </xsl:template><xsl:template name="processBibitem">
5590
5848
 
5591
5849
 
5850
+ <fo:inline padding-right="5mm">[<xsl:value-of select="un:docidentifier"/>]</fo:inline><xsl:value-of select="un:docidentifier"/>
5851
+ <xsl:if test="un:title">
5852
+ <fo:inline font-style="italic">
5853
+ <xsl:text>, </xsl:text>
5854
+ <xsl:choose>
5855
+ <xsl:when test="un:title[@type = 'main' and @language = 'en']">
5856
+ <xsl:apply-templates select="un:title[@type = 'main' and @language = 'en']"/>
5857
+ </xsl:when>
5858
+ <xsl:otherwise>
5859
+ <xsl:apply-templates select="un:title"/>
5860
+ </xsl:otherwise>
5861
+ </xsl:choose>
5862
+ </fo:inline>
5863
+ </xsl:if>
5864
+ <xsl:apply-templates select="un:formattedref"/>
5865
+
5866
+
5592
5867
  </xsl:template><xsl:template name="processBibitemDocId">
5593
- <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')]"/>
5868
+ <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'metanorma-ordinal' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
5594
5869
  <xsl:choose>
5595
5870
  <xsl:when test="normalize-space($_doc_ident) != ''">
5596
5871
  <!-- <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"/>
@@ -5604,7 +5879,7 @@
5604
5879
  <xsl:if test="$type != ''">
5605
5880
  <xsl:value-of select="$type"/><xsl:text> </xsl:text>
5606
5881
  </xsl:if> -->
5607
- <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
5882
+ <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma') and not(@type = 'metanorma-ordinal')]"/>
5608
5883
  </xsl:otherwise>
5609
5884
  </xsl:choose>
5610
5885
  </xsl:template><xsl:template name="processPersonalAuthor">
@@ -5645,6 +5920,50 @@
5645
5920
  <xsl:value-of select="substring(.,1,1)"/>
5646
5921
  </xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
5647
5922
  <fo:inline><xsl:apply-templates/></fo:inline>
5923
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'title']" priority="2">
5924
+ <!-- <fo:inline><xsl:apply-templates /></fo:inline> -->
5925
+ <fo:inline font-style="italic"> <!-- BIPM BSI CSD CSA GB IEC IHO ISO ITU JCGM -->
5926
+ <xsl:apply-templates/>
5927
+ </fo:inline>
5928
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" priority="2">
5929
+ <fo:footnote>
5930
+ <xsl:variable name="number">
5931
+
5932
+ <xsl:number level="any" count="*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
5933
+
5934
+ </xsl:variable>
5935
+ <fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
5936
+ <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
5937
+ <xsl:value-of select="$number"/>
5938
+
5939
+ </fo:basic-link>
5940
+ </fo:inline>
5941
+ <fo:footnote-body>
5942
+ <fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
5943
+ <fo:inline id="{generate-id()}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
5944
+ <xsl:value-of select="$number"/>
5945
+
5946
+ </fo:inline>
5947
+ <xsl:apply-templates/>
5948
+ </fo:block>
5949
+ </fo:footnote-body>
5950
+ </fo:footnote>
5951
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'edition']"> <!-- for iho -->
5952
+ <xsl:text> edition </xsl:text>
5953
+ <xsl:value-of select="."/>
5954
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'uri']"> <!-- for iho -->
5955
+ <xsl:text> (</xsl:text>
5956
+ <fo:inline xsl:use-attribute-sets="link-style">
5957
+ <fo:basic-link external-destination="." fox:alt-text=".">
5958
+ <xsl:value-of select="."/>
5959
+ </fo:basic-link>
5960
+ </fo:inline>
5961
+ <xsl:text>)</xsl:text>
5962
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/><xsl:template match="*[local-name() = 'formattedref']">
5963
+
5964
+ <xsl:text>, </xsl:text>
5965
+
5966
+ <xsl:apply-templates/>
5648
5967
  </xsl:template><xsl:template match="*[local-name() = 'form']">
5649
5968
  <fo:block>
5650
5969
  <xsl:apply-templates/>
@@ -5709,7 +6028,18 @@
5709
6028
  <fo:block-container border="1pt solid black" width="50%">
5710
6029
  <fo:block> </fo:block>
5711
6030
  </fo:block-container>
5712
- </xsl:template><xsl:template match="*[local-name() = 'toc']">
6031
+ </xsl:template><xsl:variable name="toc_level">
6032
+ <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
6033
+ <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
6034
+ <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
6035
+ <xsl:choose>
6036
+ <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
6037
+ <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
6038
+ <xsl:otherwise><!-- default value -->
6039
+ 3
6040
+ </xsl:otherwise>
6041
+ </xsl:choose>
6042
+ </xsl:variable><xsl:template match="*[local-name() = 'toc']">
5713
6043
  <xsl:param name="colwidths"/>
5714
6044
  <xsl:variable name="colwidths_">
5715
6045
  <xsl:choose>
@@ -5789,7 +6119,7 @@
5789
6119
  </td>
5790
6120
  </xsl:for-each>
5791
6121
  <td>333</td> <!-- page number, just for fill -->
5792
- </xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
6122
+ </xsl:template><xsl:template match="*[local-name() = 'variant-title']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
5793
6123
  <fo:inline padding-right="5mm"> </fo:inline>
5794
6124
  <fo:inline><xsl:apply-templates/></fo:inline>
5795
6125
  </xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
@@ -5800,6 +6130,69 @@
5800
6130
  </svg>
5801
6131
  </fo:instream-foreign-object>
5802
6132
  </fo:inline>
6133
+ </xsl:template><xsl:template match="@language">
6134
+ <xsl:copy-of select="."/>
6135
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="4">
6136
+ <xsl:call-template name="title"/>
6137
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']">
6138
+
6139
+
6140
+
6141
+ <!-- display name before box -->
6142
+ <fo:block xsl:use-attribute-sets="admonition-name-style">
6143
+ <xsl:call-template name="displayAdmonitionName"/>
6144
+ </fo:block>
6145
+
6146
+
6147
+ <!-- text in the box -->
6148
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
6149
+
6150
+
6151
+
6152
+
6153
+
6154
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style">
6155
+
6156
+
6157
+ <fo:block-container margin-left="0mm" margin-right="0mm">
6158
+ <fo:block>
6159
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
6160
+ </fo:block>
6161
+ </fo:block-container>
6162
+
6163
+ </fo:block-container>
6164
+
6165
+ </fo:block-container>
6166
+
6167
+ </xsl:template><xsl:template name="displayAdmonitionName">
6168
+
6169
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
6170
+ <xsl:if test="not(*[local-name() = 'name'])">
6171
+ <xsl:apply-templates select="@type"/>
6172
+ </xsl:if>
6173
+
6174
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
6175
+ <xsl:apply-templates/>
6176
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/@type">
6177
+ <xsl:variable name="admonition_type_">
6178
+ <xsl:call-template name="getLocalizedString">
6179
+ <xsl:with-param name="key">admonition.<xsl:value-of select="."/></xsl:with-param>
6180
+ </xsl:call-template>
6181
+ </xsl:variable>
6182
+ <xsl:variable name="admonition_type" select="normalize-space(java:toUpperCase(java:java.lang.String.new($admonition_type_)))"/>
6183
+ <xsl:value-of select="$admonition_type"/>
6184
+ <xsl:if test="$admonition_type = ''">
6185
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
6186
+ </xsl:if>
6187
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
6188
+
6189
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
6190
+
6191
+
6192
+
6193
+ <xsl:apply-templates/>
6194
+ </fo:block>
6195
+
5803
6196
  </xsl:template><xsl:template name="convertDate">
5804
6197
  <xsl:param name="date"/>
5805
6198
  <xsl:param name="format" select="'short'"/>
@@ -5808,78 +6201,39 @@
5808
6201
  <xsl:variable name="day" select="substring($date, 9, 2)"/>
5809
6202
  <xsl:variable name="monthStr">
5810
6203
  <xsl:choose>
5811
- <xsl:when test="$month = '01'">January</xsl:when>
5812
- <xsl:when test="$month = '02'">February</xsl:when>
5813
- <xsl:when test="$month = '03'">March</xsl:when>
5814
- <xsl:when test="$month = '04'">April</xsl:when>
5815
- <xsl:when test="$month = '05'">May</xsl:when>
5816
- <xsl:when test="$month = '06'">June</xsl:when>
5817
- <xsl:when test="$month = '07'">July</xsl:when>
5818
- <xsl:when test="$month = '08'">August</xsl:when>
5819
- <xsl:when test="$month = '09'">September</xsl:when>
5820
- <xsl:when test="$month = '10'">October</xsl:when>
5821
- <xsl:when test="$month = '11'">November</xsl:when>
5822
- <xsl:when test="$month = '12'">December</xsl:when>
5823
- </xsl:choose>
5824
- </xsl:variable>
5825
- <xsl:variable name="result">
5826
- <xsl:choose>
5827
- <xsl:when test="$format = 'ddMMyyyy'">
5828
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5829
- <xsl:text> </xsl:text>
5830
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
5831
- </xsl:when>
5832
- <xsl:when test="$format = 'ddMM'">
5833
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5834
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
5835
- </xsl:when>
5836
- <xsl:when test="$format = 'short' or $day = ''">
5837
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
5838
- </xsl:when>
5839
- <xsl:otherwise>
5840
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
5841
- </xsl:otherwise>
6204
+ <xsl:when test="$month = '01'">january</xsl:when>
6205
+ <xsl:when test="$month = '02'">february</xsl:when>
6206
+ <xsl:when test="$month = '03'">march</xsl:when>
6207
+ <xsl:when test="$month = '04'">april</xsl:when>
6208
+ <xsl:when test="$month = '05'">may</xsl:when>
6209
+ <xsl:when test="$month = '06'">june</xsl:when>
6210
+ <xsl:when test="$month = '07'">july</xsl:when>
6211
+ <xsl:when test="$month = '08'">august</xsl:when>
6212
+ <xsl:when test="$month = '09'">september</xsl:when>
6213
+ <xsl:when test="$month = '10'">october</xsl:when>
6214
+ <xsl:when test="$month = '11'">november</xsl:when>
6215
+ <xsl:when test="$month = '12'">december</xsl:when>
5842
6216
  </xsl:choose>
5843
6217
  </xsl:variable>
5844
- <xsl:value-of select="$result"/>
5845
- </xsl:template><xsl:template name="convertDateLocalized">
5846
- <xsl:param name="date"/>
5847
- <xsl:param name="format" select="'short'"/>
5848
- <xsl:variable name="year" select="substring($date, 1, 4)"/>
5849
- <xsl:variable name="month" select="substring($date, 6, 2)"/>
5850
- <xsl:variable name="day" select="substring($date, 9, 2)"/>
5851
- <xsl:variable name="monthStr">
5852
- <xsl:choose>
5853
- <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>
5854
- <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>
5855
- <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>
5856
- <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>
5857
- <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>
5858
- <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>
5859
- <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>
5860
- <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>
5861
- <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>
5862
- <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>
5863
- <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>
5864
- <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>
5865
- </xsl:choose>
6218
+ <xsl:variable name="monthStr_localized">
6219
+ <xsl:if test="normalize-space($monthStr) != ''"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_<xsl:value-of select="$monthStr"/></xsl:with-param></xsl:call-template></xsl:if>
5866
6220
  </xsl:variable>
5867
6221
  <xsl:variable name="result">
5868
6222
  <xsl:choose>
5869
6223
  <xsl:when test="$format = 'ddMMyyyy'">
5870
6224
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5871
6225
  <xsl:text> </xsl:text>
5872
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
6226
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ' , $year))"/>
5873
6227
  </xsl:when>
5874
6228
  <xsl:when test="$format = 'ddMM'">
5875
6229
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5876
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
6230
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr_localized"/>
5877
6231
  </xsl:when>
5878
6232
  <xsl:when test="$format = 'short' or $day = ''">
5879
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
6233
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $year))"/>
5880
6234
  </xsl:when>
5881
6235
  <xsl:otherwise>
5882
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
6236
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/>
5883
6237
  </xsl:otherwise>
5884
6238
  </xsl:choose>
5885
6239
  </xsl:variable>
@@ -5932,13 +6286,8 @@
5932
6286
  <xsl:variable name="title">
5933
6287
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
5934
6288
 
5935
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
5936
-
5937
-
5938
-
5939
-
5940
-
5941
-
6289
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
6290
+
5942
6291
  </xsl:for-each>
5943
6292
  </xsl:variable>
5944
6293
  <xsl:choose>
@@ -5953,21 +6302,18 @@
5953
6302
  <dc:creator>
5954
6303
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
5955
6304
 
5956
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
5957
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
5958
- <xsl:if test="position() != last()">; </xsl:if>
5959
- </xsl:for-each>
5960
-
5961
-
5962
-
6305
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
6306
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
6307
+ <xsl:if test="position() != last()">; </xsl:if>
6308
+ </xsl:for-each>
6309
+
5963
6310
  </xsl:for-each>
5964
6311
  </dc:creator>
5965
6312
  <dc:description>
5966
6313
  <xsl:variable name="abstract">
5967
6314
 
5968
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
5969
-
5970
-
6315
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
6316
+
5971
6317
  </xsl:variable>
5972
6318
  <xsl:value-of select="normalize-space($abstract)"/>
5973
6319
  </dc:description>
@@ -5987,7 +6333,6 @@
5987
6333
  <xsl:value-of select="../@id"/>
5988
6334
  </xsl:when>
5989
6335
  <xsl:otherwise>
5990
- <!-- <xsl:value-of select="concat(local-name(..), '_', text())"/> -->
5991
6336
  <xsl:value-of select="concat(generate-id(..), '_', text())"/>
5992
6337
  </xsl:otherwise>
5993
6338
  </xsl:choose>
@@ -6013,9 +6358,6 @@
6013
6358
  <xsl:when test="ancestor::*[local-name() = 'preface']">
6014
6359
  <xsl:value-of select="$level_total - 2"/>
6015
6360
  </xsl:when>
6016
- <!-- <xsl:when test="parent::*[local-name() = 'sections']">
6017
- <xsl:value-of select="$level_total - 1"/>
6018
- </xsl:when> -->
6019
6361
  <xsl:when test="ancestor::*[local-name() = 'sections']">
6020
6362
  <xsl:value-of select="$level_total - 1"/>
6021
6363
  </xsl:when>
@@ -6157,9 +6499,15 @@
6157
6499
  </xsl:template><xsl:template name="getLocalizedString">
6158
6500
  <xsl:param name="key"/>
6159
6501
  <xsl:param name="formatted">false</xsl:param>
6502
+ <xsl:param name="lang"/>
6160
6503
 
6161
6504
  <xsl:variable name="curr_lang">
6162
- <xsl:call-template name="getLang"/>
6505
+ <xsl:choose>
6506
+ <xsl:when test="$lang != ''"><xsl:value-of select="$lang"/></xsl:when>
6507
+ <xsl:otherwise>
6508
+ <xsl:call-template name="getLang"/>
6509
+ </xsl:otherwise>
6510
+ </xsl:choose>
6163
6511
  </xsl:variable>
6164
6512
 
6165
6513
  <xsl:variable name="data_value">
@@ -6199,7 +6547,6 @@
6199
6547
  <xsl:value-of select="$key_"/>
6200
6548
  </xsl:otherwise>
6201
6549
  </xsl:choose>
6202
-
6203
6550
  </xsl:template><xsl:template name="setTrackChangesStyles">
6204
6551
  <xsl:param name="isAdded"/>
6205
6552
  <xsl:param name="isDeleted"/>
@@ -6222,7 +6569,6 @@
6222
6569
  <xsl:if test="local-name() = 'table'">
6223
6570
  <xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
6224
6571
  </xsl:if>
6225
- <!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
6226
6572
  <xsl:attribute name="padding">2mm</xsl:attribute>
6227
6573
  </xsl:if>
6228
6574
  </xsl:otherwise>
@@ -6242,15 +6588,18 @@
6242
6588
  </xsl:choose>
6243
6589
  </xsl:template><xsl:template name="setTextAlignment">
6244
6590
  <xsl:param name="default">left</xsl:param>
6591
+ <xsl:variable name="align" select="normalize-space(@align)"/>
6245
6592
  <xsl:attribute name="text-align">
6246
6593
  <xsl:choose>
6247
- <xsl:when test="@align and not(@align = 'indent')"><xsl:value-of select="@align"/></xsl:when>
6594
+ <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
6595
+ <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
6596
+ <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
6248
6597
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
6249
6598
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
6250
6599
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
6251
6600
  </xsl:choose>
6252
6601
  </xsl:attribute>
6253
- <xsl:if test="@align = 'indent'">
6602
+ <xsl:if test="$align = 'indent'">
6254
6603
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
6255
6604
  </xsl:if>
6256
6605
  </xsl:template><xsl:template name="number-to-words">
@@ -6349,4 +6698,14 @@
6349
6698
  </xsl:otherwise>
6350
6699
  </xsl:choose>
6351
6700
  </xsl:if>
6701
+ </xsl:template><xsl:template name="setAltText">
6702
+ <xsl:param name="value"/>
6703
+ <xsl:attribute name="fox:alt-text">
6704
+ <xsl:choose>
6705
+ <xsl:when test="normalize-space($value) != ''">
6706
+ <xsl:value-of select="$value"/>
6707
+ </xsl:when>
6708
+ <xsl:otherwise>_</xsl:otherwise>
6709
+ </xsl:choose>
6710
+ </xsl:attribute>
6352
6711
  </xsl:template></xsl:stylesheet>