metanorma-ieee 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d42117ebe0d96ef2b4b95c6be7a53e117cac1f94dc9824b827d8e304a4b5856
4
- data.tar.gz: e4d5bf0dfa00ed20d6a0c93c22acff54481b4571ee805de9e03b2101dbfdbea5
3
+ metadata.gz: d8d83608460dd4f0a8b91f963553c4f9a319fe1264259f4cd51c4eaa783b2d95
4
+ data.tar.gz: 7016563f5ae5736a84f1a4266d3c893ed15682e079eed0df3768b81dce174f18
5
5
  SHA512:
6
- metadata.gz: 4e061d1fb9f157edd9ba4b333300710a666764b0f140609dcb7782c0227336a3669bb15e446393c1d4647fa3dbb1111bad040e6bc962abea6c1792af8c15f687
7
- data.tar.gz: a4c5b133214d7cf12a0cb5035596a5c2ab56e9267ef06084204d59f2a4c55a41ce0dd3b65070795625fe503fba4406bbb151e90bccc0c30275f7b709482aebe2
6
+ metadata.gz: 7a83703e3591664c3bba95732da262a9e8242fe834c223757ee52c21532c7c66e47af14d5b0d2824e22c590e134f43afbd59643749f459c3e725d78d5d30f098
7
+ data.tar.gz: 2469ed39262d09ccaef4cbe0cd156453a10822156f00dc30e8717b54379b84a13e442390cf84b4f1fcd8de6616656deca4616bdd2ceca6d3c1f71cbcecabf461
@@ -461,6 +461,12 @@ p.Terms {
461
461
  padding-left: 30px; }
462
462
  #toc .h3, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h3 {
463
463
  padding-left: 50px; }
464
+ #toc .h4, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h4 {
465
+ padding-left: 70px; }
466
+ #toc .h5, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h5 {
467
+ padding-left: 90px; }
468
+ #toc .h6, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h6 {
469
+ padding-left: 110px; }
464
470
  #toc .toc-active, #toc li:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
465
471
  background: #1d1d1d;
466
472
  box-shadow: inset -5px 0px 10px -5px #1d1d1d !important; }
