metanorma-bipm 1.0.7 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,6 +4,7 @@
4
4
 
5
5
  <xsl:param name="svg_images"/>
6
6
  <xsl:variable name="images" select="document($svg_images)"/>
7
+ <xsl:param name="basepath"/>
7
8
 
8
9
  <xsl:param name="initial_page_number"/>
9
10
  <xsl:param name="doc_split_by_language"/>
@@ -4630,12 +4631,18 @@
4630
4631
 
4631
4632
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
4632
4633
 
4633
-
4634
+
4634
4635
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
4635
4636
 
4636
4637
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
4637
4638
 
4638
4639
 
4640
+ </xsl:attribute-set><xsl:attribute-set name="add-style">
4641
+ <xsl:attribute name="color">red</xsl:attribute>
4642
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
4643
+ </xsl:attribute-set><xsl:attribute-set name="del-style">
4644
+ <xsl:attribute name="color">red</xsl:attribute>
4645
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
4639
4646
  </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
4640
4647
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
4641
4648
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -6101,8 +6108,12 @@
6101
6108
  <fo:inline text-decoration="underline">
6102
6109
  <xsl:apply-templates/>
6103
6110
  </fo:inline>
6111
+ </xsl:template><xsl:template match="*[local-name()='add']">
6112
+ <fo:inline xsl:use-attribute-sets="add-style">
6113
+ <xsl:apply-templates/>
6114
+ </fo:inline>
6104
6115
  </xsl:template><xsl:template match="*[local-name()='del']">
6105
- <fo:inline font-size="10pt" color="red" text-decoration="line-through">
6116
+ <fo:inline xsl:use-attribute-sets="del-style">
6106
6117
  <xsl:apply-templates/>
6107
6118
  </fo:inline>
6108
6119
  </xsl:template><xsl:template match="*[local-name()='hi']">
@@ -6740,22 +6751,37 @@
6740
6751
  <xsl:apply-templates/>
6741
6752
  </fo:block>
6742
6753
  </xsl:template><xsl:template match="*[local-name() = 'image']">
6743
- <fo:block xsl:use-attribute-sets="image-style">
6744
-
6745
-
6746
- <xsl:variable name="src">
6747
- <xsl:choose>
6748
- <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
6749
- <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
6750
- </xsl:when>
6751
- <xsl:otherwise>
6752
- <xsl:value-of select="@src"/>
6753
- </xsl:otherwise>
6754
- </xsl:choose>
6755
- </xsl:variable>
6756
-
6757
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
6758
- </fo:block>
6754
+ <xsl:choose>
6755
+ <xsl:when test="ancestor::*[local-name() = 'title']">
6756
+ <fo:inline padding-left="1mm" padding-right="1mm">
6757
+ <xsl:variable name="src">
6758
+ <xsl:call-template name="image_src"/>
6759
+ </xsl:variable>
6760
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
6761
+ </fo:inline>
6762
+ </xsl:when>
6763
+ <xsl:otherwise>
6764
+ <fo:block xsl:use-attribute-sets="image-style">
6765
+
6766
+ <xsl:variable name="src">
6767
+ <xsl:call-template name="image_src"/>
6768
+ </xsl:variable>
6769
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
6770
+ </fo:block>
6771
+ </xsl:otherwise>
6772
+ </xsl:choose>
6773
+ </xsl:template><xsl:template name="image_src">
6774
+ <xsl:choose>
6775
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
6776
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
6777
+ </xsl:when>
6778
+ <xsl:when test="not(starts-with(@src, 'data:'))">
6779
+ <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
6780
+ </xsl:when>
6781
+ <xsl:otherwise>
6782
+ <xsl:value-of select="@src"/>
6783
+ </xsl:otherwise>
6784
+ </xsl:choose>
6759
6785
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
6760
6786
  <xsl:apply-templates mode="contents"/>
6761
6787
  <xsl:text> </xsl:text>
@@ -4,6 +4,7 @@
4
4
 
5
5
  <xsl:param name="svg_images"/>
6
6
  <xsl:variable name="images" select="document($svg_images)"/>
7
+ <xsl:param name="basepath"/>
7
8
 
