metanorma-csa 2.5.0 → 2.5.1
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/csa/csa.standard.xsl +68 -21
- data/lib/metanorma/csa/basicdoc.rng +71 -6
- data/lib/metanorma/csa/biblio.rng +3 -1
- data/lib/metanorma/csa/isodoc.rng +3 -0
- data/lib/metanorma/csa/reqt.rng +3 -0
- data/lib/metanorma/csa/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: dc7f3e19db0e8f8ac36c850c107dc38e455cb9ac8ea4b2fcde699a8f6c982fb0
|
4
|
+
data.tar.gz: af551eebc94bbdbe65eecc474b5252937e912ef704d954bc5d774f9a204df95d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8f9d11ebee9473e46cb0a45a553ef5758bb53a1a7d67ff45230d1e7bd970e5b11ea6356a3552a4b37828821c5be8277f644187ab052e77a63a36536c9366633
|
7
|
+
data.tar.gz: 8ec46ad091ee729cf444720580ca2efbc546d9a7462b04bd605d7f6ec5037e25db13c5a5b6470e04a9423ee14ecaf639bea518fe25730768fda7481b32bae167
|
@@ -6673,6 +6673,12 @@
|
|
6673
6673
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
6674
6674
|
<attachment filename="{@name}"/>
|
6675
6675
|
</xsl:for-each>
|
6676
|
+
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
6677
|
+
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
6678
|
+
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
6679
|
+
<attachment filename="{$attachment_path}"/>
|
6680
|
+
</xsl:for-each>
|
6681
|
+
</xsl:if>
|
6676
6682
|
</xsl:variable>
|
6677
6683
|
<xsl:variable name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
|
6678
6684
|
|
@@ -6685,7 +6691,7 @@
|
|
6685
6691
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
6686
6692
|
</xsl:when>
|
6687
6693
|
<!-- link to the PDF attachment -->
|
6688
|
-
<xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
|
6694
|
+
<xsl:when test="@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target]">
|
6689
6695
|
<xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
|
6690
6696
|
</xsl:when>
|
6691
6697
|
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
@@ -7336,7 +7342,16 @@
|
|
7336
7342
|
</xsl:variable>
|
7337
7343
|
<xsl:variable name="img_src">
|
7338
7344
|
<xsl:choose>
|
7339
|
-
<xsl:when test="not(starts-with(@src, 'data:'))"
|
7345
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
7346
|
+
<xsl:choose>
|
7347
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
7348
|
+
<xsl:value-of select="@src"/>
|
7349
|
+
</xsl:when>
|
7350
|
+
<xsl:otherwise>
|
7351
|
+
<xsl:value-of select="concat($basepath, @src)"/>
|
7352
|
+
</xsl:otherwise>
|
7353
|
+
</xsl:choose>
|
7354
|
+
</xsl:when>
|
7340
7355
|
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
7341
7356
|
</xsl:choose>
|
7342
7357
|
</xsl:variable>
|
@@ -7349,7 +7364,7 @@
|
|
7349
7364
|
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
7350
7365
|
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
7351
7366
|
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
7352
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.
|
7367
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
7353
7368
|
<xsl:value-of select="$scale"/>
|
7354
7369
|
</xsl:template>
|
7355
7370
|
|
@@ -7368,7 +7383,14 @@
|
|
7368
7383
|
<xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
|
7369
7384
|
</xsl:when>
|
7370
7385
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
7371
|
-
<xsl:
|
7386
|
+
<xsl:choose>
|
7387
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
7388
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
7389
|
+
</xsl:when>
|
7390
|
+
<xsl:otherwise>
|
7391
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
7392
|
+
</xsl:otherwise>
|
7393
|
+
</xsl:choose>
|
7372
7394
|
</xsl:when>
|
7373
7395
|
<xsl:otherwise>
|
7374
7396
|
<xsl:value-of select="@src"/>
|
@@ -7390,7 +7412,14 @@
|
|
7390
7412
|
</xsl:when>
|
7391
7413
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
7392
7414
|
<xsl:variable name="src">
|
7393
|
-
<xsl:
|
7415
|
+
<xsl:choose>
|
7416
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
7417
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
7418
|
+
</xsl:when>
|
7419
|
+
<xsl:otherwise>
|
7420
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
7421
|
+
</xsl:otherwise>
|
7422
|
+
</xsl:choose>
|
7394
7423
|
</xsl:variable>
|
7395
7424
|
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
7396
7425
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
@@ -12149,26 +12178,37 @@
|
|
12149
12178
|
</x:xmpmeta>
|
12150
12179
|
<!-- add attachments -->
|
12151
12180
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
12152
|
-
<xsl:
|
12153
|
-
|
12154
|
-
|
12155
|
-
|
12156
|
-
|
12157
|
-
|
12158
|
-
|
12159
|
-
|
12160
|
-
|
12161
|
-
|
12162
|
-
|
12163
|
-
|
12181
|
+
<xsl:variable name="description" select="normalize-space(//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]/*[local-name() = 'formattedref'])"/>
|
12182
|
+
|
12183
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" filename="{@name}">
|
12184
|
+
<xsl:attribute name="src">
|
12185
|
+
<xsl:choose>
|
12186
|
+
<xsl:when test="normalize-space() != ''">
|
12187
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
12188
|
+
<xsl:value-of select="$src_attachment"/>
|
12189
|
+
</xsl:when>
|
12190
|
+
<xsl:otherwise>
|
12191
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
12192
|
+
<xsl:value-of select="$url"/>
|
12193
|
+
</xsl:otherwise>
|
12194
|
+
</xsl:choose>
|
12195
|
+
</xsl:attribute>
|
12196
|
+
<xsl:if test="$description != ''">
|
12197
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
12198
|
+
</xsl:if>
|
12199
|
+
</pdf:embedded-file>
|
12164
12200
|
</xsl:for-each>
|
12165
12201
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
12166
12202
|
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
12167
12203
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
12168
12204
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
12169
|
-
<xsl:variable name="url" select="concat('url(file:///',$
|
12170
|
-
<xsl:variable name="
|
12171
|
-
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$
|
12205
|
+
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
12206
|
+
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
12207
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$attachment_path}">
|
12208
|
+
<xsl:if test="$description != ''">
|
12209
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
12210
|
+
</xsl:if>
|
12211
|
+
</pdf:embedded-file>
|
12172
12212
|
</xsl:for-each>
|
12173
12213
|
</xsl:if>
|
12174
12214
|
</xsl:template> <!-- addPDFUAmeta -->
|
@@ -12546,7 +12586,14 @@
|
|
12546
12586
|
<xsl:value-of select="$src"/>
|
12547
12587
|
</xsl:when>
|
12548
12588
|
<xsl:otherwise>
|
12549
|
-
<xsl:
|
12589
|
+
<xsl:choose>
|
12590
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
12591
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
12592
|
+
</xsl:when>
|
12593
|
+
<xsl:otherwise>
|
12594
|
+
<xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
|
12595
|
+
</xsl:otherwise>
|
12596
|
+
</xsl:choose>
|
12550
12597
|
</xsl:otherwise>
|
12551
12598
|
</xsl:choose>
|
12552
12599
|
</xsl:template>
|
@@ -1000,14 +1000,14 @@
|
|
1000
1000
|
<define name="PureTextElement">
|
1001
1001
|
<choice>
|
1002
1002
|
<text/>
|
1003
|
-
<ref name="
|
1004
|
-
<ref name="
|
1003
|
+
<ref name="pure_em"/>
|
1004
|
+
<ref name="pure_strong"/>
|
1005
1005
|
<ref name="sub"/>
|
1006
1006
|
<ref name="sup"/>
|
1007
|
-
<ref name="
|
1008
|
-
<ref name="
|
1009
|
-
<ref name="
|
1010
|
-
<ref name="
|
1007
|
+
<ref name="pure_tt"/>
|
1008
|
+
<ref name="pure_underline"/>
|
1009
|
+
<ref name="pure_strike"/>
|
1010
|
+
<ref name="pure_smallcap"/>
|
1011
1011
|
<ref name="br"/>
|
1012
1012
|
</choice>
|
1013
1013
|
</define>
|
@@ -1031,6 +1031,13 @@
|
|
1031
1031
|
</zeroOrMore>
|
1032
1032
|
</element>
|
1033
1033
|
</define>
|
1034
|
+
<define name="pure_em">
|
1035
|
+
<element name="em">
|
1036
|
+
<zeroOrMore>
|
1037
|
+
<ref name="PureTextElement"/>
|
1038
|
+
</zeroOrMore>
|
1039
|
+
</element>
|
1040
|
+
</define>
|
1034
1041
|
<define name="strong">
|
1035
1042
|
<element name="strong">
|
1036
1043
|
<zeroOrMore>
|
@@ -1046,6 +1053,13 @@
|
|
1046
1053
|
</zeroOrMore>
|
1047
1054
|
</element>
|
1048
1055
|
</define>
|
1056
|
+
<define name="pure_strong">
|
1057
|
+
<element name="strong">
|
1058
|
+
<zeroOrMore>
|
1059
|
+
<ref name="PureTextElement"/>
|
1060
|
+
</zeroOrMore>
|
1061
|
+
</element>
|
1062
|
+
</define>
|
1049
1063
|
<define name="tt">
|
1050
1064
|
<element name="tt">
|
1051
1065
|
<zeroOrMore>
|
@@ -1060,6 +1074,13 @@
|
|
1060
1074
|
</zeroOrMore>
|
1061
1075
|
</element>
|
1062
1076
|
</define>
|
1077
|
+
<define name="pure_tt">
|
1078
|
+
<element name="tt">
|
1079
|
+
<zeroOrMore>
|
1080
|
+
<ref name="PureTextElement"/>
|
1081
|
+
</zeroOrMore>
|
1082
|
+
</element>
|
1083
|
+
</define>
|
1063
1084
|
<define name="keyword">
|
1064
1085
|
<element name="keyword">
|
1065
1086
|
<zeroOrMore>
|
@@ -1090,13 +1111,42 @@
|
|
1090
1111
|
<zeroOrMore>
|
1091
1112
|
<choice>
|
1092
1113
|
<ref name="PureTextElement"/>
|
1114
|
+
<ref name="stem"/>
|
1115
|
+
<ref name="eref"/>
|
1116
|
+
<ref name="xref"/>
|
1117
|
+
<ref name="hyperlink"/>
|
1093
1118
|
<ref name="index"/>
|
1094
1119
|
<ref name="index-xref"/>
|
1095
1120
|
</choice>
|
1096
1121
|
</zeroOrMore>
|
1097
1122
|
</element>
|
1098
1123
|
</define>
|
1124
|
+
<define name="pure_strike">
|
1125
|
+
<element name="strike">
|
1126
|
+
<zeroOrMore>
|
1127
|
+
<ref name="PureTextElement"/>
|
1128
|
+
</zeroOrMore>
|
1129
|
+
</element>
|
1130
|
+
</define>
|
1099
1131
|
<define name="underline">
|
1132
|
+
<element name="underline">
|
1133
|
+
<optional>
|
1134
|
+
<attribute name="style"/>
|
1135
|
+
</optional>
|
1136
|
+
<zeroOrMore>
|
1137
|
+
<choice>
|
1138
|
+
<ref name="PureTextElement"/>
|
1139
|
+
<ref name="stem"/>
|
1140
|
+
<ref name="eref"/>
|
1141
|
+
<ref name="xref"/>
|
1142
|
+
<ref name="hyperlink"/>
|
1143
|
+
<ref name="index"/>
|
1144
|
+
<ref name="index-xref"/>
|
1145
|
+
</choice>
|
1146
|
+
</zeroOrMore>
|
1147
|
+
</element>
|
1148
|
+
</define>
|
1149
|
+
<define name="pure_underline">
|
1100
1150
|
<element name="underline">
|
1101
1151
|
<optional>
|
1102
1152
|
<attribute name="style"/>
|
@@ -1107,6 +1157,21 @@
|
|
1107
1157
|
</element>
|
1108
1158
|
</define>
|
1109
1159
|
<define name="smallcap">
|
1160
|
+
<element name="smallcap">
|
1161
|
+
<zeroOrMore>
|
1162
|
+
<choice>
|
1163
|
+
<ref name="PureTextElement"/>
|
1164
|
+
<ref name="stem"/>
|
1165
|
+
<ref name="eref"/>
|
1166
|
+
<ref name="xref"/>
|
1167
|
+
<ref name="hyperlink"/>
|
1168
|
+
<ref name="index"/>
|
1169
|
+
<ref name="index-xref"/>
|
1170
|
+
</choice>
|
1171
|
+
</zeroOrMore>
|
1172
|
+
</element>
|
1173
|
+
</define>
|
1174
|
+
<define name="pure_smallcap">
|
1110
1175
|
<element name="smallcap">
|
1111
1176
|
<zeroOrMore>
|
1112
1177
|
<ref name="PureTextElement"/>
|
data/lib/metanorma/csa/reqt.rng
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-csa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.1
|
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-
|
11
|
+
date: 2024-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|