metanorma-jis 0.3.2 → 0.3.4
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/jis/html/style-human.css +1 -1
- data/lib/isodoc/jis/html/style-iso.css +1 -1
- data/lib/isodoc/jis/jis.international-standard.xsl +144 -38
- data/lib/metanorma/jis/basicdoc.rng +909 -464
- data/lib/metanorma/jis/biblio-standoc.rng +87 -20
- data/lib/metanorma/jis/biblio.rng +884 -325
- data/lib/metanorma/jis/isodoc.rng +1031 -912
- data/lib/metanorma/jis/reqt.rng +94 -72
- data/lib/metanorma/jis/validate.rb +4 -0
- data/lib/metanorma/jis/version.rb +1 -1
- data/lib/relaton/render-jis/config.yml +57 -0
- data/lib/relaton/render-jis/general.rb +16 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 767a090a3aebe22d2d6f00eb901394cc4c03b2e0bd27cc742ed5474234dc3ae7
|
4
|
+
data.tar.gz: f3bf668006d08059015df61d5970c17cb812f95ab524e403d0be44570e7f6925
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 415691142621e73ecad0196c8538ef4ee69a3101fb54273f93493c0ea8bf213f0d2e53b080f04834e39b85d282b043a59270b3332f37bc40e6511eeeebc4e7e1
|
7
|
+
data.tar.gz: 45c5df4d2172923555dd91a7071a06f113a2d7990608f755ee7cb9d8f7ddee1c00ec9a7b4197d09ad0d0308044ab1573ff65750913b5aedba29265880d1b0985
|
@@ -6,6 +6,8 @@
|
|
6
6
|
|
7
7
|
<xsl:variable name="debug">false</xsl:variable>
|
8
8
|
|
9
|
+
<xsl:variable name="isIgnoreComplexScripts">true</xsl:variable>
|
10
|
+
|
9
11
|
<xsl:variable name="contents_">
|
10
12
|
<xsl:variable name="bundle" select="count(//jis:jis-standard) > 1"/>
|
11
13
|
|
@@ -7724,6 +7726,12 @@
|
|
7724
7726
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
7725
7727
|
<attachment filename="{@name}"/>
|
7726
7728
|
</xsl:for-each>
|
7729
|
+
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
7730
|
+
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
7731
|
+
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
7732
|
+
<attachment filename="{$attachment_path}"/>
|
7733
|
+
</xsl:for-each>
|
7734
|
+
</xsl:if>
|
7727
7735
|
</xsl:variable>
|
7728
7736
|
<xsl:variable name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
|
7729
7737
|
|
@@ -7736,7 +7744,7 @@
|
|
7736
7744
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
7737
7745
|
</xsl:when>
|
7738
7746
|
<!-- link to the PDF attachment -->
|
7739
|
-
<xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
|
7747
|
+
<xsl:when test="@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target]">
|
7740
7748
|
<xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
|
7741
7749
|
</xsl:when>
|
7742
7750
|
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
@@ -8378,7 +8386,16 @@
|
|
8378
8386
|
</xsl:variable>
|
8379
8387
|
<xsl:variable name="img_src">
|
8380
8388
|
<xsl:choose>
|
8381
|
-
<xsl:when test="not(starts-with(@src, 'data:'))"
|
8389
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
8390
|
+
<xsl:choose>
|
8391
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
8392
|
+
<xsl:value-of select="@src"/>
|
8393
|
+
</xsl:when>
|
8394
|
+
<xsl:otherwise>
|
8395
|
+
<xsl:value-of select="concat($basepath, @src)"/>
|
8396
|
+
</xsl:otherwise>
|
8397
|
+
</xsl:choose>
|
8398
|
+
</xsl:when>
|
8382
8399
|
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
8383
8400
|
</xsl:choose>
|
8384
8401
|
</xsl:variable>
|
@@ -8391,7 +8408,7 @@
|
|
8391
8408
|
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
8392
8409
|
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
8393
8410
|
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
8394
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.
|
8411
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
8395
8412
|
<xsl:value-of select="$scale"/>
|
8396
8413
|
</xsl:template>
|
8397
8414
|
|
@@ -8410,7 +8427,14 @@
|
|
8410
8427
|
<xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
|
8411
8428
|
</xsl:when>
|
8412
8429
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
8413
|
-
<xsl:
|
8430
|
+
<xsl:choose>
|
8431
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
8432
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
8433
|
+
</xsl:when>
|
8434
|
+
<xsl:otherwise>
|
8435
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
8436
|
+
</xsl:otherwise>
|
8437
|
+
</xsl:choose>
|
8414
8438
|
</xsl:when>
|
8415
8439
|
<xsl:otherwise>
|
8416
8440
|
<xsl:value-of select="@src"/>
|
@@ -8432,7 +8456,14 @@
|
|
8432
8456
|
</xsl:when>
|
8433
8457
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
8434
8458
|
<xsl:variable name="src">
|
8435
|
-
<xsl:
|
8459
|
+
<xsl:choose>
|
8460
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
8461
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
8462
|
+
</xsl:when>
|
8463
|
+
<xsl:otherwise>
|
8464
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
8465
|
+
</xsl:otherwise>
|
8466
|
+
</xsl:choose>
|
8436
8467
|
</xsl:variable>
|
8437
8468
|
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
8438
8469
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
@@ -13277,6 +13308,39 @@
|
|
13277
13308
|
</pdf:catalog>
|
13278
13309
|
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
13279
13310
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
13311
|
+
<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="">
|
13312
|
+
<pdfaExtension:schemas>
|
13313
|
+
<rdf:Bag>
|
13314
|
+
<rdf:li rdf:parseType="Resource">
|
13315
|
+
<pdfaSchema:namespaceURI>http://www.aiim.org/pdfua/ns/id/</pdfaSchema:namespaceURI>
|
13316
|
+
<pdfaSchema:prefix>pdfuaid</pdfaSchema:prefix>
|
13317
|
+
<pdfaSchema:schema>PDF/UA identification schema</pdfaSchema:schema>
|
13318
|
+
<pdfaSchema:property>
|
13319
|
+
<rdf:Seq>
|
13320
|
+
<rdf:li rdf:parseType="Resource">
|
13321
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
13322
|
+
<pdfaProperty:description>PDF/UA version identifier</pdfaProperty:description>
|
13323
|
+
<pdfaProperty:name>part</pdfaProperty:name>
|
13324
|
+
<pdfaProperty:valueType>Integer</pdfaProperty:valueType>
|
13325
|
+
</rdf:li>
|
13326
|
+
<rdf:li rdf:parseType="Resource">
|
13327
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
13328
|
+
<pdfaProperty:description>PDF/UA amendment identifier</pdfaProperty:description>
|
13329
|
+
<pdfaProperty:name>amd</pdfaProperty:name>
|
13330
|
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
13331
|
+
</rdf:li>
|
13332
|
+
<rdf:li rdf:parseType="Resource">
|
13333
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
13334
|
+
<pdfaProperty:description>PDF/UA corrigenda identifier</pdfaProperty:description>
|
13335
|
+
<pdfaProperty:name>corr</pdfaProperty:name>
|
13336
|
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
13337
|
+
</rdf:li>
|
13338
|
+
</rdf:Seq>
|
13339
|
+
</pdfaSchema:property>
|
13340
|
+
</rdf:li>
|
13341
|
+
</rdf:Bag>
|
13342
|
+
</pdfaExtension:schemas>
|
13343
|
+
</rdf:Description>
|
13280
13344
|
<rdf:Description xmlns:pdf="http://ns.adobe.com/pdf/1.3/" xmlns:dc="http://purl.org/dc/elements/1.1/" rdf:about="">
|
13281
13345
|
<!-- Dublin Core properties go here -->
|
13282
13346
|
<dc:title>
|
@@ -13287,33 +13351,57 @@
|
|
13287
13351
|
|
13288
13352
|
</xsl:for-each>
|
13289
13353
|
</xsl:variable>
|
13290
|
-
<
|
13291
|
-
<
|
13292
|
-
<xsl:
|
13293
|
-
|
13294
|
-
|
13295
|
-
|
13296
|
-
|
13297
|
-
|
13354
|
+
<rdf:Alt>
|
13355
|
+
<rdf:li xml:lang="x-default">
|
13356
|
+
<xsl:choose>
|
13357
|
+
<xsl:when test="normalize-space($title) != ''">
|
13358
|
+
<xsl:value-of select="$title"/>
|
13359
|
+
</xsl:when>
|
13360
|
+
<xsl:otherwise>
|
13361
|
+
<xsl:text> </xsl:text>
|
13362
|
+
</xsl:otherwise>
|
13363
|
+
</xsl:choose>
|
13364
|
+
</rdf:li>
|
13365
|
+
</rdf:Alt>
|
13298
13366
|
</dc:title>
|
13299
|
-
<
|
13367
|
+
<xsl:variable name="dc_creator">
|
13300
13368
|
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
13301
13369
|
|
13302
|
-
<
|
13303
|
-
<xsl:
|
13304
|
-
|
13305
|
-
|
13370
|
+
<rdf:Seq>
|
13371
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
13372
|
+
<rdf:li>
|
13373
|
+
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
13374
|
+
</rdf:li>
|
13375
|
+
<!-- <xsl:if test="position() != last()">; </xsl:if> -->
|
13376
|
+
</xsl:for-each>
|
13377
|
+
</rdf:Seq>
|
13306
13378
|
|
13307
13379
|
</xsl:for-each>
|
13308
|
-
</
|
13309
|
-
<
|
13380
|
+
</xsl:variable>
|
13381
|
+
<xsl:if test="normalize-space($dc_creator) != ''">
|
13382
|
+
<dc:creator>
|
13383
|
+
<xsl:copy-of select="$dc_creator"/>
|
13384
|
+
</dc:creator>
|
13385
|
+
</xsl:if>
|
13386
|
+
|
13387
|
+
<xsl:variable name="dc_description">
|
13310
13388
|
<xsl:variable name="abstract">
|
13311
13389
|
|
13312
13390
|
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'title'])]"/>
|
13313
13391
|
|
13314
13392
|
</xsl:variable>
|
13315
|
-
<
|
13316
|
-
|
13393
|
+
<rdf:Alt>
|
13394
|
+
<rdf:li xml:lang="x-default">
|
13395
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
13396
|
+
</rdf:li>
|
13397
|
+
</rdf:Alt>
|
13398
|
+
</xsl:variable>
|
13399
|
+
<xsl:if test="normalize-space($dc_description)">
|
13400
|
+
<dc:description>
|
13401
|
+
<xsl:copy-of select="$dc_description"/>
|
13402
|
+
</dc:description>
|
13403
|
+
</xsl:if>
|
13404
|
+
|
13317
13405
|
<pdf:Keywords>
|
13318
13406
|
<xsl:call-template name="insertKeywords">
|
13319
13407
|
<xsl:with-param name="meta">true</xsl:with-param>
|
@@ -13328,26 +13416,37 @@
|
|
13328
13416
|
</x:xmpmeta>
|
13329
13417
|
<!-- add attachments -->
|
13330
13418
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
13331
|
-
<xsl:
|
13332
|
-
|
13333
|
-
|
13334
|
-
|
13335
|
-
|
13336
|
-
|
13337
|
-
|
13338
|
-
|
13339
|
-
|
13340
|
-
|
13341
|
-
|
13342
|
-
|
13419
|
+
<xsl:variable name="description" select="normalize-space(//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]/*[local-name() = 'formattedref'])"/>
|
13420
|
+
|
13421
|
+
<pdf:embedded-file filename="{@name}">
|
13422
|
+
<xsl:attribute name="src">
|
13423
|
+
<xsl:choose>
|
13424
|
+
<xsl:when test="normalize-space() != ''">
|
13425
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
13426
|
+
<xsl:value-of select="$src_attachment"/>
|
13427
|
+
</xsl:when>
|
13428
|
+
<xsl:otherwise>
|
13429
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
13430
|
+
<xsl:value-of select="$url"/>
|
13431
|
+
</xsl:otherwise>
|
13432
|
+
</xsl:choose>
|
13433
|
+
</xsl:attribute>
|
13434
|
+
<xsl:if test="$description != ''">
|
13435
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
13436
|
+
</xsl:if>
|
13437
|
+
</pdf:embedded-file>
|
13343
13438
|
</xsl:for-each>
|
13344
13439
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
13345
13440
|
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
13346
13441
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
13347
13442
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
13348
|
-
<xsl:variable name="url" select="concat('url(file:///',$
|
13349
|
-
<xsl:variable name="
|
13350
|
-
<pdf:embedded-file src="{$url}" filename="{$
|
13443
|
+
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
13444
|
+
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
13445
|
+
<pdf:embedded-file src="{$url}" filename="{$attachment_path}">
|
13446
|
+
<xsl:if test="$description != ''">
|
13447
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
13448
|
+
</xsl:if>
|
13449
|
+
</pdf:embedded-file>
|
13351
13450
|
</xsl:for-each>
|
13352
13451
|
</xsl:if>
|
13353
13452
|
</xsl:template> <!-- addPDFUAmeta -->
|
@@ -13723,7 +13822,14 @@
|
|
13723
13822
|
<xsl:value-of select="$src"/>
|
13724
13823
|
</xsl:when>
|
13725
13824
|
<xsl:otherwise>
|
13726
|
-
<xsl:
|
13825
|
+
<xsl:choose>
|
13826
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
13827
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
13828
|
+
</xsl:when>
|
13829
|
+
<xsl:otherwise>
|
13830
|
+
<xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
|
13831
|
+
</xsl:otherwise>
|
13832
|
+
</xsl:choose>
|
13727
13833
|
</xsl:otherwise>
|
13728
13834
|
</xsl:choose>
|
13729
13835
|
</xsl:template>
|