8
9
  <xsl:param name="initial_page_number"/>
9
10
  <xsl:param name="doc_split_by_language"/>
@@ -4630,12 +4631,18 @@
4630
4631
 
4631
4632
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
4632
4633
 
4633
-
4634
+
4634
4635
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
4635
4636
 
4636
4637
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
4637
4638
 
4638
4639
 
4640
+ </xsl:attribute-set><xsl:attribute-set name="add-style">
4641
+ <xsl:attribute name="color">red</xsl:attribute>
4642
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
4643
+ </xsl:attribute-set><xsl:attribute-set name="del-style">
4644
+ <xsl:attribute name="color">red</xsl:attribute>
4645
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
4639
4646
  </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
4640
4647
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
4641
4648
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -6101,8 +6108,12 @@
6101
6108
  <fo:inline text-decoration="underline">
6102
6109
  <xsl:apply-templates/>
6103
6110
  </fo:inline>
6111
+ </xsl:template><xsl:template match="*[local-name()='add']">
6112
+ <fo:inline xsl:use-attribute-sets="add-style">
6113
+ <xsl:apply-templates/>
6114
+ </fo:inline>
6104
6115
  </xsl:template><xsl:template match="*[local-name()='del']">
6105
- <fo:inline font-size="10pt" color="red" text-decoration="line-through">
6116
+ <fo:inline xsl:use-attribute-sets="del-style">
6106
6117
  <xsl:apply-templates/>
6107
6118
  </fo:inline>
6108
6119
  </xsl:template><xsl:template match="*[local-name()='hi']">
@@ -6740,22 +6751,37 @@
6740
6751
  <xsl:apply-templates/>
6741
6752
  </fo:block>
6742
6753
  </xsl:template><xsl:template match="*[local-name() = 'image']">
6743
- <fo:block xsl:use-attribute-sets="image-style">
6744
-
6745
-
6746
- <xsl:variable name="src">
6747
- <xsl:choose>
6748
- <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
6749
- <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
6750
- </xsl:when>
6751
- <xsl:otherwise>
6752
- <xsl:value-of select="@src"/>
6753
- </xsl:otherwise>
6754
- </xsl:choose>
6755
- </xsl:variable>
6756
-
6757
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
6758
- </fo:block>
6754
+ <xsl:choose>
6755
+ <xsl:when test="ancestor::*[local-name() = 'title']">
6756
+ <fo:inline padding-left="1mm" padding-right="1mm">
6757
+ <xsl:variable name="src">
6758
+ <xsl:call-template name="image_src"/>
6759
+ </xsl:variable>
6760
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
6761
+ </fo:inline>
6762
+ </xsl:when>
6763
+ <xsl:otherwise>
6764
+ <fo:block xsl:use-attribute-sets="image-style">
6765
+
6766
+ <xsl:variable name="src">
6767
+ <xsl:call-template name="image_src"/>
6768
+ </xsl:variable>
6769
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
6770
+ </fo:block>
6771
+ </xsl:otherwise>
6772
+ </xsl:choose>
6773
+ </xsl:template><xsl:template name="image_src">
6774
+ <xsl:choose>
6775
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
6776
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
6777
+ </xsl:when>
6778
+ <xsl:when test="not(starts-with(@src, 'data:'))">
6779
+ <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
6780
+ </xsl:when>
6781
+ <xsl:otherwise>
6782
+ <xsl:value-of select="@src"/>
6783
+ </xsl:otherwise>
6784
+ </xsl:choose>
6759
6785
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
6760
6786
  <xsl:apply-templates mode="contents"/>
6761
6787
  <xsl:text> </xsl:text>
@@ -4,6 +4,7 @@
4
4
 
5
5
  <xsl:param name="svg_images"/>
6
6
  <xsl:variable name="images" select="document($svg_images)"/>
7
+ <xsl:param name="basepath"/>
7
8
 
8
9
  <xsl:param name="initial_page_number"/>
9
10
  <xsl:param name="doc_split_by_language"/>
@@ -4630,12 +4631,18 @@
4630
4631
 
4631
4632
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
4632
4633
 
4633
-
4634
+
4634
4635
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
4635
4636
 
