metanorma-itu 2.5.1 → 2.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/itu/html/_coverpage.css +1 -1
- data/lib/isodoc/itu/html/htmlstyle.css +2 -2
- data/lib/isodoc/itu/itu.implementers-guide.xsl +142 -38
- data/lib/isodoc/itu/itu.in-force.xsl +142 -38
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +142 -38
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +142 -38
- data/lib/isodoc/itu/itu.recommendation.xsl +142 -38
- data/lib/isodoc/itu/itu.resolution.xsl +142 -38
- data/lib/isodoc/itu/itu.service-publication.xsl +142 -38
- data/lib/isodoc/itu/itu.technical-paper.xsl +142 -38
- data/lib/isodoc/itu/itu.technical-report.xsl +142 -38
- data/lib/metanorma/itu/basicdoc.rng +909 -464
- data/lib/metanorma/itu/biblio-standoc.rng +87 -20
- data/lib/metanorma/itu/biblio.rng +884 -325
- data/lib/metanorma/itu/isodoc.rng +1031 -912
- data/lib/metanorma/itu/reqt.rng +94 -72
- data/lib/metanorma/itu/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: 42edc246f664fa8b8888607aad04900531584ed175a96ef2a2aaea9039580468
|
4
|
+
data.tar.gz: 3927bfff57be9492a0b548c6ea3c3f1dfb9d8313263b05114d131271edb97b11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e42b70ae4cdebe42e9bfde83e0e895bbcde0fc5aade85a16e8923ffdec17a1d7feecddea76090a23794e021f5e2dfa71db6118c4c099ea44fd0962b21d11f97
|
7
|
+
data.tar.gz: ec418558ceab2dd56cf5ade9b92d90b3b48fb5da84b7e2d5956541f322e72a49294fc4df35eeb6489f437970b583aba169438da7a3d7983ca241005aaabb060e
|
@@ -232,7 +232,7 @@ h6:hover > a.anchor,
|
|
232
232
|
background-color: #777;
|
233
233
|
color: white;
|
234
234
|
cursor: pointer;
|
235
|
-
padding:
|
235
|
+
padding: 3px 0;
|
236
236
|
margin: 0;
|
237
237
|
width: 100%;
|
238
238
|
border: none;
|
@@ -615,7 +615,7 @@ h6:hover > a.anchor,
|
|
615
615
|
background-color: #777;
|
616
616
|
color: white;
|
617
617
|
cursor: pointer;
|
618
|
-
padding:
|
618
|
+
padding: 3px 0;
|
619
619
|
margin: 0;
|
620
620
|
width: 100%;
|
621
621
|
border: none;
|
@@ -8880,6 +8880,12 @@
|
|
8880
8880
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
8881
8881
|
<attachment filename="{@name}"/>
|
8882
8882
|
</xsl:for-each>
|
8883
|
+
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
8884
|
+
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
8885
|
+
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
8886
|
+
<attachment filename="{$attachment_path}"/>
|
8887
|
+
</xsl:for-each>
|
8888
|
+
</xsl:if>
|
8883
8889
|
</xsl:variable>
|
8884
8890
|
<xsl:variable name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
|
8885
8891
|
|
@@ -8892,7 +8898,7 @@
|
|
8892
8898
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
8893
8899
|
</xsl:when>
|
8894
8900
|
<!-- link to the PDF attachment -->
|
8895
|
-
<xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
|
8901
|
+
<xsl:when test="@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target]">
|
8896
8902
|
<xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
|
8897
8903
|
</xsl:when>
|
8898
8904
|
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
@@ -9547,7 +9553,16 @@
|
|
9547
9553
|
</xsl:variable>
|
9548
9554
|
<xsl:variable name="img_src">
|
9549
9555
|
<xsl:choose>
|
9550
|
-
<xsl:when test="not(starts-with(@src, 'data:'))"
|
9556
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
9557
|
+
<xsl:choose>
|
9558
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
9559
|
+
<xsl:value-of select="@src"/>
|
9560
|
+
</xsl:when>
|
9561
|
+
<xsl:otherwise>
|
9562
|
+
<xsl:value-of select="concat($basepath, @src)"/>
|
9563
|
+
</xsl:otherwise>
|
9564
|
+
</xsl:choose>
|
9565
|
+
</xsl:when>
|
9551
9566
|
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
9552
9567
|
</xsl:choose>
|
9553
9568
|
</xsl:variable>
|
@@ -9560,7 +9575,7 @@
|
|
9560
9575
|
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
9561
9576
|
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
9562
9577
|
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
9563
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.
|
9578
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
9564
9579
|
<xsl:value-of select="$scale"/>
|
9565
9580
|
</xsl:template>
|
9566
9581
|
|
@@ -9579,7 +9594,14 @@
|
|
9579
9594
|
<xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
|
9580
9595
|
</xsl:when>
|
9581
9596
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
9582
|
-
<xsl:
|
9597
|
+
<xsl:choose>
|
9598
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
9599
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
9600
|
+
</xsl:when>
|
9601
|
+
<xsl:otherwise>
|
9602
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
9603
|
+
</xsl:otherwise>
|
9604
|
+
</xsl:choose>
|
9583
9605
|
</xsl:when>
|
9584
9606
|
<xsl:otherwise>
|
9585
9607
|
<xsl:value-of select="@src"/>
|
@@ -9601,7 +9623,14 @@
|
|
9601
9623
|
</xsl:when>
|
9602
9624
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
9603
9625
|
<xsl:variable name="src">
|
9604
|
-
<xsl:
|
9626
|
+
<xsl:choose>
|
9627
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
9628
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
9629
|
+
</xsl:when>
|
9630
|
+
<xsl:otherwise>
|
9631
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
9632
|
+
</xsl:otherwise>
|
9633
|
+
</xsl:choose>
|
9605
9634
|
</xsl:variable>
|
9606
9635
|
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
9607
9636
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
@@ -14366,6 +14395,39 @@
|
|
14366
14395
|
</pdf:catalog>
|
14367
14396
|
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
14368
14397
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
14398
|
+
<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="">
|
14399
|
+
<pdfaExtension:schemas>
|
14400
|
+
<rdf:Bag>
|
14401
|
+
<rdf:li rdf:parseType="Resource">
|
14402
|
+
<pdfaSchema:namespaceURI>http://www.aiim.org/pdfua/ns/id/</pdfaSchema:namespaceURI>
|
14403
|
+
<pdfaSchema:prefix>pdfuaid</pdfaSchema:prefix>
|
14404
|
+
<pdfaSchema:schema>PDF/UA identification schema</pdfaSchema:schema>
|
14405
|
+
<pdfaSchema:property>
|
14406
|
+
<rdf:Seq>
|
14407
|
+
<rdf:li rdf:parseType="Resource">
|
14408
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
14409
|
+
<pdfaProperty:description>PDF/UA version identifier</pdfaProperty:description>
|
14410
|
+
<pdfaProperty:name>part</pdfaProperty:name>
|
14411
|
+
<pdfaProperty:valueType>Integer</pdfaProperty:valueType>
|
14412
|
+
</rdf:li>
|
14413
|
+
<rdf:li rdf:parseType="Resource">
|
14414
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
14415
|
+
<pdfaProperty:description>PDF/UA amendment identifier</pdfaProperty:description>
|
14416
|
+
<pdfaProperty:name>amd</pdfaProperty:name>
|
14417
|
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
14418
|
+
</rdf:li>
|
14419
|
+
<rdf:li rdf:parseType="Resource">
|
14420
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
14421
|
+
<pdfaProperty:description>PDF/UA corrigenda identifier</pdfaProperty:description>
|
14422
|
+
<pdfaProperty:name>corr</pdfaProperty:name>
|
14423
|
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
14424
|
+
</rdf:li>
|
14425
|
+
</rdf:Seq>
|
14426
|
+
</pdfaSchema:property>
|
14427
|
+
</rdf:li>
|
14428
|
+
</rdf:Bag>
|
14429
|
+
</pdfaExtension:schemas>
|
14430
|
+
</rdf:Description>
|
14369
14431
|
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
14370
14432
|
<!-- Dublin Core properties go here -->
|
14371
14433
|
<dc:title>
|
@@ -14376,33 +14438,57 @@
|
|
14376
14438
|
|
14377
14439
|
</xsl:for-each>
|
14378
14440
|
</xsl:variable>
|
14379
|
-
<
|
14380
|
-
<
|
14381
|
-
<xsl:
|
14382
|
-
|
14383
|
-
|
14384
|
-
|
14385
|
-
|
14386
|
-
|
14441
|
+
<rdf:Alt>
|
14442
|
+
<rdf:li xml:lang="x-default">
|
14443
|
+
<xsl:choose>
|
14444
|
+
<xsl:when test="normalize-space($title) != ''">
|
14445
|
+
<xsl:value-of select="$title"/>
|
14446
|
+
</xsl:when>
|
14447
|
+
<xsl:otherwise>
|
14448
|
+
<xsl:text> </xsl:text>
|
14449
|
+
</xsl:otherwise>
|
14450
|
+
</xsl:choose>
|
14451
|
+
</rdf:li>
|
14452
|
+
</rdf:Alt>
|
14387
14453
|
</dc:title>
|
14388
|
-
<
|
14454
|
+
<xsl:variable name="dc_creator">
|
14389
14455
|
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
14390
14456
|
|
14391
|
-
<
|
14392
|
-
<xsl:
|
14393
|
-
|
14394
|
-
|
14457
|
+
<rdf:Seq>
|
14458
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
14459
|
+
<rdf:li>
|
14460
|
+
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
14461
|
+
</rdf:li>
|
14462
|
+
<!-- <xsl:if test="position() != last()">; </xsl:if> -->
|
14463
|
+
</xsl:for-each>
|
14464
|
+
</rdf:Seq>
|
14395
14465
|
|
14396
14466
|
</xsl:for-each>
|
14397
|
-
</
|
14398
|
-
<
|
14467
|
+
</xsl:variable>
|
14468
|
+
<xsl:if test="normalize-space($dc_creator) != ''">
|
14469
|
+
<dc:creator>
|
14470
|
+
<xsl:copy-of select="$dc_creator"/>
|
14471
|
+
</dc:creator>
|
14472
|
+
</xsl:if>
|
14473
|
+
|
14474
|
+
<xsl:variable name="dc_description">
|
14399
14475
|
<xsl:variable name="abstract">
|
14400
14476
|
|
14401
14477
|
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'title'])]"/>
|
14402
14478
|
|
14403
14479
|
</xsl:variable>
|
14404
|
-
<
|
14405
|
-
|
14480
|
+
<rdf:Alt>
|
14481
|
+
<rdf:li xml:lang="x-default">
|
14482
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
14483
|
+
</rdf:li>
|
14484
|
+
</rdf:Alt>
|
14485
|
+
</xsl:variable>
|
14486
|
+
<xsl:if test="normalize-space($dc_description)">
|
14487
|
+
<dc:description>
|
14488
|
+
<xsl:copy-of select="$dc_description"/>
|
14489
|
+
</dc:description>
|
14490
|
+
</xsl:if>
|
14491
|
+
|
14406
14492
|
<pdf:Keywords>
|
14407
14493
|
<xsl:call-template name="insertKeywords">
|
14408
14494
|
<xsl:with-param name="meta">true</xsl:with-param>
|
@@ -14417,26 +14503,37 @@
|
|
14417
14503
|
</x:xmpmeta>
|
14418
14504
|
<!-- add attachments -->
|
14419
14505
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
14420
|
-
<xsl:
|
14421
|
-
|
14422
|
-
|
14423
|
-
|
14424
|
-
|
14425
|
-
|
14426
|
-
|
14427
|
-
|
14428
|
-
|
14429
|
-
|
14430
|
-
|
14431
|
-
|
14506
|
+
<xsl:variable name="description" select="normalize-space(//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]/*[local-name() = 'formattedref'])"/>
|
14507
|
+
|
14508
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" filename="{@name}">
|
14509
|
+
<xsl:attribute name="src">
|
14510
|
+
<xsl:choose>
|
14511
|
+
<xsl:when test="normalize-space() != ''">
|
14512
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
14513
|
+
<xsl:value-of select="$src_attachment"/>
|
14514
|
+
</xsl:when>
|
14515
|
+
<xsl:otherwise>
|
14516
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
14517
|
+
<xsl:value-of select="$url"/>
|
14518
|
+
</xsl:otherwise>
|
14519
|
+
</xsl:choose>
|
14520
|
+
</xsl:attribute>
|
14521
|
+
<xsl:if test="$description != ''">
|
14522
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
14523
|
+
</xsl:if>
|
14524
|
+
</pdf:embedded-file>
|
14432
14525
|
</xsl:for-each>
|
14433
14526
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
14434
14527
|
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
14435
14528
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
14436
14529
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
14437
|
-
<xsl:variable name="url" select="concat('url(file:///',$
|
14438
|
-
<xsl:variable name="
|
14439
|
-
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$
|
14530
|
+
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
14531
|
+
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
14532
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$attachment_path}">
|
14533
|
+
<xsl:if test="$description != ''">
|
14534
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
14535
|
+
</xsl:if>
|
14536
|
+
</pdf:embedded-file>
|
14440
14537
|
</xsl:for-each>
|
14441
14538
|
</xsl:if>
|
14442
14539
|
</xsl:template> <!-- addPDFUAmeta -->
|
@@ -14814,7 +14911,14 @@
|
|
14814
14911
|
<xsl:value-of select="$src"/>
|
14815
14912
|
</xsl:when>
|
14816
14913
|
<xsl:otherwise>
|
14817
|
-
<xsl:
|
14914
|
+
<xsl:choose>
|
14915
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
14916
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
14917
|
+
</xsl:when>
|
14918
|
+
<xsl:otherwise>
|
14919
|
+
<xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
|
14920
|
+
</xsl:otherwise>
|
14921
|
+
</xsl:choose>
|
14818
14922
|
</xsl:otherwise>
|
14819
14923
|
</xsl:choose>
|
14820
14924
|
</xsl:template>
|
@@ -8880,6 +8880,12 @@
|
|
8880
8880
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
8881
8881
|
<attachment filename="{@name}"/>
|
8882
8882
|
</xsl:for-each>
|
8883
|
+
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
8884
|
+
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
8885
|
+
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
8886
|
+
<attachment filename="{$attachment_path}"/>
|
8887
|
+
</xsl:for-each>
|
8888
|
+
</xsl:if>
|
8883
8889
|
</xsl:variable>
|
8884
8890
|
<xsl:variable name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
|
8885
8891
|
|
@@ -8892,7 +8898,7 @@
|
|
8892
8898
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
8893
8899
|
</xsl:when>
|
8894
8900
|
<!-- link to the PDF attachment -->
|
8895
|
-
<xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
|
8901
|
+
<xsl:when test="@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target]">
|
8896
8902
|
<xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
|
8897
8903
|
</xsl:when>
|
8898
8904
|
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
@@ -9547,7 +9553,16 @@
|
|
9547
9553
|
</xsl:variable>
|
9548
9554
|
<xsl:variable name="img_src">
|
9549
9555
|
<xsl:choose>
|
9550
|
-
<xsl:when test="not(starts-with(@src, 'data:'))"
|
9556
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
9557
|
+
<xsl:choose>
|
9558
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
9559
|
+
<xsl:value-of select="@src"/>
|
9560
|
+
</xsl:when>
|
9561
|
+
<xsl:otherwise>
|
9562
|
+
<xsl:value-of select="concat($basepath, @src)"/>
|
9563
|
+
</xsl:otherwise>
|
9564
|
+
</xsl:choose>
|
9565
|
+
</xsl:when>
|
9551
9566
|
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
9552
9567
|
</xsl:choose>
|
9553
9568
|
</xsl:variable>
|
@@ -9560,7 +9575,7 @@
|
|
9560
9575
|
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
9561
9576
|
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
9562
9577
|
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
9563
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.
|
9578
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
9564
9579
|
<xsl:value-of select="$scale"/>
|
9565
9580
|
</xsl:template>
|
9566
9581
|
|
@@ -9579,7 +9594,14 @@
|
|
9579
9594
|
<xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
|
9580
9595
|
</xsl:when>
|
9581
9596
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
9582
|
-
<xsl:
|
9597
|
+
<xsl:choose>
|
9598
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
9599
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
9600
|
+
</xsl:when>
|
9601
|
+
<xsl:otherwise>
|
9602
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
9603
|
+
</xsl:otherwise>
|
9604
|
+
</xsl:choose>
|
9583
9605
|
</xsl:when>
|
9584
9606
|
<xsl:otherwise>
|
9585
9607
|
<xsl:value-of select="@src"/>
|
@@ -9601,7 +9623,14 @@
|
|
9601
9623
|
</xsl:when>
|
9602
9624
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
9603
9625
|
<xsl:variable name="src">
|
9604
|
-
<xsl:
|
9626
|
+
<xsl:choose>
|
9627
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
9628
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
9629
|
+
</xsl:when>
|
9630
|
+
<xsl:otherwise>
|
9631
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
9632
|
+
</xsl:otherwise>
|
9633
|
+
</xsl:choose>
|
9605
9634
|
</xsl:variable>
|
9606
9635
|
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
9607
9636
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
@@ -14366,6 +14395,39 @@
|
|
14366
14395
|
</pdf:catalog>
|
14367
14396
|
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
14368
14397
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
14398
|
+
<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="">
|
14399
|
+
<pdfaExtension:schemas>
|
14400
|
+
<rdf:Bag>
|
14401
|
+
<rdf:li rdf:parseType="Resource">
|
14402
|
+
<pdfaSchema:namespaceURI>http://www.aiim.org/pdfua/ns/id/</pdfaSchema:namespaceURI>
|
14403
|
+
<pdfaSchema:prefix>pdfuaid</pdfaSchema:prefix>
|
14404
|
+
<pdfaSchema:schema>PDF/UA identification schema</pdfaSchema:schema>
|
14405
|
+
<pdfaSchema:property>
|
14406
|
+
<rdf:Seq>
|
14407
|
+
<rdf:li rdf:parseType="Resource">
|
14408
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
14409
|
+
<pdfaProperty:description>PDF/UA version identifier</pdfaProperty:description>
|
14410
|
+
<pdfaProperty:name>part</pdfaProperty:name>
|
14411
|
+
<pdfaProperty:valueType>Integer</pdfaProperty:valueType>
|
14412
|
+
</rdf:li>
|
14413
|
+
<rdf:li rdf:parseType="Resource">
|
14414
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
14415
|
+
<pdfaProperty:description>PDF/UA amendment identifier</pdfaProperty:description>
|
14416
|
+
<pdfaProperty:name>amd</pdfaProperty:name>
|
14417
|
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
14418
|
+
</rdf:li>
|
14419
|
+
<rdf:li rdf:parseType="Resource">
|
14420
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
14421
|
+
<pdfaProperty:description>PDF/UA corrigenda identifier</pdfaProperty:description>
|
14422
|
+
<pdfaProperty:name>corr</pdfaProperty:name>
|
14423
|
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
14424
|
+
</rdf:li>
|
14425
|
+
</rdf:Seq>
|
14426
|
+
</pdfaSchema:property>
|
14427
|
+
</rdf:li>
|
14428
|
+
</rdf:Bag>
|
14429
|
+
</pdfaExtension:schemas>
|
14430
|
+
</rdf:Description>
|
14369
14431
|
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
14370
14432
|
<!-- Dublin Core properties go here -->
|
14371
14433
|
<dc:title>
|
@@ -14376,33 +14438,57 @@
|
|
14376
14438
|
|
14377
14439
|
</xsl:for-each>
|
14378
14440
|
</xsl:variable>
|
14379
|
-
<
|
14380
|
-
<
|
14381
|
-
<xsl:
|
14382
|
-
|
14383
|
-
|
14384
|
-
|
14385
|
-
|
14386
|
-
|
14441
|
+
<rdf:Alt>
|
14442
|
+
<rdf:li xml:lang="x-default">
|
14443
|
+
<xsl:choose>
|
14444
|
+
<xsl:when test="normalize-space($title) != ''">
|
14445
|
+
<xsl:value-of select="$title"/>
|
14446
|
+
</xsl:when>
|
14447
|
+
<xsl:otherwise>
|
14448
|
+
<xsl:text> </xsl:text>
|
14449
|
+
</xsl:otherwise>
|
14450
|
+
</xsl:choose>
|
14451
|
+
</rdf:li>
|
14452
|
+
</rdf:Alt>
|
14387
14453
|
</dc:title>
|
14388
|
-
<
|
14454
|
+
<xsl:variable name="dc_creator">
|
14389
14455
|
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
14390
14456
|
|
14391
|
-
<
|
14392
|
-
<xsl:
|
14393
|
-
|
14394
|
-
|
14457
|
+
<rdf:Seq>
|
14458
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
14459
|
+
<rdf:li>
|
14460
|
+
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
14461
|
+
</rdf:li>
|
14462
|
+
<!-- <xsl:if test="position() != last()">; </xsl:if> -->
|
14463
|
+
</xsl:for-each>
|
14464
|
+
</rdf:Seq>
|
14395
14465
|
|
14396
14466
|
</xsl:for-each>
|
14397
|
-
</
|
14398
|
-
<
|
14467
|
+
</xsl:variable>
|
14468
|
+
<xsl:if test="normalize-space($dc_creator) != ''">
|
14469
|
+
<dc:creator>
|
14470
|
+
<xsl:copy-of select="$dc_creator"/>
|
14471
|
+
</dc:creator>
|
14472
|
+
</xsl:if>
|
14473
|
+
|
14474
|
+
<xsl:variable name="dc_description">
|
14399
14475
|
<xsl:variable name="abstract">
|
14400
14476
|
|
14401
14477
|
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'title'])]"/>
|
14402
14478
|
|
14403
14479
|
</xsl:variable>
|
14404
|
-
<
|
14405
|
-
|
14480
|
+
<rdf:Alt>
|
14481
|
+
<rdf:li xml:lang="x-default">
|
14482
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
14483
|
+
</rdf:li>
|
14484
|
+
</rdf:Alt>
|
14485
|
+
</xsl:variable>
|
14486
|
+
<xsl:if test="normalize-space($dc_description)">
|
14487
|
+
<dc:description>
|
14488
|
+
<xsl:copy-of select="$dc_description"/>
|
14489
|
+
</dc:description>
|
14490
|
+
</xsl:if>
|
14491
|
+
|
14406
14492
|
<pdf:Keywords>
|
14407
14493
|
<xsl:call-template name="insertKeywords">
|
14408
14494
|
<xsl:with-param name="meta">true</xsl:with-param>
|
@@ -14417,26 +14503,37 @@
|
|
14417
14503
|
</x:xmpmeta>
|
14418
14504
|
<!-- add attachments -->
|
14419
14505
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
14420
|
-
<xsl:
|
14421
|
-
|
14422
|
-
|
14423
|
-
|
14424
|
-
|
14425
|
-
|
14426
|
-
|
14427
|
-
|
14428
|
-
|
14429
|
-
|
14430
|
-
|
14431
|
-
|
14506
|
+
<xsl:variable name="description" select="normalize-space(//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]/*[local-name() = 'formattedref'])"/>
|
14507
|
+
|
14508
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" filename="{@name}">
|
14509
|
+
<xsl:attribute name="src">
|
14510
|
+
<xsl:choose>
|
14511
|
+
<xsl:when test="normalize-space() != ''">
|
14512
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
14513
|
+
<xsl:value-of select="$src_attachment"/>
|
14514
|
+
</xsl:when>
|
14515
|
+
<xsl:otherwise>
|
14516
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
14517
|
+
<xsl:value-of select="$url"/>
|
14518
|
+
</xsl:otherwise>
|
14519
|
+
</xsl:choose>
|
14520
|
+
</xsl:attribute>
|
14521
|
+
<xsl:if test="$description != ''">
|
14522
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
14523
|
+
</xsl:if>
|
14524
|
+
</pdf:embedded-file>
|
14432
14525
|
</xsl:for-each>
|
14433
14526
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
14434
14527
|
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
14435
14528
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
14436
14529
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
14437
|
-
<xsl:variable name="url" select="concat('url(file:///',$
|
14438
|
-
<xsl:variable name="
|
14439
|
-
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$
|
14530
|
+
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
14531
|
+
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
14532
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$attachment_path}">
|
14533
|
+
<xsl:if test="$description != ''">
|
14534
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
14535
|
+
</xsl:if>
|
14536
|
+
</pdf:embedded-file>
|
14440
14537
|
</xsl:for-each>
|
14441
14538
|
</xsl:if>
|
14442
14539
|
</xsl:template> <!-- addPDFUAmeta -->
|
@@ -14814,7 +14911,14 @@
|
|
14814
14911
|
<xsl:value-of select="$src"/>
|
14815
14912
|
</xsl:when>
|
14816
14913
|
<xsl:otherwise>
|
14817
|
-
<xsl:
|
14914
|
+
<xsl:choose>
|
14915
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
14916
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
14917
|
+
</xsl:when>
|
14918
|
+
<xsl:otherwise>
|
14919
|
+
<xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
|
14920
|
+
</xsl:otherwise>
|
14921
|
+
</xsl:choose>
|
14818
14922
|
</xsl:otherwise>
|
14819
14923
|
</xsl:choose>
|
14820
14924
|
</xsl:template>
|