metanorma-ogc 2.6.0 → 2.6.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/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
@@ -6897,6 +6897,12 @@
|
|
6897
6897
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
6898
6898
|
<attachment filename="{@name}"/>
|
6899
6899
|
</xsl:for-each>
|
6900
|
+
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
6901
|
+
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
6902
|
+
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
6903
|
+
<attachment filename="{$attachment_path}"/>
|
6904
|
+
</xsl:for-each>
|
6905
|
+
</xsl:if>
|
6900
6906
|
</xsl:variable>
|
6901
6907
|
<xsl:variable name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
|
6902
6908
|
|
@@ -6909,7 +6915,7 @@
|
|
6909
6915
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
6910
6916
|
</xsl:when>
|
6911
6917
|
<!-- link to the PDF attachment -->
|
6912
|
-
<xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
|
6918
|
+
<xsl:when test="@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target]">
|
6913
6919
|
<xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
|
6914
6920
|
</xsl:when>
|
6915
6921
|
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
@@ -7558,7 +7564,16 @@
|
|
7558
7564
|
</xsl:variable>
|
7559
7565
|
<xsl:variable name="img_src">
|
7560
7566
|
<xsl:choose>
|
7561
|
-
<xsl:when test="not(starts-with(@src, 'data:'))"
|
7567
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
7568
|
+
<xsl:choose>
|
7569
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
7570
|
+
<xsl:value-of select="@src"/>
|
7571
|
+
</xsl:when>
|
7572
|
+
<xsl:otherwise>
|
7573
|
+
<xsl:value-of select="concat($basepath, @src)"/>
|
7574
|
+
</xsl:otherwise>
|
7575
|
+
</xsl:choose>
|
7576
|
+
</xsl:when>
|
7562
7577
|
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
7563
7578
|
</xsl:choose>
|
7564
7579
|
</xsl:variable>
|
@@ -7571,7 +7586,7 @@
|
|
7571
7586
|
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
7572
7587
|
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
7573
7588
|
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
7574
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.
|
7589
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
7575
7590
|
<xsl:value-of select="$scale"/>
|
7576
7591
|
</xsl:template>
|
7577
7592
|
|
@@ -7590,7 +7605,14 @@
|
|
7590
7605
|
<xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
|
7591
7606
|
</xsl:when>
|
7592
7607
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
7593
|
-
<xsl:
|
7608
|
+
<xsl:choose>
|
7609
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
7610
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
7611
|
+
</xsl:when>
|
7612
|
+
<xsl:otherwise>
|
7613
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
7614
|
+
</xsl:otherwise>
|
7615
|
+
</xsl:choose>
|
7594
7616
|
</xsl:when>
|
7595
7617
|
<xsl:otherwise>
|
7596
7618
|
<xsl:value-of select="@src"/>
|
@@ -7612,7 +7634,14 @@
|
|
7612
7634
|
</xsl:when>
|
7613
7635
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
7614
7636
|
<xsl:variable name="src">
|
7615
|
-
<xsl:
|
7637
|
+
<xsl:choose>
|
7638
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
7639
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
7640
|
+
</xsl:when>
|
7641
|
+
<xsl:otherwise>
|
7642
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
7643
|
+
</xsl:otherwise>
|
7644
|
+
</xsl:choose>
|
7616
7645
|
</xsl:variable>
|
7617
7646
|
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
7618
7647
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
@@ -12377,6 +12406,39 @@
|
|
12377
12406
|
</pdf:catalog>
|
12378
12407
|
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
12379
12408
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
12409
|
+
<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="">
|
12410
|
+
<pdfaExtension:schemas>
|
12411
|
+
<rdf:Bag>
|
12412
|
+
<rdf:li rdf:parseType="Resource">
|
12413
|
+
<pdfaSchema:namespaceURI>http://www.aiim.org/pdfua/ns/id/</pdfaSchema:namespaceURI>
|
12414
|
+
<pdfaSchema:prefix>pdfuaid</pdfaSchema:prefix>
|
12415
|
+
<pdfaSchema:schema>PDF/UA identification schema</pdfaSchema:schema>
|
12416
|
+
<pdfaSchema:property>
|
12417
|
+
<rdf:Seq>
|
12418
|
+
<rdf:li rdf:parseType="Resource">
|
12419
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
12420
|
+
<pdfaProperty:description>PDF/UA version identifier</pdfaProperty:description>
|
12421
|
+
<pdfaProperty:name>part</pdfaProperty:name>
|
12422
|
+
<pdfaProperty:valueType>Integer</pdfaProperty:valueType>
|
12423
|
+
</rdf:li>
|
12424
|
+
<rdf:li rdf:parseType="Resource">
|
12425
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
12426
|
+
<pdfaProperty:description>PDF/UA amendment identifier</pdfaProperty:description>
|
12427
|
+
<pdfaProperty:name>amd</pdfaProperty:name>
|
12428
|
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
12429
|
+
</rdf:li>
|
12430
|
+
<rdf:li rdf:parseType="Resource">
|
12431
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
12432
|
+
<pdfaProperty:description>PDF/UA corrigenda identifier</pdfaProperty:description>
|
12433
|
+
<pdfaProperty:name>corr</pdfaProperty:name>
|
12434
|
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
12435
|
+
</rdf:li>
|
12436
|
+
</rdf:Seq>
|
12437
|
+
</pdfaSchema:property>
|
12438
|
+
</rdf:li>
|
12439
|
+
</rdf:Bag>
|
12440
|
+
</pdfaExtension:schemas>
|
12441
|
+
</rdf:Description>
|
12380
12442
|
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
12381
12443
|
<!-- Dublin Core properties go here -->
|
12382
12444
|
<dc:title>
|
@@ -12387,33 +12449,57 @@
|
|
12387
12449
|
|
12388
12450
|
</xsl:for-each>
|
12389
12451
|
</xsl:variable>
|
12390
|
-
<
|
12391
|
-
<
|
12392
|
-
<xsl:
|
12393
|
-
|
12394
|
-
|
12395
|
-
|
12396
|
-
|
12397
|
-
|
12452
|
+
<rdf:Alt>
|
12453
|
+
<rdf:li xml:lang="x-default">
|
12454
|
+
<xsl:choose>
|
12455
|
+
<xsl:when test="normalize-space($title) != ''">
|
12456
|
+
<xsl:value-of select="$title"/>
|
12457
|
+
</xsl:when>
|
12458
|
+
<xsl:otherwise>
|
12459
|
+
<xsl:text> </xsl:text>
|
12460
|
+
</xsl:otherwise>
|
12461
|
+
</xsl:choose>
|
12462
|
+
</rdf:li>
|
12463
|
+
</rdf:Alt>
|
12398
12464
|
</dc:title>
|
12399
|
-
<
|
12465
|
+
<xsl:variable name="dc_creator">
|
12400
12466
|
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
12401
12467
|
|
12402
|
-
<
|
12403
|
-
<xsl:
|
12404
|
-
|
12405
|
-
|
12468
|
+
<rdf:Seq>
|
12469
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
12470
|
+
<rdf:li>
|
12471
|
+
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
12472
|
+
</rdf:li>
|
12473
|
+
<!-- <xsl:if test="position() != last()">; </xsl:if> -->
|
12474
|
+
</xsl:for-each>
|
12475
|
+
</rdf:Seq>
|
12406
12476
|
|
12407
12477
|
</xsl:for-each>
|
12408
|
-
</
|
12409
|
-
<
|
12478
|
+
</xsl:variable>
|
12479
|
+
<xsl:if test="normalize-space($dc_creator) != ''">
|
12480
|
+
<dc:creator>
|
12481
|
+
<xsl:copy-of select="$dc_creator"/>
|
12482
|
+
</dc:creator>
|
12483
|
+
</xsl:if>
|
12484
|
+
|
12485
|
+
<xsl:variable name="dc_description">
|
12410
12486
|
<xsl:variable name="abstract">
|
12411
12487
|
|
12412
12488
|
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'title'])]"/>
|
12413
12489
|
|
12414
12490
|
</xsl:variable>
|
12415
|
-
<
|
12416
|
-
|
12491
|
+
<rdf:Alt>
|
12492
|
+
<rdf:li xml:lang="x-default">
|
12493
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
12494
|
+
</rdf:li>
|
12495
|
+
</rdf:Alt>
|
12496
|
+
</xsl:variable>
|
12497
|
+
<xsl:if test="normalize-space($dc_description)">
|
12498
|
+
<dc:description>
|
12499
|
+
<xsl:copy-of select="$dc_description"/>
|
12500
|
+
</dc:description>
|
12501
|
+
</xsl:if>
|
12502
|
+
|
12417
12503
|
<pdf:Keywords>
|
12418
12504
|
<xsl:call-template name="insertKeywords">
|
12419
12505
|
<xsl:with-param name="meta">true</xsl:with-param>
|
@@ -12428,26 +12514,37 @@
|
|
12428
12514
|
</x:xmpmeta>
|
12429
12515
|
<!-- add attachments -->
|
12430
12516
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
12431
|
-
<xsl:
|
12432
|
-
|
12433
|
-
|
12434
|
-
|
12435
|
-
|
12436
|
-
|
12437
|
-
|
12438
|
-
|
12439
|
-
|
12440
|
-
|
12441
|
-
|
12442
|
-
|
12517
|
+
<xsl:variable name="description" select="normalize-space(//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]/*[local-name() = 'formattedref'])"/>
|
12518
|
+
|
12519
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" filename="{@name}">
|
12520
|
+
<xsl:attribute name="src">
|
12521
|
+
<xsl:choose>
|
12522
|
+
<xsl:when test="normalize-space() != ''">
|
12523
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
12524
|
+
<xsl:value-of select="$src_attachment"/>
|
12525
|
+
</xsl:when>
|
12526
|
+
<xsl:otherwise>
|
12527
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
12528
|
+
<xsl:value-of select="$url"/>
|
12529
|
+
</xsl:otherwise>
|
12530
|
+
</xsl:choose>
|
12531
|
+
</xsl:attribute>
|
12532
|
+
<xsl:if test="$description != ''">
|
12533
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
12534
|
+
</xsl:if>
|
12535
|
+
</pdf:embedded-file>
|
12443
12536
|
</xsl:for-each>
|
12444
12537
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
12445
12538
|
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
12446
12539
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
12447
12540
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
12448
|
-
<xsl:variable name="url" select="concat('url(file:///',$
|
12449
|
-
<xsl:variable name="
|
12450
|
-
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$
|
12541
|
+
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
12542
|
+
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
12543
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$attachment_path}">
|
12544
|
+
<xsl:if test="$description != ''">
|
12545
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
12546
|
+
</xsl:if>
|
12547
|
+
</pdf:embedded-file>
|
12451
12548
|
</xsl:for-each>
|
12452
12549
|
</xsl:if>
|
12453
12550
|
</xsl:template> <!-- addPDFUAmeta -->
|
@@ -12825,7 +12922,14 @@
|
|
12825
12922
|
<xsl:value-of select="$src"/>
|
12826
12923
|
</xsl:when>
|
12827
12924
|
<xsl:otherwise>
|
12828
|
-
<xsl:
|
12925
|
+
<xsl:choose>
|
12926
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
12927
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
12928
|
+
</xsl:when>
|
12929
|
+
<xsl:otherwise>
|
12930
|
+
<xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
|
12931
|
+
</xsl:otherwise>
|
12932
|
+
</xsl:choose>
|
12829
12933
|
</xsl:otherwise>
|
12830
12934
|
</xsl:choose>
|
12831
12935
|
</xsl:template>
|