4636
4637
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
4637
4638
 
4638
4639
 
4640
+ </xsl:attribute-set><xsl:attribute-set name="add-style">
4641
+ <xsl:attribute name="color">red</xsl:attribute>
4642
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
4643
+ </xsl:attribute-set><xsl:attribute-set name="del-style">
4644
+ <xsl:attribute name="color">red</xsl:attribute>
4645
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
4639
4646
  </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
4640
4647
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
4641
4648
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -6101,8 +6108,12 @@
6101
6108
  <fo:inline text-decoration="underline">
6102
6109
  <xsl:apply-templates/>
6103
6110
  </fo:inline>
6111
+ </xsl:template><xsl:template match="*[local-name()='add']">
6112
+ <fo:inline xsl:use-attribute-sets="add-style">
6113
+ <xsl:apply-templates/>
6114
+ </fo:inline>
6104
6115
  </xsl:template><xsl:template match="*[local-name()='del']">
6105
- <fo:inline font-size="10pt" color="red" text-decoration="line-through">
6116
+ <fo:inline xsl:use-attribute-sets="del-style">
6106
6117
  <xsl:apply-templates/>
6107
6118
  </fo:inline>
6108
6119
  </xsl:template><xsl:template match="*[local-name()='hi']">
@@ -6740,22 +6751,37 @@
6740
6751
  <xsl:apply-templates/>
6741
6752
  </fo:block>
6742
6753
  </xsl:template><xsl:template match="*[local-name() = 'image']">
6743
- <fo:block xsl:use-attribute-sets="image-style">
6744
-
6745
-
6746
- <xsl:variable name="src">
6747
- <xsl:choose>
6748
- <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
6749
- <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
6750
- </xsl:when>
6751
- <xsl:otherwise>
6752
- <xsl:value-of select="@src"/>
6753
- </xsl:otherwise>
6754
- </xsl:choose>
6755
- </xsl:variable>
6756
-
6757
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
6758
- </fo:block>
6754
+ <xsl:choose>
6755
+ <xsl:when test="ancestor::*[local-name() = 'title']">
6756
+ <fo:inline padding-left="1mm" padding-right="1mm">
6757
+ <xsl:variable name="src">
6758
+ <xsl:call-template name="image_src"/>
6759
+ </xsl:variable>
6760
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
6761
+ </fo:inline>
6762
+ </xsl:when>
6763
+ <xsl:otherwise>
6764
+ <fo:block xsl:use-attribute-sets="image-style">
6765
+
6766
+ <xsl:variable name="src">
6767
+ <xsl:call-template name="image_src"/>
6768
+ </xsl:variable>
6769
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
6770
+ </fo:block>
6771
+ </xsl:otherwise>
6772
+ </xsl:choose>
6773
+ </xsl:template><xsl:template name="image_src">
6774
+ <xsl:choose>
6775
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
6776
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
6777
+ </xsl:when>
6778
+ <xsl:when test="not(starts-with(@src, 'data:'))">
6779
+ <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
6780
+ </xsl:when>
6781
+ <xsl:otherwise>
6782
+ <xsl:value-of select="@src"/>
6783
+ </xsl:otherwise>
6784
+ </xsl:choose>
6759
6785
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
6760
6786
  <xsl:apply-templates mode="contents"/>
6761
6787
  <xsl:text> </xsl:text>
@@ -35,6 +35,8 @@
35
35
  {% if partid_alt %}<span class="title-second">{{ partid_alt}}: {{ partsubtitle }}</span>{% endif %}
36
36
  {% if subparttitle %}<span class="title-first">{{ subparttitle }}</span><br/>{% endif %}
37
37
  {% if subpartsubtitle %}<span class="title-second">{{ subpartsubtitle }}</span><br/>{% endif %}
38
+ {% if provenancetitle %}<span class="title-first">{{ provenancetitle }}</span><br/>{% endif %}
39
+ {% if provenancesubtitle %}<span class="title-second">{{ provenancesubtitle }}</span><br/>{% endif %}
38
40
  {% if appendixid %}<span class="title-first">{{ appendixid}}: {{ appendixtitle }}</span><br/>{% endif %}
