metanorma-iso 3.1.6 → 3.1.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/iso/iso.amendment.xsl +100 -64
- data/lib/isodoc/iso/iso.international-standard.xsl +100 -64
- data/lib/isodoc/iso/presentation_section.rb +0 -22
- data/lib/isodoc/iso/presentation_xml_convert.rb +5 -3
- data/lib/isodoc/iso/presentation_xref.rb +8 -8
- data/lib/isodoc/iso/xref.rb +28 -4
- data/lib/isodoc/iso/xref_section.rb +1 -2
- data/lib/metanorma/iso/biblio.rng +1 -1
- data/lib/metanorma/iso/isodoc.rng +35 -10
- data/lib/metanorma/iso/validate_list.rb +2 -2
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '06585186ffa8c41465b19f7e7b98c16af489febfa31216e5358d10f8103fe3b6'
|
4
|
+
data.tar.gz: '097fa39c8d80b04eadad3d7e301a445bdceaceccfd89bedff64830f39bb80b82'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b84e6420b6f72a068dbf66a3a52e7e6264206ea39d1eb260d1c5087bf4eeb0e28e1add9b0c66df348dbed3ba4e814f0ce78f1ed65d5718430324ba594068d4f
|
7
|
+
data.tar.gz: 4f2b014aad730605cd669832e2b0243f06223cc21bd226f261fb2597d61eb103bf91695ad20ec76c5571e53649290d13fc3e802be97b4fb88c890d5ff6684a20
|
@@ -1449,6 +1449,10 @@
|
|
1449
1449
|
<xsl:variable name="fo_cover_page">
|
1450
1450
|
<!-- cover page -->
|
1451
1451
|
<xsl:choose>
|
1452
|
+
<xsl:when test="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'coverpage-image']/mn:value/mn:image and normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:full-coverpage-replacement) = 'true'">
|
1453
|
+
<xsl:call-template name="insertCoverPageFullImage"/>
|
1454
|
+
</xsl:when>
|
1455
|
+
|
1452
1456
|
<xsl:when test="$layoutVersion = '1951'">
|
1453
1457
|
<fo:page-sequence master-reference="cover-page_1951" force-page-count="no-force">
|
1454
1458
|
<fo:static-content flow-name="cover-page-header" font-family="Times New Roman" font-size="8.5pt" font-weight="bold">
|
@@ -4969,19 +4973,27 @@
|
|
4969
4973
|
<xsl:param name="border_around_page">false</xsl:param>
|
4970
4974
|
<xsl:param name="insert_header_first">true</xsl:param>
|
4971
4975
|
<xsl:param name="insert_footer_last">true</xsl:param>
|
4972
|
-
|
4973
|
-
|
4974
|
-
<xsl:with-param name="font-weight" select="$font-weight"/>
|
4975
|
-
</xsl:call-template>
|
4976
|
-
</xsl:if>
|
4977
|
-
<xsl:call-template name="insertHeaderEven">
|
4978
|
-
<xsl:with-param name="border_around_page" select="$border_around_page"/>
|
4976
|
+
|
4977
|
+
<xsl:call-template name="insertHeader">
|
4979
4978
|
<xsl:with-param name="is_header" select="$is_header"/>
|
4979
|
+
<xsl:with-param name="border_around_page" select="$border_around_page"/>
|
4980
|
+
<xsl:with-param name="insert_header_first" select="$insert_header_first"/>
|
4980
4981
|
</xsl:call-template>
|
4981
|
-
<xsl:call-template name="
|
4982
|
+
<xsl:call-template name="insertFooter">
|
4982
4983
|
<xsl:with-param name="font-weight" select="$font-weight"/>
|
4984
|
+
<xsl:with-param name="is_footer" select="$is_footer"/>
|
4983
4985
|
<xsl:with-param name="insert_footer_last" select="$insert_footer_last"/>
|
4984
4986
|
</xsl:call-template>
|
4987
|
+
</xsl:template>
|
4988
|
+
|
4989
|
+
<xsl:template name="insertHeader">
|
4990
|
+
<xsl:param name="is_header">true</xsl:param>
|
4991
|
+
<xsl:param name="border_around_page">false</xsl:param>
|
4992
|
+
<xsl:param name="insert_header_first">true</xsl:param>
|
4993
|
+
<xsl:call-template name="insertHeaderEven">
|
4994
|
+
<xsl:with-param name="border_around_page" select="$border_around_page"/>
|
4995
|
+
<xsl:with-param name="is_header" select="$is_header"/>
|
4996
|
+
</xsl:call-template>
|
4985
4997
|
<xsl:choose>
|
4986
4998
|
<xsl:when test="$layoutVersion = '1951'"/>
|
4987
4999
|
<xsl:when test="not((($layoutVersion = '1987' and $doctype = 'technical-report') or ($layoutVersion = '1979' and $doctype = 'addendum'))) and $insert_header_first = 'true'">
|
@@ -4992,10 +5004,26 @@
|
|
4992
5004
|
<xsl:with-param name="border_around_page" select="$border_around_page"/>
|
4993
5005
|
<xsl:with-param name="is_header" select="$is_header"/>
|
4994
5006
|
</xsl:call-template>
|
5007
|
+
</xsl:template>
|
5008
|
+
|
5009
|
+
<xsl:template name="insertFooter">
|
5010
|
+
<xsl:param name="font-weight" select="'bold'"/>
|
5011
|
+
<xsl:param name="is_footer">false</xsl:param>
|
5012
|
+
<xsl:param name="insert_footer_last">true</xsl:param>
|
5013
|
+
<xsl:if test="($layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or ($layoutVersion = '1989' and $revision_date_num <= 19981231)) and $is_footer = 'true'">
|
5014
|
+
<xsl:call-template name="insertFooterFirst1972_1998">
|
5015
|
+
<xsl:with-param name="font-weight" select="$font-weight"/>
|
5016
|
+
</xsl:call-template>
|
5017
|
+
</xsl:if>
|
5018
|
+
<xsl:call-template name="insertFooterEven">
|
5019
|
+
<xsl:with-param name="font-weight" select="$font-weight"/>
|
5020
|
+
<xsl:with-param name="insert_footer_last" select="$insert_footer_last"/>
|
5021
|
+
</xsl:call-template>
|
4995
5022
|
<xsl:call-template name="insertFooterOdd">
|
4996
5023
|
<xsl:with-param name="font-weight" select="$font-weight"/>
|
4997
5024
|
</xsl:call-template>
|
4998
5025
|
</xsl:template>
|
5026
|
+
|
4999
5027
|
<xsl:variable name="font-size_header">
|
5000
5028
|
<xsl:choose>
|
5001
5029
|
<xsl:when test="$layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989'">11pt</xsl:when>
|
@@ -9392,86 +9420,80 @@
|
|
9392
9420
|
</xsl:if>
|
9393
9421
|
</xsl:template>
|
9394
9422
|
|
9395
|
-
<xsl:attribute-set name="term-
|
9423
|
+
<xsl:attribute-set name="term-number-style">
|
9396
9424
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
9397
9425
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
9398
9426
|
</xsl:attribute-set> <!-- term-name-style -->
|
9399
9427
|
|
9400
|
-
<xsl:template name="refine_term-
|
9401
|
-
</xsl:template>
|
9402
|
-
|
9403
|
-
<xsl:attribute-set name="preferred-style">
|
9404
|
-
</xsl:attribute-set> <!-- preferred-style -->
|
9405
|
-
|
9406
|
-
<xsl:template name="refine_preferred-style">
|
9428
|
+
<xsl:template name="refine_term-number-style">
|
9407
9429
|
</xsl:template>
|
9408
9430
|
|
9409
|
-
<xsl:attribute-set name="preferred-block-style">
|
9431
|
+
<xsl:attribute-set name="term-preferred-block-style">
|
9410
9432
|
<xsl:attribute name="line-height">1.1</xsl:attribute>
|
9411
9433
|
</xsl:attribute-set> <!-- preferred-block-style -->
|
9412
9434
|
|
9413
|
-
<xsl:template name="
|
9435
|
+
<xsl:template name="refine_term-preferred-block-style">
|
9414
9436
|
</xsl:template>
|
9415
9437
|
|
9416
|
-
<xsl:attribute-set name="preferred-
|
9438
|
+
<xsl:attribute-set name="term-preferred-style">
|
9417
9439
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
9418
9440
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
9419
9441
|
</xsl:attribute-set> <!-- preferred-term-style -->
|
9420
9442
|
|
9421
|
-
<xsl:template name="
|
9443
|
+
<xsl:template name="refine_term-preferred-style">
|
9422
9444
|
<xsl:if test="mn:strong">
|
9423
9445
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
9424
9446
|
</xsl:if>
|
9425
9447
|
</xsl:template>
|
9426
9448
|
|
9427
|
-
<xsl:attribute-set name="domain-style">
|
9428
|
-
</xsl:attribute-set> <!-- domain-style -->
|
9449
|
+
<xsl:attribute-set name="term-domain-style">
|
9450
|
+
</xsl:attribute-set> <!-- term-domain-style -->
|
9429
9451
|
|
9430
|
-
<xsl:template name="
|
9452
|
+
<xsl:template name="refine_term-domain-style">
|
9431
9453
|
</xsl:template>
|
9432
9454
|
|
9433
|
-
<xsl:attribute-set name="admitted-style">
|
9434
|
-
</xsl:attribute-set> <!-- admitted-style -->
|
9455
|
+
<xsl:attribute-set name="term-admitted-style">
|
9456
|
+
</xsl:attribute-set> <!-- term-admitted-style -->
|
9435
9457
|
|
9436
|
-
<xsl:template name="
|
9458
|
+
<xsl:template name="refine_term-admitted-style">
|
9437
9459
|
</xsl:template>
|
9438
9460
|
|
9439
|
-
<xsl:attribute-set name="deprecates-style">
|
9440
|
-
</xsl:attribute-set> <!-- deprecates-style -->
|
9461
|
+
<xsl:attribute-set name="term-deprecates-style">
|
9462
|
+
</xsl:attribute-set> <!-- term-deprecates-style -->
|
9441
9463
|
|
9442
|
-
<xsl:template name="
|
9464
|
+
<xsl:template name="refine_term-deprecates-style">
|
9443
9465
|
</xsl:template>
|
9444
9466
|
|
9445
|
-
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
9467
|
+
<xsl:attribute-set name="term-related-block-style" use-attribute-sets="term-preferred-block-style">
|
9446
9468
|
</xsl:attribute-set>
|
9447
9469
|
|
9448
|
-
<xsl:template name="
|
9470
|
+
<xsl:template name="refine_term-related-block-style">
|
9449
9471
|
</xsl:template>
|
9450
9472
|
|
9451
|
-
<xsl:attribute-set name="definition-style">
|
9473
|
+
<xsl:attribute-set name="term-definition-style">
|
9452
9474
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
9453
|
-
</xsl:attribute-set> <!-- definition-style -->
|
9475
|
+
</xsl:attribute-set> <!-- term-definition-style -->
|
9454
9476
|
|
9455
|
-
<xsl:template name="
|
9477
|
+
<xsl:template name="refine_term-definition-style">
|
9456
9478
|
</xsl:template>
|
9457
9479
|
|
9458
|
-
<xsl:attribute-set name="termsource-style">
|
9480
|
+
<xsl:attribute-set name="term-termsource-style">
|
9459
9481
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
9460
|
-
</xsl:attribute-set> <!-- termsource-style -->
|
9482
|
+
</xsl:attribute-set> <!-- term-termsource-style -->
|
9461
9483
|
|
9462
|
-
<xsl:template name="
|
9463
|
-
</xsl:template> <!--
|
9484
|
+
<xsl:template name="refine_term-termsource-style">
|
9485
|
+
</xsl:template> <!-- refine_term-termsource-style -->
|
9464
9486
|
|
9465
|
-
<xsl:attribute-set name="termsource-text-style">
|
9466
|
-
</xsl:attribute-set> <!-- termsource-text-style -->
|
9487
|
+
<xsl:attribute-set name="term-termsource-text-style">
|
9488
|
+
</xsl:attribute-set> <!-- term-termsource-text-style -->
|
9467
9489
|
|
9468
|
-
<xsl:template name="
|
9490
|
+
<xsl:template name="refine_term-termsource-text-style">
|
9469
9491
|
</xsl:template>
|
9470
9492
|
|
9471
|
-
<xsl:attribute-set name="origin-style">
|
9472
|
-
</xsl:attribute-set> <!-- origin-style -->
|
9493
|
+
<xsl:attribute-set name="term-origin-style">
|
9494
|
+
</xsl:attribute-set> <!-- term-origin-style -->
|
9473
9495
|
|
9474
|
-
<xsl:template name="
|
9496
|
+
<xsl:template name="refine_term-origin-style">
|
9475
9497
|
</xsl:template>
|
9476
9498
|
|
9477
9499
|
<!-- ====== -->
|
@@ -9515,9 +9537,9 @@
|
|
9515
9537
|
<!-- modification -->
|
9516
9538
|
<!-- ====== -->
|
9517
9539
|
<xsl:template match="mn:fmt-termsource" name="termsource">
|
9518
|
-
<fo:block xsl:use-attribute-sets="termsource-style">
|
9540
|
+
<fo:block xsl:use-attribute-sets="term-termsource-style">
|
9519
9541
|
|
9520
|
-
<xsl:call-template name="
|
9542
|
+
<xsl:call-template name="refine_term-termsource-style"/>
|
9521
9543
|
|
9522
9544
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
9523
9545
|
<xsl:variable name="termsource_text">
|
@@ -9565,8 +9587,8 @@
|
|
9565
9587
|
|
9566
9588
|
<!-- text SOURCE: -->
|
9567
9589
|
<xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
|
9568
|
-
<fo:inline xsl:use-attribute-sets="termsource-text-style">
|
9569
|
-
<xsl:call-template name="
|
9590
|
+
<fo:inline xsl:use-attribute-sets="term-termsource-text-style">
|
9591
|
+
<xsl:call-template name="refine_term-termsource-text-style"/>
|
9570
9592
|
<xsl:value-of select="."/>
|
9571
9593
|
</fo:inline>
|
9572
9594
|
</xsl:template>
|
@@ -9578,8 +9600,8 @@
|
|
9578
9600
|
<xsl:if test="normalize-space(@citeas) = ''">
|
9579
9601
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
9580
9602
|
</xsl:if>
|
9581
|
-
<fo:inline xsl:use-attribute-sets="origin-style">
|
9582
|
-
<xsl:call-template name="
|
9603
|
+
<fo:inline xsl:use-attribute-sets="term-origin-style">
|
9604
|
+
<xsl:call-template name="refine_term-origin-style"/>
|
9583
9605
|
<xsl:apply-templates/>
|
9584
9606
|
</fo:inline>
|
9585
9607
|
</fo:basic-link>
|
@@ -9627,14 +9649,14 @@
|
|
9627
9649
|
<xsl:variable name="levelTerm">
|
9628
9650
|
<xsl:call-template name="getLevelTermName"/>
|
9629
9651
|
</xsl:variable>
|
9630
|
-
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
9652
|
+
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="term-preferred-block-style">
|
9631
9653
|
|
9632
|
-
<xsl:call-template name="
|
9654
|
+
<xsl:call-template name="refine_term-preferred-block-style"/>
|
9633
9655
|
|
9634
9656
|
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
|
9635
9657
|
|
9636
|
-
<fo:block xsl:use-attribute-sets="term-
|
9637
|
-
<xsl:call-template name="refine_term-
|
9658
|
+
<fo:block xsl:use-attribute-sets="term-number-style" role="SKIP">
|
9659
|
+
<xsl:call-template name="refine_term-number-style"/>
|
9638
9660
|
|
9639
9661
|
<xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
|
9640
9662
|
<xsl:call-template name="setIDforNamedDestination"/>
|
@@ -9644,8 +9666,8 @@
|
|
9644
9666
|
</fo:block>
|
9645
9667
|
</xsl:if>
|
9646
9668
|
|
9647
|
-
<fo:block xsl:use-attribute-sets="preferred-
|
9648
|
-
<xsl:call-template name="
|
9669
|
+
<fo:block xsl:use-attribute-sets="term-preferred-style" role="SKIP">
|
9670
|
+
<xsl:call-template name="refine_term-preferred-style"/>
|
9649
9671
|
|
9650
9672
|
<xsl:apply-templates/>
|
9651
9673
|
</fo:block>
|
@@ -9665,15 +9687,15 @@
|
|
9665
9687
|
<xsl:template match="mn:domain"/>
|
9666
9688
|
|
9667
9689
|
<xsl:template match="mn:fmt-admitted">
|
9668
|
-
<fo:block xsl:use-attribute-sets="admitted-style">
|
9669
|
-
<xsl:call-template name="
|
9690
|
+
<fo:block xsl:use-attribute-sets="term-admitted-style">
|
9691
|
+
<xsl:call-template name="refine_term-admitted-style"/>
|
9670
9692
|
<xsl:apply-templates/>
|
9671
9693
|
</fo:block>
|
9672
9694
|
</xsl:template>
|
9673
9695
|
|
9674
9696
|
<xsl:template match="mn:fmt-deprecates">
|
9675
|
-
<fo:block xsl:use-attribute-sets="deprecates-style">
|
9676
|
-
<xsl:call-template name="
|
9697
|
+
<fo:block xsl:use-attribute-sets="term-deprecates-style">
|
9698
|
+
<xsl:call-template name="refine_term-deprecates-style"/>
|
9677
9699
|
<xsl:apply-templates/>
|
9678
9700
|
</fo:block>
|
9679
9701
|
</xsl:template>
|
@@ -9686,8 +9708,8 @@
|
|
9686
9708
|
<!-- End Preferred, admitted, deprecated -->
|
9687
9709
|
|
9688
9710
|
<xsl:template match="mn:fmt-related">
|
9689
|
-
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
9690
|
-
<xsl:call-template name="
|
9711
|
+
<fo:block role="SKIP" xsl:use-attribute-sets="term-related-block-style">
|
9712
|
+
<xsl:call-template name="refine_term-related-block-style"/>
|
9691
9713
|
<xsl:apply-templates/>
|
9692
9714
|
</fo:block>
|
9693
9715
|
</xsl:template>
|
@@ -9701,8 +9723,8 @@
|
|
9701
9723
|
<!-- definition -->
|
9702
9724
|
<!-- ========== -->
|
9703
9725
|
<xsl:template match="mn:fmt-definition">
|
9704
|
-
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
9705
|
-
<xsl:call-template name="
|
9726
|
+
<fo:block xsl:use-attribute-sets="term-definition-style" role="SKIP">
|
9727
|
+
<xsl:call-template name="refine_term-definition-style"/>
|
9706
9728
|
<xsl:apply-templates/>
|
9707
9729
|
</fo:block>
|
9708
9730
|
</xsl:template>
|
@@ -19967,6 +19989,20 @@
|
|
19967
19989
|
</fo:block-container>
|
19968
19990
|
</xsl:template>
|
19969
19991
|
|
19992
|
+
<!-- for https://github.com/metanorma/mn-native-pdf/issues/845 -->
|
19993
|
+
<xsl:template name="insertCoverPageFullImage">
|
19994
|
+
<xsl:param name="name">coverpage-image</xsl:param>
|
19995
|
+
<xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image">
|
19996
|
+
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
19997
|
+
<fo:flow flow-name="xsl-region-body">
|
19998
|
+
<xsl:call-template name="insertBackgroundPageImage">
|
19999
|
+
<xsl:with-param name="number" select="position()"/>
|
20000
|
+
</xsl:call-template>
|
20001
|
+
</fo:flow>
|
20002
|
+
</fo:page-sequence>
|
20003
|
+
</xsl:for-each>
|
20004
|
+
</xsl:template>
|
20005
|
+
|
19970
20006
|
<xsl:template name="insertPageImage">
|
19971
20007
|
<xsl:param name="svg_content_height" select="$pageHeight"/>
|
19972
20008
|
<xsl:param name="bitmap_width" select="$pageWidth"/>
|
@@ -1449,6 +1449,10 @@
|
|
1449
1449
|
<xsl:variable name="fo_cover_page">
|
1450
1450
|
<!-- cover page -->
|
1451
1451
|
<xsl:choose>
|
1452
|
+
<xsl:when test="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'coverpage-image']/mn:value/mn:image and normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:full-coverpage-replacement) = 'true'">
|
1453
|
+
<xsl:call-template name="insertCoverPageFullImage"/>
|
1454
|
+
</xsl:when>
|
1455
|
+
|
1452
1456
|
<xsl:when test="$layoutVersion = '1951'">
|
1453
1457
|
<fo:page-sequence master-reference="cover-page_1951" force-page-count="no-force">
|
1454
1458
|
<fo:static-content flow-name="cover-page-header" font-family="Times New Roman" font-size="8.5pt" font-weight="bold">
|
@@ -4969,19 +4973,27 @@
|
|
4969
4973
|
<xsl:param name="border_around_page">false</xsl:param>
|
4970
4974
|
<xsl:param name="insert_header_first">true</xsl:param>
|
4971
4975
|
<xsl:param name="insert_footer_last">true</xsl:param>
|
4972
|
-
|
4973
|
-
|
4974
|
-
<xsl:with-param name="font-weight" select="$font-weight"/>
|
4975
|
-
</xsl:call-template>
|
4976
|
-
</xsl:if>
|
4977
|
-
<xsl:call-template name="insertHeaderEven">
|
4978
|
-
<xsl:with-param name="border_around_page" select="$border_around_page"/>
|
4976
|
+
|
4977
|
+
<xsl:call-template name="insertHeader">
|
4979
4978
|
<xsl:with-param name="is_header" select="$is_header"/>
|
4979
|
+
<xsl:with-param name="border_around_page" select="$border_around_page"/>
|
4980
|
+
<xsl:with-param name="insert_header_first" select="$insert_header_first"/>
|
4980
4981
|
</xsl:call-template>
|
4981
|
-
<xsl:call-template name="
|
4982
|
+
<xsl:call-template name="insertFooter">
|
4982
4983
|
<xsl:with-param name="font-weight" select="$font-weight"/>
|
4984
|
+
<xsl:with-param name="is_footer" select="$is_footer"/>
|
4983
4985
|
<xsl:with-param name="insert_footer_last" select="$insert_footer_last"/>
|
4984
4986
|
</xsl:call-template>
|
4987
|
+
</xsl:template>
|
4988
|
+
|
4989
|
+
<xsl:template name="insertHeader">
|
4990
|
+
<xsl:param name="is_header">true</xsl:param>
|
4991
|
+
<xsl:param name="border_around_page">false</xsl:param>
|
4992
|
+
<xsl:param name="insert_header_first">true</xsl:param>
|
4993
|
+
<xsl:call-template name="insertHeaderEven">
|
4994
|
+
<xsl:with-param name="border_around_page" select="$border_around_page"/>
|
4995
|
+
<xsl:with-param name="is_header" select="$is_header"/>
|
4996
|
+
</xsl:call-template>
|
4985
4997
|
<xsl:choose>
|
4986
4998
|
<xsl:when test="$layoutVersion = '1951'"/>
|
4987
4999
|
<xsl:when test="not((($layoutVersion = '1987' and $doctype = 'technical-report') or ($layoutVersion = '1979' and $doctype = 'addendum'))) and $insert_header_first = 'true'">
|
@@ -4992,10 +5004,26 @@
|
|
4992
5004
|
<xsl:with-param name="border_around_page" select="$border_around_page"/>
|
4993
5005
|
<xsl:with-param name="is_header" select="$is_header"/>
|
4994
5006
|
</xsl:call-template>
|
5007
|
+
</xsl:template>
|
5008
|
+
|
5009
|
+
<xsl:template name="insertFooter">
|
5010
|
+
<xsl:param name="font-weight" select="'bold'"/>
|
5011
|
+
<xsl:param name="is_footer">false</xsl:param>
|
5012
|
+
<xsl:param name="insert_footer_last">true</xsl:param>
|
5013
|
+
<xsl:if test="($layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or ($layoutVersion = '1989' and $revision_date_num <= 19981231)) and $is_footer = 'true'">
|
5014
|
+
<xsl:call-template name="insertFooterFirst1972_1998">
|
5015
|
+
<xsl:with-param name="font-weight" select="$font-weight"/>
|
5016
|
+
</xsl:call-template>
|
5017
|
+
</xsl:if>
|
5018
|
+
<xsl:call-template name="insertFooterEven">
|
5019
|
+
<xsl:with-param name="font-weight" select="$font-weight"/>
|
5020
|
+
<xsl:with-param name="insert_footer_last" select="$insert_footer_last"/>
|
5021
|
+
</xsl:call-template>
|
4995
5022
|
<xsl:call-template name="insertFooterOdd">
|
4996
5023
|
<xsl:with-param name="font-weight" select="$font-weight"/>
|
4997
5024
|
</xsl:call-template>
|
4998
5025
|
</xsl:template>
|
5026
|
+
|
4999
5027
|
<xsl:variable name="font-size_header">
|
5000
5028
|
<xsl:choose>
|
5001
5029
|
<xsl:when test="$layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989'">11pt</xsl:when>
|
@@ -9392,86 +9420,80 @@
|
|
9392
9420
|
</xsl:if>
|
9393
9421
|
</xsl:template>
|
9394
9422
|
|
9395
|
-
<xsl:attribute-set name="term-
|
9423
|
+
<xsl:attribute-set name="term-number-style">
|
9396
9424
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
9397
9425
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
9398
9426
|
</xsl:attribute-set> <!-- term-name-style -->
|
9399
9427
|
|
9400
|
-
<xsl:template name="refine_term-
|
9401
|
-
</xsl:template>
|
9402
|
-
|
9403
|
-
<xsl:attribute-set name="preferred-style">
|
9404
|
-
</xsl:attribute-set> <!-- preferred-style -->
|
9405
|
-
|
9406
|
-
<xsl:template name="refine_preferred-style">
|
9428
|
+
<xsl:template name="refine_term-number-style">
|
9407
9429
|
</xsl:template>
|
9408
9430
|
|
9409
|
-
<xsl:attribute-set name="preferred-block-style">
|
9431
|
+
<xsl:attribute-set name="term-preferred-block-style">
|
9410
9432
|
<xsl:attribute name="line-height">1.1</xsl:attribute>
|
9411
9433
|
</xsl:attribute-set> <!-- preferred-block-style -->
|
9412
9434
|
|
9413
|
-
<xsl:template name="
|
9435
|
+
<xsl:template name="refine_term-preferred-block-style">
|
9414
9436
|
</xsl:template>
|
9415
9437
|
|
9416
|
-
<xsl:attribute-set name="preferred-
|
9438
|
+
<xsl:attribute-set name="term-preferred-style">
|
9417
9439
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
9418
9440
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
9419
9441
|
</xsl:attribute-set> <!-- preferred-term-style -->
|
9420
9442
|
|
9421
|
-
<xsl:template name="
|
9443
|
+
<xsl:template name="refine_term-preferred-style">
|
9422
9444
|
<xsl:if test="mn:strong">
|
9423
9445
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
9424
9446
|
</xsl:if>
|
9425
9447
|
</xsl:template>
|
9426
9448
|
|
9427
|
-
<xsl:attribute-set name="domain-style">
|
9428
|
-
</xsl:attribute-set> <!-- domain-style -->
|
9449
|
+
<xsl:attribute-set name="term-domain-style">
|
9450
|
+
</xsl:attribute-set> <!-- term-domain-style -->
|
9429
9451
|
|
9430
|
-
<xsl:template name="
|
9452
|
+
<xsl:template name="refine_term-domain-style">
|
9431
9453
|
</xsl:template>
|
9432
9454
|
|
9433
|
-
<xsl:attribute-set name="admitted-style">
|
9434
|
-
</xsl:attribute-set> <!-- admitted-style -->
|
9455
|
+
<xsl:attribute-set name="term-admitted-style">
|
9456
|
+
</xsl:attribute-set> <!-- term-admitted-style -->
|
9435
9457
|
|
9436
|
-
<xsl:template name="
|
9458
|
+
<xsl:template name="refine_term-admitted-style">
|
9437
9459
|
</xsl:template>
|
9438
9460
|
|
9439
|
-
<xsl:attribute-set name="deprecates-style">
|
9440
|
-
</xsl:attribute-set> <!-- deprecates-style -->
|
9461
|
+
<xsl:attribute-set name="term-deprecates-style">
|
9462
|
+
</xsl:attribute-set> <!-- term-deprecates-style -->
|
9441
9463
|
|
9442
|
-
<xsl:template name="
|
9464
|
+
<xsl:template name="refine_term-deprecates-style">
|
9443
9465
|
</xsl:template>
|
9444
9466
|
|
9445
|
-
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
9467
|
+
<xsl:attribute-set name="term-related-block-style" use-attribute-sets="term-preferred-block-style">
|
9446
9468
|
</xsl:attribute-set>
|
9447
9469
|
|
9448
|
-
<xsl:template name="
|
9470
|
+
<xsl:template name="refine_term-related-block-style">
|
9449
9471
|
</xsl:template>
|
9450
9472
|
|
9451
|
-
<xsl:attribute-set name="definition-style">
|
9473
|
+
<xsl:attribute-set name="term-definition-style">
|
9452
9474
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
9453
|
-
</xsl:attribute-set> <!-- definition-style -->
|
9475
|
+
</xsl:attribute-set> <!-- term-definition-style -->
|
9454
9476
|
|
9455
|
-
<xsl:template name="
|
9477
|
+
<xsl:template name="refine_term-definition-style">
|
9456
9478
|
</xsl:template>
|
9457
9479
|
|
9458
|
-
<xsl:attribute-set name="termsource-style">
|
9480
|
+
<xsl:attribute-set name="term-termsource-style">
|
9459
9481
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
9460
|
-
</xsl:attribute-set> <!-- termsource-style -->
|
9482
|
+
</xsl:attribute-set> <!-- term-termsource-style -->
|
9461
9483
|
|
9462
|
-
<xsl:template name="
|
9463
|
-
</xsl:template> <!--
|
9484
|
+
<xsl:template name="refine_term-termsource-style">
|
9485
|
+
</xsl:template> <!-- refine_term-termsource-style -->
|
9464
9486
|
|
9465
|
-
<xsl:attribute-set name="termsource-text-style">
|
9466
|
-
</xsl:attribute-set> <!-- termsource-text-style -->
|
9487
|
+
<xsl:attribute-set name="term-termsource-text-style">
|
9488
|
+
</xsl:attribute-set> <!-- term-termsource-text-style -->
|
9467
9489
|
|
9468
|
-
<xsl:template name="
|
9490
|
+
<xsl:template name="refine_term-termsource-text-style">
|
9469
9491
|
</xsl:template>
|
9470
9492
|
|
9471
|
-
<xsl:attribute-set name="origin-style">
|
9472
|
-
</xsl:attribute-set> <!-- origin-style -->
|
9493
|
+
<xsl:attribute-set name="term-origin-style">
|
9494
|
+
</xsl:attribute-set> <!-- term-origin-style -->
|
9473
9495
|
|
9474
|
-
<xsl:template name="
|
9496
|
+
<xsl:template name="refine_term-origin-style">
|
9475
9497
|
</xsl:template>
|
9476
9498
|
|
9477
9499
|
<!-- ====== -->
|
@@ -9515,9 +9537,9 @@
|
|
9515
9537
|
<!-- modification -->
|
9516
9538
|
<!-- ====== -->
|
9517
9539
|
<xsl:template match="mn:fmt-termsource" name="termsource">
|
9518
|
-
<fo:block xsl:use-attribute-sets="termsource-style">
|
9540
|
+
<fo:block xsl:use-attribute-sets="term-termsource-style">
|
9519
9541
|
|
9520
|
-
<xsl:call-template name="
|
9542
|
+
<xsl:call-template name="refine_term-termsource-style"/>
|
9521
9543
|
|
9522
9544
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
9523
9545
|
<xsl:variable name="termsource_text">
|
@@ -9565,8 +9587,8 @@
|
|
9565
9587
|
|
9566
9588
|
<!-- text SOURCE: -->
|
9567
9589
|
<xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
|
9568
|
-
<fo:inline xsl:use-attribute-sets="termsource-text-style">
|
9569
|
-
<xsl:call-template name="
|
9590
|
+
<fo:inline xsl:use-attribute-sets="term-termsource-text-style">
|
9591
|
+
<xsl:call-template name="refine_term-termsource-text-style"/>
|
9570
9592
|
<xsl:value-of select="."/>
|
9571
9593
|
</fo:inline>
|
9572
9594
|
</xsl:template>
|
@@ -9578,8 +9600,8 @@
|
|
9578
9600
|
<xsl:if test="normalize-space(@citeas) = ''">
|
9579
9601
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
9580
9602
|
</xsl:if>
|
9581
|
-
<fo:inline xsl:use-attribute-sets="origin-style">
|
9582
|
-
<xsl:call-template name="
|
9603
|
+
<fo:inline xsl:use-attribute-sets="term-origin-style">
|
9604
|
+
<xsl:call-template name="refine_term-origin-style"/>
|
9583
9605
|
<xsl:apply-templates/>
|
9584
9606
|
</fo:inline>
|
9585
9607
|
</fo:basic-link>
|
@@ -9627,14 +9649,14 @@
|
|
9627
9649
|
<xsl:variable name="levelTerm">
|
9628
9650
|
<xsl:call-template name="getLevelTermName"/>
|
9629
9651
|
</xsl:variable>
|
9630
|
-
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
9652
|
+
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="term-preferred-block-style">
|
9631
9653
|
|
9632
|
-
<xsl:call-template name="
|
9654
|
+
<xsl:call-template name="refine_term-preferred-block-style"/>
|
9633
9655
|
|
9634
9656
|
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
|
9635
9657
|
|
9636
|
-
<fo:block xsl:use-attribute-sets="term-
|
9637
|
-
<xsl:call-template name="refine_term-
|
9658
|
+
<fo:block xsl:use-attribute-sets="term-number-style" role="SKIP">
|
9659
|
+
<xsl:call-template name="refine_term-number-style"/>
|
9638
9660
|
|
9639
9661
|
<xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
|
9640
9662
|
<xsl:call-template name="setIDforNamedDestination"/>
|
@@ -9644,8 +9666,8 @@
|
|
9644
9666
|
</fo:block>
|
9645
9667
|
</xsl:if>
|
9646
9668
|
|
9647
|
-
<fo:block xsl:use-attribute-sets="preferred-
|
9648
|
-
<xsl:call-template name="
|
9669
|
+
<fo:block xsl:use-attribute-sets="term-preferred-style" role="SKIP">
|
9670
|
+
<xsl:call-template name="refine_term-preferred-style"/>
|
9649
9671
|
|
9650
9672
|
<xsl:apply-templates/>
|
9651
9673
|
</fo:block>
|
@@ -9665,15 +9687,15 @@
|
|
9665
9687
|
<xsl:template match="mn:domain"/>
|
9666
9688
|
|
9667
9689
|
<xsl:template match="mn:fmt-admitted">
|
9668
|
-
<fo:block xsl:use-attribute-sets="admitted-style">
|
9669
|
-
<xsl:call-template name="
|
9690
|
+
<fo:block xsl:use-attribute-sets="term-admitted-style">
|
9691
|
+
<xsl:call-template name="refine_term-admitted-style"/>
|
9670
9692
|
<xsl:apply-templates/>
|
9671
9693
|
</fo:block>
|
9672
9694
|
</xsl:template>
|
9673
9695
|
|
9674
9696
|
<xsl:template match="mn:fmt-deprecates">
|
9675
|
-
<fo:block xsl:use-attribute-sets="deprecates-style">
|
9676
|
-
<xsl:call-template name="
|
9697
|
+
<fo:block xsl:use-attribute-sets="term-deprecates-style">
|
9698
|
+
<xsl:call-template name="refine_term-deprecates-style"/>
|
9677
9699
|
<xsl:apply-templates/>
|
9678
9700
|
</fo:block>
|
9679
9701
|
</xsl:template>
|
@@ -9686,8 +9708,8 @@
|
|
9686
9708
|
<!-- End Preferred, admitted, deprecated -->
|
9687
9709
|
|
9688
9710
|
<xsl:template match="mn:fmt-related">
|
9689
|
-
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
9690
|
-
<xsl:call-template name="
|
9711
|
+
<fo:block role="SKIP" xsl:use-attribute-sets="term-related-block-style">
|
9712
|
+
<xsl:call-template name="refine_term-related-block-style"/>
|
9691
9713
|
<xsl:apply-templates/>
|
9692
9714
|
</fo:block>
|
9693
9715
|
</xsl:template>
|
@@ -9701,8 +9723,8 @@
|
|
9701
9723
|
<!-- definition -->
|
9702
9724
|
<!-- ========== -->
|
9703
9725
|
<xsl:template match="mn:fmt-definition">
|
9704
|
-
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
9705
|
-
<xsl:call-template name="
|
9726
|
+
<fo:block xsl:use-attribute-sets="term-definition-style" role="SKIP">
|
9727
|
+
<xsl:call-template name="refine_term-definition-style"/>
|
9706
9728
|
<xsl:apply-templates/>
|
9707
9729
|
</fo:block>
|
9708
9730
|
</xsl:template>
|
@@ -19967,6 +19989,20 @@
|
|
19967
19989
|
</fo:block-container>
|
19968
19990
|
</xsl:template>
|
19969
19991
|
|
19992
|
+
<!-- for https://github.com/metanorma/mn-native-pdf/issues/845 -->
|
19993
|
+
<xsl:template name="insertCoverPageFullImage">
|
19994
|
+
<xsl:param name="name">coverpage-image</xsl:param>
|
19995
|
+
<xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image">
|
19996
|
+
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
19997
|
+
<fo:flow flow-name="xsl-region-body">
|
19998
|
+
<xsl:call-template name="insertBackgroundPageImage">
|
19999
|
+
<xsl:with-param name="number" select="position()"/>
|
20000
|
+
</xsl:call-template>
|
20001
|
+
</fo:flow>
|
20002
|
+
</fo:page-sequence>
|
20003
|
+
</xsl:for-each>
|
20004
|
+
</xsl:template>
|
20005
|
+
|
19970
20006
|
<xsl:template name="insertPageImage">
|
19971
20007
|
<xsl:param name="svg_content_height" select="$pageHeight"/>
|
19972
20008
|
<xsl:param name="bitmap_width" select="$pageWidth"/>
|
@@ -84,28 +84,6 @@ module IsoDoc
|
|
84
84
|
super
|
85
85
|
end
|
86
86
|
|
87
|
-
# KILL
|
88
|
-
def middle_titlex(docxml)
|
89
|
-
@meta.get[:doctitlemain].nil? || @meta.get[:doctitlemain].empty? and
|
90
|
-
return
|
91
|
-
s = docxml.at(ns("//sections")) or return
|
92
|
-
ret = "#{middle_title_main}#{middle_title_amd}"
|
93
|
-
s.add_first_child ret
|
94
|
-
end
|
95
|
-
|
96
|
-
# KILL
|
97
|
-
def middle_title_mainx
|
98
|
-
ret = "<span class='boldtitle'>#{@meta.get[:doctitleintro]}"
|
99
|
-
@meta.get[:doctitleintro] && @meta.get[:doctitlemain] and
|
100
|
-
ret += " — "
|
101
|
-
ret += @meta.get[:doctitlemain]
|
102
|
-
@meta.get[:doctitlemain] &&
|
103
|
-
(@meta.get[:doctitlepart] || @meta.get[:doctitlecomplementary]) and
|
104
|
-
ret += " — "
|
105
|
-
ret += "</span>#{middle_title_part}"
|
106
|
-
"<p class='zzSTDTitle1'>#{ret}</p>"
|
107
|
-
end
|
108
|
-
|
109
87
|
def middle_title_main
|
110
88
|
<<~OUTPUT
|
111
89
|
<p class='zzSTDTitle1'><span class='boldtitle'>{{ doctitleintro -}}
|
@@ -37,7 +37,8 @@ module IsoDoc
|
|
37
37
|
requirement docxml
|
38
38
|
recommendation docxml
|
39
39
|
requirement_render docxml
|
40
|
-
@xrefs.anchors_previous =
|
40
|
+
@xrefs.anchors_previous =
|
41
|
+
@xrefs.anchors.transform_values(&:dup) # store old xrefs of reqts
|
41
42
|
@xrefs.parse docxml
|
42
43
|
# TODO move this dependency around: requirements at root should be processed before everything else
|
43
44
|
table docxml # have table include requirements newly converted to tables
|
@@ -52,11 +53,11 @@ module IsoDoc
|
|
52
53
|
end
|
53
54
|
|
54
55
|
def figure_delim(elem)
|
55
|
-
elem.
|
56
|
+
elem.at("./ancestor::xmlns:figure") ? "  " : " — "
|
56
57
|
end
|
57
58
|
|
58
59
|
def figure_name(elem)
|
59
|
-
elem.
|
60
|
+
elem.at("./ancestor::xmlns:figure") and return ""
|
60
61
|
super
|
61
62
|
end
|
62
63
|
|
@@ -125,6 +126,7 @@ module IsoDoc
|
|
125
126
|
|
126
127
|
def table1(elem)
|
127
128
|
table1_key(elem)
|
129
|
+
#require "debug"; binding.b
|
128
130
|
if elem["class"] == "modspec"
|
129
131
|
if n = elem.at(ns(".//fmt-name"))
|
130
132
|
n.remove.name = "name"
|
@@ -51,7 +51,7 @@ module IsoDoc
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def subclause?(target, type, from)
|
54
|
-
(from&.
|
54
|
+
(from&.include?(".") && type == "clause") ||
|
55
55
|
type == "list" ||
|
56
56
|
target&.gsub(/<[^<>]+>/, "")&.match(/^IEV$|^IEC 60050-/)
|
57
57
|
end
|
@@ -83,8 +83,8 @@ module IsoDoc
|
|
83
83
|
end
|
84
84
|
|
85
85
|
def eref_localities1_zh(opt)
|
86
|
-
ret = "
|
87
|
-
ret += "–
|
86
|
+
ret = " 第<esc>#{opt[:from]}</esc>" if opt[:from]
|
87
|
+
ret += "–<esc>#{opt[:upto]}</esc>" if opt[:upto]
|
88
88
|
opt[:node]["droploc"] != "true" &&
|
89
89
|
!subclause?(opt[:target], opt[:type], opt[:from]) and
|
90
90
|
ret += eref_locality_populate(opt[:type], opt[:node], "sg")
|
@@ -93,10 +93,10 @@ module IsoDoc
|
|
93
93
|
end
|
94
94
|
|
95
95
|
def eref_localities1(opt)
|
96
|
-
|
97
|
-
|
96
|
+
opt[:type] == "anchor" and return nil
|
98
97
|
opt[:type] = opt[:type].downcase
|
99
|
-
opt[:lang]
|
98
|
+
%w(zh ko ja).include?(opt[:lang]) and
|
99
|
+
return l10n(eref_localities1_zh(opt))
|
100
100
|
ret = ""
|
101
101
|
opt[:node]["droploc"] != "true" &&
|
102
102
|
!subclause?(opt[:target], opt[:type], opt[:from]) and
|
@@ -117,8 +117,8 @@ module IsoDoc
|
|
117
117
|
container_label = prefix_container(container_container,
|
118
118
|
container_label, node, target)
|
119
119
|
l10n(connectives_spans(nested_xref
|
120
|
-
.sub("%1", "<span class='fmt-xref-container'>#{container_label}</span>")
|
121
|
-
.sub("%2", linkend)))
|
120
|
+
.sub("%1", "<span class='fmt-xref-container'><esc>#{container_label}</esc></span>")
|
121
|
+
.sub("%2", "<esc>#{linkend}</esc>")))
|
122
122
|
end
|
123
123
|
|
124
124
|
def prefix_container_template(container, node, target)
|
data/lib/isodoc/iso/xref.rb
CHANGED
@@ -82,10 +82,11 @@ module IsoDoc
|
|
82
82
|
)
|
83
83
|
if elem["unnumbered"] != "true"
|
84
84
|
# Dropping the parent figure label is specific to ISO
|
85
|
+
p = elem.at("./ancestor::xmlns:figure")
|
85
86
|
@anchors[elem["id"]][:label] = sublabel
|
86
|
-
@anchors[elem["id"]][:xref] = @anchors[
|
87
|
+
@anchors[elem["id"]][:xref] = @anchors[p["id"]][:xref] +
|
87
88
|
" " + semx(elem, sublabel) + delim_wrap(subfigure_delim)
|
88
|
-
x = @anchors[
|
89
|
+
x = @anchors[p["id"]][:container] and
|
89
90
|
@anchors[elem["id"]][:container] = x
|
90
91
|
end
|
91
92
|
end
|
@@ -205,8 +206,8 @@ module IsoDoc
|
|
205
206
|
(@anchors[id] && !@anchors[id][:has_table_prefix]) or return
|
206
207
|
@anchors[id][:has_table_prefix] = true
|
207
208
|
x = @anchors_previous[id][:xref_bare] || @anchors_previous[id][:xref]
|
208
|
-
@anchors[id][:xref] =
|
209
|
-
.sub("%1", table_label).sub("%2", x))
|
209
|
+
@anchors[id][:xref] = @klass.connectives_spans(@i18n.nested_xref
|
210
|
+
.sub("%1", table_label).sub("%2", x))
|
210
211
|
@anchors[id][:modspec] = @anchors_previous[id][:modspec]
|
211
212
|
@anchors[id][:subtype] = "modspec" # prevents citetbl style from beign applied
|
212
213
|
true
|
@@ -242,6 +243,29 @@ module IsoDoc
|
|
242
243
|
{ unnum: false, container: true })
|
243
244
|
end
|
244
245
|
end
|
246
|
+
|
247
|
+
def sequential_permission_body(id, parent_id, elem, label, klass, model,
|
248
|
+
container: false)
|
249
|
+
e = elem["id"] || elem["original-id"]
|
250
|
+
has_table_prefix = @anchors.dig(e, :has_table_prefix)
|
251
|
+
has_table_prefix and return
|
252
|
+
super
|
253
|
+
# has_table_prefix and @anchors[e][:has_table_prefix] = true # restore
|
254
|
+
end
|
255
|
+
|
256
|
+
def localise_anchors(type = nil)
|
257
|
+
@anchors.each do |id, v|
|
258
|
+
type && v[:type] != type and next
|
259
|
+
#v[:has_table_prefix] and next
|
260
|
+
# has already been l10n'd, is copied from prev iteration
|
261
|
+
%i(label value xref xref_bare modspec).each do |t|
|
262
|
+
v[t] && !v[t].empty? or next
|
263
|
+
# Skip if value unchanged from previous iteration
|
264
|
+
@anchors_previous&.dig(id, t) == v[t] and next
|
265
|
+
v[t] = @i18n.l10n(v[t])
|
266
|
+
end
|
267
|
+
end
|
268
|
+
end
|
245
269
|
end
|
246
270
|
end
|
247
271
|
end
|
@@ -33,8 +33,7 @@ module IsoDoc
|
|
33
33
|
ret = { label: num, level: level, subtype: "annex" }
|
34
34
|
ret2 = if level == 2
|
35
35
|
xref = labelled_autonum(@labels["clause"], num)
|
36
|
-
{ xref:,
|
37
|
-
elem: @labels["clause"] }
|
36
|
+
{ xref:, elem: @labels["clause"] }
|
38
37
|
else
|
39
38
|
{ xref: semx(clause, num) }
|
40
39
|
end
|
@@ -869,7 +869,7 @@ depending on whether the items exist as independent documents, or are parts of a
|
|
869
869
|
</zeroOrMore>
|
870
870
|
</element>
|
871
871
|
</define>
|
872
|
-
<define name="BibItemType"
|
872
|
+
<define name="BibItemType">
|
873
873
|
<a:documentation>Type of bibliographic item.
|
874
874
|
The value list complies with the types provided in ISO 690:2021.
|
875
875
|
NOTE: These values represent a strict superset to BibTeX
|
@@ -311,17 +311,28 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
311
311
|
</ref>
|
312
312
|
</optional>
|
313
313
|
<choice>
|
314
|
-
<a:documentation>Content of the figure</a:documentation>
|
315
|
-
<ref name="image"
|
314
|
+
<a:documentation>Content of the figure </a:documentation>
|
315
|
+
<ref name="image">
|
316
|
+
<a:documentation>by default the content of a figure is a media file</a:documentation>
|
317
|
+
</ref>
|
316
318
|
<ref name="video"/>
|
317
319
|
<ref name="audio"/>
|
318
|
-
<ref name="pre"
|
320
|
+
<ref name="pre">
|
321
|
+
<a:documentation>figures can contain ASCII art</a:documentation>
|
322
|
+
</ref>
|
319
323
|
<oneOrMore>
|
320
|
-
<ref name="paragraph-with-footnote"
|
324
|
+
<ref name="paragraph-with-footnote">
|
325
|
+
<a:documentation>figures can contain discursive art</a:documentation>
|
326
|
+
</ref>
|
321
327
|
</oneOrMore>
|
322
328
|
<zeroOrMore>
|
323
|
-
<ref name="figure"
|
329
|
+
<ref name="figure">
|
330
|
+
<a:documentation>subfigures, nested directly within a figure</a:documentation>
|
331
|
+
</ref>
|
324
332
|
</zeroOrMore>
|
333
|
+
<ref name="table">
|
334
|
+
<a:documentation>Table is understood in this context to be a tabular arrangement of subfigures</a:documentation>
|
335
|
+
</ref>
|
325
336
|
</choice>
|
326
337
|
<zeroOrMore>
|
327
338
|
<ref name="fn">
|
@@ -354,17 +365,28 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
354
365
|
</ref>
|
355
366
|
</optional>
|
356
367
|
<choice>
|
357
|
-
<a:documentation>Content of the figure</a:documentation>
|
358
|
-
<ref name="image-no-id"
|
368
|
+
<a:documentation>Content of the figure </a:documentation>
|
369
|
+
<ref name="image-no-id">
|
370
|
+
<a:documentation>by default the content of a figure is a media file</a:documentation>
|
371
|
+
</ref>
|
359
372
|
<ref name="video-no-id"/>
|
360
373
|
<ref name="audio-no-id"/>
|
361
|
-
<ref name="pre-no-id"
|
374
|
+
<ref name="pre-no-id">
|
375
|
+
<a:documentation>figures can contain ASCII art</a:documentation>
|
376
|
+
</ref>
|
362
377
|
<oneOrMore>
|
363
|
-
<ref name="paragraph-with-footnote-no-id"
|
378
|
+
<ref name="paragraph-with-footnote-no-id">
|
379
|
+
<a:documentation>figures can contain discursive art</a:documentation>
|
380
|
+
</ref>
|
364
381
|
</oneOrMore>
|
365
382
|
<zeroOrMore>
|
366
|
-
<ref name="figure-no-id"
|
383
|
+
<ref name="figure-no-id">
|
384
|
+
<a:documentation>subfigures, nested directly within a figure</a:documentation>
|
385
|
+
</ref>
|
367
386
|
</zeroOrMore>
|
387
|
+
<ref name="table-no-id">
|
388
|
+
<a:documentation>Table is understood in this context to be a tabular arrangement of subfigures</a:documentation>
|
389
|
+
</ref>
|
368
390
|
</choice>
|
369
391
|
<zeroOrMore>
|
370
392
|
<ref name="fn">
|
@@ -876,6 +898,9 @@ titlecase, or lowercase</a:documentation>
|
|
876
898
|
<data type="boolean"/>
|
877
899
|
</attribute>
|
878
900
|
</optional>
|
901
|
+
<ref name="LocalizedStringAttributes">
|
902
|
+
<a:documentation>Specify language of bibitem, can be used to render it with language-specific bibliographic style</a:documentation>
|
903
|
+
</ref>
|
879
904
|
<ref name="ReducedBibliographicItem"/>
|
880
905
|
</element>
|
881
906
|
</define>
|
@@ -86,7 +86,7 @@ module Metanorma
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def list_semicolon_phrase_punct(elem, text, last)
|
89
|
-
punct = text.strip.sub(/^.*?(\S)
|
89
|
+
punct = text.strip.sub(/^.*?(\S)\z/m, "\\1")
|
90
90
|
if last
|
91
91
|
punct == "." or
|
92
92
|
style_warning(elem, "Final list entry of broken up " \
|
@@ -105,7 +105,7 @@ module Metanorma
|
|
105
105
|
starts_uppercase?(text) or
|
106
106
|
style_warning(elem, "List entry of separate sentences must start " \
|
107
107
|
"with uppercase letter", text, display: false)
|
108
|
-
punct = text.strip.sub(/^.*?(\S)
|
108
|
+
punct = text.strip.sub(/^.*?(\S)\z/m, "\\1")
|
109
109
|
punct == "." or
|
110
110
|
style_warning(elem, "List entry of separate sentences must " \
|
111
111
|
"end with full stop", text, display: false)
|
data/metanorma-iso.gemspec
CHANGED
@@ -50,5 +50,5 @@ spec.add_development_dependency "rubocop-performance"
|
|
50
50
|
spec.add_development_dependency "simplecov", "~> 0.15"
|
51
51
|
spec.add_development_dependency "timecop", "~> 0.9"
|
52
52
|
spec.add_development_dependency "webmock"
|
53
|
-
spec.add_development_dependency "canon"
|
53
|
+
spec.add_development_dependency "canon", "= 0.1.3"
|
54
54
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.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: 2025-
|
11
|
+
date: 2025-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|
@@ -252,16 +252,16 @@ dependencies:
|
|
252
252
|
name: canon
|
253
253
|
requirement: !ruby/object:Gem::Requirement
|
254
254
|
requirements:
|
255
|
-
- -
|
255
|
+
- - '='
|
256
256
|
- !ruby/object:Gem::Version
|
257
|
-
version:
|
257
|
+
version: 0.1.3
|
258
258
|
type: :development
|
259
259
|
prerelease: false
|
260
260
|
version_requirements: !ruby/object:Gem::Requirement
|
261
261
|
requirements:
|
262
|
-
- -
|
262
|
+
- - '='
|
263
263
|
- !ruby/object:Gem::Version
|
264
|
-
version:
|
264
|
+
version: 0.1.3
|
265
265
|
description: |
|
266
266
|
metanorma-iso lets you write ISO standards in AsciiDoc syntax.
|
267
267
|
|