metanorma-cc 2.5.2 → 2.5.3
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/cc/cc.standard.xsl +102 -7
- data/lib/isodoc/cc/html/_coverpage.css +3 -0
- data/lib/isodoc/cc/html/htmlstyle.css +6 -0
- data/lib/metanorma/cc/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: 66c15830e8c03cdf33a31399e79c7c877c8571d01e026ce58ed957f3775af78d
|
|
4
|
+
data.tar.gz: 34da7c69025deca892b3f0ce14c6085d1006ccf9e046c60ab77fb79d1a0cf849
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4d793ea61e587754be9e0875b925a4574604aec112bc557333c1fb5e8d2bb50836126e82c83c9ae0f1f32dec0b5a200d897fc4aaf03272c08256f2c21c5846dd
|
|
7
|
+
data.tar.gz: 026f27420bc99c78745abf79453b6a8cefe5699f91347a9a6695f0e642e3ab4d412bee6719ddbb0b0e641fcd06e89c23037d6af0d2bd153e7868fcabdafbf06a
|
|
@@ -3824,6 +3824,7 @@
|
|
|
3824
3824
|
|
|
3825
3825
|
<fo:block role="SKIP">
|
|
3826
3826
|
<xsl:apply-templates/>
|
|
3827
|
+
<xsl:if test="$isGenerateTableIF = 'false' and count(node()) = 0"> </xsl:if>
|
|
3827
3828
|
</fo:block>
|
|
3828
3829
|
</fo:table-cell>
|
|
3829
3830
|
</xsl:template> <!-- cell in table header row - 'th' -->
|
|
@@ -3887,6 +3888,8 @@
|
|
|
3887
3888
|
|
|
3888
3889
|
<xsl:if test="$isGenerateTableIF = 'true'"> <fo:inline id="{@id}_end">end</fo:inline></xsl:if> <!-- to determine width of text --> <!-- <xsl:value-of select="$hair_space"/> -->
|
|
3889
3890
|
|
|
3891
|
+
<xsl:if test="$isGenerateTableIF = 'false' and count(node()) = 0"> </xsl:if>
|
|
3892
|
+
|
|
3890
3893
|
</fo:block>
|
|
3891
3894
|
</fo:table-cell>
|
|
3892
3895
|
</xsl:template> <!-- td -->
|
|
@@ -6673,14 +6676,16 @@
|
|
|
6673
6676
|
<xsl:template match="*[local-name()='link']" name="link">
|
|
6674
6677
|
<xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
|
|
6675
6678
|
<xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
|
|
6679
|
+
<xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
|
|
6676
6680
|
<xsl:variable name="target">
|
|
6677
6681
|
<xsl:choose>
|
|
6678
6682
|
<xsl:when test="@updatetype = 'true'">
|
|
6679
6683
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
|
6680
6684
|
</xsl:when>
|
|
6681
6685
|
<!-- link to the PDF attachment -->
|
|
6682
|
-
<xsl:when test="
|
|
6683
|
-
<xsl:
|
|
6686
|
+
<xsl:when test="$isLinkToEmbeddedFile = 'true'">
|
|
6687
|
+
<xsl:variable name="target_file" select="java:org.metanorma.fop.Util.getFilenameFromPath(@target)"/>
|
|
6688
|
+
<xsl:value-of select="concat('url(embedded-file:', $target_file, ')')"/>
|
|
6684
6689
|
</xsl:when>
|
|
6685
6690
|
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
|
6686
6691
|
<xsl:value-of select="concat('url(embedded-file:', $target_attachment_name, ')')"/>
|
|
@@ -6711,6 +6716,11 @@
|
|
|
6711
6716
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
|
6712
6717
|
</xsl:if>
|
|
6713
6718
|
|
|
6719
|
+
<xsl:if test="$isLinkToEmbeddedFile = 'true'">
|
|
6720
|
+
<xsl:attribute name="color">inherit</xsl:attribute>
|
|
6721
|
+
<xsl:attribute name="text-decoration">none</xsl:attribute>
|
|
6722
|
+
</xsl:if>
|
|
6723
|
+
|
|
6714
6724
|
<xsl:call-template name="refine_link-style"/>
|
|
6715
6725
|
|
|
6716
6726
|
<xsl:choose>
|
|
@@ -6721,6 +6731,9 @@
|
|
|
6721
6731
|
<xsl:call-template name="insert_basic_link">
|
|
6722
6732
|
<xsl:with-param name="element">
|
|
6723
6733
|
<fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
|
|
6734
|
+
<xsl:if test="$isLinkToEmbeddedFile = 'true'">
|
|
6735
|
+
<xsl:attribute name="role">Annot</xsl:attribute>
|
|
6736
|
+
</xsl:if>
|
|
6724
6737
|
<xsl:choose>
|
|
6725
6738
|
<xsl:when test="normalize-space(.) = ''">
|
|
6726
6739
|
<xsl:call-template name="add-zero-spaces-link-java">
|
|
@@ -6733,6 +6746,10 @@
|
|
|
6733
6746
|
</xsl:otherwise>
|
|
6734
6747
|
</xsl:choose>
|
|
6735
6748
|
</fo:basic-link>
|
|
6749
|
+
<xsl:if test="$isLinkToEmbeddedFile = 'true'">
|
|
6750
|
+
<!-- reserve space at right for PaperClip icon -->
|
|
6751
|
+
<fo:inline keep-with-previous.within-line="always"> </fo:inline>
|
|
6752
|
+
</xsl:if>
|
|
6736
6753
|
</xsl:with-param>
|
|
6737
6754
|
</xsl:call-template>
|
|
6738
6755
|
</xsl:otherwise>
|
|
@@ -12251,9 +12268,14 @@
|
|
|
12251
12268
|
</x:xmpmeta>
|
|
12252
12269
|
<!-- add attachments -->
|
|
12253
12270
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
|
12254
|
-
<xsl:variable name="
|
|
12255
|
-
|
|
12256
|
-
<
|
|
12271
|
+
<xsl:variable name="bibitem_attachment_" select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]"/>
|
|
12272
|
+
<xsl:variable name="bibitem_attachment" select="xalan:nodeset($bibitem_attachment_)"/>
|
|
12273
|
+
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
|
|
12274
|
+
<xsl:variable name="filename" select="java:org.metanorma.fop.Util.getFilenameFromPath(@name)"/>
|
|
12275
|
+
<!-- Todo: need update -->
|
|
12276
|
+
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
|
|
12277
|
+
|
|
12278
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" filename="{$filename}" link-as-file-annotation="true">
|
|
12257
12279
|
<xsl:attribute name="src">
|
|
12258
12280
|
<xsl:choose>
|
|
12259
12281
|
<xsl:when test="normalize-space() != ''">
|
|
@@ -12269,18 +12291,27 @@
|
|
|
12269
12291
|
<xsl:if test="$description != ''">
|
|
12270
12292
|
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
|
12271
12293
|
</xsl:if>
|
|
12294
|
+
<xsl:if test="$afrelationship != ''">
|
|
12295
|
+
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
|
|
12296
|
+
</xsl:if>
|
|
12272
12297
|
</pdf:embedded-file>
|
|
12273
12298
|
</xsl:for-each>
|
|
12274
12299
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
|
12275
12300
|
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
|
12276
12301
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
|
12277
12302
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
|
12303
|
+
<xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
|
|
12278
12304
|
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
|
12279
12305
|
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
|
12280
|
-
|
|
12306
|
+
<!-- Todo: need update -->
|
|
12307
|
+
<xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
|
|
12308
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$attachment_name}" link-as-file-annotation="true">
|
|
12281
12309
|
<xsl:if test="$description != ''">
|
|
12282
12310
|
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
|
12283
12311
|
</xsl:if>
|
|
12312
|
+
<xsl:if test="$afrelationship != ''">
|
|
12313
|
+
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
|
|
12314
|
+
</xsl:if>
|
|
12284
12315
|
</pdf:embedded-file>
|
|
12285
12316
|
</xsl:for-each>
|
|
12286
12317
|
</xsl:if>
|
|
@@ -12300,6 +12331,12 @@
|
|
|
12300
12331
|
<!-- Get or calculate depth of the element -->
|
|
12301
12332
|
<xsl:template name="getLevel">
|
|
12302
12333
|
<xsl:param name="depth"/>
|
|
12334
|
+
<!-- <xsl:message>
|
|
12335
|
+
<xsl:choose>
|
|
12336
|
+
<xsl:when test="local-name() = 'title'">title=<xsl:value-of select="."/></xsl:when>
|
|
12337
|
+
<xsl:when test="local-name() = 'clause'">clause/title=<xsl:value-of select="*[local-name() = 'title']"/></xsl:when>
|
|
12338
|
+
</xsl:choose>
|
|
12339
|
+
</xsl:message> -->
|
|
12303
12340
|
<xsl:choose>
|
|
12304
12341
|
<xsl:when test="normalize-space(@depth) != ''">
|
|
12305
12342
|
<xsl:value-of select="@depth"/>
|
|
@@ -12320,8 +12357,27 @@
|
|
|
12320
12357
|
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
|
12321
12358
|
<xsl:value-of select="$level_total - 2"/>
|
|
12322
12359
|
</xsl:when>
|
|
12360
|
+
<xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'title']">
|
|
12361
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/>
|
|
12362
|
+
<xsl:choose>
|
|
12363
|
+
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
|
12364
|
+
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
|
12365
|
+
</xsl:when>
|
|
12366
|
+
<xsl:otherwise>
|
|
12367
|
+
<xsl:value-of select="$level_total - 2"/>
|
|
12368
|
+
</xsl:otherwise>
|
|
12369
|
+
</xsl:choose>
|
|
12370
|
+
</xsl:when>
|
|
12323
12371
|
<xsl:when test="ancestor::*[local-name() = 'sections']">
|
|
12324
|
-
<xsl:
|
|
12372
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][1]/*[local-name() = 'title']/@depth)"/>
|
|
12373
|
+
<xsl:choose>
|
|
12374
|
+
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
|
12375
|
+
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
|
12376
|
+
</xsl:when>
|
|
12377
|
+
<xsl:otherwise>
|
|
12378
|
+
<xsl:value-of select="$level_total - 1"/>
|
|
12379
|
+
</xsl:otherwise>
|
|
12380
|
+
</xsl:choose>
|
|
12325
12381
|
</xsl:when>
|
|
12326
12382
|
<xsl:when test="ancestor::*[local-name() = 'bibliography']">
|
|
12327
12383
|
<xsl:value-of select="$level_total - 1"/>
|
|
@@ -12329,6 +12385,17 @@
|
|
|
12329
12385
|
<xsl:when test="parent::*[local-name() = 'annex']">
|
|
12330
12386
|
<xsl:value-of select="$level_total - 1"/>
|
|
12331
12387
|
</xsl:when>
|
|
12388
|
+
<xsl:when test="ancestor::*[local-name() = 'annex'] and self::*[local-name() = 'title']">
|
|
12389
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/>
|
|
12390
|
+
<xsl:choose>
|
|
12391
|
+
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
|
12392
|
+
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
|
12393
|
+
</xsl:when>
|
|
12394
|
+
<xsl:otherwise>
|
|
12395
|
+
<xsl:value-of select="$level_total - 1"/>
|
|
12396
|
+
</xsl:otherwise>
|
|
12397
|
+
</xsl:choose>
|
|
12398
|
+
</xsl:when>
|
|
12332
12399
|
<xsl:when test="ancestor::*[local-name() = 'annex']">
|
|
12333
12400
|
<xsl:value-of select="$level_total"/>
|
|
12334
12401
|
</xsl:when>
|
|
@@ -12687,6 +12754,20 @@
|
|
|
12687
12754
|
|
|
12688
12755
|
<!-- END: insert cover page image -->
|
|
12689
12756
|
|
|
12757
|
+
<xsl:template name="insertVerticalChar">
|
|
12758
|
+
<xsl:param name="str"/>
|
|
12759
|
+
<xsl:if test="string-length($str) > 0">
|
|
12760
|
+
<fo:inline-container writing-mode="lr-tb" text-align="center" alignment-baseline="central" reference-orientation="90" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
|
|
12761
|
+
<fo:block-container width="1em">
|
|
12762
|
+
<fo:block line-height="1em"><xsl:value-of select="substring($str,1,1)"/></fo:block>
|
|
12763
|
+
</fo:block-container>
|
|
12764
|
+
</fo:inline-container>
|
|
12765
|
+
<xsl:call-template name="insertVerticalChar">
|
|
12766
|
+
<xsl:with-param name="str" select="substring($str, 2)"/>
|
|
12767
|
+
</xsl:call-template>
|
|
12768
|
+
</xsl:if>
|
|
12769
|
+
</xsl:template>
|
|
12770
|
+
|
|
12690
12771
|
<xsl:template name="number-to-words">
|
|
12691
12772
|
<xsl:param name="number"/>
|
|
12692
12773
|
<xsl:param name="first"/>
|
|
@@ -12974,4 +13055,18 @@
|
|
|
12974
13055
|
</xsl:if>
|
|
12975
13056
|
</xsl:template>
|
|
12976
13057
|
|
|
13058
|
+
<xsl:template match="@*|node()" mode="set_table_role_skip">
|
|
13059
|
+
<xsl:copy>
|
|
13060
|
+
<xsl:apply-templates select="@*|node()" mode="set_table_role_skip"/>
|
|
13061
|
+
</xsl:copy>
|
|
13062
|
+
</xsl:template>
|
|
13063
|
+
|
|
13064
|
+
<xsl:template match="*[starts-with(local-name(), 'table')]" mode="set_table_role_skip">
|
|
13065
|
+
<xsl:copy>
|
|
13066
|
+
<xsl:apply-templates select="@*" mode="set_table_role_skip"/>
|
|
13067
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
13068
|
+
<xsl:apply-templates select="node()" mode="set_table_role_skip"/>
|
|
13069
|
+
</xsl:copy>
|
|
13070
|
+
</xsl:template>
|
|
13071
|
+
|
|
12977
13072
|
</xsl:stylesheet>
|
|
@@ -75,6 +75,9 @@ p kbd, dt kbd, li kbd, label kbd, legend kbd, caption kbd, th kbd, td kbd,
|
|
|
75
75
|
p samp, dt samp, li samp, label samp, legend samp, caption samp, th samp, td samp {
|
|
76
76
|
font-size: {{monospacefontsize}}; }
|
|
77
77
|
|
|
78
|
+
sub, sup {
|
|
79
|
+
font-size: 0.75em; }
|
|
80
|
+
|
|
78
81
|
article, aside, details, figcaption, figure,
|
|
79
82
|
footer, header, hgroup, menu, nav, section {
|
|
80
83
|
display: block; }
|
|
@@ -75,6 +75,9 @@ p kbd, dt kbd, li kbd, label kbd, legend kbd, caption kbd, th kbd, td kbd,
|
|
|
75
75
|
p samp, dt samp, li samp, label samp, legend samp, caption samp, th samp, td samp {
|
|
76
76
|
font-size: {{monospacefontsize}}; }
|
|
77
77
|
|
|
78
|
+
sub, sup {
|
|
79
|
+
font-size: 0.75em; }
|
|
80
|
+
|
|
78
81
|
article, aside, details, figcaption, figure,
|
|
79
82
|
footer, header, hgroup, menu, nav, section {
|
|
80
83
|
display: block; }
|
|
@@ -440,6 +443,9 @@ p kbd, dt kbd, li kbd, label kbd, legend kbd, caption kbd, th kbd, td kbd,
|
|
|
440
443
|
p samp, dt samp, li samp, label samp, legend samp, caption samp, th samp, td samp {
|
|
441
444
|
font-size: {{monospacefontsize}}; }
|
|
442
445
|
|
|
446
|
+
sub, sup {
|
|
447
|
+
font-size: 0.75em; }
|
|
448
|
+
|
|
443
449
|
article, aside, details, figcaption, figure,
|
|
444
450
|
footer, header, hgroup, menu, nav, section {
|
|
445
451
|
display: block; }
|
data/lib/metanorma/cc/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-cc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.5.
|
|
4
|
+
version: 2.5.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-09-
|
|
11
|
+
date: 2024-09-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-generic
|