39
41
  {% if appendixid_alt %}<span class="title-second">{{ appendixid_alt}}: {{ appendixsubtitle }}</span>{% endif %}
40
42
  {% if annexid %}<span class="title-first">{{ annexid}}: {{ annextitle }}</span><br/>{% endif %}
@@ -116,6 +116,13 @@ a.FootnoteRef + a.FootnoteRef:before {
116
116
  content: ", ";
117
117
  vertical-align: super; }
118
118
 
119
+ .addition {
120
+ color: blue; }
121
+
122
+ .deletion {
123
+ color: red;
124
+ text-decoration: line-through; }
125
+
119
126
  #brochure-band {
120
127
  background-color: #0AC442; }
121
128
 
@@ -4,7 +4,16 @@ see: see
4
4
  see_also: see also
5
5
  clause: Chapter
6
6
  subclause: Section
7
+ clause_jcgm: Clause
8
+ subclause_jcgm: Clause
7
9
  formula: Equation
8
10
  inequality: Inequality
9
11
  bibliography: References
10
12
  index: Index
13
+ norm_with_refs_pref:
14
+ The following referenced documents are indispensable for the application of this document.
15
+ For dated references, only the edition cited applies.
16
+ For undated references, the latest edition of the referenced
17
+ document (including any amendments) applies.
18
+ all_rights_reserved: All rights reserved
19
+ table_of_contents: Contents
@@ -4,6 +4,8 @@ see: voir
4
4
  see_also: voir aussi
5
5
  clause: chapître
6
6
  subclause: section
7
+ clause_jcgm: Article
8
+ subclause_jcgm: Article
7
9
  formula: équation
8
10
  inequality: inégalité
9
11
  bibliography: Références
@@ -34,3 +36,7 @@ stage_dict:
34
36
  draft-development: projet-de-développement
35
37
  in-force: en-vigeur
36
38
  retired: retiré
39
+ norm_with_refs_pref:
40
+ Les documents suivants cités dans le texte sont indispensables pour l'application de ce document. Pour les références datées, seule l’édition citée s’applique. Pour les références non datées, la dernière édition du document de référence s’applique (y compris les éventuels amendements).
41
+ all_rights_reserved: Tous droits réservés
42
+ table_of_contents: Table des matières
@@ -4,6 +4,7 @@
4
4
 
5
5
  <xsl:param name="svg_images"/>
6
6
  <xsl:variable name="images" select="document($svg_images)"/>
7
+ <xsl:param name="basepath"/>
7
8
 
8
9
  <!-- <item id="#">N_page</item> -->
9
10
  <!-- param for second pass -->
@@ -213,7 +214,7 @@
213
214
  <xsl:call-template name="printEdition"/>
214
215
  <xsl:text>  </xsl:text>
215
216
  <xsl:call-template name="convertDate">
216
- <xsl:with-param name="date" select="(//jcgm:bipm-standard)[1]/jcgm:bibdata/jcgm:version/jcgm:revision-date"/>
217
+ <xsl:with-param name="date" select="(//jcgm:bipm-standard)[1]/jcgm:bibdata/jcgm:date[@type = 'published']/jcgm:on"/>
217
218
  </xsl:call-template>
218
219
  </fo:block>
219
220
  <!-- Example © JCGM 2009 -->
@@ -227,13 +228,16 @@
227
228
  <fo:flow flow-name="xsl-region-body">
228
229
  <xsl:call-template name="insert_Logo-BIPM-Metro"/>
229
230
  <fo:block-container font-weight="bold">
230
- <fo:block font-size="16.5pt" space-after="24.5mm">
231
+ <fo:block font-size="16.5pt">
231
232
  <xsl:value-of select="(//jcgm:bipm-standard)[1]/jcgm:bibdata/jcgm:ext/jcgm:editorialgroup/jcgm:committee/@acronym"/>
232
233
  <xsl:text> </xsl:text>
233
234
  <xsl:value-of select="(//jcgm:bipm-standard)[1]/jcgm:bibdata/jcgm:docnumber"/>
234
235
  <fo:inline font-weight="normal">:</fo:inline>
