metanorma-csa 2.5.0 → 2.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/csa/csa.standard.xsl +142 -38
- data/lib/isodoc/csa/html/htmlstyle.css +1 -1
- data/lib/metanorma/csa/basicdoc.rng +909 -464
- data/lib/metanorma/csa/biblio-standoc.rng +87 -20
- data/lib/metanorma/csa/biblio.rng +884 -325
- data/lib/metanorma/csa/isodoc.rng +1031 -912
- data/lib/metanorma/csa/reqt.rng +94 -72
- 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: 59fc6bb20c36f092138dea577abe66a6e1e63604316f806028487e6668aab801
|
4
|
+
data.tar.gz: 67b871bae162e214b5d3431bd588d3db240d1a82f7952fefdb54a87c1c8a38c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c3596a2d9c2d0f3ee08277e4a11d4d952336e0bcca4cdadd4ede530b057caf00d188c6afcb6712ed8f671629df94866f4655eb4942adec3fd2e55ce6d7677f9
|
7
|
+
data.tar.gz: 72a05f08024dd308f2afd68a381295e270802c7620a90111500ac5f86abb4f4a54a36a60bb9561824b98acd6bf28f88554ea1226fb79bc890d9100764cfdaf2a
|
@@ -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)"/>
|
@@ -12098,6 +12127,39 @@
|
|
12098
12127
|
</pdf:catalog>
|
12099
12128
|
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
12100
12129
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
12130
|
+
<rdf:Description xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/" xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#" xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#" rdf:about="">
|
12131
|
+
<pdfaExtension:schemas>
|
12132
|
+
<rdf:Bag>
|
12133
|
+
<rdf:li rdf:parseType="Resource">
|
12134
|
+
<pdfaSchema:namespaceURI>http://www.aiim.org/pdfua/ns/id/</pdfaSchema:namespaceURI>
|
12135
|
+
<pdfaSchema:prefix>pdfuaid</pdfaSchema:prefix>
|
12136
|
+
<pdfaSchema:schema>PDF/UA identification schema</pdfaSchema:schema>
|
12137
|
+
<pdfaSchema:property>
|
12138
|
+
<rdf:Seq>
|
12139
|
+
<rdf:li rdf:parseType="Resource">
|
12140
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
12141
|
+
<pdfaProperty:description>PDF/UA version identifier</pdfaProperty:description>
|
12142
|
+
<pdfaProperty:name>part</pdfaProperty:name>
|
12143
|
+
<pdfaProperty:valueType>Integer</pdfaProperty:valueType>
|
12144
|
+
</rdf:li>
|
12145
|
+
<rdf:li rdf:parseType="Resource">
|
12146
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
12147
|
+
<pdfaProperty:description>PDF/UA amendment identifier</pdfaProperty:description>
|
12148
|
+
<pdfaProperty:name>amd</pdfaProperty:name>
|
12149
|
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
12150
|
+
</rdf:li>
|
12151
|
+
<rdf:li rdf:parseType="Resource">
|
12152
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
12153
|
+
<pdfaProperty:description>PDF/UA corrigenda identifier</pdfaProperty:description>
|
12154
|
+
<pdfaProperty:name>corr</pdfaProperty:name>
|
12155
|
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
12156
|
+
</rdf:li>
|
12157
|
+
</rdf:Seq>
|
12158
|
+
</pdfaSchema:property>
|
12159
|
+
</rdf:li>
|
12160
|
+
</rdf:Bag>
|
12161
|
+
</pdfaExtension:schemas>
|
12162
|
+
</rdf:Description>
|
12101
12163
|
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
12102
12164
|
<!-- Dublin Core properties go here -->
|
12103
12165
|
<dc:title>
|
@@ -12108,33 +12170,57 @@
|
|
12108
12170
|
|
12109
12171
|
</xsl:for-each>
|
12110
12172
|
</xsl:variable>
|
12111
|
-
<
|
12112
|
-
<
|
12113
|
-
<xsl:
|
12114
|
-
|
12115
|
-
|
12116
|
-
|
12117
|
-
|
12118
|
-
|
12173
|
+
<rdf:Alt>
|
12174
|
+
<rdf:li xml:lang="x-default">
|
12175
|
+
<xsl:choose>
|
12176
|
+
<xsl:when test="normalize-space($title) != ''">
|
12177
|
+
<xsl:value-of select="$title"/>
|
12178
|
+
</xsl:when>
|
12179
|
+
<xsl:otherwise>
|
12180
|
+
<xsl:text> </xsl:text>
|
12181
|
+
</xsl:otherwise>
|
12182
|
+
</xsl:choose>
|
12183
|
+
</rdf:li>
|
12184
|
+
</rdf:Alt>
|
12119
12185
|
</dc:title>
|
12120
|
-
<
|
12186
|
+
<xsl:variable name="dc_creator">
|
12121
12187
|
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
12122
12188
|
|
12123
|
-
<
|
12124
|
-
<xsl:
|
12125
|
-
|
12126
|
-
|
12189
|
+
<rdf:Seq>
|
12190
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
12191
|
+
<rdf:li>
|
12192
|
+
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
12193
|
+
</rdf:li>
|
12194
|
+
<!-- <xsl:if test="position() != last()">; </xsl:if> -->
|
12195
|
+
</xsl:for-each>
|
12196
|
+
</rdf:Seq>
|
12127
12197
|
|
12128
12198
|
</xsl:for-each>
|
12129
|
-
</
|
12130
|
-
<
|
12199
|
+
</xsl:variable>
|
12200
|
+
<xsl:if test="normalize-space($dc_creator) != ''">
|
12201
|
+
<dc:creator>
|
12202
|
+
<xsl:copy-of select="$dc_creator"/>
|
12203
|
+
</dc:creator>
|
12204
|
+
</xsl:if>
|
12205
|
+
|
12206
|
+
<xsl:variable name="dc_description">
|
12131
12207
|
<xsl:variable name="abstract">
|
12132
12208
|
|
12133
12209
|
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'title'])]"/>
|
12134
12210
|
|
12135
12211
|
</xsl:variable>
|
12136
|
-
<
|
12137
|
-
|
12212
|
+
<rdf:Alt>
|
12213
|
+
<rdf:li xml:lang="x-default">
|
12214
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
12215
|
+
</rdf:li>
|
12216
|
+
</rdf:Alt>
|
12217
|
+
</xsl:variable>
|
12218
|
+
<xsl:if test="normalize-space($dc_description)">
|
12219
|
+
<dc:description>
|
12220
|
+
<xsl:copy-of select="$dc_description"/>
|
12221
|
+
</dc:description>
|
12222
|
+
</xsl:if>
|
12223
|
+
|
12138
12224
|
<pdf:Keywords>
|
12139
12225
|
<xsl:call-template name="insertKeywords">
|
12140
12226
|
<xsl:with-param name="meta">true</xsl:with-param>
|
@@ -12149,26 +12235,37 @@
|
|
12149
12235
|
</x:xmpmeta>
|
12150
12236
|
<!-- add attachments -->
|
12151
12237
|
<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
|
-
|
12238
|
+
<xsl:variable name="description" select="normalize-space(//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]/*[local-name() = 'formattedref'])"/>
|
12239
|
+
|
12240
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" filename="{@name}">
|
12241
|
+
<xsl:attribute name="src">
|
12242
|
+
<xsl:choose>
|
12243
|
+
<xsl:when test="normalize-space() != ''">
|
12244
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
12245
|
+
<xsl:value-of select="$src_attachment"/>
|
12246
|
+
</xsl:when>
|
12247
|
+
<xsl:otherwise>
|
12248
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
12249
|
+
<xsl:value-of select="$url"/>
|
12250
|
+
</xsl:otherwise>
|
12251
|
+
</xsl:choose>
|
12252
|
+
</xsl:attribute>
|
12253
|
+
<xsl:if test="$description != ''">
|
12254
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
12255
|
+
</xsl:if>
|
12256
|
+
</pdf:embedded-file>
|
12164
12257
|
</xsl:for-each>
|
12165
12258
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
12166
12259
|
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
12167
12260
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
12168
12261
|
<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="{$
|
12262
|
+
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
12263
|
+
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
12264
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$attachment_path}">
|
12265
|
+
<xsl:if test="$description != ''">
|
12266
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
12267
|
+
</xsl:if>
|
12268
|
+
</pdf:embedded-file>
|
12172
12269
|
</xsl:for-each>
|
12173
12270
|
</xsl:if>
|
12174
12271
|
</xsl:template> <!-- addPDFUAmeta -->
|
@@ -12546,7 +12643,14 @@
|
|
12546
12643
|
<xsl:value-of select="$src"/>
|
12547
12644
|
</xsl:when>
|
12548
12645
|
<xsl:otherwise>
|
12549
|
-
<xsl:
|
12646
|
+
<xsl:choose>
|
12647
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
12648
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
12649
|
+
</xsl:when>
|
12650
|
+
<xsl:otherwise>
|
12651
|
+
<xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
|
12652
|
+
</xsl:otherwise>
|
12653
|
+
</xsl:choose>
|
12550
12654
|
</xsl:otherwise>
|
12551
12655
|
</xsl:choose>
|
12552
12656
|
</xsl:template>
|