metanorma-bipm 2.4.12 → 2.5.0
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 +32 -7
- data/lib/isodoc/bipm/bipm.guide.xsl +32 -7
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +32 -7
- data/lib/isodoc/bipm/bipm.rapport.xsl +32 -7
- data/lib/isodoc/bipm/html/htmlstyle.css +40 -0
- data/lib/isodoc/bipm/jcgm.standard.xsl +32 -7
- data/lib/isodoc/bipm/pdf_convert.rb +8 -9
- data/lib/metanorma/bipm/processor.rb +0 -19
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma-bipm.gemspec +1 -1
- data/metanorma.yml +15 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e64338ce855335c62f1d91866164719bc27d51fba3da87c05a0a2742fd616f1
|
4
|
+
data.tar.gz: 2a0b624bf5af319f0b6d07a722c2cc8548ea94d08ae51afb1251de6219ad7bd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6f425f80f2b93e33ae13331e3fd808f7a25f81621d54c2af65377457173621c03598886c54f0982105e44f60f1506cb40b4c7bcce76226aacb5934569808236
|
7
|
+
data.tar.gz: 1bd5e4718c7e410f270c3f23d66204c0b174725b23eb467b55acc38b619066fff62e19ea28e382984558120bbaa9f0ff7349f47caf0c6d404d130ba0cfc59932
|
@@ -5725,13 +5725,35 @@
|
|
5725
5725
|
</xsl:for-each>
|
5726
5726
|
</xsl:element>
|
5727
5727
|
|
5728
|
-
<xsl:call-template name="
|
5728
|
+
<xsl:call-template name="insertAnnexAndBibliographyInSeparatePageSequences"/>
|
5729
5729
|
|
5730
|
-
<xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
|
5730
|
+
<!-- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/> -->
|
5731
5731
|
|
5732
5732
|
<!-- <xsl:call-template name="insertIndexInSeparatePageSequences"/> -->
|
5733
5733
|
</xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
|
5734
5734
|
|
5735
|
+
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertAnnexAndBibliographyInSeparatePageSequences">
|
5736
|
+
<xsl:for-each select="/*/*[local-name()='annex'] | /*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]] | /*/*[local-name()='indexsect']">
|
5737
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
5738
|
+
<xsl:choose>
|
5739
|
+
<xsl:when test="local-name() = 'annex' or local-name() = 'indexsect'">
|
5740
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
5741
|
+
<xsl:attribute name="main_page_sequence"/>
|
5742
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
5743
|
+
</xsl:element>
|
5744
|
+
</xsl:when>
|
5745
|
+
<xsl:otherwise> <!-- bibliography -->
|
5746
|
+
<xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
|
5747
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
5748
|
+
<xsl:attribute name="main_page_sequence"/>
|
5749
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
5750
|
+
</xsl:element>
|
5751
|
+
</xsl:element>
|
5752
|
+
</xsl:otherwise>
|
5753
|
+
</xsl:choose>
|
5754
|
+
</xsl:for-each>
|
5755
|
+
</xsl:template>
|
5756
|
+
|
5735
5757
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertAnnexInSeparatePageSequences">
|
5736
5758
|
<xsl:for-each select="/*/*[local-name()='annex']">
|
5737
5759
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -14656,10 +14678,12 @@
|
|
14656
14678
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
14657
14679
|
<xsl:copy>
|
14658
14680
|
<xsl:copy-of select="@*"/>
|
14659
|
-
<xsl:
|
14660
|
-
|
14661
|
-
|
14662
|
-
<xsl:
|
14681
|
+
<xsl:if test="1 = 2"> <!-- remove attachment/text(), because attachments added in the template 'addPDFUAmeta' before applying 'update_xml_step1' -->
|
14682
|
+
<xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
|
14683
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
|
14684
|
+
<xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
|
14685
|
+
<xsl:value-of select="normalize-space(.)"/>
|
14686
|
+
</xsl:if>
|
14663
14687
|
</xsl:if>
|
14664
14688
|
</xsl:copy>
|
14665
14689
|
</xsl:template>
|
@@ -15534,7 +15558,8 @@
|
|
15534
15558
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
15535
15559
|
<xsl:choose>
|
15536
15560
|
<xsl:when test="normalize-space() != ''">
|
15537
|
-
<
|
15561
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
15562
|
+
<pdf:embedded-file src="{$src_attachment}" filename="{@name}"/>
|
15538
15563
|
</xsl:when>
|
15539
15564
|
<xsl:otherwise>
|
15540
15565
|
<!-- _{filename}_attachments -->
|
@@ -5725,13 +5725,35 @@
|
|
5725
5725
|
</xsl:for-each>
|
5726
5726
|
</xsl:element>
|
5727
5727
|
|
5728
|
-
<xsl:call-template name="
|
5728
|
+
<xsl:call-template name="insertAnnexAndBibliographyInSeparatePageSequences"/>
|
5729
5729
|
|
5730
|
-
<xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
|
5730
|
+
<!-- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/> -->
|
5731
5731
|
|
5732
5732
|
<!-- <xsl:call-template name="insertIndexInSeparatePageSequences"/> -->
|
5733
5733
|
</xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
|
5734
5734
|
|
5735
|
+
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertAnnexAndBibliographyInSeparatePageSequences">
|
5736
|
+
<xsl:for-each select="/*/*[local-name()='annex'] | /*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]] | /*/*[local-name()='indexsect']">
|
5737
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
5738
|
+
<xsl:choose>
|
5739
|
+
<xsl:when test="local-name() = 'annex' or local-name() = 'indexsect'">
|
5740
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
5741
|
+
<xsl:attribute name="main_page_sequence"/>
|
5742
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
5743
|
+
</xsl:element>
|
5744
|
+
</xsl:when>
|
5745
|
+
<xsl:otherwise> <!-- bibliography -->
|
5746
|
+
<xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
|
5747
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
5748
|
+
<xsl:attribute name="main_page_sequence"/>
|
5749
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
5750
|
+
</xsl:element>
|
5751
|
+
</xsl:element>
|
5752
|
+
</xsl:otherwise>
|
5753
|
+
</xsl:choose>
|
5754
|
+
</xsl:for-each>
|
5755
|
+
</xsl:template>
|
5756
|
+
|
5735
5757
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertAnnexInSeparatePageSequences">
|
5736
5758
|
<xsl:for-each select="/*/*[local-name()='annex']">
|
5737
5759
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -14656,10 +14678,12 @@
|
|
14656
14678
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
14657
14679
|
<xsl:copy>
|
14658
14680
|
<xsl:copy-of select="@*"/>
|
14659
|
-
<xsl:
|
14660
|
-
|
14661
|
-
|
14662
|
-
<xsl:
|
14681
|
+
<xsl:if test="1 = 2"> <!-- remove attachment/text(), because attachments added in the template 'addPDFUAmeta' before applying 'update_xml_step1' -->
|
14682
|
+
<xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
|
14683
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
|
14684
|
+
<xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
|
14685
|
+
<xsl:value-of select="normalize-space(.)"/>
|
14686
|
+
</xsl:if>
|
14663
14687
|
</xsl:if>
|
14664
14688
|
</xsl:copy>
|
14665
14689
|
</xsl:template>
|
@@ -15534,7 +15558,8 @@
|
|
15534
15558
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
15535
15559
|
<xsl:choose>
|
15536
15560
|
<xsl:when test="normalize-space() != ''">
|
15537
|
-
<
|
15561
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
15562
|
+
<pdf:embedded-file src="{$src_attachment}" filename="{@name}"/>
|
15538
15563
|
</xsl:when>
|
15539
15564
|
<xsl:otherwise>
|
15540
15565
|
<!-- _{filename}_attachments -->
|
@@ -5725,13 +5725,35 @@
|
|
5725
5725
|
</xsl:for-each>
|
5726
5726
|
</xsl:element>
|
5727
5727
|
|
5728
|
-
<xsl:call-template name="
|
5728
|
+
<xsl:call-template name="insertAnnexAndBibliographyInSeparatePageSequences"/>
|
5729
5729
|
|
5730
|
-
<xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
|
5730
|
+
<!-- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/> -->
|
5731
5731
|
|
5732
5732
|
<!-- <xsl:call-template name="insertIndexInSeparatePageSequences"/> -->
|
5733
5733
|
</xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
|
5734
5734
|
|
5735
|
+
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertAnnexAndBibliographyInSeparatePageSequences">
|
5736
|
+
<xsl:for-each select="/*/*[local-name()='annex'] | /*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]] | /*/*[local-name()='indexsect']">
|
5737
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
5738
|
+
<xsl:choose>
|
5739
|
+
<xsl:when test="local-name() = 'annex' or local-name() = 'indexsect'">
|
5740
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
5741
|
+
<xsl:attribute name="main_page_sequence"/>
|
5742
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
5743
|
+
</xsl:element>
|
5744
|
+
</xsl:when>
|
5745
|
+
<xsl:otherwise> <!-- bibliography -->
|
5746
|
+
<xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
|
5747
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
5748
|
+
<xsl:attribute name="main_page_sequence"/>
|
5749
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
5750
|
+
</xsl:element>
|
5751
|
+
</xsl:element>
|
5752
|
+
</xsl:otherwise>
|
5753
|
+
</xsl:choose>
|
5754
|
+
</xsl:for-each>
|
5755
|
+
</xsl:template>
|
5756
|
+
|
5735
5757
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertAnnexInSeparatePageSequences">
|
5736
5758
|
<xsl:for-each select="/*/*[local-name()='annex']">
|
5737
5759
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -14656,10 +14678,12 @@
|
|
14656
14678
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
14657
14679
|
<xsl:copy>
|
14658
14680
|
<xsl:copy-of select="@*"/>
|
14659
|
-
<xsl:
|
14660
|
-
|
14661
|
-
|
14662
|
-
<xsl:
|
14681
|
+
<xsl:if test="1 = 2"> <!-- remove attachment/text(), because attachments added in the template 'addPDFUAmeta' before applying 'update_xml_step1' -->
|
14682
|
+
<xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
|
14683
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
|
14684
|
+
<xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
|
14685
|
+
<xsl:value-of select="normalize-space(.)"/>
|
14686
|
+
</xsl:if>
|
14663
14687
|
</xsl:if>
|
14664
14688
|
</xsl:copy>
|
14665
14689
|
</xsl:template>
|
@@ -15534,7 +15558,8 @@
|
|
15534
15558
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
15535
15559
|
<xsl:choose>
|
15536
15560
|
<xsl:when test="normalize-space() != ''">
|
15537
|
-
<
|
15561
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
15562
|
+
<pdf:embedded-file src="{$src_attachment}" filename="{@name}"/>
|
15538
15563
|
</xsl:when>
|
15539
15564
|
<xsl:otherwise>
|
15540
15565
|
<!-- _{filename}_attachments -->
|
@@ -5725,13 +5725,35 @@
|
|
5725
5725
|
</xsl:for-each>
|
5726
5726
|
</xsl:element>
|
5727
5727
|
|
5728
|
-
<xsl:call-template name="
|
5728
|
+
<xsl:call-template name="insertAnnexAndBibliographyInSeparatePageSequences"/>
|
5729
5729
|
|
5730
|
-
<xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
|
5730
|
+
<!-- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/> -->
|
5731
5731
|
|
5732
5732
|
<!-- <xsl:call-template name="insertIndexInSeparatePageSequences"/> -->
|
5733
5733
|
</xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
|
5734
5734
|
|
5735
|
+
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertAnnexAndBibliographyInSeparatePageSequences">
|
5736
|
+
<xsl:for-each select="/*/*[local-name()='annex'] | /*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]] | /*/*[local-name()='indexsect']">
|
5737
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
5738
|
+
<xsl:choose>
|
5739
|
+
<xsl:when test="local-name() = 'annex' or local-name() = 'indexsect'">
|
5740
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
5741
|
+
<xsl:attribute name="main_page_sequence"/>
|
5742
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
5743
|
+
</xsl:element>
|
5744
|
+
</xsl:when>
|
5745
|
+
<xsl:otherwise> <!-- bibliography -->
|
5746
|
+
<xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
|
5747
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
5748
|
+
<xsl:attribute name="main_page_sequence"/>
|
5749
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
5750
|
+
</xsl:element>
|
5751
|
+
</xsl:element>
|
5752
|
+
</xsl:otherwise>
|
5753
|
+
</xsl:choose>
|
5754
|
+
</xsl:for-each>
|
5755
|
+
</xsl:template>
|
5756
|
+
|
5735
5757
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertAnnexInSeparatePageSequences">
|
5736
5758
|
<xsl:for-each select="/*/*[local-name()='annex']">
|
5737
5759
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -14656,10 +14678,12 @@
|
|
14656
14678
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
14657
14679
|
<xsl:copy>
|
14658
14680
|
<xsl:copy-of select="@*"/>
|
14659
|
-
<xsl:
|
14660
|
-
|
14661
|
-
|
14662
|
-
<xsl:
|
14681
|
+
<xsl:if test="1 = 2"> <!-- remove attachment/text(), because attachments added in the template 'addPDFUAmeta' before applying 'update_xml_step1' -->
|
14682
|
+
<xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
|
14683
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
|
14684
|
+
<xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
|
14685
|
+
<xsl:value-of select="normalize-space(.)"/>
|
14686
|
+
</xsl:if>
|
14663
14687
|
</xsl:if>
|
14664
14688
|
</xsl:copy>
|
14665
14689
|
</xsl:template>
|
@@ -15534,7 +15558,8 @@
|
|
15534
15558
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
15535
15559
|
<xsl:choose>
|
15536
15560
|
<xsl:when test="normalize-space() != ''">
|
15537
|
-
<
|
15561
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
15562
|
+
<pdf:embedded-file src="{$src_attachment}" filename="{@name}"/>
|
15538
15563
|
</xsl:when>
|
15539
15564
|
<xsl:otherwise>
|
15540
15565
|
<!-- _{filename}_attachments -->
|
@@ -229,6 +229,46 @@ h6:hover > a.anchor,
|
|
229
229
|
.inline-header:hover > a.anchor {
|
230
230
|
visibility: visible; }
|
231
231
|
|
232
|
+
/* collapsible snippets: collapsible before hidable */
|
233
|
+
.hidable {
|
234
|
+
max-height: 0;
|
235
|
+
overflow: hidden;
|
236
|
+
transition: max-height 0.2s ease-out; }
|
237
|
+
|
238
|
+
.collapsible {
|
239
|
+
background-color: #777;
|
240
|
+
color: white;
|
241
|
+
cursor: pointer;
|
242
|
+
padding: 12px 0;
|
243
|
+
margin: 0;
|
244
|
+
width: 100%;
|
245
|
+
border: none;
|
246
|
+
text-align: left;
|
247
|
+
outline: none;
|
248
|
+
font-size: 15px; }
|
249
|
+
|
250
|
+
.active, .collapsible:hover {
|
251
|
+
background-color: #555; }
|
252
|
+
|
253
|
+
.collapsible:after {
|
254
|
+
content: '\25bc';
|
255
|
+
color: white;
|
256
|
+
font-weight: bold;
|
257
|
+
float: right;
|
258
|
+
margin-left: 12px;
|
259
|
+
margin-right: 12px; }
|
260
|
+
|
261
|
+
.active:after {
|
262
|
+
content: "\25b2"; }
|
263
|
+
|
264
|
+
/* collapsible: */
|
265
|
+
.collapsible + .hidable {
|
266
|
+
margin-top: 0; }
|
267
|
+
|
268
|
+
.collapsible:not(.active) + .hidable {
|
269
|
+
overflow: hidden;
|
270
|
+
padding: 0; }
|
271
|
+
|
232
272
|
#brochure-band {
|
233
273
|
background-color: #0AC442; }
|
234
274
|
|
@@ -3645,13 +3645,35 @@
|
|
3645
3645
|
</xsl:for-each>
|
3646
3646
|
</xsl:element>
|
3647
3647
|
|
3648
|
-
<xsl:call-template name="
|
3648
|
+
<xsl:call-template name="insertAnnexAndBibliographyInSeparatePageSequences"/>
|
3649
3649
|
|
3650
|
-
<xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
|
3650
|
+
<!-- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/> -->
|
3651
3651
|
|
3652
3652
|
<!-- <xsl:call-template name="insertIndexInSeparatePageSequences"/> -->
|
3653
3653
|
</xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
|
3654
3654
|
|
3655
|
+
<xsl:template name="insertAnnexAndBibliographyInSeparatePageSequences">
|
3656
|
+
<xsl:for-each select="/*/*[local-name()='annex'] | /*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]] | /*/*[local-name()='indexsect']">
|
3657
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3658
|
+
<xsl:choose>
|
3659
|
+
<xsl:when test="local-name() = 'annex' or local-name() = 'indexsect'">
|
3660
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
3661
|
+
<xsl:attribute name="main_page_sequence"/>
|
3662
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
3663
|
+
</xsl:element>
|
3664
|
+
</xsl:when>
|
3665
|
+
<xsl:otherwise> <!-- bibliography -->
|
3666
|
+
<xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
|
3667
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
3668
|
+
<xsl:attribute name="main_page_sequence"/>
|
3669
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
3670
|
+
</xsl:element>
|
3671
|
+
</xsl:element>
|
3672
|
+
</xsl:otherwise>
|
3673
|
+
</xsl:choose>
|
3674
|
+
</xsl:for-each>
|
3675
|
+
</xsl:template>
|
3676
|
+
|
3655
3677
|
<xsl:template name="insertAnnexInSeparatePageSequences">
|
3656
3678
|
<xsl:for-each select="/*/*[local-name()='annex']">
|
3657
3679
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -12547,10 +12569,12 @@
|
|
12547
12569
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
12548
12570
|
<xsl:copy>
|
12549
12571
|
<xsl:copy-of select="@*"/>
|
12550
|
-
<xsl:
|
12551
|
-
|
12552
|
-
|
12553
|
-
<xsl:
|
12572
|
+
<xsl:if test="1 = 2"> <!-- remove attachment/text(), because attachments added in the template 'addPDFUAmeta' before applying 'update_xml_step1' -->
|
12573
|
+
<xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
|
12574
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
|
12575
|
+
<xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
|
12576
|
+
<xsl:value-of select="normalize-space(.)"/>
|
12577
|
+
</xsl:if>
|
12554
12578
|
</xsl:if>
|
12555
12579
|
</xsl:copy>
|
12556
12580
|
</xsl:template>
|
@@ -13423,7 +13447,8 @@
|
|
13423
13447
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
13424
13448
|
<xsl:choose>
|
13425
13449
|
<xsl:when test="normalize-space() != ''">
|
13426
|
-
<
|
13450
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
13451
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$src_attachment}" filename="{@name}"/>
|
13427
13452
|
</xsl:when>
|
13428
13453
|
<xsl:otherwise>
|
13429
13454
|
<!-- _{filename}_attachments -->
|
@@ -1,22 +1,18 @@
|
|
1
1
|
require "isodoc"
|
2
|
+
require "metanorma-generic"
|
3
|
+
require_relative "base_convert"
|
2
4
|
|
3
5
|
module IsoDoc
|
4
6
|
module BIPM
|
5
|
-
|
6
|
-
# document schema encapsulation of the document for validation
|
7
|
-
class PdfConvert < IsoDoc::XslfoPdfConvert
|
7
|
+
class PdfConvert < IsoDoc::Generic::PdfConvert
|
8
8
|
def initialize(options)
|
9
|
-
@libdir = File.dirname(__FILE__)
|
10
9
|
super
|
11
|
-
|
12
|
-
|
13
|
-
def configuration
|
14
|
-
Metanorma::BIPM.configuration
|
10
|
+
@libdir = File.dirname(__FILE__)
|
15
11
|
end
|
16
12
|
|
17
13
|
def pdf_stylesheet(docxml)
|
18
14
|
docxml&.at(ns("//bibdata/ext/editorialgroup/committee/@acronym"))
|
19
|
-
|
15
|
+
&.value == "JCGM" and
|
20
16
|
return "jcgm.standard.xsl"
|
21
17
|
|
22
18
|
doctype = @doctype
|
@@ -37,6 +33,9 @@ module IsoDoc
|
|
37
33
|
end
|
38
34
|
super
|
39
35
|
end
|
36
|
+
|
37
|
+
include Init
|
38
|
+
include BaseConvert
|
40
39
|
end
|
41
40
|
end
|
42
41
|
end
|
@@ -14,25 +14,6 @@ module Metanorma
|
|
14
14
|
).tap { |hs| hs.delete(:doc) }
|
15
15
|
end
|
16
16
|
|
17
|
-
def fonts_manifest
|
18
|
-
{
|
19
|
-
"Arial" => nil,
|
20
|
-
"Times New Roman" => nil,
|
21
|
-
"Work Sans" => nil,
|
22
|
-
"Work Sans Black" => nil,
|
23
|
-
"Work Sans ExtraBold" => nil,
|
24
|
-
"Work Sans ExtraLight" => nil,
|
25
|
-
"Work Sans Light" => nil,
|
26
|
-
"Work Sans Medium" => nil,
|
27
|
-
"Work Sans SemiBold" => nil,
|
28
|
-
"Work Sans Thin" => nil,
|
29
|
-
"STIX Two Math" => nil,
|
30
|
-
"Source Han Sans" => nil,
|
31
|
-
"Source Han Sans Normal" => nil,
|
32
|
-
"TeXGyreChorus" => nil,
|
33
|
-
}
|
34
|
-
end
|
35
|
-
|
36
17
|
def version
|
37
18
|
"Metanorma::BIPM #{Metanorma::BIPM::VERSION}"
|
38
19
|
end
|
data/metanorma-bipm.gemspec
CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.require_paths = ["lib"]
|
28
28
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
|
29
29
|
|
30
|
-
spec.add_dependency "metanorma-generic", "~> 2.
|
30
|
+
spec.add_dependency "metanorma-generic", "~> 2.7.0"
|
31
31
|
spec.add_dependency "metanorma-iso", "~> 2.8.0"
|
32
32
|
|
33
33
|
spec.add_development_dependency "debug"
|
data/metanorma.yml
CHANGED
@@ -116,3 +116,18 @@ metadata_extensions:
|
|
116
116
|
relations:
|
117
117
|
- supersedes
|
118
118
|
- superseded-by
|
119
|
+
fonts_manifest:
|
120
|
+
Arial:
|
121
|
+
Times New Roman:
|
122
|
+
Work Sans:
|
123
|
+
Work Sans Black:
|
124
|
+
Work Sans ExtraBold:
|
125
|
+
Work Sans ExtraLight:
|
126
|
+
Work Sans Light:
|
127
|
+
Work Sans Medium:
|
128
|
+
Work Sans SemiBold:
|
129
|
+
Work Sans Thin:
|
130
|
+
STIX Two Math:
|
131
|
+
Source Han Sans:
|
132
|
+
Source Han Sans Normal:
|
133
|
+
TeXGyreChorus:
|
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
|
+
version: 2.5.0
|
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-08-
|
11
|
+
date: 2024-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.7.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.7.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: metanorma-iso
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|