235
236
  <xsl:value-of select="(//jcgm:bipm-standard)[1]/jcgm:bibdata/jcgm:copyright/jcgm:from"/>
236
237
  </fo:block>
238
+ <fo:block font-size="13pt" font-weight="normal" space-after="19.5mm">
239
+ <xsl:value-of select="(//jcgm:bipm-standard)[1]/jcgm:bibdata/jcgm:title[@type = 'provenance']"/>
240
+ </fo:block>
237
241
  <fo:block border-bottom="1pt solid black"> </fo:block>
238
242
  <fo:block font-size="16.5pt" margin-left="-0.5mm" padding-top="3.5mm" space-after="7mm" margin-right="7mm" line-height="105%">
239
243
  <xsl:apply-templates select="(//jcgm:bipm-standard)[1]/jcgm:bibdata/jcgm:title[@language = $lang and @type = 'main']" mode="title"/>
@@ -597,7 +601,7 @@
597
601
 
598
602
  <xsl:template name="getListItemFormat">
599
603
  <xsl:choose>
600
- <xsl:when test="local-name(..) = 'ul' and ../ancestor::bipm:ul">−</xsl:when> <!-- &#x2212; - minus sign. &#x2014; - dash -->
604
+ <xsl:when test="local-name(..) = 'ul' and ../ancestor::jcgm:ul">−</xsl:when> <!-- &#x2212; - minus sign. &#x2014; - dash -->
601
605
  <xsl:when test="local-name(..) = 'ul'">—</xsl:when> <!-- &#x2014; dash -->
602
606
  <xsl:otherwise> <!-- for ordered lists -->
603
607
  <xsl:variable name="start_value">
@@ -807,6 +811,42 @@
807
811
  </fo:footnote>
808
812
  </xsl:template>
809
813
 
814
+
815
+ <!--
816
+ <fn reference="1">
817
+ <p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
818
+ </fn>
819
+ -->
820
+ <xsl:template match="jcgm:title//jcgm:fn | jcgm:name//jcgm:fn | jcgm:p/jcgm:fn[not(ancestor::jcgm:table)] | jcgm:p/*/jcgm:fn[not(ancestor::jcgm:table)] | jcgm:sourcecode/jcgm:fn[not(ancestor::jcgm:table)]" priority="2" name="fn">
821
+ <fo:footnote keep-with-previous.within-line="always">
822
+ <xsl:variable name="number">
823
+ <xsl:number count="jcgm:fn[not(ancestor::jcgm:table)]" level="any"/>
824
+ </xsl:variable>
825
+ <xsl:variable name="gen_id" select="generate-id()"/>
826
+ <xsl:variable name="lang" select="ancestor::jcgm:bipm-standard/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
827
+ <fo:inline font-size="65%" keep-with-previous.within-line="always" vertical-align="super">
828
+ <fo:basic-link internal-destination="{$lang}_footnote_{@reference}_{$number}_{$gen_id}" fox:alt-text="footnote {@reference}">
829
+ <xsl:value-of select="$number"/>
830
+ </fo:basic-link>
831
+ </fo:inline>
832
+ <fo:footnote-body>
833
+ <fo:block font-size="9pt" margin-bottom="12pt" font-weight="normal" text-indent="0" start-indent="0" line-height="124%" text-align="justify">
834
+ <fo:inline id="{$lang}_footnote_{@reference}_{$number}_{$gen_id}" keep-with-next.within-line="always" font-size="60%" vertical-align="super" padding-right="1mm"> <!-- baseline-shift="30%" padding-right="3mm" font-size="60%" alignment-baseline="hanging" -->
835
+ <xsl:value-of select="$number "/>
836
+ </fo:inline>
837
+ <xsl:for-each select="jcgm:p">
838
+ <xsl:apply-templates/>
839
+ </xsl:for-each>
840
+ </fo:block>
841
+ </fo:footnote-body>
842
+ </fo:footnote>
843
+ </xsl:template>
844
+
845
+ <xsl:template match="jcgm:fn/jcgm:p">
846
+ <fo:block>
847
+ <xsl:apply-templates/>
848
+ </fo:block>
849
+ </xsl:template>
810
850
 
811
851
 
