metanorma-bipm 2.4.11 → 2.4.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/bipm/bipm.brochure.xsl +30 -3
- data/lib/isodoc/bipm/bipm.guide.xsl +30 -3
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +30 -3
- data/lib/isodoc/bipm/bipm.rapport.xsl +30 -3
- data/lib/isodoc/bipm/jcgm.standard.xsl +30 -3
- data/lib/isodoc/bipm/metadata.rb +3 -1
- data/lib/metanorma/bipm/converter.rb +1 -1
- data/lib/metanorma/bipm/front.rb +8 -12
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma-bipm.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6328cc0a118035ba72b346c223c4e7e28aacdf48c5baf5a40a6de7fdc05005aa
|
4
|
+
data.tar.gz: bb543f02c153a0f39a5f0291104281c9b423258933dc5add261c7b57eda81de5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e381d7db910aff8421d57a31da740d022bc4bb235539a74439b7096f2e11760d365996a3f4cedf79925b14a1b9681feb94387271f747b1803ee7c22ba34482e
|
7
|
+
data.tar.gz: bc6cd6855b001bc0f81d46d66e82e28710fa09039c82cdab897b6e45a43e28387e5217cd6e5966772a1692c2bfc719bf4b078f9f01b0e710ddbb651e2525cef8
|
@@ -9999,18 +9999,33 @@
|
|
9999
9999
|
|
10000
10000
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name()='localityStack']"/>
|
10001
10001
|
|
10002
|
+
<xsl:variable xmlns:redirect="http://xml.apache.org/xalan/redirect" name="pdfAttachmentsList_">
|
10003
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
10004
|
+
<attachment filename="{@name}"/>
|
10005
|
+
</xsl:for-each>
|
10006
|
+
</xsl:variable>
|
10007
|
+
<xsl:variable xmlns:redirect="http://xml.apache.org/xalan/redirect" name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
|
10008
|
+
|
10002
10009
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name()='link']" name="link">
|
10010
|
+
<xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
|
10011
|
+
<xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
|
10003
10012
|
<xsl:variable name="target">
|
10004
10013
|
<xsl:choose>
|
10005
10014
|
<xsl:when test="@updatetype = 'true'">
|
10006
10015
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
10007
10016
|
</xsl:when>
|
10017
|
+
<!-- link to the PDF attachment -->
|
10018
|
+
<xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
|
10019
|
+
<xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
|
10020
|
+
</xsl:when>
|
10021
|
+
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
10022
|
+
<xsl:value-of select="concat('url(embedded-file:', $target_attachment_name, ')')"/>
|
10023
|
+
</xsl:when>
|
10008
10024
|
<xsl:when test="contains(@target, concat('_', $inputxml_filename_prefix, '_attachments'))">
|
10009
|
-
<!-- link to the PDF attachment -->
|
10010
10025
|
<xsl:variable name="target_" select="translate(@target, '\', '/')"/>
|
10011
10026
|
<xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
|
10012
10027
|
<xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
|
10013
|
-
</xsl:when>
|
10028
|
+
</xsl:when> -->
|
10014
10029
|
<xsl:otherwise>
|
10015
10030
|
<xsl:value-of select="normalize-space(@target)"/>
|
10016
10031
|
</xsl:otherwise>
|
@@ -14638,6 +14653,17 @@
|
|
14638
14653
|
<xsl:copy-of select="."/>
|
14639
14654
|
</xsl:template>
|
14640
14655
|
|
14656
|
+
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
14657
|
+
<xsl:copy>
|
14658
|
+
<xsl:copy-of select="@*"/>
|
14659
|
+
<xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
|
14660
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
|
14661
|
+
<xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
|
14662
|
+
<xsl:value-of select="."/>
|
14663
|
+
</xsl:if>
|
14664
|
+
</xsl:copy>
|
14665
|
+
</xsl:template>
|
14666
|
+
|
14641
14667
|
<!-- add @id, mandatory for table auto-layout algorithm -->
|
14642
14668
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'dl' or local-name() = 'table'][not(@id)]" mode="update_xml_step1">
|
14643
14669
|
<xsl:copy>
|
@@ -15512,7 +15538,8 @@
|
|
15512
15538
|
</xsl:when>
|
15513
15539
|
<xsl:otherwise>
|
15514
15540
|
<!-- _{filename}_attachments -->
|
15515
|
-
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/>
|
15541
|
+
<!-- <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/> -->
|
15542
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
15516
15543
|
<pdf:embedded-file src="{$url}" filename="{@name}"/>
|
15517
15544
|
</xsl:otherwise>
|
15518
15545
|
</xsl:choose>
|
@@ -9999,18 +9999,33 @@
|
|
9999
9999
|
|
10000
10000
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name()='localityStack']"/>
|
10001
10001
|
|
10002
|
+
<xsl:variable xmlns:redirect="http://xml.apache.org/xalan/redirect" name="pdfAttachmentsList_">
|
10003
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
10004
|
+
<attachment filename="{@name}"/>
|
10005
|
+
</xsl:for-each>
|
10006
|
+
</xsl:variable>
|
10007
|
+
<xsl:variable xmlns:redirect="http://xml.apache.org/xalan/redirect" name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
|
10008
|
+
|
10002
10009
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name()='link']" name="link">
|
10010
|
+
<xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
|
10011
|
+
<xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
|
10003
10012
|
<xsl:variable name="target">
|
10004
10013
|
<xsl:choose>
|
10005
10014
|
<xsl:when test="@updatetype = 'true'">
|
10006
10015
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
10007
10016
|
</xsl:when>
|
10017
|
+
<!-- link to the PDF attachment -->
|
10018
|
+
<xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
|
10019
|
+
<xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
|
10020
|
+
</xsl:when>
|
10021
|
+
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
10022
|
+
<xsl:value-of select="concat('url(embedded-file:', $target_attachment_name, ')')"/>
|
10023
|
+
</xsl:when>
|
10008
10024
|
<xsl:when test="contains(@target, concat('_', $inputxml_filename_prefix, '_attachments'))">
|
10009
|
-
<!-- link to the PDF attachment -->
|
10010
10025
|
<xsl:variable name="target_" select="translate(@target, '\', '/')"/>
|
10011
10026
|
<xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
|
10012
10027
|
<xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
|
10013
|
-
</xsl:when>
|
10028
|
+
</xsl:when> -->
|
10014
10029
|
<xsl:otherwise>
|
10015
10030
|
<xsl:value-of select="normalize-space(@target)"/>
|
10016
10031
|
</xsl:otherwise>
|
@@ -14638,6 +14653,17 @@
|
|
14638
14653
|
<xsl:copy-of select="."/>
|
14639
14654
|
</xsl:template>
|
14640
14655
|
|
14656
|
+
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
14657
|
+
<xsl:copy>
|
14658
|
+
<xsl:copy-of select="@*"/>
|
14659
|
+
<xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
|
14660
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
|
14661
|
+
<xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
|
14662
|
+
<xsl:value-of select="."/>
|
14663
|
+
</xsl:if>
|
14664
|
+
</xsl:copy>
|
14665
|
+
</xsl:template>
|
14666
|
+
|
14641
14667
|
<!-- add @id, mandatory for table auto-layout algorithm -->
|
14642
14668
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'dl' or local-name() = 'table'][not(@id)]" mode="update_xml_step1">
|
14643
14669
|
<xsl:copy>
|
@@ -15512,7 +15538,8 @@
|
|
15512
15538
|
</xsl:when>
|
15513
15539
|
<xsl:otherwise>
|
15514
15540
|
<!-- _{filename}_attachments -->
|
15515
|
-
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/>
|
15541
|
+
<!-- <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/> -->
|
15542
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
15516
15543
|
<pdf:embedded-file src="{$url}" filename="{@name}"/>
|
15517
15544
|
</xsl:otherwise>
|
15518
15545
|
</xsl:choose>
|
@@ -9999,18 +9999,33 @@
|
|
9999
9999
|
|
10000
10000
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name()='localityStack']"/>
|
10001
10001
|
|
10002
|
+
<xsl:variable xmlns:redirect="http://xml.apache.org/xalan/redirect" name="pdfAttachmentsList_">
|
10003
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
10004
|
+
<attachment filename="{@name}"/>
|
10005
|
+
</xsl:for-each>
|
10006
|
+
</xsl:variable>
|
10007
|
+
<xsl:variable xmlns:redirect="http://xml.apache.org/xalan/redirect" name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
|
10008
|
+
|
10002
10009
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name()='link']" name="link">
|
10010
|
+
<xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
|
10011
|
+
<xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
|
10003
10012
|
<xsl:variable name="target">
|
10004
10013
|
<xsl:choose>
|
10005
10014
|
<xsl:when test="@updatetype = 'true'">
|
10006
10015
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
10007
10016
|
</xsl:when>
|
10017
|
+
<!-- link to the PDF attachment -->
|
10018
|
+
<xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
|
10019
|
+
<xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
|
10020
|
+
</xsl:when>
|
10021
|
+
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
10022
|
+
<xsl:value-of select="concat('url(embedded-file:', $target_attachment_name, ')')"/>
|
10023
|
+
</xsl:when>
|
10008
10024
|
<xsl:when test="contains(@target, concat('_', $inputxml_filename_prefix, '_attachments'))">
|
10009
|
-
<!-- link to the PDF attachment -->
|
10010
10025
|
<xsl:variable name="target_" select="translate(@target, '\', '/')"/>
|
10011
10026
|
<xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
|
10012
10027
|
<xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
|
10013
|
-
</xsl:when>
|
10028
|
+
</xsl:when> -->
|
10014
10029
|
<xsl:otherwise>
|
10015
10030
|
<xsl:value-of select="normalize-space(@target)"/>
|
10016
10031
|
</xsl:otherwise>
|
@@ -14638,6 +14653,17 @@
|
|
14638
14653
|
<xsl:copy-of select="."/>
|
14639
14654
|
</xsl:template>
|
14640
14655
|
|
14656
|
+
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
14657
|
+
<xsl:copy>
|
14658
|
+
<xsl:copy-of select="@*"/>
|
14659
|
+
<xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
|
14660
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
|
14661
|
+
<xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
|
14662
|
+
<xsl:value-of select="."/>
|
14663
|
+
</xsl:if>
|
14664
|
+
</xsl:copy>
|
14665
|
+
</xsl:template>
|
14666
|
+
|
14641
14667
|
<!-- add @id, mandatory for table auto-layout algorithm -->
|
14642
14668
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'dl' or local-name() = 'table'][not(@id)]" mode="update_xml_step1">
|
14643
14669
|
<xsl:copy>
|
@@ -15512,7 +15538,8 @@
|
|
15512
15538
|
</xsl:when>
|
15513
15539
|
<xsl:otherwise>
|
15514
15540
|
<!-- _{filename}_attachments -->
|
15515
|
-
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/>
|
15541
|
+
<!-- <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/> -->
|
15542
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
15516
15543
|
<pdf:embedded-file src="{$url}" filename="{@name}"/>
|
15517
15544
|
</xsl:otherwise>
|
15518
15545
|
</xsl:choose>
|
@@ -9999,18 +9999,33 @@
|
|
9999
9999
|
|
10000
10000
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name()='localityStack']"/>
|
10001
10001
|
|
10002
|
+
<xsl:variable xmlns:redirect="http://xml.apache.org/xalan/redirect" name="pdfAttachmentsList_">
|
10003
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
10004
|
+
<attachment filename="{@name}"/>
|
10005
|
+
</xsl:for-each>
|
10006
|
+
</xsl:variable>
|
10007
|
+
<xsl:variable xmlns:redirect="http://xml.apache.org/xalan/redirect" name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
|
10008
|
+
|
10002
10009
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name()='link']" name="link">
|
10010
|
+
<xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
|
10011
|
+
<xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
|
10003
10012
|
<xsl:variable name="target">
|
10004
10013
|
<xsl:choose>
|
10005
10014
|
<xsl:when test="@updatetype = 'true'">
|
10006
10015
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
10007
10016
|
</xsl:when>
|
10017
|
+
<!-- link to the PDF attachment -->
|
10018
|
+
<xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
|
10019
|
+
<xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
|
10020
|
+
</xsl:when>
|
10021
|
+
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
10022
|
+
<xsl:value-of select="concat('url(embedded-file:', $target_attachment_name, ')')"/>
|
10023
|
+
</xsl:when>
|
10008
10024
|
<xsl:when test="contains(@target, concat('_', $inputxml_filename_prefix, '_attachments'))">
|
10009
|
-
<!-- link to the PDF attachment -->
|
10010
10025
|
<xsl:variable name="target_" select="translate(@target, '\', '/')"/>
|
10011
10026
|
<xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
|
10012
10027
|
<xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
|
10013
|
-
</xsl:when>
|
10028
|
+
</xsl:when> -->
|
10014
10029
|
<xsl:otherwise>
|
10015
10030
|
<xsl:value-of select="normalize-space(@target)"/>
|
10016
10031
|
</xsl:otherwise>
|
@@ -14638,6 +14653,17 @@
|
|
14638
14653
|
<xsl:copy-of select="."/>
|
14639
14654
|
</xsl:template>
|
14640
14655
|
|
14656
|
+
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
14657
|
+
<xsl:copy>
|
14658
|
+
<xsl:copy-of select="@*"/>
|
14659
|
+
<xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
|
14660
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
|
14661
|
+
<xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
|
14662
|
+
<xsl:value-of select="."/>
|
14663
|
+
</xsl:if>
|
14664
|
+
</xsl:copy>
|
14665
|
+
</xsl:template>
|
14666
|
+
|
14641
14667
|
<!-- add @id, mandatory for table auto-layout algorithm -->
|
14642
14668
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'dl' or local-name() = 'table'][not(@id)]" mode="update_xml_step1">
|
14643
14669
|
<xsl:copy>
|
@@ -15512,7 +15538,8 @@
|
|
15512
15538
|
</xsl:when>
|
15513
15539
|
<xsl:otherwise>
|
15514
15540
|
<!-- _{filename}_attachments -->
|
15515
|
-
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/>
|
15541
|
+
<!-- <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/> -->
|
15542
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
15516
15543
|
<pdf:embedded-file src="{$url}" filename="{@name}"/>
|
15517
15544
|
</xsl:otherwise>
|
15518
15545
|
</xsl:choose>
|
@@ -7908,18 +7908,33 @@
|
|
7908
7908
|
|
7909
7909
|
<xsl:template match="*[local-name()='localityStack']"/>
|
7910
7910
|
|
7911
|
+
<xsl:variable name="pdfAttachmentsList_">
|
7912
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
7913
|
+
<attachment filename="{@name}"/>
|
7914
|
+
</xsl:for-each>
|
7915
|
+
</xsl:variable>
|
7916
|
+
<xsl:variable name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
|
7917
|
+
|
7911
7918
|
<xsl:template match="*[local-name()='link']" name="link">
|
7919
|
+
<xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
|
7920
|
+
<xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
|
7912
7921
|
<xsl:variable name="target">
|
7913
7922
|
<xsl:choose>
|
7914
7923
|
<xsl:when test="@updatetype = 'true'">
|
7915
7924
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
7916
7925
|
</xsl:when>
|
7926
|
+
<!-- link to the PDF attachment -->
|
7927
|
+
<xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
|
7928
|
+
<xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
|
7929
|
+
</xsl:when>
|
7930
|
+
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
7931
|
+
<xsl:value-of select="concat('url(embedded-file:', $target_attachment_name, ')')"/>
|
7932
|
+
</xsl:when>
|
7917
7933
|
<xsl:when test="contains(@target, concat('_', $inputxml_filename_prefix, '_attachments'))">
|
7918
|
-
<!-- link to the PDF attachment -->
|
7919
7934
|
<xsl:variable name="target_" select="translate(@target, '\', '/')"/>
|
7920
7935
|
<xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
|
7921
7936
|
<xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
|
7922
|
-
</xsl:when>
|
7937
|
+
</xsl:when> -->
|
7923
7938
|
<xsl:otherwise>
|
7924
7939
|
<xsl:value-of select="normalize-space(@target)"/>
|
7925
7940
|
</xsl:otherwise>
|
@@ -12529,6 +12544,17 @@
|
|
12529
12544
|
<xsl:copy-of select="."/>
|
12530
12545
|
</xsl:template>
|
12531
12546
|
|
12547
|
+
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
12548
|
+
<xsl:copy>
|
12549
|
+
<xsl:copy-of select="@*"/>
|
12550
|
+
<xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
|
12551
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
|
12552
|
+
<xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
|
12553
|
+
<xsl:value-of select="."/>
|
12554
|
+
</xsl:if>
|
12555
|
+
</xsl:copy>
|
12556
|
+
</xsl:template>
|
12557
|
+
|
12532
12558
|
<!-- add @id, mandatory for table auto-layout algorithm -->
|
12533
12559
|
<xsl:template match="*[local-name() = 'dl' or local-name() = 'table'][not(@id)]" mode="update_xml_step1">
|
12534
12560
|
<xsl:copy>
|
@@ -13401,7 +13427,8 @@
|
|
13401
13427
|
</xsl:when>
|
13402
13428
|
<xsl:otherwise>
|
13403
13429
|
<!-- _{filename}_attachments -->
|
13404
|
-
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/>
|
13430
|
+
<!-- <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/> -->
|
13431
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
13405
13432
|
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{@name}"/>
|
13406
13433
|
</xsl:otherwise>
|
13407
13434
|
</xsl:choose>
|
data/lib/isodoc/bipm/metadata.rb
CHANGED
@@ -83,7 +83,9 @@ module IsoDoc
|
|
83
83
|
ret = xml.xpath(ns("//bibdata/contributor[xmlns:role/@type = " \
|
84
84
|
"'authorizer']/organization"))
|
85
85
|
.each_with_object([]) do |org, m|
|
86
|
-
|
86
|
+
name = org.at(ns("./name[@language = '#{@lang}']")) ||
|
87
|
+
org.at(ns("./name"))
|
88
|
+
m << name.text
|
87
89
|
end
|
88
90
|
ret.empty? or set(:authorizer, ret)
|
89
91
|
end
|
@@ -85,7 +85,7 @@ module Metanorma
|
|
85
85
|
def committee_validate(xml)
|
86
86
|
committees = Array(configuration&.committees) || return
|
87
87
|
committees.empty? and return
|
88
|
-
xml.xpath("//bibdata/ext/editorialgroup/committee
|
88
|
+
xml.xpath("//bibdata/ext/editorialgroup/committee").each do |c|
|
89
89
|
committees.include? c.text or
|
90
90
|
@log.add("Document Attributes", nil,
|
91
91
|
"#{c.text} is not a recognised committee")
|
data/lib/metanorma/bipm/front.rb
CHANGED
@@ -16,22 +16,18 @@ module Metanorma
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def metadata_committee1(node, xml)
|
19
|
-
|
20
|
-
|
21
|
-
e
|
22
|
-
|
23
|
-
e = node.attr("committee-fr") and
|
24
|
-
c.variant e, language: "fr", script: "Latn"
|
19
|
+
%w(en fr).each do |lg|
|
20
|
+
e = node.attr("committee-#{lg}") or next
|
21
|
+
xml.committee e, **attr_code(acronym: node.attr("committee-acronym"),
|
22
|
+
language: lg, script: "Latn")
|
25
23
|
end
|
26
24
|
end
|
27
25
|
|
28
26
|
def metadata_committee2(node, xml, num)
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
c.variant e, language: lg, script: "Latn"
|
34
|
-
end
|
27
|
+
%w(en fr).each do |lg|
|
28
|
+
e = node.attr("committee-#{lg}_#{num}") or next
|
29
|
+
xml.committee e, **attr_code(acronym: node.attr("committee-acronym"),
|
30
|
+
language: lg, script: "Latn")
|
35
31
|
end
|
36
32
|
end
|
37
33
|
|
data/metanorma-bipm.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-bipm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -206,6 +206,20 @@ dependencies:
|
|
206
206
|
- - ">="
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: xml-c14n
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
209
223
|
description: |
|
210
224
|
metanorma-vg lets you write Bureau International de Poids et Mesures (BIPM) standards in Metanorma syntax.
|
211
225
|
|