metanorma-ribose 2.5.0 → 2.5.2
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/ribose/html/htmlstyle.css +1 -1
- data/lib/isodoc/ribose/ribose.standard.xsl +142 -38
- data/lib/metanorma/ribose/basicdoc.rng +909 -464
- data/lib/metanorma/ribose/biblio-standoc.rng +87 -20
- data/lib/metanorma/ribose/biblio.rng +884 -325
- data/lib/metanorma/ribose/isodoc.rng +1031 -912
- data/lib/metanorma/ribose/reqt.rng +94 -72
- data/lib/metanorma/ribose/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: edac65eda4eb9b0bbe575ac4770019b2f4e65fd77c626b97caa74af6a6187d78
|
|
4
|
+
data.tar.gz: f3589092a64694540b3160ab7c66b8342beb3bf1279bff17927126a904dae8bc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9532a580feb0eafd71645919b0faf9d9e8aafdb071f112b1ac342e610362241f2cd87fbf87058782e44eaafd804393e20cda801953788f266eb05fe05b9aaa96
|
|
7
|
+
data.tar.gz: 21f16a4cf1ac78a424add2d0736cba58f12cf6f02c09f0a9fa9cdc0e3d56714be44902519139282f596e97be8e4dc98160328c2478a33f1811a40fc8a629320c
|
|
@@ -7445,6 +7445,12 @@
|
|
|
7445
7445
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
|
7446
7446
|
<attachment filename="{@name}"/>
|
|
7447
7447
|
</xsl:for-each>
|
|
7448
|
+
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
|
7449
|
+
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
|
7450
|
+
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
|
7451
|
+
<attachment filename="{$attachment_path}"/>
|
|
7452
|
+
</xsl:for-each>
|
|
7453
|
+
</xsl:if>
|
|
7448
7454
|
</xsl:variable>
|
|
7449
7455
|
<xsl:variable name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
|
|
7450
7456
|
|
|
@@ -7457,7 +7463,7 @@
|
|
|
7457
7463
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
|
7458
7464
|
</xsl:when>
|
|
7459
7465
|
<!-- link to the PDF attachment -->
|
|
7460
|
-
<xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
|
|
7466
|
+
<xsl:when test="@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target]">
|
|
7461
7467
|
<xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
|
|
7462
7468
|
</xsl:when>
|
|
7463
7469
|
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
|
@@ -8109,7 +8115,16 @@
|
|
|
8109
8115
|
</xsl:variable>
|
|
8110
8116
|
<xsl:variable name="img_src">
|
|
8111
8117
|
<xsl:choose>
|
|
8112
|
-
<xsl:when test="not(starts-with(@src, 'data:'))"
|
|
8118
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
|
8119
|
+
<xsl:choose>
|
|
8120
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
|
8121
|
+
<xsl:value-of select="@src"/>
|
|
8122
|
+
</xsl:when>
|
|
8123
|
+
<xsl:otherwise>
|
|
8124
|
+
<xsl:value-of select="concat($basepath, @src)"/>
|
|
8125
|
+
</xsl:otherwise>
|
|
8126
|
+
</xsl:choose>
|
|
8127
|
+
</xsl:when>
|
|
8113
8128
|
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
|
8114
8129
|
</xsl:choose>
|
|
8115
8130
|
</xsl:variable>
|
|
@@ -8122,7 +8137,7 @@
|
|
|
8122
8137
|
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
|
8123
8138
|
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
|
8124
8139
|
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
|
8125
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.
|
|
8140
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
|
8126
8141
|
<xsl:value-of select="$scale"/>
|
|
8127
8142
|
</xsl:template>
|
|
8128
8143
|
|
|
@@ -8141,7 +8156,14 @@
|
|
|
8141
8156
|
<xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
|
|
8142
8157
|
</xsl:when>
|
|
8143
8158
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
|
8144
|
-
<xsl:
|
|
8159
|
+
<xsl:choose>
|
|
8160
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
|
8161
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
|
8162
|
+
</xsl:when>
|
|
8163
|
+
<xsl:otherwise>
|
|
8164
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
|
8165
|
+
</xsl:otherwise>
|
|
8166
|
+
</xsl:choose>
|
|
8145
8167
|
</xsl:when>
|
|
8146
8168
|
<xsl:otherwise>
|
|
8147
8169
|
<xsl:value-of select="@src"/>
|
|
@@ -8163,7 +8185,14 @@
|
|
|
8163
8185
|
</xsl:when>
|
|
8164
8186
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
|
8165
8187
|
<xsl:variable name="src">
|
|
8166
|
-
<xsl:
|
|
8188
|
+
<xsl:choose>
|
|
8189
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
|
8190
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
|
8191
|
+
</xsl:when>
|
|
8192
|
+
<xsl:otherwise>
|
|
8193
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
|
8194
|
+
</xsl:otherwise>
|
|
8195
|
+
</xsl:choose>
|
|
8167
8196
|
</xsl:variable>
|
|
8168
8197
|
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
|
8169
8198
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
|
@@ -12893,6 +12922,39 @@
|
|
|
12893
12922
|
</pdf:catalog>
|
|
12894
12923
|
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
|
12895
12924
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
|
12925
|
+
<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="">
|
|
12926
|
+
<pdfaExtension:schemas>
|
|
12927
|
+
<rdf:Bag>
|
|
12928
|
+
<rdf:li rdf:parseType="Resource">
|
|
12929
|
+
<pdfaSchema:namespaceURI>http://www.aiim.org/pdfua/ns/id/</pdfaSchema:namespaceURI>
|
|
12930
|
+
<pdfaSchema:prefix>pdfuaid</pdfaSchema:prefix>
|
|
12931
|
+
<pdfaSchema:schema>PDF/UA identification schema</pdfaSchema:schema>
|
|
12932
|
+
<pdfaSchema:property>
|
|
12933
|
+
<rdf:Seq>
|
|
12934
|
+
<rdf:li rdf:parseType="Resource">
|
|
12935
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
|
12936
|
+
<pdfaProperty:description>PDF/UA version identifier</pdfaProperty:description>
|
|
12937
|
+
<pdfaProperty:name>part</pdfaProperty:name>
|
|
12938
|
+
<pdfaProperty:valueType>Integer</pdfaProperty:valueType>
|
|
12939
|
+
</rdf:li>
|
|
12940
|
+
<rdf:li rdf:parseType="Resource">
|
|
12941
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
|
12942
|
+
<pdfaProperty:description>PDF/UA amendment identifier</pdfaProperty:description>
|
|
12943
|
+
<pdfaProperty:name>amd</pdfaProperty:name>
|
|
12944
|
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
|
12945
|
+
</rdf:li>
|
|
12946
|
+
<rdf:li rdf:parseType="Resource">
|
|
12947
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
|
12948
|
+
<pdfaProperty:description>PDF/UA corrigenda identifier</pdfaProperty:description>
|
|
12949
|
+
<pdfaProperty:name>corr</pdfaProperty:name>
|
|
12950
|
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
|
12951
|
+
</rdf:li>
|
|
12952
|
+
</rdf:Seq>
|
|
12953
|
+
</pdfaSchema:property>
|
|
12954
|
+
</rdf:li>
|
|
12955
|
+
</rdf:Bag>
|
|
12956
|
+
</pdfaExtension:schemas>
|
|
12957
|
+
</rdf:Description>
|
|
12896
12958
|
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
|
12897
12959
|
<!-- Dublin Core properties go here -->
|
|
12898
12960
|
<dc:title>
|
|
@@ -12903,33 +12965,57 @@
|
|
|
12903
12965
|
|
|
12904
12966
|
</xsl:for-each>
|
|
12905
12967
|
</xsl:variable>
|
|
12906
|
-
<
|
|
12907
|
-
<
|
|
12908
|
-
<xsl:
|
|
12909
|
-
|
|
12910
|
-
|
|
12911
|
-
|
|
12912
|
-
|
|
12913
|
-
|
|
12968
|
+
<rdf:Alt>
|
|
12969
|
+
<rdf:li xml:lang="x-default">
|
|
12970
|
+
<xsl:choose>
|
|
12971
|
+
<xsl:when test="normalize-space($title) != ''">
|
|
12972
|
+
<xsl:value-of select="$title"/>
|
|
12973
|
+
</xsl:when>
|
|
12974
|
+
<xsl:otherwise>
|
|
12975
|
+
<xsl:text> </xsl:text>
|
|
12976
|
+
</xsl:otherwise>
|
|
12977
|
+
</xsl:choose>
|
|
12978
|
+
</rdf:li>
|
|
12979
|
+
</rdf:Alt>
|
|
12914
12980
|
</dc:title>
|
|
12915
|
-
<
|
|
12981
|
+
<xsl:variable name="dc_creator">
|
|
12916
12982
|
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
|
12917
12983
|
|
|
12918
|
-
<
|
|
12919
|
-
<xsl:
|
|
12920
|
-
|
|
12921
|
-
|
|
12984
|
+
<rdf:Seq>
|
|
12985
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
|
12986
|
+
<rdf:li>
|
|
12987
|
+
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
|
12988
|
+
</rdf:li>
|
|
12989
|
+
<!-- <xsl:if test="position() != last()">; </xsl:if> -->
|
|
12990
|
+
</xsl:for-each>
|
|
12991
|
+
</rdf:Seq>
|
|
12922
12992
|
|
|
12923
12993
|
</xsl:for-each>
|
|
12924
|
-
</
|
|
12925
|
-
<
|
|
12994
|
+
</xsl:variable>
|
|
12995
|
+
<xsl:if test="normalize-space($dc_creator) != ''">
|
|
12996
|
+
<dc:creator>
|
|
12997
|
+
<xsl:copy-of select="$dc_creator"/>
|
|
12998
|
+
</dc:creator>
|
|
12999
|
+
</xsl:if>
|
|
13000
|
+
|
|
13001
|
+
<xsl:variable name="dc_description">
|
|
12926
13002
|
<xsl:variable name="abstract">
|
|
12927
13003
|
|
|
12928
13004
|
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'title'])]"/>
|
|
12929
13005
|
|
|
12930
13006
|
</xsl:variable>
|
|
12931
|
-
<
|
|
12932
|
-
|
|
13007
|
+
<rdf:Alt>
|
|
13008
|
+
<rdf:li xml:lang="x-default">
|
|
13009
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
|
13010
|
+
</rdf:li>
|
|
13011
|
+
</rdf:Alt>
|
|
13012
|
+
</xsl:variable>
|
|
13013
|
+
<xsl:if test="normalize-space($dc_description)">
|
|
13014
|
+
<dc:description>
|
|
13015
|
+
<xsl:copy-of select="$dc_description"/>
|
|
13016
|
+
</dc:description>
|
|
13017
|
+
</xsl:if>
|
|
13018
|
+
|
|
12933
13019
|
<pdf:Keywords>
|
|
12934
13020
|
<xsl:call-template name="insertKeywords">
|
|
12935
13021
|
<xsl:with-param name="meta">true</xsl:with-param>
|
|
@@ -12944,26 +13030,37 @@
|
|
|
12944
13030
|
</x:xmpmeta>
|
|
12945
13031
|
<!-- add attachments -->
|
|
12946
13032
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
|
12947
|
-
<xsl:
|
|
12948
|
-
|
|
12949
|
-
|
|
12950
|
-
|
|
12951
|
-
|
|
12952
|
-
|
|
12953
|
-
|
|
12954
|
-
|
|
12955
|
-
|
|
12956
|
-
|
|
12957
|
-
|
|
12958
|
-
|
|
13033
|
+
<xsl:variable name="description" select="normalize-space(//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]/*[local-name() = 'formattedref'])"/>
|
|
13034
|
+
|
|
13035
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" filename="{@name}">
|
|
13036
|
+
<xsl:attribute name="src">
|
|
13037
|
+
<xsl:choose>
|
|
13038
|
+
<xsl:when test="normalize-space() != ''">
|
|
13039
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
|
13040
|
+
<xsl:value-of select="$src_attachment"/>
|
|
13041
|
+
</xsl:when>
|
|
13042
|
+
<xsl:otherwise>
|
|
13043
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
|
13044
|
+
<xsl:value-of select="$url"/>
|
|
13045
|
+
</xsl:otherwise>
|
|
13046
|
+
</xsl:choose>
|
|
13047
|
+
</xsl:attribute>
|
|
13048
|
+
<xsl:if test="$description != ''">
|
|
13049
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
|
13050
|
+
</xsl:if>
|
|
13051
|
+
</pdf:embedded-file>
|
|
12959
13052
|
</xsl:for-each>
|
|
12960
13053
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
|
12961
13054
|
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
|
12962
13055
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
|
12963
13056
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
|
12964
|
-
<xsl:variable name="url" select="concat('url(file:///',$
|
|
12965
|
-
<xsl:variable name="
|
|
12966
|
-
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$
|
|
13057
|
+
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
|
13058
|
+
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
|
13059
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$attachment_path}">
|
|
13060
|
+
<xsl:if test="$description != ''">
|
|
13061
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
|
13062
|
+
</xsl:if>
|
|
13063
|
+
</pdf:embedded-file>
|
|
12967
13064
|
</xsl:for-each>
|
|
12968
13065
|
</xsl:if>
|
|
12969
13066
|
</xsl:template> <!-- addPDFUAmeta -->
|
|
@@ -13341,7 +13438,14 @@
|
|
|
13341
13438
|
<xsl:value-of select="$src"/>
|
|
13342
13439
|
</xsl:when>
|
|
13343
13440
|
<xsl:otherwise>
|
|
13344
|
-
<xsl:
|
|
13441
|
+
<xsl:choose>
|
|
13442
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
|
13443
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
|
13444
|
+
</xsl:when>
|
|
13445
|
+
<xsl:otherwise>
|
|
13446
|
+
<xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
|
|
13447
|
+
</xsl:otherwise>
|
|
13448
|
+
</xsl:choose>
|
|
13345
13449
|
</xsl:otherwise>
|
|
13346
13450
|
</xsl:choose>
|
|
13347
13451
|
</xsl:template>
|