812
852
  <xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="ul_ol">
@@ -982,6 +1022,12 @@
982
1022
  <xsl:apply-templates select="." mode="mathml"/>
983
1023
  </xsl:variable>
984
1024
  <fo:instream-foreign-object fox:alt-text="Math">
1025
+ <xsl:if test="local-name(../..) = 'formula'">
1026
+ <xsl:attribute name="width">95%</xsl:attribute>
1027
+ <xsl:attribute name="content-height">100%</xsl:attribute>
1028
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
1029
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
1030
+ </xsl:if>
985
1031
  <!-- <xsl:copy-of select="."/> -->
986
1032
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
987
1033
  </fo:instream-foreign-object>
@@ -1082,6 +1128,17 @@
1082
1128
  </xsl:template>
1083
1129
 
1084
1130
 
1131
+ <xsl:template match="*[local-name()='td' or local-name()='th']/*[local-name()='formula']/*[local-name()='stem']" priority="2">
1132
+ <fo:block>
1133
+ <xsl:if test="ancestor::*[local-name()='td' or local-name()='th'][1][@align]">
1134
+ <xsl:attribute name="text-align">
1135
+ <xsl:value-of select="ancestor::*[local-name()='td' or local-name()='th'][1]/@align"/>
1136
+ </xsl:attribute>
1137
+ </xsl:if>
1138
+ <xsl:apply-templates/>
1139
+ </fo:block>
1140
+ </xsl:template>
1141
+
1085
1142
  <xsl:template match="*[local-name()='formula']/*[local-name()='stem']">
1086
1143
  <fo:block margin-top="6pt" margin-bottom="12pt">
1087
1144
  <fo:table table-layout="fixed" width="100%">
@@ -1320,6 +1377,7 @@
1320
1377
  <xsl:variable name="font-size">
1321
1378
  <xsl:choose>
1322
1379
  <xsl:when test="ancestor::jcgm:preface">15pt</xsl:when>
1380
+ <xsl:when test="parent::jcgm:annex">15pt</xsl:when>
1323
1381
  <xsl:when test="../@inline-header = 'true' or @inline-header = 'true'">10.5pt</xsl:when>
1324
1382
  <xsl:when test="$level = 2">11.5pt</xsl:when>
1325
1383
  <xsl:when test="$level &gt;= 3">10.5pt</xsl:when>
@@ -1351,6 +1409,8 @@
1351
1409
  <xsl:attribute name="space-after">
1352
1410
  <xsl:choose>
1353
1411
  <xsl:when test="ancestor::jcgm:preface">12pt</xsl:when>
1412
+ <xsl:when test="parent::jcgm:annex">30pt</xsl:when>
1413
+ <xsl:when test="following-sibling::*[1][local-name() = 'admitted']">0pt</xsl:when>
1354
1414
  <!-- <xsl:otherwise>12pt</xsl:otherwise> -->
1355
1415
  <xsl:otherwise>12pt</xsl:otherwise>
1356
1416
  </xsl:choose>
@@ -1364,6 +1424,10 @@
1364
1424
  </xsl:choose>
1365
1425
  </xsl:attribute>
1366
1426
  </xsl:if>
1427
+ <xsl:if test="parent::jcgm:annex">
1428
+ <xsl:attribute name="text-align">center</xsl:attribute>
1429
+ <xsl:attribute name="line-height">130%</xsl:attribute>
1430
+ </xsl:if>
1367
1431
  <xsl:apply-templates/>
1368
1432
  </xsl:element>
1369
1433
 
@@ -1380,41 +1444,43 @@
1380
1444
  <xsl:param name="font-size" select="'65%'"/>
1381
1445
  <xsl:param name="baseline-shift" select="'30%'"/>
1382
1446
  <xsl:param name="curr_lang" select="'fr'"/>
