metanorma-jis 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/jis/jis.international-standard.xsl +258 -59
- data/lib/isodoc/jis/presentation_xml_convert.rb +6 -0
- data/lib/isodoc/jis/xref.rb +42 -0
- data/lib/metanorma/jis/isodoc.rng +18 -0
- data/lib/metanorma/jis/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 413ce76333c43d3e720d8a6f99deb65ba896f4a37ef1e18d9aac3e335afae58e
|
4
|
+
data.tar.gz: 4b9f704a85a0f2337ecf6cc39f0f5dd55fce70350d9ed7d1d5ec06c9c8cf5460
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1175113eecfc11a79aecfbc4762d51dcbb1078c60532cde52de5f367aefc1c1d33dcb66b7ed45cd7228eaff2d6d56b237ea2e5b73ad3db23c4678dca6e6e8968
|
7
|
+
data.tar.gz: bfb468a5b9e14e0bbef57d38b5846da5389ce970437aed9ba86bbeaa39c3cfc75309cfeafac85018d67dac5f588b75d15e8c67d2a573df46c77f4c5510e3cd95
|
@@ -126,6 +126,31 @@
|
|
126
126
|
</fo:repeatable-page-master-alternatives>
|
127
127
|
</fo:page-sequence-master>
|
128
128
|
|
129
|
+
<fo:simple-page-master master-name="commentary_first_page_even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
130
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
131
|
+
<fo:region-before region-name="header-commentary-even-first" extent="{$marginTop}mm"/>
|
132
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
133
|
+
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
134
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
135
|
+
</fo:simple-page-master>
|
136
|
+
|
137
|
+
<fo:simple-page-master master-name="commentary_first_page_odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
138
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
139
|
+
<fo:region-before region-name="header-commentary-odd-first" extent="{$marginTop}mm"/>
|
140
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
141
|
+
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
142
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
143
|
+
</fo:simple-page-master>
|
144
|
+
|
145
|
+
<fo:page-sequence-master master-name="document_commentary_section">
|
146
|
+
<fo:repeatable-page-master-alternatives>
|
147
|
+
<fo:conditional-page-master-reference page-position="first" odd-or-even="even" master-reference="commentary_first_page_even"/>
|
148
|
+
<fo:conditional-page-master-reference page-position="first" odd-or-even="odd" master-reference="commentary_first_page_odd"/>
|
149
|
+
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
|
150
|
+
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
|
151
|
+
</fo:repeatable-page-master-alternatives>
|
152
|
+
</fo:page-sequence-master>
|
153
|
+
|
129
154
|
<!-- landscape -->
|
130
155
|
<fo:simple-page-master master-name="odd-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
131
156
|
<fo:region-body margin-top="{$marginLeftRight1}mm" margin-bottom="{$marginLeftRight2}mm" margin-left="{$marginBottom}mm" margin-right="{$marginTop}mm"/>
|
@@ -348,14 +373,15 @@
|
|
348
373
|
</item>
|
349
374
|
|
350
375
|
<!-- Annexes -->
|
351
|
-
<xsl:for-each select="/*/*[local-name()='annex']">
|
376
|
+
<!-- <xsl:for-each select="/*/*[local-name()='annex']">
|
352
377
|
<item>
|
353
378
|
<xsl:apply-templates select="." mode="linear_xml"/>
|
354
379
|
</item>
|
355
|
-
</xsl:for-each>
|
380
|
+
</xsl:for-each> -->
|
356
381
|
|
357
|
-
<!-- Bibliography -->
|
358
|
-
<xsl:for-each select="/*/*[local-name()='bibliography']/*[count(.//*[local-name() = 'bibitem'][not(@hidden) = 'true']) > 0 and not(@hidden = 'true')]">
|
382
|
+
<!-- Annexes and Bibliography -->
|
383
|
+
<xsl:for-each select="/*/*[local-name()='annex'] | /*/*[local-name()='bibliography']/*[count(.//*[local-name() = 'bibitem'][not(@hidden) = 'true']) > 0 and not(@hidden = 'true')]">
|
384
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
359
385
|
<item><xsl:apply-templates select="." mode="linear_xml"/></item>
|
360
386
|
</xsl:for-each>
|
361
387
|
|
@@ -382,6 +408,9 @@
|
|
382
408
|
<!-- paged_xml=<xsl:copy-of select="$paged_xml"/> -->
|
383
409
|
|
384
410
|
<xsl:for-each select="xalan:nodeset($paged_xml)/*[local-name()='page'][*]">
|
411
|
+
|
412
|
+
<xsl:variable name="isCommentary" select="normalize-space(.//jis:annex[@commentary = 'true'] and 1 = 1)"/> <!-- true or false -->
|
413
|
+
<!-- DEBUG: <xsl:copy-of select="."/> -->
|
385
414
|
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
386
415
|
<xsl:if test="position() = 1">
|
387
416
|
<xsl:attribute name="master-reference">document_first_section</xsl:attribute>
|
@@ -389,6 +418,9 @@
|
|
389
418
|
<xsl:if test="@orientation = 'landscape'">
|
390
419
|
<xsl:attribute name="master-reference">document-<xsl:value-of select="@orientation"/></xsl:attribute>
|
391
420
|
</xsl:if>
|
421
|
+
<xsl:if test="$isCommentary = 'true'">
|
422
|
+
<xsl:attribute name="master-reference">document_commentary_section</xsl:attribute>
|
423
|
+
</xsl:if>
|
392
424
|
<xsl:if test="position() = 1">
|
393
425
|
<xsl:attribute name="initial-page-number">1</xsl:attribute>
|
394
426
|
</xsl:if>
|
@@ -398,10 +430,31 @@
|
|
398
430
|
</fo:block>
|
399
431
|
</fo:static-content>
|
400
432
|
|
433
|
+
<xsl:variable name="section_title">
|
434
|
+
<xsl:if test="$isCommentary = 'true'">
|
435
|
+
<fo:inline font-family="IPAexGothic" padding-left="2mm">
|
436
|
+
<xsl:text> </xsl:text>
|
437
|
+
<xsl:call-template name="getLocalizedString">
|
438
|
+
<xsl:with-param name="key">commentary</xsl:with-param>
|
439
|
+
</xsl:call-template>
|
440
|
+
</fo:inline>
|
441
|
+
</xsl:if>
|
442
|
+
</xsl:variable>
|
443
|
+
|
444
|
+
<xsl:variable name="section">
|
445
|
+
<xsl:choose>
|
446
|
+
<xsl:when test="$isCommentary = 'true'">commentary</xsl:when>
|
447
|
+
<xsl:otherwise>main</xsl:otherwise>
|
448
|
+
</xsl:choose>
|
449
|
+
</xsl:variable>
|
450
|
+
|
401
451
|
<xsl:call-template name="insertHeaderFooter">
|
402
452
|
<xsl:with-param name="docidentifier" select="$docidentifier"/>
|
403
453
|
<xsl:with-param name="copyrightText" select="$copyrightText"/>
|
404
|
-
<xsl:with-param name="section"
|
454
|
+
<xsl:with-param name="section" select="$section"/>
|
455
|
+
<xsl:with-param name="section_title">
|
456
|
+
<xsl:copy-of select="$section_title"/>
|
457
|
+
</xsl:with-param>
|
405
458
|
</xsl:call-template>
|
406
459
|
|
407
460
|
<fo:flow flow-name="xsl-region-body">
|
@@ -446,6 +499,20 @@
|
|
446
499
|
|
447
500
|
</xsl:if>
|
448
501
|
|
502
|
+
<!-- Annex Commentary first page -->
|
503
|
+
<xsl:if test="$isCommentary = 'true'">
|
504
|
+
|
505
|
+
<!-- Example: JIS Z 8301:2019 -->
|
506
|
+
<fo:block font-family="IPAexGothic" font-size="15pt" text-align="center">
|
507
|
+
<fo:inline font-family="Arial">JIS <xsl:value-of select="$docidentifier_number"/></fo:inline>
|
508
|
+
<fo:inline baseline-shift="10%"><fo:inline font-size="10pt">:</fo:inline>
|
509
|
+
<fo:inline font-family="Times New Roman" font-size="10pt"><xsl:value-of select="$docidentifier_year"/></fo:inline></fo:inline>
|
510
|
+
</fo:block>
|
511
|
+
|
512
|
+
<!-- title -->
|
513
|
+
<fo:block role="H1" font-family="IPAexGothic" font-size="16pt" text-align="center" margin-top="6mm"><xsl:value-of select="$title_ja"/></fo:block>
|
514
|
+
</xsl:if>
|
515
|
+
|
449
516
|
<xsl:apply-templates select="*" mode="page"/>
|
450
517
|
|
451
518
|
</fo:flow>
|
@@ -488,9 +555,7 @@
|
|
488
555
|
<xsl:for-each select="$contents/doc[@num = $num]//item[@display = 'true'][@level <= $toc_level or @type='figure' or @type = 'table']">
|
489
556
|
<fo:block role="TOCI">
|
490
557
|
<xsl:choose>
|
491
|
-
<xsl:when test="@type = 'bibliography'">
|
492
|
-
</xsl:when>
|
493
|
-
<xsl:when test="@type = 'annex'">
|
558
|
+
<xsl:when test="@type = 'annex' or @type = 'bibliography'">
|
494
559
|
<fo:block space-after="5pt">
|
495
560
|
<xsl:call-template name="insertTocItem"/>
|
496
561
|
</fo:block>
|
@@ -559,6 +624,10 @@
|
|
559
624
|
</fo:block>
|
560
625
|
</xsl:template>
|
561
626
|
|
627
|
+
<!-- docidentifier, 3 part: number, colon and year-->
|
628
|
+
<xsl:variable name="docidentifier_jis" select="/*/jis:bibdata/jis:docidentifier[@type = 'JIS']"/>
|
629
|
+
<xsl:variable name="docidentifier_number" select="java:replaceAll(java:java.lang.String.new($docidentifier_jis), '^(.*)(:)(.*)$', '$1')"/>
|
630
|
+
<xsl:variable name="docidentifier_year" select="java:replaceAll(java:java.lang.String.new($docidentifier_jis), '^(.*)(:)(.*)$', '$3')"/>
|
562
631
|
<xsl:template name="insertCoverPage">
|
563
632
|
<xsl:param name="num"/>
|
564
633
|
<xsl:param name="copyrightText"/>
|
@@ -578,10 +647,6 @@
|
|
578
647
|
<fo:block-container text-align="center">
|
579
648
|
<!-- title -->
|
580
649
|
<fo:block role="H1" font-family="IPAexGothic" font-size="22pt" margin-top="27mm"><xsl:apply-templates select="/*/jis:bibdata/jis:title[@language = 'ja' and @type = 'main']/node()"/></fo:block>
|
581
|
-
<!-- docidentifier, 3 part: number, colon and year-->
|
582
|
-
<xsl:variable name="docidentifier" select="/*/jis:bibdata/jis:docidentifier[@type = 'JIS']"/>
|
583
|
-
<xsl:variable name="docidentifier_number" select="java:replaceAll(java:java.lang.String.new($docidentifier), '^(.*)(:)(.*)$', '$1')"/>
|
584
|
-
<xsl:variable name="docidentifier_year" select="java:replaceAll(java:java.lang.String.new($docidentifier), '^(.*)(:)(.*)$', '$3')"/>
|
585
650
|
|
586
651
|
<fo:block font-family="IPAexGothic" font-size="20pt" margin-top="15mm">
|
587
652
|
<fo:inline font-family="Arial">JIS <xsl:value-of select="$docidentifier_number"/></fo:inline>
|
@@ -777,6 +842,7 @@
|
|
777
842
|
<xsl:choose>
|
778
843
|
<xsl:when test="@type = 'section-title'">18pt</xsl:when>
|
779
844
|
<xsl:when test="@ancestor = 'foreword' and $level = '1'">14pt</xsl:when>
|
845
|
+
<xsl:when test="@ancestor = 'annex' and $level = '1' and preceding-sibling::*[1][local-name() = 'annex' and @commentary = 'true']">16pt</xsl:when>
|
780
846
|
<xsl:when test="@ancestor = 'annex' and $level = '1'">14pt</xsl:when>
|
781
847
|
<!-- <xsl:when test="@ancestor = 'foreword' and $level >= '2'">12pt</xsl:when>
|
782
848
|
<xsl:when test=". = 'Executive summary'">18pt</xsl:when>
|
@@ -813,6 +879,7 @@
|
|
813
879
|
<xsl:variable name="margin-top">
|
814
880
|
<xsl:choose>
|
815
881
|
<xsl:when test="@ancestor = 'foreword' and $level = 1">9mm</xsl:when>
|
882
|
+
<xsl:when test="@ancestor = 'annex' and $level = '1' and preceding-sibling::*[1][local-name() = 'annex' and @commentary = 'true']">1mm</xsl:when>
|
816
883
|
<xsl:when test="$level = 1">6.5mm</xsl:when>
|
817
884
|
<xsl:when test="@ancestor = 'foreword' and $level = 2">0mm</xsl:when>
|
818
885
|
<xsl:when test="@ancestor = 'annex' and $level = 2">4.5mm</xsl:when>
|
@@ -833,6 +900,7 @@
|
|
833
900
|
<xsl:variable name="margin-bottom">
|
834
901
|
<xsl:choose>
|
835
902
|
<xsl:when test="@ancestor = 'foreword' and $level = 1">9mm</xsl:when>
|
903
|
+
<xsl:when test="@ancestor = 'annex' and $level = '1' and preceding-sibling::*[1][local-name() = 'annex' and @commentary = 'true']">7mm</xsl:when>
|
836
904
|
<xsl:when test="$level = 1 and following-sibling::jis:clause">8pt</xsl:when>
|
837
905
|
<xsl:when test="$level = 1">12pt</xsl:when>
|
838
906
|
<xsl:when test="$level = 2 and following-sibling::jis:clause">8pt</xsl:when>
|
@@ -1014,6 +1082,7 @@
|
|
1014
1082
|
<xsl:variable name="list_item_label">
|
1015
1083
|
<xsl:call-template name="getListItemFormat"/>
|
1016
1084
|
</xsl:variable>
|
1085
|
+
|
1017
1086
|
<xsl:choose>
|
1018
1087
|
<xsl:when test="contains($list_item_label, ')')">
|
1019
1088
|
<xsl:value-of select="substring-before($list_item_label,')')"/>
|
@@ -1290,7 +1359,7 @@
|
|
1290
1359
|
</fo:static-content>
|
1291
1360
|
<fo:static-content flow-name="header-odd" role="artifact">
|
1292
1361
|
<fo:block-container font-family="Arial" font-size="9pt" height="26mm" display-align="after" text-align="right">
|
1293
|
-
<xsl:if test="$section = 'main'"><fo:block><fo:page-number/></fo:block></xsl:if>
|
1362
|
+
<xsl:if test="$section = 'main' or $section = 'commentary'"><fo:block><fo:page-number/></fo:block></xsl:if>
|
1294
1363
|
<fo:block>
|
1295
1364
|
<xsl:copy-of select="$docidentifier"/>
|
1296
1365
|
<xsl:copy-of select="$section_title"/>
|
@@ -1299,13 +1368,28 @@
|
|
1299
1368
|
</fo:static-content>
|
1300
1369
|
<fo:static-content flow-name="header-even" role="artifact">
|
1301
1370
|
<fo:block-container font-family="Arial" font-size="9pt" height="26mm" display-align="after">
|
1302
|
-
<xsl:if test="$section = 'main'"><fo:block><fo:page-number/></fo:block></xsl:if>
|
1371
|
+
<xsl:if test="$section = 'main' or $section = 'commentary'"><fo:block><fo:page-number/></fo:block></xsl:if>
|
1303
1372
|
<fo:block>
|
1304
1373
|
<xsl:copy-of select="$docidentifier"/>
|
1305
1374
|
<xsl:copy-of select="$section_title"/>
|
1306
1375
|
</fo:block>
|
1307
1376
|
</fo:block-container>
|
1308
1377
|
</fo:static-content>
|
1378
|
+
|
1379
|
+
<fo:static-content flow-name="header-commentary-even-first" role="artifact">
|
1380
|
+
<fo:block-container font-family="Arial" font-size="9pt" height="26mm" display-align="after" text-align="left">
|
1381
|
+
<fo:block><fo:page-number/></fo:block>
|
1382
|
+
<fo:block> </fo:block>
|
1383
|
+
</fo:block-container>
|
1384
|
+
</fo:static-content>
|
1385
|
+
|
1386
|
+
<fo:static-content flow-name="header-commentary-odd-first" role="artifact">
|
1387
|
+
<fo:block-container font-family="Arial" font-size="9pt" height="26mm" display-align="after" text-align="right">
|
1388
|
+
<fo:block><fo:page-number/></fo:block>
|
1389
|
+
<fo:block> </fo:block>
|
1390
|
+
</fo:block-container>
|
1391
|
+
</fo:static-content>
|
1392
|
+
|
1309
1393
|
<xsl:call-template name="insertFooter">
|
1310
1394
|
<xsl:with-param name="section" select="$section"/>
|
1311
1395
|
<xsl:with-param name="copyrightText" select="$copyrightText"/>
|
@@ -1320,6 +1404,16 @@
|
|
1320
1404
|
<xsl:if test="$section = 'preface'">
|
1321
1405
|
<fo:block font-size="9pt" text-align="center" space-after="10pt">(<fo:inline font-family="Times New Roman"><fo:page-number/></fo:inline>)</fo:block>
|
1322
1406
|
</xsl:if>
|
1407
|
+
<xsl:if test="$section = 'commentary'">
|
1408
|
+
<fo:block font-size="9pt" text-align="center" space-after="12pt">
|
1409
|
+
<fo:inline font-family="IPAexGothic" padding-right="3mm">
|
1410
|
+
<xsl:call-template name="getLocalizedString">
|
1411
|
+
<xsl:with-param name="key">commentary_page</xsl:with-param>
|
1412
|
+
</xsl:call-template>
|
1413
|
+
</fo:inline>
|
1414
|
+
<fo:inline font-weight="bold" font-family="Times New Roman" id="_independent_page_number_commentary"><fo:page-number/></fo:inline>
|
1415
|
+
</fo:block>
|
1416
|
+
</xsl:if>
|
1323
1417
|
<!-- copyright restriction -->
|
1324
1418
|
<fo:block font-size="7pt" text-align="center" font-family="IPAexMincho" margin-bottom="13mm"><xsl:value-of select="$copyrightText"/></fo:block>
|
1325
1419
|
</fo:block-container>
|
@@ -2345,6 +2439,10 @@
|
|
2345
2439
|
</xsl:attribute-set> <!-- formula-stem-number-style -->
|
2346
2440
|
<!-- End Formula's styles -->
|
2347
2441
|
|
2442
|
+
<xsl:template name="refine_formula-stem-number-style">
|
2443
|
+
|
2444
|
+
</xsl:template>
|
2445
|
+
|
2348
2446
|
<xsl:attribute-set name="image-style">
|
2349
2447
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
2350
2448
|
|
@@ -2825,13 +2923,13 @@
|
|
2825
2923
|
|
2826
2924
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
2827
2925
|
<xsl:variable name="nodes_preface_">
|
2828
|
-
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
|
2926
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
|
2829
2927
|
<node id="{@id}"/>
|
2830
2928
|
</xsl:for-each>
|
2831
2929
|
</xsl:variable>
|
2832
2930
|
<xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
|
2833
2931
|
|
2834
|
-
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
|
2932
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
|
2835
2933
|
<xsl:sort select="@displayorder" data-type="number"/>
|
2836
2934
|
|
2837
2935
|
<!-- process Section's title -->
|
@@ -2865,12 +2963,12 @@
|
|
2865
2963
|
<xsl:apply-templates select="." mode="contents"/>
|
2866
2964
|
</xsl:for-each>
|
2867
2965
|
|
2868
|
-
<xsl:for-each select="/*/*[local-name()='annex']">
|
2966
|
+
<!-- <xsl:for-each select="/*/*[local-name()='annex']">
|
2869
2967
|
<xsl:sort select="@displayorder" data-type="number"/>
|
2870
2968
|
<xsl:apply-templates select="." mode="contents"/>
|
2871
|
-
</xsl:for-each>
|
2969
|
+
</xsl:for-each> -->
|
2872
2970
|
|
2873
|
-
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true') and not(*[local-name()='references'][@normative='true'])][count(.//*[local-name() = 'bibitem'][not(@hidden) = 'true']) > 0] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]][count(.//*[local-name() = 'bibitem'][not(@hidden) = 'true']) > 0]">
|
2971
|
+
<xsl:for-each select="/*/*[local-name()='annex'] | /*/*[local-name()='bibliography']/*[not(@normative='true') and not(*[local-name()='references'][@normative='true'])][count(.//*[local-name() = 'bibitem'][not(@hidden) = 'true']) > 0] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]][count(.//*[local-name() = 'bibitem'][not(@hidden) = 'true']) > 0]">
|
2874
2972
|
<xsl:sort select="@displayorder" data-type="number"/>
|
2875
2973
|
<xsl:apply-templates select="." mode="contents"/>
|
2876
2974
|
</xsl:for-each>
|
@@ -3236,7 +3334,7 @@
|
|
3236
3334
|
</xsl:attribute>
|
3237
3335
|
</xsl:for-each>
|
3238
3336
|
|
3239
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
3337
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
3240
3338
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
3241
3339
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
3242
3340
|
</xsl:if>
|
@@ -3280,7 +3378,7 @@
|
|
3280
3378
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
3281
3379
|
</xsl:when>
|
3282
3380
|
<xsl:otherwise>
|
3283
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
3381
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
3284
3382
|
</xsl:otherwise>
|
3285
3383
|
</xsl:choose>
|
3286
3384
|
|
@@ -3348,7 +3446,7 @@
|
|
3348
3446
|
<xsl:param name="continued"/>
|
3349
3447
|
<xsl:if test="normalize-space() != ''">
|
3350
3448
|
|
3351
|
-
<fo:block xsl:use-attribute-sets="table-name-style">
|
3449
|
+
<fo:block xsl:use-attribute-sets="table-name-style" role="SKIP">
|
3352
3450
|
|
3353
3451
|
<xsl:call-template name="refine_table-name-style">
|
3354
3452
|
<xsl:with-param name="continued" select="$continued"/>
|
@@ -3733,8 +3831,8 @@
|
|
3733
3831
|
<xsl:template name="table-header-title">
|
3734
3832
|
<xsl:param name="cols-count"/>
|
3735
3833
|
<!-- row for title -->
|
3736
|
-
<fo:table-row>
|
3737
|
-
<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">
|
3834
|
+
<fo:table-row role="SKIP">
|
3835
|
+
<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" role="SKIP">
|
3738
3836
|
|
3739
3837
|
<xsl:call-template name="refine_table-header-title-style"/>
|
3740
3838
|
|
@@ -3743,7 +3841,7 @@
|
|
3743
3841
|
</xsl:apply-templates>
|
3744
3842
|
|
3745
3843
|
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
3746
|
-
<fo:block/>
|
3844
|
+
<fo:block role="SKIP"/>
|
3747
3845
|
</xsl:if>
|
3748
3846
|
|
3749
3847
|
</fo:table-cell>
|
@@ -3778,7 +3876,7 @@
|
|
3778
3876
|
<xsl:param name="colwidths"/>
|
3779
3877
|
<xsl:param name="colgroup"/>
|
3780
3878
|
|
3781
|
-
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
3879
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
3782
3880
|
|
3783
3881
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
3784
3882
|
|
@@ -3851,6 +3949,7 @@
|
|
3851
3949
|
<xsl:apply-templates select="../*[local-name()='p']"/>
|
3852
3950
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
3853
3951
|
<xsl:apply-templates select="../*[local-name()='note']"/>
|
3952
|
+
<xsl:apply-templates select="../*[local-name()='example']"/>
|
3854
3953
|
<xsl:apply-templates select="../*[local-name()='source']"/>
|
3855
3954
|
|
3856
3955
|
<xsl:variable name="isDisplayRowSeparator">
|
@@ -3859,7 +3958,7 @@
|
|
3859
3958
|
|
3860
3959
|
<!-- horizontal row separator -->
|
3861
3960
|
<xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
|
3862
|
-
<xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
|
3961
|
+
<xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
3863
3962
|
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
3864
3963
|
|
3865
3964
|
<xsl:call-template name="setBordersTableArray"/>
|
@@ -4053,7 +4152,7 @@
|
|
4053
4152
|
|
4054
4153
|
<xsl:call-template name="refine_table-header-cell-style"/>
|
4055
4154
|
|
4056
|
-
<fo:block>
|
4155
|
+
<fo:block role="SKIP">
|
4057
4156
|
<xsl:apply-templates/>
|
4058
4157
|
</fo:block>
|
4059
4158
|
</fo:table-cell>
|
@@ -4106,7 +4205,7 @@
|
|
4106
4205
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
4107
4206
|
</xsl:if>
|
4108
4207
|
|
4109
|
-
<fo:block>
|
4208
|
+
<fo:block role="SKIP">
|
4110
4209
|
|
4111
4210
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
4112
4211
|
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
@@ -4120,13 +4219,13 @@
|
|
4120
4219
|
</fo:table-cell>
|
4121
4220
|
</xsl:template> <!-- td -->
|
4122
4221
|
|
4123
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
|
4222
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
|
4124
4223
|
|
4125
4224
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
4126
4225
|
|
4127
4226
|
<xsl:call-template name="refine_table-note-style"/>
|
4128
4227
|
|
4129
|
-
<!-- Table's note name (NOTE, for example) -->
|
4228
|
+
<!-- Table's note/example name (NOTE, for example) -->
|
4130
4229
|
<fo:inline xsl:use-attribute-sets="table-note-name-style">
|
4131
4230
|
|
4132
4231
|
<xsl:call-template name="refine_table-note-name-style"/>
|
@@ -4140,7 +4239,7 @@
|
|
4140
4239
|
|
4141
4240
|
</xsl:template> <!-- table/note -->
|
4142
4241
|
|
4143
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
|
4242
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
|
4144
4243
|
<xsl:apply-templates/>
|
4145
4244
|
</xsl:template>
|
4146
4245
|
|
@@ -4985,7 +5084,7 @@
|
|
4985
5084
|
-->
|
4986
5085
|
<fo:table-row>
|
4987
5086
|
<fo:table-cell number-columns-spanned="2">
|
4988
|
-
<fo:block>
|
5087
|
+
<fo:block role="SKIP">
|
4989
5088
|
<xsl:call-template name="note"/>
|
4990
5089
|
</fo:block>
|
4991
5090
|
</fo:table-cell>
|
@@ -5050,7 +5149,7 @@
|
|
5050
5149
|
|
5051
5150
|
<xsl:call-template name="refine_dt-cell-style"/>
|
5052
5151
|
|
5053
|
-
<fo:block xsl:use-attribute-sets="dt-block-style">
|
5152
|
+
<fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
|
5054
5153
|
<xsl:copy-of select="@id"/>
|
5055
5154
|
|
5056
5155
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
@@ -5080,7 +5179,7 @@
|
|
5080
5179
|
|
5081
5180
|
<xsl:call-template name="refine_dd-cell-style"/>
|
5082
5181
|
|
5083
|
-
<fo:block>
|
5182
|
+
<fo:block role="SKIP">
|
5084
5183
|
|
5085
5184
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
5086
5185
|
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
@@ -5222,10 +5321,15 @@
|
|
5222
5321
|
<!-- ========================= -->
|
5223
5322
|
<xsl:template match="*[local-name()='em']">
|
5224
5323
|
<fo:inline font-style="italic">
|
5324
|
+
<xsl:call-template name="refine_italic_style"/>
|
5225
5325
|
<xsl:apply-templates/>
|
5226
5326
|
</fo:inline>
|
5227
5327
|
</xsl:template>
|
5228
5328
|
|
5329
|
+
<xsl:template name="refine_italic_style">
|
5330
|
+
|
5331
|
+
</xsl:template>
|
5332
|
+
|
5229
5333
|
<xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
5230
5334
|
<xsl:param name="split_keep-within-line"/>
|
5231
5335
|
<fo:inline font-weight="bold">
|
@@ -5450,11 +5554,41 @@
|
|
5450
5554
|
|
5451
5555
|
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
5452
5556
|
<xsl:variable name="text" select="normalize-space(.)"/>
|
5453
|
-
<fo:inline font-size="75%">
|
5557
|
+
<fo:inline font-size="75%" role="SKIP">
|
5454
5558
|
<xsl:if test="string-length($text) > 0">
|
5455
|
-
<xsl:
|
5456
|
-
<xsl:
|
5457
|
-
|
5559
|
+
<xsl:variable name="smallCapsText">
|
5560
|
+
<xsl:call-template name="recursiveSmallCaps">
|
5561
|
+
<xsl:with-param name="text" select="$text"/>
|
5562
|
+
</xsl:call-template>
|
5563
|
+
</xsl:variable>
|
5564
|
+
<!-- merge neighboring fo:inline -->
|
5565
|
+
<xsl:for-each select="xalan:nodeset($smallCapsText)/node()">
|
5566
|
+
<xsl:choose>
|
5567
|
+
<xsl:when test="self::fo:inline and preceding-sibling::node()[1][self::fo:inline]"><!-- <xsl:copy-of select="."/> --></xsl:when>
|
5568
|
+
<xsl:when test="self::fo:inline and @font-size">
|
5569
|
+
<xsl:variable name="curr_pos" select="count(preceding-sibling::node()) + 1"/>
|
5570
|
+
<!-- <curr_pos><xsl:value-of select="$curr_pos"/></curr_pos> -->
|
5571
|
+
<xsl:variable name="next_text_" select="count(following-sibling::node()[not(local-name() = 'inline')][1]/preceding-sibling::node())"/>
|
5572
|
+
<xsl:variable name="next_text">
|
5573
|
+
<xsl:choose>
|
5574
|
+
<xsl:when test="$next_text_ = 0">99999999</xsl:when>
|
5575
|
+
<xsl:otherwise><xsl:value-of select="$next_text_ + 1"/></xsl:otherwise>
|
5576
|
+
</xsl:choose>
|
5577
|
+
</xsl:variable>
|
5578
|
+
<!-- <next_text><xsl:value-of select="$next_text"/></next_text> -->
|
5579
|
+
<fo:inline>
|
5580
|
+
<xsl:copy-of select="@*"/>
|
5581
|
+
<xsl:copy-of select="./node()"/>
|
5582
|
+
<xsl:for-each select="following-sibling::node()[position() < $next_text - $curr_pos]"> <!-- [self::fo:inline] -->
|
5583
|
+
<xsl:copy-of select="./node()"/>
|
5584
|
+
</xsl:for-each>
|
5585
|
+
</fo:inline>
|
5586
|
+
</xsl:when>
|
5587
|
+
<xsl:otherwise>
|
5588
|
+
<xsl:copy-of select="."/>
|
5589
|
+
</xsl:otherwise>
|
5590
|
+
</xsl:choose>
|
5591
|
+
</xsl:for-each>
|
5458
5592
|
</xsl:if>
|
5459
5593
|
</fo:inline>
|
5460
5594
|
</xsl:template>
|
@@ -5466,7 +5600,7 @@
|
|
5466
5600
|
<xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
|
5467
5601
|
<xsl:choose>
|
5468
5602
|
<xsl:when test="$char=$upperCase">
|
5469
|
-
<fo:inline font-size="{100 div 0.75}%">
|
5603
|
+
<fo:inline font-size="{100 div 0.75}%" role="SKIP">
|
5470
5604
|
<xsl:value-of select="$upperCase"/>
|
5471
5605
|
</fo:inline>
|
5472
5606
|
</xsl:when>
|
@@ -5632,6 +5766,10 @@
|
|
5632
5766
|
|
5633
5767
|
<xsl:when test="not(contains($text, $separator))">
|
5634
5768
|
<word>
|
5769
|
+
<xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
|
5770
|
+
<xsl:text>
|
5771
|
+
</xsl:text> <!-- to add distance between dt and dd -->
|
5772
|
+
</xsl:if>
|
5635
5773
|
<xsl:call-template name="enclose_text_in_tags">
|
5636
5774
|
<xsl:with-param name="text" select="normalize-space($text)"/>
|
5637
5775
|
<xsl:with-param name="tags" select="$tags"/>
|
@@ -5640,6 +5778,10 @@
|
|
5640
5778
|
</xsl:when>
|
5641
5779
|
<xsl:otherwise>
|
5642
5780
|
<word>
|
5781
|
+
<xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
|
5782
|
+
<xsl:text>
|
5783
|
+
</xsl:text> <!-- to add distance between dt and dd -->
|
5784
|
+
</xsl:if>
|
5643
5785
|
<xsl:call-template name="enclose_text_in_tags">
|
5644
5786
|
<xsl:with-param name="text" select="normalize-space(substring-before($text, $separator))"/>
|
5645
5787
|
<xsl:with-param name="tags" select="$tags"/>
|
@@ -5823,6 +5965,10 @@
|
|
5823
5965
|
<xsl:template name="getSimpleTable">
|
5824
5966
|
<xsl:param name="id"/>
|
5825
5967
|
|
5968
|
+
<!-- <test0>
|
5969
|
+
<xsl:copy-of select="."/>
|
5970
|
+
</test0> -->
|
5971
|
+
|
5826
5972
|
<xsl:variable name="simple-table">
|
5827
5973
|
|
5828
5974
|
<!-- Step 0. replace <br/> to <p>...</p> -->
|
@@ -6868,7 +7014,7 @@
|
|
6868
7014
|
<fo:table-body>
|
6869
7015
|
<fo:table-row>
|
6870
7016
|
<fo:table-cell display-align="center">
|
6871
|
-
<fo:block xsl:use-attribute-sets="formula-stem-block-style">
|
7017
|
+
<fo:block xsl:use-attribute-sets="formula-stem-block-style" role="SKIP">
|
6872
7018
|
|
6873
7019
|
<xsl:call-template name="refine_formula-stem-block-style"/>
|
6874
7020
|
|
@@ -6876,7 +7022,10 @@
|
|
6876
7022
|
</fo:block>
|
6877
7023
|
</fo:table-cell>
|
6878
7024
|
<fo:table-cell display-align="center">
|
6879
|
-
<fo:block xsl:use-attribute-sets="formula-stem-number-style">
|
7025
|
+
<fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
|
7026
|
+
|
7027
|
+
<xsl:call-template name="refine_formula-stem-number-style"/>
|
7028
|
+
|
6880
7029
|
<xsl:apply-templates select="../*[local-name() = 'name']"/>
|
6881
7030
|
</fo:block>
|
6882
7031
|
</fo:table-cell>
|
@@ -8379,7 +8528,7 @@
|
|
8379
8528
|
<!-- second td with sourcecode -->
|
8380
8529
|
<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']/*[local-name()='td'][preceding-sibling::*]" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
|
8381
8530
|
<fo:table-cell>
|
8382
|
-
<fo:block>
|
8531
|
+
<fo:block role="SKIP">
|
8383
8532
|
<xsl:apply-templates/>
|
8384
8533
|
</fo:block>
|
8385
8534
|
</fo:table-cell>
|
@@ -8866,7 +9015,7 @@
|
|
8866
9015
|
|
8867
9016
|
<xsl:call-template name="setTableCellAttributes"/>
|
8868
9017
|
|
8869
|
-
<fo:block>
|
9018
|
+
<fo:block role="SKIP">
|
8870
9019
|
<xsl:apply-templates/>
|
8871
9020
|
</fo:block>
|
8872
9021
|
</fo:table-cell>
|
@@ -8888,7 +9037,7 @@
|
|
8888
9037
|
|
8889
9038
|
<xsl:call-template name="setTableCellAttributes"/>
|
8890
9039
|
|
8891
|
-
<fo:block>
|
9040
|
+
<fo:block role="SKIP">
|
8892
9041
|
<xsl:apply-templates/>
|
8893
9042
|
</fo:block>
|
8894
9043
|
</fo:table-cell>
|
@@ -9083,6 +9232,12 @@
|
|
9083
9232
|
|
9084
9233
|
</xsl:template>
|
9085
9234
|
|
9235
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
|
9236
|
+
<fo:inline xsl:use-attribute-sets="example-name-style">
|
9237
|
+
<xsl:apply-templates/>
|
9238
|
+
</fo:inline>
|
9239
|
+
</xsl:template>
|
9240
|
+
|
9086
9241
|
<xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
9087
9242
|
<xsl:param name="fo_element">block</xsl:param>
|
9088
9243
|
|
@@ -9648,6 +9803,50 @@
|
|
9648
9803
|
<xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
|
9649
9804
|
</xsl:choose>
|
9650
9805
|
</xsl:when>
|
9806
|
+
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
9807
|
+
|
9808
|
+
<xsl:variable name="label">
|
9809
|
+
|
9810
|
+
<xsl:variable name="type" select="../@type"/>
|
9811
|
+
|
9812
|
+
<xsl:variable name="style_prefix_">
|
9813
|
+
<xsl:if test="$type = 'roman'">
|
9814
|
+
<!-- Example: (i) -->
|
9815
|
+
</xsl:if>
|
9816
|
+
</xsl:variable>
|
9817
|
+
<xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
|
9818
|
+
|
9819
|
+
<xsl:variable name="style_suffix_">
|
9820
|
+
<xsl:choose>
|
9821
|
+
<xsl:when test="$type = 'arabic'">
|
9822
|
+
)
|
9823
|
+
</xsl:when>
|
9824
|
+
<xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
|
9825
|
+
)
|
9826
|
+
</xsl:when>
|
9827
|
+
<xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
|
9828
|
+
.
|
9829
|
+
</xsl:when>
|
9830
|
+
<xsl:when test="$type = 'roman'">
|
9831
|
+
)
|
9832
|
+
</xsl:when>
|
9833
|
+
<xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
|
9834
|
+
</xsl:choose>
|
9835
|
+
</xsl:variable>
|
9836
|
+
<xsl:variable name="style_suffix" select="normalize-space($style_suffix_)"/>
|
9837
|
+
|
9838
|
+
<xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
|
9839
|
+
<xsl:value-of select="$style_prefix"/>
|
9840
|
+
</xsl:if>
|
9841
|
+
<xsl:value-of select="@label"/>
|
9842
|
+
<xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
|
9843
|
+
<xsl:value-of select="$style_suffix"/>
|
9844
|
+
</xsl:if>
|
9845
|
+
</xsl:variable>
|
9846
|
+
|
9847
|
+
<xsl:value-of select="normalize-space($label)"/>
|
9848
|
+
|
9849
|
+
</xsl:when>
|
9651
9850
|
<xsl:otherwise> <!-- for ordered lists 'ol' -->
|
9652
9851
|
|
9653
9852
|
<!-- Example: for BSI <?list-start 2?> -->
|
@@ -9705,10 +9904,10 @@
|
|
9705
9904
|
<xsl:when test="$type = 'arabic'">
|
9706
9905
|
1)
|
9707
9906
|
</xsl:when>
|
9708
|
-
<xsl:when test="$type = 'alphabet'">
|
9907
|
+
<xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
|
9709
9908
|
a)
|
9710
9909
|
</xsl:when>
|
9711
|
-
<xsl:when test="$type = 'alphabet_upper'">
|
9910
|
+
<xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
|
9712
9911
|
A.
|
9713
9912
|
</xsl:when>
|
9714
9913
|
<xsl:when test="$type = 'roman'">
|
@@ -9846,7 +10045,7 @@
|
|
9846
10045
|
<xsl:call-template name="refine_list-item-style"/>
|
9847
10046
|
|
9848
10047
|
<fo:list-item-label end-indent="label-end()">
|
9849
|
-
<fo:block xsl:use-attribute-sets="list-item-label-style">
|
10048
|
+
<fo:block xsl:use-attribute-sets="list-item-label-style" role="SKIP">
|
9850
10049
|
|
9851
10050
|
<xsl:call-template name="refine_list-item-label-style"/>
|
9852
10051
|
|
@@ -9860,7 +10059,7 @@
|
|
9860
10059
|
</fo:block>
|
9861
10060
|
</fo:list-item-label>
|
9862
10061
|
<fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
|
9863
|
-
<fo:block>
|
10062
|
+
<fo:block role="SKIP">
|
9864
10063
|
|
9865
10064
|
<xsl:call-template name="refine_list-item-body-style"/>
|
9866
10065
|
|
@@ -10139,10 +10338,10 @@
|
|
10139
10338
|
<fo:table-body>
|
10140
10339
|
<fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
|
10141
10340
|
|
10142
|
-
<fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
|
10143
|
-
<fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
|
10144
|
-
<fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
|
10145
|
-
<fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
|
10341
|
+
<fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
|
10342
|
+
<fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
|
10343
|
+
<fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
|
10344
|
+
<fo:table-cell border="1pt solid black"><fo:block role="SKIP">Pages</fo:block></fo:table-cell>
|
10146
10345
|
</fo:table-row>
|
10147
10346
|
<xsl:apply-templates/>
|
10148
10347
|
</fo:table-body>
|
@@ -10157,7 +10356,7 @@
|
|
10157
10356
|
|
10158
10357
|
<xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
|
10159
10358
|
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
10160
|
-
<fo:block><xsl:apply-templates/></fo:block>
|
10359
|
+
<fo:block role="SKIP"><xsl:apply-templates/></fo:block>
|
10161
10360
|
</fo:table-cell>
|
10162
10361
|
</xsl:template>
|
10163
10362
|
<!-- ============ -->
|
@@ -10242,8 +10441,8 @@
|
|
10242
10441
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
10243
10442
|
<fo:list-item>
|
10244
10443
|
<fo:list-item-label end-indent="label-end()">
|
10245
|
-
<fo:block>
|
10246
|
-
<fo:inline>
|
10444
|
+
<fo:block role="SKIP">
|
10445
|
+
<fo:inline role="SKIP">
|
10247
10446
|
|
10248
10447
|
<xsl:apply-templates select="*[local-name() = 'biblio-tag']">
|
10249
10448
|
<xsl:with-param name="biblio_tag_part">first</xsl:with-param>
|
@@ -10252,7 +10451,7 @@
|
|
10252
10451
|
</fo:block>
|
10253
10452
|
</fo:list-item-label>
|
10254
10453
|
<fo:list-item-body start-indent="body-start()">
|
10255
|
-
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style">
|
10454
|
+
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
|
10256
10455
|
<xsl:call-template name="processBibitem">
|
10257
10456
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
10258
10457
|
</xsl:call-template>
|
@@ -10473,7 +10672,7 @@
|
|
10473
10672
|
<xsl:for-each select="*[local-name() = 'tab']">
|
10474
10673
|
<xsl:variable name="current_id" select="generate-id()"/>
|
10475
10674
|
<fo:table-cell>
|
10476
|
-
<fo:block line-height-shift-adjustment="disregard-shifts">
|
10675
|
+
<fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
|
10477
10676
|
<xsl:call-template name="insert_basic_link">
|
10478
10677
|
<xsl:with-param name="element">
|
10479
10678
|
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
@@ -10491,7 +10690,7 @@
|
|
10491
10690
|
</xsl:for-each>
|
10492
10691
|
<!-- last column - for page numbers -->
|
10493
10692
|
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
10494
|
-
<fo:block>
|
10693
|
+
<fo:block role="SKIP">
|
10495
10694
|
<xsl:call-template name="insert_basic_link">
|
10496
10695
|
<xsl:with-param name="element">
|
10497
10696
|
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
data/lib/isodoc/jis/xref.rb
CHANGED
@@ -1,6 +1,19 @@
|
|
1
1
|
module IsoDoc
|
2
2
|
module JIS
|
3
3
|
class Counter < IsoDoc::XrefGen::Counter
|
4
|
+
def ol_type(list, depth)
|
5
|
+
return list["type"].to_sym if list["type"]
|
6
|
+
return :alphabet if depth == 1
|
7
|
+
|
8
|
+
:arabic
|
9
|
+
end
|
10
|
+
|
11
|
+
def listlabel(_list, depth)
|
12
|
+
case depth
|
13
|
+
when 1 then (96 + @num).chr.to_s
|
14
|
+
else @num.to_s
|
15
|
+
end
|
16
|
+
end
|
4
17
|
end
|
5
18
|
|
6
19
|
class Xref < IsoDoc::Iso::Xref
|
@@ -53,6 +66,35 @@ module IsoDoc
|
|
53
66
|
title: clause_title(clause), level: level, type: "clause",
|
54
67
|
elem: @labels["clause"] }
|
55
68
|
end
|
69
|
+
|
70
|
+
def list_item_anchor_names(list, list_anchor, depth, prev_label,
|
71
|
+
refer_list)
|
72
|
+
c = Counter.new(list["start"] ? list["start"].to_i - 1 : 0)
|
73
|
+
list.xpath(ns("./li")).each do |li|
|
74
|
+
bare_label, label = list_item_value(li, c, depth,
|
75
|
+
{ list_anchor: list_anchor, prev_label: prev_label, refer_list: refer_list })
|
76
|
+
li["id"] and @anchors[li["id"]] =
|
77
|
+
{ label: bare_label, bare_xref: "#{bare_label})",
|
78
|
+
xref: "#{label})", type: "listitem", refer_list:
|
79
|
+
refer_list, container: list_anchor[:container] }
|
80
|
+
(li.xpath(ns(".//ol")) - li.xpath(ns(".//ol//ol"))).each do |ol|
|
81
|
+
list_item_anchor_names(ol, list_anchor, depth + 1, label, false)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
def list_item_value(entry, counter, depth, opts)
|
87
|
+
label1 = counter.increment(entry).listlabel(entry.parent, depth)
|
88
|
+
if depth > 2
|
89
|
+
base = opts[:prev_label].match(/^(.*?)([0-9.]+)$/) # a) 1.1.1
|
90
|
+
label1 = "#{base[2]}.#{label1}"
|
91
|
+
[label1, list_item_anchor_label(label1, opts[:list_anchor],
|
92
|
+
base[1].sub(/[^a-z0-9]*$/, ""), opts[:refer_list])]
|
93
|
+
else
|
94
|
+
[label1, list_item_anchor_label(label1, opts[:list_anchor], opts[:prev_label],
|
95
|
+
opts[:refer_list])]
|
96
|
+
end
|
97
|
+
end
|
56
98
|
end
|
57
99
|
end
|
58
100
|
end
|
@@ -1012,6 +1012,7 @@
|
|
1012
1012
|
<ref name="del"/>
|
1013
1013
|
<ref name="span"/>
|
1014
1014
|
<ref name="erefstack"/>
|
1015
|
+
<ref name="date_inline"/>
|
1015
1016
|
</choice>
|
1016
1017
|
</define>
|
1017
1018
|
<define name="add">
|
@@ -1053,6 +1054,23 @@
|
|
1053
1054
|
</oneOrMore>
|
1054
1055
|
</element>
|
1055
1056
|
</define>
|
1057
|
+
<define name="date_inline">
|
1058
|
+
<element name="date">
|
1059
|
+
<attribute name="value"/>
|
1060
|
+
<optional>
|
1061
|
+
<attribute name="format"/>
|
1062
|
+
</optional>
|
1063
|
+
<optional>
|
1064
|
+
<attribute name="language"/>
|
1065
|
+
</optional>
|
1066
|
+
<optional>
|
1067
|
+
<attribute name="script"/>
|
1068
|
+
</optional>
|
1069
|
+
<optional>
|
1070
|
+
<attribute name="locale"/>
|
1071
|
+
</optional>
|
1072
|
+
</element>
|
1073
|
+
</define>
|
1056
1074
|
<define name="concept">
|
1057
1075
|
<element name="concept">
|
1058
1076
|
<optional>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-jis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-iso
|