@@ -477,6 +477,7 @@ p.MsoToc1, li.MsoToc1, div.MsoToc1 {
477
477
  mso-style-unhide: no;
478
478
  mso-style-parent: "IEEEStds Paragraph";
479
479
  mso-style-next: "IEEEStds Paragraph";
480
+ mso-style-name: "TOC 1";
480
481
  margin-top: 12.0pt;
481
482
  margin-right: 0cm;
482
483
  margin-bottom: 0cm;
@@ -494,7 +495,8 @@ p.MsoToc2, li.MsoToc2, div.MsoToc2 {
494
495
  mso-style-update: auto;
495
496
  mso-style-priority: 39;
496
497
  mso-style-unhide: no;
497
- mso-style-parent: "ΠΠ 1";
498
+ mso-style-name: "TOC 2";
499
+ mso-style-parent: "TOC 1";
498
500
  mso-style-next: "IEEEStds Paragraph";
499
501
  margin-top: 0cm;
500
502
  margin-right: 0cm;
@@ -514,6 +516,8 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3 {
514
516
  mso-style-noshow: yes;
515
517
  mso-style-unhide: no;
516
518
  mso-style-next: Normal;
519
+ mso-style-name: "TOC 3";
520
+ mso-style-parent: "TOC 2";
517
521
  margin-top: 0cm;
518
522
  margin-right: 0cm;
519
523
  margin-bottom: 0cm;
@@ -532,6 +536,8 @@ p.MsoToc4, li.MsoToc4, div.MsoToc4 {
532
536
  mso-style-noshow: yes;
533
537
  mso-style-unhide: no;
534
538
  mso-style-next: Normal;
539
+ mso-style-name: "TOC 4";
540
+ mso-style-parent: "TOC 3";
535
541
  margin-top: 0cm;
536
542
  margin-right: 0cm;
537
543
  margin-bottom: 0cm;
@@ -549,6 +555,8 @@ p.MsoToc5, li.MsoToc5, div.MsoToc5 {
549
555
  mso-style-noshow: yes;
550
556
  mso-style-unhide: no;
551
557
  mso-style-next: Normal;
558
+ mso-style-name: "TOC 5";
559
+ mso-style-parent: "TOC 4";
552
560
  margin-top: 0cm;
553
561
  margin-right: 0cm;
554
562
  margin-bottom: 0cm;
@@ -566,6 +574,8 @@ p.MsoToc6, li.MsoToc6, div.MsoToc6 {
566
574
  mso-style-noshow: yes;
567
575
  mso-style-unhide: no;
568
576
  mso-style-next: Normal;
577
+ mso-style-name: "TOC 6";
578
+ mso-style-parent: "TOC 5";
569
579
  margin-top: 0cm;
570
580
  margin-right: 0cm;
571
581
  margin-bottom: 0cm;
@@ -583,6 +593,8 @@ p.MsoToc7, li.MsoToc7, div.MsoToc7 {
583
593
  mso-style-noshow: yes;
584
594
  mso-style-unhide: no;
585
595
  mso-style-next: Normal;
596
+ mso-style-name: "TOC 7";
597
+ mso-style-parent: "TOC 6";
586
598
  margin-top: 0cm;
587
599
  margin-right: 0cm;
588
600
  margin-bottom: 0cm;
@@ -600,6 +612,8 @@ p.MsoToc8, li.MsoToc8, div.MsoToc8 {
600
612
  mso-style-noshow: yes;
601
613
  mso-style-unhide: no;
602
614
  mso-style-next: Normal;
615
+ mso-style-name: "TOC 8";
616
+ mso-style-parent: "TOC 7";
603
617
  margin-top: 0cm;
604
618
  margin-right: 0cm;
605
619
  margin-bottom: 0cm;
@@ -617,6 +631,8 @@ p.MsoToc9, li.MsoToc9, div.MsoToc9 {
617
631
  mso-style-noshow: yes;
618
632
  mso-style-unhide: no;
619
633
  mso-style-next: Normal;
634
+ mso-style-name: "TOC 9";
635
+ mso-style-parent: "TOC 8";
620
636
  margin-top: 0cm;
621
637
  margin-right: 0cm;
622
638
  margin-bottom: 0cm;
@@ -454,6 +454,7 @@ p.MsoToc1, li.MsoToc1, div.MsoToc1
454
454
  mso-style-unhide:no;
455
455
  mso-style-parent:"IEEEStds Paragraph";
456
456
  mso-style-next:"IEEEStds Paragraph";
457
+ mso-style-name:"TOC 1";
457
458
  margin-top:12.0pt;
458
459
  margin-right:0cm;
459
460
  margin-bottom:0cm;
@@ -470,7 +471,8 @@ p.MsoToc2, li.MsoToc2, div.MsoToc2
470
471
  {mso-style-update:auto;
471
472
  mso-style-priority:39;
472
473
  mso-style-unhide:no;
473
- mso-style-parent:"ΠΠ 1";
474
+ mso-style-name:"TOC 2";
475
+ mso-style-parent:"TOC 1";
474
476
  mso-style-next:"IEEEStds Paragraph";
475
477
  margin-top:0cm;
476
478
  margin-right:0cm;
@@ -489,6 +491,8 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3
489
491
  mso-style-noshow:yes;
490
492
  mso-style-unhide:no;
491
493
  mso-style-next:Normal;
494
+ mso-style-name:"TOC 3";
495
+ mso-style-parent:"TOC 2";
492
496
  margin-top:0cm;
493
497
  margin-right:0cm;
494
498
  margin-bottom:0cm;
@@ -506,6 +510,8 @@ p.MsoToc4, li.MsoToc4, div.MsoToc4
506
510
  mso-style-noshow:yes;
507
511
  mso-style-unhide:no;
508
512
  mso-style-next:Normal;
513
+ mso-style-name:"TOC 4";
514
+ mso-style-parent:"TOC 3";
509
515
  margin-top:0cm;
510
516
  margin-right:0cm;
511
517
  margin-bottom:0cm;
@@ -522,6 +528,8 @@ p.MsoToc5, li.MsoToc5, div.MsoToc5
522
528
  mso-style-noshow:yes;
523
529
  mso-style-unhide:no;
524
530
  mso-style-next:Normal;
531
+ mso-style-name:"TOC 5";
532
+ mso-style-parent:"TOC 4";
525
533
  margin-top:0cm;
526
534
  margin-right:0cm;
527
535
  margin-bottom:0cm;
@@ -538,6 +546,8 @@ p.MsoToc6, li.MsoToc6, div.MsoToc6
538
546
  mso-style-noshow:yes;
539
547
  mso-style-unhide:no;
540
548
  mso-style-next:Normal;
549
+ mso-style-name:"TOC 6";
550
+ mso-style-parent:"TOC 5";
541
551
  margin-top:0cm;
542
552
  margin-right:0cm;
543
553
  margin-bottom:0cm;
@@ -554,6 +564,8 @@ p.MsoToc7, li.MsoToc7, div.MsoToc7
554
564
  mso-style-noshow:yes;
555
565
  mso-style-unhide:no;
556
566
  mso-style-next:Normal;
567
+ mso-style-name:"TOC 7";
568
+ mso-style-parent:"TOC 6";
557
569
  margin-top:0cm;
558
570
  margin-right:0cm;
559
571
  margin-bottom:0cm;
@@ -570,6 +582,8 @@ p.MsoToc8, li.MsoToc8, div.MsoToc8
570
582
  mso-style-noshow:yes;
571
583
  mso-style-unhide:no;
572
584
  mso-style-next:Normal;
585
+ mso-style-name:"TOC 8";
586
+ mso-style-parent:"TOC 7";
573
587
  margin-top:0cm;
574
588
  margin-right:0cm;
575
589
  margin-bottom:0cm;
@@ -586,6 +600,8 @@ p.MsoToc9, li.MsoToc9, div.MsoToc9
586
600
  mso-style-noshow:yes;
587
601
  mso-style-unhide:no;
588
602
  mso-style-next:Normal;
603
+ mso-style-name:"TOC 9";
604
+ mso-style-parent:"TOC 8";
589
605
  margin-top:0cm;
590
606
  margin-right:0cm;
591
607
  margin-bottom:0cm;
@@ -3,7 +3,7 @@
3
3
  <xsl:output method="xml" encoding="UTF-8" indent="no"/>
4
4
 
5
5
  <!-- mandatory 'key' -->
6
- <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"/>
6
+ <xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure' or local-name() = 'localized-strings') and not(ancestor::*[local-name() = 'name'])])]" use="@reference"/>
7
7
 
8
8
  <!-- mandatory variable -->
9
9
 
@@ -40,7 +40,7 @@
40
40
  <!-- mandatory variable -->
41
41
  <xsl:variable name="ids">
42
42
  <xsl:for-each select="//*[@id]">
43
- <id><xsl:value-of select="@id"/></id>
43
+ <id name="{local-name()}"><xsl:value-of select="@id"/></id>
44
44
  </xsl:for-each>
45
45
  </xsl:variable>
46
46
 
@@ -548,6 +548,8 @@
548
548
 
549
549
  <fo:block break-after="page"/>
550
550
 
551
+ <!-- Second page -->
552
+
551
553
  <fo:block font-family="Arial" text-align="justify">
552
554
  <fo:block>
553
555
  <fo:inline font-weight="bold">
@@ -566,6 +568,7 @@
566
568
  <xsl:if test="position() != last()">, </xsl:if>
567
569
  </xsl:for-each>
568
570
  </fo:block>
571
+ <xsl:apply-templates select="/ieee:ieee-standard/ieee:preface/ieee:acknowledgements"/>
569
572
  </fo:block>
570
573
 
571
574
  <!-- Example:
@@ -728,6 +731,7 @@
728
731
  <xsl:if test="position() != last()">, </xsl:if>
729
732
  </xsl:for-each>
730
733
  </fo:block>
734
+ <xsl:apply-templates select="/ieee:ieee-standard/ieee:preface/ieee:acknowledgements"/>
731
735
  </fo:block>
732
736
 
733
737
  <!-- Example:
@@ -1597,6 +1601,12 @@
1597
1601
  <fo:inline><xsl:apply-templates/></fo:inline>
1598
1602
  </xsl:template>
1599
1603
 
1604
+ <xsl:template match="ieee:preface/ieee:acknowledgements" priority="3">
1605
+ <fo:block>
1606
+ <xsl:apply-templates/>
1607
+ </fo:block>
1608
+ </xsl:template>
1609
+
1600
1610
  <xsl:template match="text()" priority="2" mode="uppercase">
1601
1611
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
1602
1612
  </xsl:template>
@@ -2301,6 +2311,7 @@
2301
2311
  <xsl:otherwise>
2302
2312
  <xsl:choose>
2303
2313
  <xsl:when test="@type = 'section-title'">12pt</xsl:when>
2314
+ <xsl:when test="ancestor::ieee:acknowledgements">inherit</xsl:when>
2304
2315
  <xsl:when test="$level = 1">12pt</xsl:when>
2305
2316
  <xsl:when test="$level = 2">11pt</xsl:when>
2306
2317
  <xsl:otherwise>10pt</xsl:otherwise> <!-- 3rd, 4th, ... levels -->
@@ -2804,7 +2815,7 @@
2804
2815
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
2805
2816
 
2806
2817
  <!-- no highlight term's names -->
2807
- <xsl:if test="normalize-space() != '' and string-length(normalize-space()) = string-length(translate(normalize-space(), '0123456789', '')) and not(contains(normalize-space(), 'Annex'))">
2818
+ <xsl:if test="normalize-space() != '' and xalan:nodeset($ids)/id[. = current()/@target]/@name = 'term'"> <!-- string-length(normalize-space()) = string-length(translate(normalize-space(), '0123456789', '')) and not(contains(normalize-space(), 'Annex')) -->
2808
2819
  <xsl:attribute name="color">inherit</xsl:attribute>
2809
2820
  <xsl:attribute name="text-decoration">none</xsl:attribute>
2810
2821
  </xsl:if>
@@ -3722,6 +3733,8 @@
3722
3733
  </xsl:choose>
3723
3734
  </xsl:template>
3724
3735
 
3736
+ <xsl:strip-space elements="ieee:xref"/>
3737
+
3725
3738
  <!-- external parameters -->
3726
3739
 
3727
3740
  <xsl:param name="svg_images"/> <!-- svg images array -->
@@ -4257,6 +4270,7 @@
4257
4270
 
4258
4271
  1pt solid black
4259
4272
 
4273
+
4260
4274
  </xsl:variable>
4261
4275
  <xsl:variable name="table-border" select="normalize-space($table-border_)"/>
4262
4276
 
@@ -5125,17 +5139,22 @@
5125
5139
  </xsl:for-each>
5126
5140
  </xsl:template>
5127
5141
 
5142
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
5128
5143
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
5129
5144
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
5130
5145
  <xsl:template match="text()" name="text">
5131
5146
 
5132
- <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
5133
- <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
5134
- <xsl:call-template name="replace_fo_inline_tags">
5135
- <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
5136
- <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
5137
- <xsl:with-param name="text" select="$text"/>
5138
- </xsl:call-template>
5147
+ <xsl:choose>
5148
+ <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
5149
+ <xsl:otherwise>
5150
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
5151
+ <xsl:call-template name="replace_fo_inline_tags">
5152
+ <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
5153
+ <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
5154
+ <xsl:with-param name="text" select="$text"/>
5155
+ </xsl:call-template>
5156
+ </xsl:otherwise>
5157
+ </xsl:choose>
5139
5158
 
5140
5159
  </xsl:template>
5141
5160
 
@@ -6214,7 +6233,7 @@
6214
6233
  <xsl:template match="*[local-name()='tr']">
6215
6234
  <fo:table-row xsl:use-attribute-sets="table-body-row-style">
6216
6235
 
6217
- <xsl:if test="*[local-name() = 'th']">
6236
+ <xsl:if test="count(*) = count(*[local-name() = 'th'])"> <!-- row contains 'th' only -->
6218
6237
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
6219
6238
  </xsl:if>
6220
6239
 
@@ -7193,7 +7212,8 @@
7193
7212
  <xsl:copy-of select="node()"/>
7194
7213
  </td>
7195
7214
  <td>
7196
- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
7215
+ <!-- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/> -->
7216
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]" mode="dl_if"/>
7197
7217
  <!-- get paragraphs from nested 'dl' -->
7198
7218
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
7199
7219
  </td>
@@ -7201,6 +7221,53 @@
7201
7221
  </xsl:template>
7202
7222
  <xsl:template match="*[local-name()='dd']" mode="dl_if"/>
7203
7223
 
7224
+ <xsl:template match="*" mode="dl_if">
7225
+ <xsl:copy-of select="."/>
7226
+ </xsl:template>
7227
+
7228
+ <xsl:template match="*[local-name() = 'p']" mode="dl_if">
7229
+ <xsl:param name="indent"/>
7230
+ <p>
7231
+ <xsl:copy-of select="@*"/>
7232
+ <xsl:value-of select="$indent"/>
7233
+ <xsl:copy-of select="node()"/>
7234
+ </p>
7235
+
7236
+ </xsl:template>
7237
+
7238
+ <xsl:template match="*[local-name() = 'ul' or local-name() = 'ol']" mode="dl_if">
7239
+ <xsl:variable name="list_rendered_">
7240
+ <xsl:apply-templates select="."/>
7241
+ </xsl:variable>
7242
+ <xsl:variable name="list_rendered" select="xalan:nodeset($list_rendered_)"/>
7243
+
7244
+ <xsl:variable name="indent">
7245
+ <xsl:for-each select="($list_rendered//fo:block[not(.//fo:block)])[1]">
7246
+ <xsl:apply-templates select="ancestor::*[@provisional-distance-between-starts]/@provisional-distance-between-starts" mode="dl_if"/>
7247
+ </xsl:for-each>
7248
+ </xsl:variable>
7249
+
7250
+ <xsl:apply-templates mode="dl_if">
7251
+ <xsl:with-param name="indent" select="$indent"/>
7252
+ </xsl:apply-templates>
7253
+ </xsl:template>
7254
+
7255
+ <xsl:template match="*[local-name() = 'li']" mode="dl_if">
7256
+ <xsl:param name="indent"/>
7257
+ <xsl:apply-templates mode="dl_if">
7258
+ <xsl:with-param name="indent" select="$indent"/>
7259
+ </xsl:apply-templates>
7260
+ </xsl:template>
7261
+
7262
+ <xsl:template match="@provisional-distance-between-starts" mode="dl_if">
7263
+ <xsl:variable name="value" select="round(substring-before(.,'mm'))"/>
7264
+ <!-- emulate left indent for list item -->
7265
+ <xsl:call-template name="repeat">
7266
+ <xsl:with-param name="char" select="'x'"/>
7267
+ <xsl:with-param name="count" select="$value"/>
7268
+ </xsl:call-template>
7269
+ </xsl:template>
7270
+
7204
7271
  <xsl:template match="*[local-name()='dl']" mode="dl_if_nested">
7205
7272
  <xsl:for-each select="*[local-name() = 'dt']">
7206
7273
  <p>
@@ -7594,6 +7661,7 @@
7594
7661
  </word>
7595
7662
  <xsl:call-template name="tokenize_with_tags">
7596
7663
  <xsl:with-param name="text" select="substring-after($text, $separator)"/>
7664
+ <xsl:with-param name="tags" select="$tags"/>
7597
7665
  </xsl:call-template>
7598
7666
  </xsl:otherwise>
7599
7667
  </xsl:choose>
@@ -7633,8 +7701,18 @@
7633
7701
 
7634
7702
  <xsl:template name="add-zero-spaces-java">
7635
7703
  <xsl:param name="text" select="."/>
7636
- <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
7637
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1​')"/>
7704
+ <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, arrow right -->
7705
+ <xsl:variable name="text1" select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |→)','$1​')"/>
7706
+ <!-- add zero-width space (#x200B) after characters: 'great than' -->
7707
+ <xsl:variable name="text2" select="java:replaceAll(java:java.lang.String.new($text1), '(\u003e)(?!\u003e)', '$1​')"/><!-- negative lookahead: 'great than' not followed by 'great than' -->
7708
+ <!-- add zero-width space (#x200B) before characters: 'less than' -->
7709
+ <xsl:variable name="text3" select="java:replaceAll(java:java.lang.String.new($text2), '(?&lt;!\u003c)(\u003c)', '​$1')"/> <!-- (?<!\u003c)(\u003c) --> <!-- negative lookbehind: 'less than' not preceeded by 'less than' -->
7710
+ <!-- add zero-width space (#x200B) before character: { -->
7711
+ <xsl:variable name="text4" select="java:replaceAll(java:java.lang.String.new($text3), '(?&lt;!\W)(\{)', '​$1')"/> <!-- negative lookbehind: '{' not preceeded by 'punctuation char' -->
7712
+ <!-- add zero-width space (#x200B) after character: , -->
7713
+ <xsl:variable name="text5" select="java:replaceAll(java:java.lang.String.new($text4), '(\,)(?!\d)', '$1​')"/> <!-- negative lookahead: ',' not followed by digit -->
7714
+
7715
+ <xsl:value-of select="$text5"/>
7638
7716
  </xsl:template>
7639
7717
 
7640
7718
  <xsl:template name="add-zero-spaces-link-java">
@@ -7780,7 +7858,7 @@
7780
7858
  </xsl:copy>
7781
7859
  </xsl:template>
7782
7860
 
7783
- <xsl:template match="*[local-name()='th' or local-name() = 'td'][not(*[local-name()='br']) and not(*[local-name()='p'])]" mode="table-without-br">
7861
+ <xsl:template match="*[local-name()='th' or local-name() = 'td'][not(*[local-name()='br']) and not(*[local-name()='p']) and not(*[local-name()='sourcecode'])]" mode="table-without-br">
7784
7862
  <xsl:copy>
7785
7863
  <xsl:copy-of select="@*"/>
7786
7864
  <p>
@@ -7828,6 +7906,28 @@
7828
7906
  </xsl:for-each>
7829
7907
  </xsl:template>
7830
7908
 
7909
+ <xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'sourcecode']" mode="table-without-br">
7910
+ <xsl:apply-templates mode="table-without-br"/>
7911
+ </xsl:template>
7912
+
7913
+ <xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'sourcecode']/text()[contains(., '&#13;') or contains(., '&#10;')]" mode="table-without-br">
7914
+
7915
+ <xsl:variable name="sep">###SOURCECODE_NEWLINE###</xsl:variable>
7916
+ <xsl:variable name="sourcecode_text" select="java:replaceAll(java:java.lang.String.new(.),'(&#13;&#10;|&#13;|&#10;)', $sep)"/>
7917
+ <xsl:variable name="items">
7918
+ <xsl:call-template name="split">
7919
+ <xsl:with-param name="pText" select="$sourcecode_text"/>
7920
+ <xsl:with-param name="sep" select="$sep"/>
7921
+ <xsl:with-param name="normalize-space">false</xsl:with-param>
7922
+ </xsl:call-template>
7923
+ </xsl:variable>
7924
+ <xsl:for-each select="xalan:nodeset($items)/*">
7925
+ <p>
7926
+ <sourcecode><xsl:copy-of select="node()"/></sourcecode>
7927
+ </p>
7928
+ </xsl:for-each>
7929
+ </xsl:template>
7930
+
7831
7931
  <!-- remove redundant white spaces -->
7832
7932
  <xsl:template match="text()[not(ancestor::*[local-name() = 'sourcecode'])]" mode="table-without-br">
7833
7933
  <xsl:variable name="text" select="translate(.,'&#9;&#10;&#13;','')"/>
@@ -8138,6 +8238,7 @@
8138
8238
  <xsl:if test="ancestor::*[local-name() = 'sub']"><tag>sub</tag></xsl:if>
8139
8239
  <xsl:if test="ancestor::*[local-name() = 'sup']"><tag>sup</tag></xsl:if>
8140
8240
  <xsl:if test="ancestor::*[local-name() = 'tt']"><tag>tt</tag></xsl:if>
8241
+ <xsl:if test="ancestor::*[local-name() = 'sourcecode']"><tag>sourcecode</tag></xsl:if>
8141
8242
  <xsl:if test="ancestor::*[local-name() = 'keep-together_within-line']"><tag>keep-together_within-line</tag></xsl:if>
8142
8243
  </tags>
8143
8244
  </xsl:template>
@@ -8635,6 +8736,12 @@
8635
8736
 
8636
8737
  <fo:block-container margin-left="0mm">
8637
8738
 
8739
+ <!-- <xsl:if test="$namespace = 'iho'">
8740
+ <xsl:if test="ancestor::iho:td">
8741
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
8742
+ </xsl:if>
8743
+ </xsl:if> -->
8744
+
8638
8745
  <fo:block>
8639
8746
 
8640
8747
  <fo:inline xsl:use-attribute-sets="note-name-style">
@@ -9785,37 +9892,15 @@
9785
9892
  <!-- =============== -->
9786
9893
  <xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
9787
9894
 
9788
- <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
9789
-
9790
- <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
9791
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
9792
- </xsl:if>
9895
+ <xsl:variable name="sourcecode_attributes">
9896
+ <xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
9897
+ <xsl:variable name="_font-size">
9793
9898
 
9794
- <xsl:if test="ancestor::*[local-name() = 'example']">
9795
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
9796
- </xsl:if>
9899
+ <!-- 9 -->
9797
9900
 
9798
- <xsl:copy-of select="@id"/>
9799
-
9800
- <xsl:if test="parent::*[local-name() = 'note']">
9801
- <xsl:attribute name="margin-left">
9802
- <xsl:choose>
9803
- <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
9804
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
9805
- </xsl:choose>
9806
- </xsl:attribute>
9807
-
9808
- </xsl:if>
9809
- <fo:block-container margin-left="0mm">
9810
-
9811
- <fo:block xsl:use-attribute-sets="sourcecode-style">
9812
- <xsl:variable name="_font-size">
9813
-
9814
- <!-- 9 -->
9815
-
9816
- <!-- <xsl:if test="$namespace = 'ieee'">
9817
- <xsl:if test="$current_template = 'standard'">8</xsl:if>
9818
- </xsl:if> -->
9901
+ <!-- <xsl:if test="$namespace = 'ieee'">
9902
+ <xsl:if test="$current_template = 'standard'">8</xsl:if>
9903
+ </xsl:if> -->
9819
9904
 
9820
9905
  </xsl:variable>
9821
9906
 
@@ -9830,14 +9915,60 @@
9830
9915
  </xsl:choose>
9831
9916
  </xsl:attribute>
9832
9917
  </xsl:if>
9918
+ </xsl:element>
9919
+ </xsl:variable>
9833
9920
 
9921
+ <xsl:choose>
9922
+ <xsl:when test="$isGenerateTableIF = 'true' and (ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])">
9923
+ <xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
9924
+ <xsl:attribute name="{local-name()}">
9925
+ <xsl:value-of select="."/>
9926
+ </xsl:attribute>
9927
+ </xsl:for-each>
9834
9928
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
9835
- </fo:block>
9929
+ </xsl:when>
9836
9930
 
9837
- <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
9931
+ <xsl:otherwise>
9932
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
9838
9933
 
9839
- </fo:block-container>
9840
- </fo:block-container>
9934
+ <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
9935
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
9936
+ </xsl:if>
9937
+
9938
+ <xsl:if test="ancestor::*[local-name() = 'example']">
9939
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
9940
+ </xsl:if>
9941
+
9942
+ <xsl:copy-of select="@id"/>
9943
+
9944
+ <xsl:if test="parent::*[local-name() = 'note']">
9945
+ <xsl:attribute name="margin-left">
9946
+ <xsl:choose>
9947
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
9948
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
9949
+ </xsl:choose>
9950
+ </xsl:attribute>
9951
+
9952
+ </xsl:if>
9953
+ <fo:block-container margin-left="0mm">
9954
+
9955
+ <fo:block xsl:use-attribute-sets="sourcecode-style">
9956
+
9957
+ <xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
9958
+ <xsl:attribute name="{local-name()}">
9959
+ <xsl:value-of select="."/>
9960
+ </xsl:attribute>
9961
+ </xsl:for-each>
9962
+
9963
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
9964
+ </fo:block>
9965
+
9966
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
9967
+
9968
+ </fo:block-container>
9969
+ </fo:block-container>
9970
+ </xsl:otherwise>
9971
+ </xsl:choose>
9841
9972
  </xsl:template>
9842
9973
 
9843
9974
  <xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
@@ -12125,7 +12256,9 @@
12125
12256
  <!-- ===================================== -->
12126
12257
  <!-- Update xml -->
12127
12258
  <!-- ===================================== -->
12259
+ <!-- =========================================================================== -->
12128
12260
  <!-- STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
12261
+ <!-- =========================================================================== -->
12129
12262
  <xsl:template match="@*|node()" mode="update_xml_step1">
12130
12263
  <xsl:copy>
12131
12264
  <xsl:apply-templates select="@*|node()" mode="update_xml_step1"/>
@@ -12217,10 +12350,13 @@
12217
12350
  <xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
12218
12351
  <xsl:apply-templates mode="update_xml_step1"/>
12219
12352
  </xsl:template>
12220
-
12353
+ <!-- =========================================================================== -->
12221
12354
  <!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
12355
+ <!-- =========================================================================== -->
12222
12356
 
12357
+ <!-- =========================================================================== -->
12223
12358
  <!-- STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
12359
+ <!-- =========================================================================== -->
12224
12360
  <xsl:template match="@*|node()" mode="update_xml_step2">
12225
12361
  <xsl:copy>
12226
12362
  <xsl:apply-templates select="@*|node()" mode="update_xml_step2"/>
@@ -12299,8 +12435,6 @@
12299
12435
  </xsl:copy>
12300
12436
  </xsl:template>
12301
12437
 
12302
- <!-- END STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
12303
-
12304
12438
  <!-- enclose sequence of 'char x' + 'combining char y' to <lang_none>xy</lang_none> -->
12305
12439
  <xsl:variable name="regex_combining_chars">(.[̀-ͯ])</xsl:variable>
12306
12440
  <xsl:variable name="element_name_lang_none">lang_none</xsl:variable>
@@ -12316,7 +12450,15 @@
12316
12450
  </xsl:call-template>
12317
12451
  </xsl:template>
12318
12452
 
12453
+ <!-- =========================================================================== -->
12454
+ <!-- END STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
12455
+ <!-- =========================================================================== -->
12456
+
12457
+ <!-- =========================================================================== -->
12319
12458
  <!-- XML UPDATE STEP: enclose standard's name into tag 'keep-together_within-line' -->
12459
+ <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
12460
+ <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
12461
+ <!-- =========================================================================== -->
12320
12462
  <!-- Example: <keep-together_within-line>ISO 10303-51</keep-together_within-line> -->
12321
12463
  <xsl:template match="@*|node()" mode="update_xml_enclose_keep-together_within-line">
12322
12464
  <xsl:copy>
@@ -12332,10 +12474,15 @@
12332
12474
  <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
12333
12475
 
12334
12476
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
12335
- <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
12336
12477
  <xsl:variable name="tag_keep-together_within-line_open">###<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
12337
12478
  <xsl:variable name="tag_keep-together_within-line_close">###/<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
12338
- <xsl:variable name="text_" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
12479
+ <xsl:variable name="text__" select="java:replaceAll(java:java.lang.String.new(.), $regex_standard_reference, concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
12480
+ <xsl:variable name="text_">
12481
+ <xsl:choose>
12482
+ <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when> <!-- no need enclose standard's number into tag 'keep-together_within-line' in table cells -->
12483
+ <xsl:otherwise><xsl:value-of select="$text__"/></xsl:otherwise>
12484
+ </xsl:choose>
12485
+ </xsl:variable>
12339
12486
  <xsl:variable name="text"><text><xsl:call-template name="replace_text_tags">
12340
12487
  <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
12341
12488
  <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
@@ -12351,7 +12498,11 @@
12351
12498
  </xsl:variable>
12352
12499
 
12353
12500
  <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
12354
- <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable>
12501
+ <!-- \S matches any non-whitespace character (equivalent to [^\r\n\t\f\v ]) -->
12502
+ <!-- <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable> -->
12503
+ <!-- add &lt; and &gt; to \S -->
12504
+ <xsl:variable name="regex_S">[^\r\n\t\f\v \&lt;&gt;]</xsl:variable>
12505
+ <xsl:variable name="regex_solidus_units">((\b((<xsl:value-of select="$regex_S"/>{1,3}\/<xsl:value-of select="$regex_S"/>+)|(<xsl:value-of select="$regex_S"/>+\/<xsl:value-of select="$regex_S"/>{1,3}))\b)|(\/<xsl:value-of select="$regex_S"/>{1,3})\b)</xsl:variable>
12355
12506
  <xsl:variable name="text3">
12356
12507
  <text><xsl:for-each select="xalan:nodeset($text2)/text/node()">
12357
12508
  <xsl:choose>
@@ -12415,9 +12566,8 @@
12415
12566
  <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
12416
12567
  </xsl:choose>
12417
12568
  </xsl:template>
12418
-
12419
12569
  <!-- ===================================== -->
12420
- <!-- End Update xml -->
12570
+ <!-- END XML UPDATE STEP: enclose standard's name into tag 'keep-together_within-line' -->
12421
12571
  <!-- ===================================== -->
12422
12572
 
12423
12573
  <!-- for correct rendering combining chars -->