1383
- <fo:inline>
1384
- <xsl:variable name="title-edition">
1385
- <xsl:call-template name="getTitle">
1386
- <xsl:with-param name="name" select="'title-edition'"/>
1387
- <xsl:with-param name="lang" select="$curr_lang"/>
1388
- </xsl:call-template>
1389
- </xsl:variable>
1390
- <xsl:value-of select="."/>
1391
- <fo:inline font-size="{$font-size}" baseline-shift="{$baseline-shift}">
1392
- <xsl:if test="$curr_lang = 'en'">
1393
- <xsl:attribute name="baseline-shift">0%</xsl:attribute>
1394
- <xsl:attribute name="font-size">100%</xsl:attribute>
1395
- </xsl:if>
1396
- <xsl:choose>
1397
- <xsl:when test="$curr_lang = 'fr'">
1398
- <xsl:choose>
1399
- <xsl:when test=". = '1'">re</xsl:when>
1400
- <xsl:otherwise>e</xsl:otherwise>
1401
- </xsl:choose>
1402
- </xsl:when>
1403
- <xsl:otherwise>
1404
- <xsl:choose>
1405
- <xsl:when test=". = '1'">st</xsl:when>
1406
- <xsl:when test=". = '2'">nd</xsl:when>
1407
- <xsl:when test=". = '3'">rd</xsl:when>
1408
- <xsl:otherwise>th</xsl:otherwise>
1409
- </xsl:choose>
1410
- </xsl:otherwise>
1411
- </xsl:choose>
1412
-
1447
+ <xsl:if test="normalize-space (.) != '1'">
1448
+ <fo:inline>
1449
+ <xsl:variable name="title-edition">
1450
+ <xsl:call-template name="getTitle">
1451
+ <xsl:with-param name="name" select="'title-edition'"/>
1452
+ <xsl:with-param name="lang" select="$curr_lang"/>
1453
+ </xsl:call-template>
1454
+ </xsl:variable>
1455
+ <xsl:value-of select="."/>
1456
+ <fo:inline font-size="{$font-size}" baseline-shift="{$baseline-shift}">
1457
+ <xsl:if test="$curr_lang = 'en'">
1458
+ <xsl:attribute name="baseline-shift">0%</xsl:attribute>
1459
+ <xsl:attribute name="font-size">100%</xsl:attribute>
1460
+ </xsl:if>
1461
+ <xsl:choose>
1462
+ <xsl:when test="$curr_lang = 'fr'">
1463
+ <xsl:choose>
1464
+ <xsl:when test=". = '1'">re</xsl:when>
1465
+ <xsl:otherwise>e</xsl:otherwise>
1466
+ </xsl:choose>
1467
+ </xsl:when>
1468
+ <xsl:otherwise>
1469
+ <xsl:choose>
1470
+ <xsl:when test=". = '1'">st</xsl:when>
1471
+ <xsl:when test=". = '2'">nd</xsl:when>
1472
+ <xsl:when test=". = '3'">rd</xsl:when>
1473
+ <xsl:otherwise>th</xsl:otherwise>
1474
+ </xsl:choose>
1475
+ </xsl:otherwise>
1476
+ </xsl:choose>
1477
+
1478
+ </fo:inline>
1479
+ <xsl:text> </xsl:text>
1480
+ <xsl:value-of select="java:toLowerCase(java:java.lang.String.new($title-edition))"/>
1481
+ <xsl:text/>
1413
1482
  </fo:inline>
1414
- <xsl:text> </xsl:text>
1415
- <xsl:value-of select="java:toLowerCase(java:java.lang.String.new($title-edition))"/>
1416
- <xsl:text/>
1417
- </fo:inline>
1483
+ </xsl:if>
1418
1484
  </xsl:template>
1419
1485
 
1420
1486
 
@@ -1443,7 +1509,7 @@
1443
1509
 
1444
1510
  <fo:flow flow-name="xsl-region-body">
1445
1511
  <fo:block id="{@id}" span="all">
1446
- <xsl:apply-templates select="bipm:title"/>
1512
+ <xsl:apply-templates select="jcgm:title"/>
1447
1513
  </fo:block>
1448
1514
  <fo:block>
1449
1515
  <xsl:apply-templates select="*[not(local-name() = 'title')]"/>
@@ -2511,7 +2577,9 @@
2511
2577
 
2512
2578
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
2513
2579
 
2514
-
2580
+
2581
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2582
+
2515
2583
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
2516
2584
 
2517
2585
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
@@ -2519,6 +2587,12 @@
2519
2587
 
