metanorma-ogc 2.6.0 → 2.6.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/ogc/html/htmlstyle.css +2 -2
- data/lib/isodoc/ogc/html/htmlstyle.scss +1 -1
- data/lib/isodoc/ogc/html/scripts.html +9 -68
- data/lib/isodoc/ogc/html_convert.rb +31 -0
- data/lib/isodoc/ogc/i18n-en.yaml +15 -9
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +143 -39
- data/lib/isodoc/ogc/ogc.best-practice.xsl +143 -39
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +143 -39
- data/lib/isodoc/ogc/ogc.community-practice.xsl +143 -39
- data/lib/isodoc/ogc/ogc.community-standard.xsl +143 -39
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +143 -39
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +143 -39
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +143 -39
- data/lib/isodoc/ogc/ogc.other.xsl +143 -39
- data/lib/isodoc/ogc/ogc.policy.xsl +143 -39
- data/lib/isodoc/ogc/ogc.reference-model.xsl +143 -39
- data/lib/isodoc/ogc/ogc.release-notes.xsl +143 -39
- data/lib/isodoc/ogc/ogc.standard.xsl +143 -39
- data/lib/isodoc/ogc/ogc.test-suite.xsl +143 -39
- data/lib/isodoc/ogc/ogc.user-guide.xsl +143 -39
- data/lib/isodoc/ogc/ogc.white-paper.xsl +142 -38
- data/lib/isodoc/ogc/word_convert.rb +1 -1
- data/lib/metanorma/ogc/basicdoc.rng +909 -464
- data/lib/metanorma/ogc/biblio-standoc.rng +87 -20
- data/lib/metanorma/ogc/biblio.rng +884 -325
- data/lib/metanorma/ogc/isodoc.rng +1031 -912
- data/lib/metanorma/ogc/reqt.rng +94 -72
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +2 -3
- data/Gemfile.devel +0 -4
|
@@ -817,7 +817,7 @@
|
|
|
817
817
|
<xsl:choose>
|
|
818
818
|
<xsl:when test="@level = 1">
|
|
819
819
|
<fo:list-block provisional-distance-between-starts="8mm">
|
|
820
|
-
<xsl:if test="@type = 'annex'">
|
|
820
|
+
<xsl:if test="@type = 'annex' or (@type = 'references' and normalize-space(@section) = '')">
|
|
821
821
|
<xsl:attribute name="provisional-distance-between-starts">0mm</xsl:attribute>
|
|
822
822
|
</xsl:if>
|
|
823
823
|
<fo:list-item>
|
|
@@ -8103,6 +8103,12 @@
|
|
|
8103
8103
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
|
8104
8104
|
<attachment filename="{@name}"/>
|
|
8105
8105
|
</xsl:for-each>
|
|
8106
|
+
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
|
8107
|
+
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
|
8108
|
+
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
|
8109
|
+
<attachment filename="{$attachment_path}"/>
|
|
8110
|
+
</xsl:for-each>
|
|
8111
|
+
</xsl:if>
|
|
8106
8112
|
</xsl:variable>
|
|
8107
8113
|
<xsl:variable name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
|
|
8108
8114
|
|
|
@@ -8115,7 +8121,7 @@
|
|
|
8115
8121
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
|
8116
8122
|
</xsl:when>
|
|
8117
8123
|
<!-- link to the PDF attachment -->
|
|
8118
|
-
<xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
|
|
8124
|
+
<xsl:when test="@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target]">
|
|
8119
8125
|
<xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
|
|
8120
8126
|
</xsl:when>
|
|
8121
8127
|
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
|
@@ -8770,7 +8776,16 @@
|
|
|
8770
8776
|
</xsl:variable>
|
|
8771
8777
|
<xsl:variable name="img_src">
|
|
8772
8778
|
<xsl:choose>
|
|
8773
|
-
<xsl:when test="not(starts-with(@src, 'data:'))"
|
|
8779
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
|
8780
|
+
<xsl:choose>
|
|
8781
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
|
8782
|
+
<xsl:value-of select="@src"/>
|
|
8783
|
+
</xsl:when>
|
|
8784
|
+
<xsl:otherwise>
|
|
8785
|
+
<xsl:value-of select="concat($basepath, @src)"/>
|
|
8786
|
+
</xsl:otherwise>
|
|
8787
|
+
</xsl:choose>
|
|
8788
|
+
</xsl:when>
|
|
8774
8789
|
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
|
8775
8790
|
</xsl:choose>
|
|
8776
8791
|
</xsl:variable>
|
|
@@ -8783,7 +8798,7 @@
|
|
|
8783
8798
|
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
|
8784
8799
|
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
|
8785
8800
|
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
|
8786
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.
|
|
8801
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
|
8787
8802
|
<xsl:value-of select="$scale"/>
|
|
8788
8803
|
</xsl:template>
|
|
8789
8804
|
|
|
@@ -8802,7 +8817,14 @@
|
|
|
8802
8817
|
<xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
|
|
8803
8818
|
</xsl:when>
|
|
8804
8819
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
|
8805
|
-
<xsl:
|
|
8820
|
+
<xsl:choose>
|
|
8821
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
|
8822
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
|
8823
|
+
</xsl:when>
|
|
8824
|
+
<xsl:otherwise>
|
|
8825
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
|
8826
|
+
</xsl:otherwise>
|
|
8827
|
+
</xsl:choose>
|
|
8806
8828
|
</xsl:when>
|
|
8807
8829
|
<xsl:otherwise>
|
|
8808
8830
|
<xsl:value-of select="@src"/>
|
|
@@ -8824,7 +8846,14 @@
|
|
|
8824
8846
|
</xsl:when>
|
|
8825
8847
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
|
8826
8848
|
<xsl:variable name="src">
|
|
8827
|
-
<xsl:
|
|
8849
|
+
<xsl:choose>
|
|
8850
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
|
8851
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
|
8852
|
+
</xsl:when>
|
|
8853
|
+
<xsl:otherwise>
|
|
8854
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
|
8855
|
+
</xsl:otherwise>
|
|
8856
|
+
</xsl:choose>
|
|
8828
8857
|
</xsl:variable>
|
|
8829
8858
|
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
|
8830
8859
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
|
@@ -13608,6 +13637,39 @@
|
|
|
13608
13637
|
</pdf:catalog>
|
|
13609
13638
|
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
|
13610
13639
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
|
13640
|
+
<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="">
|
|
13641
|
+
<pdfaExtension:schemas>
|
|
13642
|
+
<rdf:Bag>
|
|
13643
|
+
<rdf:li rdf:parseType="Resource">
|
|
13644
|
+
<pdfaSchema:namespaceURI>http://www.aiim.org/pdfua/ns/id/</pdfaSchema:namespaceURI>
|
|
13645
|
+
<pdfaSchema:prefix>pdfuaid</pdfaSchema:prefix>
|
|
13646
|
+
<pdfaSchema:schema>PDF/UA identification schema</pdfaSchema:schema>
|
|
13647
|
+
<pdfaSchema:property>
|
|
13648
|
+
<rdf:Seq>
|
|
13649
|
+
<rdf:li rdf:parseType="Resource">
|
|
13650
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
|
13651
|
+
<pdfaProperty:description>PDF/UA version identifier</pdfaProperty:description>
|
|
13652
|
+
<pdfaProperty:name>part</pdfaProperty:name>
|
|
13653
|
+
<pdfaProperty:valueType>Integer</pdfaProperty:valueType>
|
|
13654
|
+
</rdf:li>
|
|
13655
|
+
<rdf:li rdf:parseType="Resource">
|
|
13656
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
|
13657
|
+
<pdfaProperty:description>PDF/UA amendment identifier</pdfaProperty:description>
|
|
13658
|
+
<pdfaProperty:name>amd</pdfaProperty:name>
|
|
13659
|
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
|
13660
|
+
</rdf:li>
|
|
13661
|
+
<rdf:li rdf:parseType="Resource">
|
|
13662
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
|
13663
|
+
<pdfaProperty:description>PDF/UA corrigenda identifier</pdfaProperty:description>
|
|
13664
|
+
<pdfaProperty:name>corr</pdfaProperty:name>
|
|
13665
|
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
|
13666
|
+
</rdf:li>
|
|
13667
|
+
</rdf:Seq>
|
|
13668
|
+
</pdfaSchema:property>
|
|
13669
|
+
</rdf:li>
|
|
13670
|
+
</rdf:Bag>
|
|
13671
|
+
</pdfaExtension:schemas>
|
|
13672
|
+
</rdf:Description>
|
|
13611
13673
|
<rdf:Description xmlns:pdf="http://ns.adobe.com/pdf/1.3/" xmlns:dc="http://purl.org/dc/elements/1.1/" rdf:about="">
|
|
13612
13674
|
<!-- Dublin Core properties go here -->
|
|
13613
13675
|
<dc:title>
|
|
@@ -13618,33 +13680,57 @@
|
|
|
13618
13680
|
|
|
13619
13681
|
</xsl:for-each>
|
|
13620
13682
|
</xsl:variable>
|
|
13621
|
-
<
|
|
13622
|
-
<
|
|
13623
|
-
<xsl:
|
|
13624
|
-
|
|
13625
|
-
|
|
13626
|
-
|
|
13627
|
-
|
|
13628
|
-
|
|
13683
|
+
<rdf:Alt>
|
|
13684
|
+
<rdf:li xml:lang="x-default">
|
|
13685
|
+
<xsl:choose>
|
|
13686
|
+
<xsl:when test="normalize-space($title) != ''">
|
|
13687
|
+
<xsl:value-of select="$title"/>
|
|
13688
|
+
</xsl:when>
|
|
13689
|
+
<xsl:otherwise>
|
|
13690
|
+
<xsl:text> </xsl:text>
|
|
13691
|
+
</xsl:otherwise>
|
|
13692
|
+
</xsl:choose>
|
|
13693
|
+
</rdf:li>
|
|
13694
|
+
</rdf:Alt>
|
|
13629
13695
|
</dc:title>
|
|
13630
|
-
<
|
|
13696
|
+
<xsl:variable name="dc_creator">
|
|
13631
13697
|
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
|
13632
13698
|
|
|
13633
|
-
<
|
|
13634
|
-
<xsl:
|
|
13635
|
-
|
|
13636
|
-
|
|
13699
|
+
<rdf:Seq>
|
|
13700
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
|
13701
|
+
<rdf:li>
|
|
13702
|
+
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
|
13703
|
+
</rdf:li>
|
|
13704
|
+
<!-- <xsl:if test="position() != last()">; </xsl:if> -->
|
|
13705
|
+
</xsl:for-each>
|
|
13706
|
+
</rdf:Seq>
|
|
13637
13707
|
|
|
13638
13708
|
</xsl:for-each>
|
|
13639
|
-
</
|
|
13640
|
-
<
|
|
13709
|
+
</xsl:variable>
|
|
13710
|
+
<xsl:if test="normalize-space($dc_creator) != ''">
|
|
13711
|
+
<dc:creator>
|
|
13712
|
+
<xsl:copy-of select="$dc_creator"/>
|
|
13713
|
+
</dc:creator>
|
|
13714
|
+
</xsl:if>
|
|
13715
|
+
|
|
13716
|
+
<xsl:variable name="dc_description">
|
|
13641
13717
|
<xsl:variable name="abstract">
|
|
13642
13718
|
|
|
13643
13719
|
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'title'])]"/>
|
|
13644
13720
|
|
|
13645
13721
|
</xsl:variable>
|
|
13646
|
-
<
|
|
13647
|
-
|
|
13722
|
+
<rdf:Alt>
|
|
13723
|
+
<rdf:li xml:lang="x-default">
|
|
13724
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
|
13725
|
+
</rdf:li>
|
|
13726
|
+
</rdf:Alt>
|
|
13727
|
+
</xsl:variable>
|
|
13728
|
+
<xsl:if test="normalize-space($dc_description)">
|
|
13729
|
+
<dc:description>
|
|
13730
|
+
<xsl:copy-of select="$dc_description"/>
|
|
13731
|
+
</dc:description>
|
|
13732
|
+
</xsl:if>
|
|
13733
|
+
|
|
13648
13734
|
<pdf:Keywords>
|
|
13649
13735
|
<xsl:call-template name="insertKeywords">
|
|
13650
13736
|
<xsl:with-param name="meta">true</xsl:with-param>
|
|
@@ -13659,26 +13745,37 @@
|
|
|
13659
13745
|
</x:xmpmeta>
|
|
13660
13746
|
<!-- add attachments -->
|
|
13661
13747
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
|
13662
|
-
<xsl:
|
|
13663
|
-
|
|
13664
|
-
|
|
13665
|
-
|
|
13666
|
-
|
|
13667
|
-
|
|
13668
|
-
|
|
13669
|
-
|
|
13670
|
-
|
|
13671
|
-
|
|
13672
|
-
|
|
13673
|
-
|
|
13748
|
+
<xsl:variable name="description" select="normalize-space(//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]/*[local-name() = 'formattedref'])"/>
|
|
13749
|
+
|
|
13750
|
+
<pdf:embedded-file filename="{@name}">
|
|
13751
|
+
<xsl:attribute name="src">
|
|
13752
|
+
<xsl:choose>
|
|
13753
|
+
<xsl:when test="normalize-space() != ''">
|
|
13754
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
|
13755
|
+
<xsl:value-of select="$src_attachment"/>
|
|
13756
|
+
</xsl:when>
|
|
13757
|
+
<xsl:otherwise>
|
|
13758
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
|
13759
|
+
<xsl:value-of select="$url"/>
|
|
13760
|
+
</xsl:otherwise>
|
|
13761
|
+
</xsl:choose>
|
|
13762
|
+
</xsl:attribute>
|
|
13763
|
+
<xsl:if test="$description != ''">
|
|
13764
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
|
13765
|
+
</xsl:if>
|
|
13766
|
+
</pdf:embedded-file>
|
|
13674
13767
|
</xsl:for-each>
|
|
13675
13768
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
|
13676
13769
|
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
|
13677
13770
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
|
13678
13771
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
|
13679
|
-
<xsl:variable name="url" select="concat('url(file:///',$
|
|
13680
|
-
<xsl:variable name="
|
|
13681
|
-
<pdf:embedded-file src="{$url}" filename="{$
|
|
13772
|
+
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
|
13773
|
+
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
|
13774
|
+
<pdf:embedded-file src="{$url}" filename="{$attachment_path}">
|
|
13775
|
+
<xsl:if test="$description != ''">
|
|
13776
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
|
13777
|
+
</xsl:if>
|
|
13778
|
+
</pdf:embedded-file>
|
|
13682
13779
|
</xsl:for-each>
|
|
13683
13780
|
</xsl:if>
|
|
13684
13781
|
</xsl:template> <!-- addPDFUAmeta -->
|
|
@@ -14056,7 +14153,14 @@
|
|
|
14056
14153
|
<xsl:value-of select="$src"/>
|
|
14057
14154
|
</xsl:when>
|
|
14058
14155
|
<xsl:otherwise>
|
|
14059
|
-
<xsl:
|
|
14156
|
+
<xsl:choose>
|
|
14157
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
|
14158
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
|
14159
|
+
</xsl:when>
|
|
14160
|
+
<xsl:otherwise>
|
|
14161
|
+
<xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
|
|
14162
|
+
</xsl:otherwise>
|
|
14163
|
+
</xsl:choose>
|
|
14060
14164
|
</xsl:otherwise>
|
|
14061
14165
|
</xsl:choose>
|
|
14062
14166
|
</xsl:template>
|
|
@@ -817,7 +817,7 @@
|
|
|
817
817
|
<xsl:choose>
|
|
818
818
|
<xsl:when test="@level = 1">
|
|
819
819
|
<fo:list-block provisional-distance-between-starts="8mm">
|
|
820
|
-
<xsl:if test="@type = 'annex'">
|
|
820
|
+
<xsl:if test="@type = 'annex' or (@type = 'references' and normalize-space(@section) = '')">
|
|
821
821
|
<xsl:attribute name="provisional-distance-between-starts">0mm</xsl:attribute>
|
|
822
822
|
</xsl:if>
|
|
823
823
|
<fo:list-item>
|
|
@@ -8103,6 +8103,12 @@
|
|
|
8103
8103
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
|
8104
8104
|
<attachment filename="{@name}"/>
|
|
8105
8105
|
</xsl:for-each>
|
|
8106
|
+
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
|
8107
|
+
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
|
8108
|
+
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
|
8109
|
+
<attachment filename="{$attachment_path}"/>
|
|
8110
|
+
</xsl:for-each>
|
|
8111
|
+
</xsl:if>
|
|
8106
8112
|
</xsl:variable>
|
|
8107
8113
|
<xsl:variable name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
|
|
8108
8114
|
|
|
@@ -8115,7 +8121,7 @@
|
|
|
8115
8121
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
|
8116
8122
|
</xsl:when>
|
|
8117
8123
|
<!-- link to the PDF attachment -->
|
|
8118
|
-
<xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
|
|
8124
|
+
<xsl:when test="@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target]">
|
|
8119
8125
|
<xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
|
|
8120
8126
|
</xsl:when>
|
|
8121
8127
|
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
|
@@ -8770,7 +8776,16 @@
|
|
|
8770
8776
|
</xsl:variable>
|
|
8771
8777
|
<xsl:variable name="img_src">
|
|
8772
8778
|
<xsl:choose>
|
|
8773
|
-
<xsl:when test="not(starts-with(@src, 'data:'))"
|
|
8779
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
|
8780
|
+
<xsl:choose>
|
|
8781
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
|
8782
|
+
<xsl:value-of select="@src"/>
|
|
8783
|
+
</xsl:when>
|
|
8784
|
+
<xsl:otherwise>
|
|
8785
|
+
<xsl:value-of select="concat($basepath, @src)"/>
|
|
8786
|
+
</xsl:otherwise>
|
|
8787
|
+
</xsl:choose>
|
|
8788
|
+
</xsl:when>
|
|
8774
8789
|
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
|
8775
8790
|
</xsl:choose>
|
|
8776
8791
|
</xsl:variable>
|
|
@@ -8783,7 +8798,7 @@
|
|
|
8783
8798
|
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
|
8784
8799
|
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
|
8785
8800
|
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
|
8786
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.
|
|
8801
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
|
8787
8802
|
<xsl:value-of select="$scale"/>
|
|
8788
8803
|
</xsl:template>
|
|
8789
8804
|
|
|
@@ -8802,7 +8817,14 @@
|
|
|
8802
8817
|
<xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
|
|
8803
8818
|
</xsl:when>
|
|
8804
8819
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
|
8805
|
-
<xsl:
|
|
8820
|
+
<xsl:choose>
|
|
8821
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
|
8822
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
|
8823
|
+
</xsl:when>
|
|
8824
|
+
<xsl:otherwise>
|
|
8825
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
|
8826
|
+
</xsl:otherwise>
|
|
8827
|
+
</xsl:choose>
|
|
8806
8828
|
</xsl:when>
|
|
8807
8829
|
<xsl:otherwise>
|
|
8808
8830
|
<xsl:value-of select="@src"/>
|
|
@@ -8824,7 +8846,14 @@
|
|
|
8824
8846
|
</xsl:when>
|
|
8825
8847
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
|
8826
8848
|
<xsl:variable name="src">
|
|
8827
|
-
<xsl:
|
|
8849
|
+
<xsl:choose>
|
|
8850
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
|
8851
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
|
8852
|
+
</xsl:when>
|
|
8853
|
+
<xsl:otherwise>
|
|
8854
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
|
8855
|
+
</xsl:otherwise>
|
|
8856
|
+
</xsl:choose>
|
|
8828
8857
|
</xsl:variable>
|
|
8829
8858
|
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
|
8830
8859
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
|
@@ -13608,6 +13637,39 @@
|
|
|
13608
13637
|
</pdf:catalog>
|
|
13609
13638
|
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
|
13610
13639
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
|
13640
|
+
<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="">
|
|
13641
|
+
<pdfaExtension:schemas>
|
|
13642
|
+
<rdf:Bag>
|
|
13643
|
+
<rdf:li rdf:parseType="Resource">
|
|
13644
|
+
<pdfaSchema:namespaceURI>http://www.aiim.org/pdfua/ns/id/</pdfaSchema:namespaceURI>
|
|
13645
|
+
<pdfaSchema:prefix>pdfuaid</pdfaSchema:prefix>
|
|
13646
|
+
<pdfaSchema:schema>PDF/UA identification schema</pdfaSchema:schema>
|
|
13647
|
+
<pdfaSchema:property>
|
|
13648
|
+
<rdf:Seq>
|
|
13649
|
+
<rdf:li rdf:parseType="Resource">
|
|
13650
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
|
13651
|
+
<pdfaProperty:description>PDF/UA version identifier</pdfaProperty:description>
|
|
13652
|
+
<pdfaProperty:name>part</pdfaProperty:name>
|
|
13653
|
+
<pdfaProperty:valueType>Integer</pdfaProperty:valueType>
|
|
13654
|
+
</rdf:li>
|
|
13655
|
+
<rdf:li rdf:parseType="Resource">
|
|
13656
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
|
13657
|
+
<pdfaProperty:description>PDF/UA amendment identifier</pdfaProperty:description>
|
|
13658
|
+
<pdfaProperty:name>amd</pdfaProperty:name>
|
|
13659
|
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
|
13660
|
+
</rdf:li>
|
|
13661
|
+
<rdf:li rdf:parseType="Resource">
|
|
13662
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
|
13663
|
+
<pdfaProperty:description>PDF/UA corrigenda identifier</pdfaProperty:description>
|
|
13664
|
+
<pdfaProperty:name>corr</pdfaProperty:name>
|
|
13665
|
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
|
13666
|
+
</rdf:li>
|
|
13667
|
+
</rdf:Seq>
|
|
13668
|
+
</pdfaSchema:property>
|
|
13669
|
+
</rdf:li>
|
|
13670
|
+
</rdf:Bag>
|
|
13671
|
+
</pdfaExtension:schemas>
|
|
13672
|
+
</rdf:Description>
|
|
13611
13673
|
<rdf:Description xmlns:pdf="http://ns.adobe.com/pdf/1.3/" xmlns:dc="http://purl.org/dc/elements/1.1/" rdf:about="">
|
|
13612
13674
|
<!-- Dublin Core properties go here -->
|
|
13613
13675
|
<dc:title>
|
|
@@ -13618,33 +13680,57 @@
|
|
|
13618
13680
|
|
|
13619
13681
|
</xsl:for-each>
|
|
13620
13682
|
</xsl:variable>
|
|
13621
|
-
<
|
|
13622
|
-
<
|
|
13623
|
-
<xsl:
|
|
13624
|
-
|
|
13625
|
-
|
|
13626
|
-
|
|
13627
|
-
|
|
13628
|
-
|
|
13683
|
+
<rdf:Alt>
|
|
13684
|
+
<rdf:li xml:lang="x-default">
|
|
13685
|
+
<xsl:choose>
|
|
13686
|
+
<xsl:when test="normalize-space($title) != ''">
|
|
13687
|
+
<xsl:value-of select="$title"/>
|
|
13688
|
+
</xsl:when>
|
|
13689
|
+
<xsl:otherwise>
|
|
13690
|
+
<xsl:text> </xsl:text>
|
|
13691
|
+
</xsl:otherwise>
|
|
13692
|
+
</xsl:choose>
|
|
13693
|
+
</rdf:li>
|
|
13694
|
+
</rdf:Alt>
|
|
13629
13695
|
</dc:title>
|
|
13630
|
-
<
|
|
13696
|
+
<xsl:variable name="dc_creator">
|
|
13631
13697
|
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
|
13632
13698
|
|
|
13633
|
-
<
|
|
13634
|
-
<xsl:
|
|
13635
|
-
|
|
13636
|
-
|
|
13699
|
+
<rdf:Seq>
|
|
13700
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
|
13701
|
+
<rdf:li>
|
|
13702
|
+
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
|
13703
|
+
</rdf:li>
|
|
13704
|
+
<!-- <xsl:if test="position() != last()">; </xsl:if> -->
|
|
13705
|
+
</xsl:for-each>
|
|
13706
|
+
</rdf:Seq>
|
|
13637
13707
|
|
|
13638
13708
|
</xsl:for-each>
|
|
13639
|
-
</
|
|
13640
|
-
<
|
|
13709
|
+
</xsl:variable>
|
|
13710
|
+
<xsl:if test="normalize-space($dc_creator) != ''">
|
|
13711
|
+
<dc:creator>
|
|
13712
|
+
<xsl:copy-of select="$dc_creator"/>
|
|
13713
|
+
</dc:creator>
|
|
13714
|
+
</xsl:if>
|
|
13715
|
+
|
|
13716
|
+
<xsl:variable name="dc_description">
|
|
13641
13717
|
<xsl:variable name="abstract">
|
|
13642
13718
|
|
|
13643
13719
|
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'title'])]"/>
|
|
13644
13720
|
|
|
13645
13721
|
</xsl:variable>
|
|
13646
|
-
<
|
|
13647
|
-
|
|
13722
|
+
<rdf:Alt>
|
|
13723
|
+
<rdf:li xml:lang="x-default">
|
|
13724
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
|
13725
|
+
</rdf:li>
|
|
13726
|
+
</rdf:Alt>
|
|
13727
|
+
</xsl:variable>
|
|
13728
|
+
<xsl:if test="normalize-space($dc_description)">
|
|
13729
|
+
<dc:description>
|
|
13730
|
+
<xsl:copy-of select="$dc_description"/>
|
|
13731
|
+
</dc:description>
|
|
13732
|
+
</xsl:if>
|
|
13733
|
+
|
|
13648
13734
|
<pdf:Keywords>
|
|
13649
13735
|
<xsl:call-template name="insertKeywords">
|
|
13650
13736
|
<xsl:with-param name="meta">true</xsl:with-param>
|
|
@@ -13659,26 +13745,37 @@
|
|
|
13659
13745
|
</x:xmpmeta>
|
|
13660
13746
|
<!-- add attachments -->
|
|
13661
13747
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
|
13662
|
-
<xsl:
|
|
13663
|
-
|
|
13664
|
-
|
|
13665
|
-
|
|
13666
|
-
|
|
13667
|
-
|
|
13668
|
-
|
|
13669
|
-
|
|
13670
|
-
|
|
13671
|
-
|
|
13672
|
-
|
|
13673
|
-
|
|
13748
|
+
<xsl:variable name="description" select="normalize-space(//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]/*[local-name() = 'formattedref'])"/>
|
|
13749
|
+
|
|
13750
|
+
<pdf:embedded-file filename="{@name}">
|
|
13751
|
+
<xsl:attribute name="src">
|
|
13752
|
+
<xsl:choose>
|
|
13753
|
+
<xsl:when test="normalize-space() != ''">
|
|
13754
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
|
13755
|
+
<xsl:value-of select="$src_attachment"/>
|
|
13756
|
+
</xsl:when>
|
|
13757
|
+
<xsl:otherwise>
|
|
13758
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
|
13759
|
+
<xsl:value-of select="$url"/>
|
|
13760
|
+
</xsl:otherwise>
|
|
13761
|
+
</xsl:choose>
|
|
13762
|
+
</xsl:attribute>
|
|
13763
|
+
<xsl:if test="$description != ''">
|
|
13764
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
|
13765
|
+
</xsl:if>
|
|
13766
|
+
</pdf:embedded-file>
|
|
13674
13767
|
</xsl:for-each>
|
|
13675
13768
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
|
13676
13769
|
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
|
13677
13770
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
|
13678
13771
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
|
13679
|
-
<xsl:variable name="url" select="concat('url(file:///',$
|
|
13680
|
-
<xsl:variable name="
|
|
13681
|
-
<pdf:embedded-file src="{$url}" filename="{$
|
|
13772
|
+
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
|
13773
|
+
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
|
13774
|
+
<pdf:embedded-file src="{$url}" filename="{$attachment_path}">
|
|
13775
|
+
<xsl:if test="$description != ''">
|
|
13776
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
|
13777
|
+
</xsl:if>
|
|
13778
|
+
</pdf:embedded-file>
|
|
13682
13779
|
</xsl:for-each>
|
|
13683
13780
|
</xsl:if>
|
|
13684
13781
|
</xsl:template> <!-- addPDFUAmeta -->
|
|
@@ -14056,7 +14153,14 @@
|
|
|
14056
14153
|
<xsl:value-of select="$src"/>
|
|
14057
14154
|
</xsl:when>
|
|
14058
14155
|
<xsl:otherwise>
|
|
14059
|
-
<xsl:
|
|
14156
|
+
<xsl:choose>
|
|
14157
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
|
14158
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
|
14159
|
+
</xsl:when>
|
|
14160
|
+
<xsl:otherwise>
|
|
14161
|
+
<xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
|
|
14162
|
+
</xsl:otherwise>
|
|
14163
|
+
</xsl:choose>
|
|
14060
14164
|
</xsl:otherwise>
|
|
14061
14165
|
</xsl:choose>
|
|
14062
14166
|
</xsl:template>
|