2520
2588
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2521
2589
 
2590
+ </xsl:attribute-set><xsl:attribute-set name="add-style">
2591
+ <xsl:attribute name="color">red</xsl:attribute>
2592
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
2593
+ </xsl:attribute-set><xsl:attribute-set name="del-style">
2594
+ <xsl:attribute name="color">red</xsl:attribute>
2595
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
2522
2596
  </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
2523
2597
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
2524
2598
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -3970,8 +4044,12 @@
3970
4044
  <fo:inline text-decoration="underline">
3971
4045
  <xsl:apply-templates/>
3972
4046
  </fo:inline>
4047
+ </xsl:template><xsl:template match="*[local-name()='add']">
4048
+ <fo:inline xsl:use-attribute-sets="add-style">
4049
+ <xsl:apply-templates/>
4050
+ </fo:inline>
3973
4051
  </xsl:template><xsl:template match="*[local-name()='del']">
3974
- <fo:inline font-size="10pt" color="red" text-decoration="line-through">
4052
+ <fo:inline xsl:use-attribute-sets="del-style">
3975
4053
  <xsl:apply-templates/>
3976
4054
  </fo:inline>
3977
4055
  </xsl:template><xsl:template match="*[local-name()='hi']">
@@ -4585,22 +4663,37 @@
4585
4663
  <xsl:apply-templates/>
4586
4664
  </fo:block>
4587
4665
  </xsl:template><xsl:template match="*[local-name() = 'image']">
4588
- <fo:block xsl:use-attribute-sets="image-style">
4589
-
4590
-
4591
- <xsl:variable name="src">
4592
- <xsl:choose>
4593
- <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
4594
- <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
4595
- </xsl:when>
4596
- <xsl:otherwise>
4597
- <xsl:value-of select="@src"/>
4598
- </xsl:otherwise>
4599
- </xsl:choose>
4600
- </xsl:variable>
4601
-
4602
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
4603
- </fo:block>
4666
+ <xsl:choose>
4667
+ <xsl:when test="ancestor::*[local-name() = 'title']">
4668
+ <fo:inline padding-left="1mm" padding-right="1mm">
4669
+ <xsl:variable name="src">
4670
+ <xsl:call-template name="image_src"/>
4671
+ </xsl:variable>
4672
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
4673
+ </fo:inline>
4674
+ </xsl:when>
4675
+ <xsl:otherwise>
4676
+ <fo:block xsl:use-attribute-sets="image-style">
4677
+
4678
+ <xsl:variable name="src">
4679
+ <xsl:call-template name="image_src"/>
4680
+ </xsl:variable>
4681
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
4682
+ </fo:block>
4683
+ </xsl:otherwise>
4684
+ </xsl:choose>
4685
+ </xsl:template><xsl:template name="image_src">
4686
+ <xsl:choose>
4687
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
4688
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
4689
+ </xsl:when>
4690
+ <xsl:when test="not(starts-with(@src, 'data:'))">
4691
+ <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
4692
+ </xsl:when>
4693
+ <xsl:otherwise>
4694
+ <xsl:value-of select="@src"/>
4695
+ </xsl:otherwise>
4696
+ </xsl:choose>
4604
4697
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
4605
4698
  <xsl:apply-templates mode="contents"/>
4606
4699
  <xsl:text> </xsl:text>
@@ -5119,8 +5212,8 @@
5119
5212
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5120
5213
 
5121
5214
  <xsl:variable name="element">
5122
- block
5123
-
5215
+
5216
+ inline
5124
5217
  <xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
5125
5218
  </xsl:variable>
5126
5219
 
@@ -5165,7 +5258,12 @@
5165
5258
  </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
5166
5259
  <xsl:variable name="num"><xsl:number/></xsl:variable>
5167
5260
  <xsl:variable name="element">
5168
- block
5261
+
5262
+
5263
+ <xsl:choose>
5264
+ <xsl:when test="$num = 1">inline</xsl:when>
5265
+ <xsl:otherwise>block</xsl:otherwise>
5266
+ </xsl:choose>
5169
5267
 
5170
5268
 
5171
5269
  </xsl:variable>