metanorma-iso 2.1.6 → 2.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 668dfbc54c97728ebf7e4e0fdd489e79011776a44dddfc15b7ee3d1a6e8ce9e0
4
- data.tar.gz: 8229dab0adc5a97e1bc133ab8bf4a135824ab7c439e3b484eed901fbf6047b26
3
+ metadata.gz: a9325db8cd9c20aed14f5caf7bf67b0a7d859896eb02b1e1ea47428dabc1c4f8
4
+ data.tar.gz: b3086f316d0a7e4ce7f3b2542409cbd9e868097cba70f8519ce7c6a062976873
5
5
  SHA512:
6
- metadata.gz: 168f23d9623a5f71d57625268960dec3295bd5dad520ba0f4ba4e9d3c535f6e471104bb5dd2fb1526afd6854f78151294b0be5764870e30b62dd3e6db7ee3169
7
- data.tar.gz: 5b8c4eb9a48b88fcc6fc12445084fcc97db58b1a109a74032b69f1dc40bbea6743d4ac37745e3609a8cff7e5d30bfdfb8c9a10445d7113e782c75ff296c8a3e2
6
+ metadata.gz: 848e6626515cf16a41c3c26d578fea1ca5320d76124f201806e10b120a35d176c0c409d547f21f3ec72e68f003ce9b07979aeeea72663022dc515538d777cac2
7
+ data.tar.gz: 1786194821f9310b58f6f6ef73c827f430e8ce6b01b321a1728e826d82411ab5d9543af455b164eef29ab9c32f40af0567238d3794638750bb6e6f38f7aea235
@@ -10,7 +10,7 @@
10
10
 
11
11
  <xsl:variable name="debug">false</xsl:variable>
12
12
 
13
- <xsl:variable name="docidentifierISO_undated" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'iso-undated'])"/>
13
+ <xsl:variable name="docidentifierISO_undated"><xsl:if test="not($stage-abbreviation = 'FDAmd' or $stage-abbreviation = 'FDAM' or $stage-abbreviation = 'DAmd' or $stage-abbreviation = 'DAM')"><xsl:value-of select="normalize-space(/iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'iso-undated'])"/></xsl:if></xsl:variable>
14
14
  <xsl:variable name="docidentifierISO_">
15
15
  <xsl:value-of select="$docidentifierISO_undated"/>
16
16
  <xsl:if test="$docidentifierISO_undated = ''">
@@ -120,8 +120,8 @@
120
120
 
121
121
  <xsl:variable name="stagename-header-coverpage">
122
122
  <xsl:choose>
123
- <xsl:when test="$stage-abbreviation = 'DIS'">DRAFT</xsl:when>
124
- <xsl:when test="$stage-abbreviation = 'FDIS'">FINAL DRAFT</xsl:when>
123
+ <xsl:when test="$stage-abbreviation = 'DIS' or $stage-abbreviation = 'DAmd' or $stage-abbreviation = 'DAM'">DRAFT</xsl:when>
124
+ <xsl:when test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'FDAmd' or $stage-abbreviation = 'FDAM'">FINAL DRAFT</xsl:when>
125
125
  <xsl:when test="$stage-abbreviation = 'PRF'"/>
126
126
  <xsl:when test="$stage-abbreviation = 'IS'"/>
127
127
  <xsl:otherwise>
@@ -460,7 +460,7 @@
460
460
  <xsl:text>THIS DOCUMENT IS A DRAFT CIRCULATED FOR COMMENT AND APPROVAL. IT IS THEREFORE SUBJECT TO CHANGE AND MAY NOT BE REFERRED TO AS AN INTERNATIONAL STANDARD UNTIL PUBLISHED AS SUCH.</xsl:text>
461
461
  </fo:block>
462
462
  </xsl:if>
463
- <xsl:if test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'DIS' or $stage-abbreviation = 'NWIP' or $stage-abbreviation = 'NP' or $stage-abbreviation = 'PWI' or $stage-abbreviation = 'AWI' or $stage-abbreviation = 'WD' or $stage-abbreviation = 'CD'">
463
+ <xsl:if test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'DIS' or $stage-abbreviation = 'FDAmd' or $stage-abbreviation = 'FDAM' or $stage-abbreviation = 'DAmd' or $stage-abbreviation = 'DAM' or $stage-abbreviation = 'NWIP' or $stage-abbreviation = 'NP' or $stage-abbreviation = 'PWI' or $stage-abbreviation = 'AWI' or $stage-abbreviation = 'WD' or $stage-abbreviation = 'CD'">
464
464
  <fo:block margin-bottom="1.5mm">
465
465
  <xsl:text>RECIPIENTS OF THIS DRAFT ARE INVITED TO
466
466
  SUBMIT, WITH THEIR COMMENTS, NOTIFICATION
@@ -769,6 +769,7 @@
769
769
  <fo:table-cell>
770
770
  <fo:block text-align="left">
771
771
  <xsl:choose>
772
+ <xsl:when test="$stage-abbreviation = 'FDAmd' or $stage-abbreviation = 'FDAM' or $stage-abbreviation = 'DAmd' or $stage-abbreviation = 'DAM'"><xsl:value-of select="$doctype_uppercased"/></xsl:when>
772
773
  <xsl:when test="$doctype = 'amendment'">
773
774
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(translate(/iso:iso-standard/iso:bibdata/iso:ext/iso:updates-document-type,'-',' ')))"/>
774
775
  </xsl:when>
@@ -817,7 +818,7 @@
817
818
  </fo:block>
818
819
  <!-- <xsl:value-of select="$linebreak"/>
819
820
  <xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:version/iso:revision-date"/> -->
820
- <xsl:if test="$doctype = 'amendment'">
821
+ <xsl:if test="$doctype = 'amendment' and not($stage-abbreviation = 'FDAmd' or $stage-abbreviation = 'FDAM' or $stage-abbreviation = 'DAmd' or $stage-abbreviation = 'DAM')">
821
822
  <fo:block text-align="right" margin-right="0.5mm">
822
823
  <fo:block font-weight="bold" margin-top="4pt" role="H1">
823
824
  <xsl:value-of select="$doctype_uppercased"/>
@@ -875,11 +876,11 @@
875
876
  <fo:table-row> <!-- border="1pt solid black" height="150mm" -->
876
877
  <fo:table-cell font-size="11pt">
877
878
  <fo:block>
878
- <xsl:if test="$stage-abbreviation = 'FDIS'">
879
+ <xsl:if test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'FDAmd' or $stage-abbreviation = 'FDAM' or $stage-abbreviation = 'DAmd' or $stage-abbreviation = 'DAM'">
879
880
  <fo:block-container border="0.5mm solid black" width="51mm">
880
881
  <fo:block margin="2mm">
881
882
  <fo:block margin-bottom="8pt"><xsl:copy-of select="$editorialgroup"/></fo:block>
882
- <fo:block margin-bottom="6pt"><xsl:value-of select="$secretariat"/></fo:block>
883
+ <fo:block margin-bottom="6pt"><xsl:copy-of select="$secretariat"/></fo:block>
883
884
  <fo:block margin-bottom="6pt">Voting begins on:<xsl:value-of select="$linebreak"/>
884
885
  <fo:inline font-weight="bold">
885
886
  <xsl:choose>
@@ -911,7 +912,7 @@
911
912
  <fo:table-cell>
912
913
  <xsl:call-template name="insertTripleLine"/>
913
914
  <fo:block-container line-height="1.1">
914
- <fo:block margin-right="5mm">
915
+ <fo:block margin-right="3.5mm">
915
916
  <fo:block font-size="18pt" font-weight="bold" margin-top="12pt" role="H1">
916
917
 
917
918
  <xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
@@ -928,27 +929,29 @@
928
929
 
929
930
  </fo:block>
930
931
 
931
- <xsl:for-each select="xalan:nodeset($lang_other)/lang">
932
- <xsl:variable name="lang_other" select="."/>
932
+ <xsl:if test="not($stage-abbreviation = 'FDAmd' or $stage-abbreviation = 'FDAM' or $stage-abbreviation = 'DAmd' or $stage-abbreviation = 'DAM')">
933
+ <xsl:for-each select="xalan:nodeset($lang_other)/lang">
934
+ <xsl:variable name="lang_other" select="."/>
933
935
 
934
- <fo:block font-size="12pt"><xsl:value-of select="$linebreak"/></fo:block>
935
- <fo:block font-size="11pt" font-style="italic" line-height="1.1" role="H1">
936
+ <fo:block font-size="12pt"><xsl:value-of select="$linebreak"/></fo:block>
937
+ <fo:block font-size="11pt" font-style="italic" line-height="1.1" role="H1">
936
938
 
937
- <!-- Example: title-intro fr -->
938
- <xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-intro']"/>
939
+ <!-- Example: title-intro fr -->
940
+ <xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-intro']"/>
939
941
 
940
- <xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-main']"/>
942
+ <xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-main']"/>
941
943
 
942
- <xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-part']">
943
- <xsl:with-param name="curr_lang" select="$lang_other"/>
944
- </xsl:apply-templates>
944
+ <xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-part']">
945
+ <xsl:with-param name="curr_lang" select="$lang_other"/>
946
+ </xsl:apply-templates>
945
947
 
946
- <xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-amd']">
947
- <xsl:with-param name="curr_lang" select="$lang_other"/>
948
- </xsl:apply-templates>
948
+ <xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-amd']">
949
+ <xsl:with-param name="curr_lang" select="$lang_other"/>
950
+ </xsl:apply-templates>
949
951
 
950
- </fo:block>
951
- </xsl:for-each>
952
+ </fo:block>
953
+ </xsl:for-each>
954
+ </xsl:if>
952
955
 
953
956
  <xsl:if test="$stage-abbreviation = 'NWIP' or $stage-abbreviation = 'NP' or $stage-abbreviation = 'PWI' or $stage-abbreviation = 'AWI' or $stage-abbreviation = 'WD' or $stage-abbreviation = 'CD' or $stage-abbreviation = 'FDIS'">
954
957
  <fo:block margin-top="10mm">
@@ -2012,18 +2015,27 @@
2012
2015
  </fo:table>
2013
2016
  </fo:block-container>
2014
2017
  </fo:static-content>
2015
- <fo:static-content flow-name="header-first">
2016
- <fo:block-container margin-top="13mm" height="9mm" width="172mm" border-top="0.5mm solid black" border-bottom="0.5mm solid black" display-align="center" background-color="white">
2017
- <fo:block text-align-last="justify" font-size="12pt" font-weight="bold">
2018
+ <fo:static-content flow-name="header-first" role="artifact">
2019
+ <xsl:choose>
2020
+ <xsl:when test="$stage-abbreviation = 'FDAmd' or $stage-abbreviation = 'FDAM' or $stage-abbreviation = 'DAmd' or $stage-abbreviation = 'DAM'">
2021
+ <fo:block-container height="24mm" display-align="before">
2022
+ <fo:block font-size="12pt" font-weight="bold" text-align="right" padding-top="12.5mm"><xsl:value-of select="$ISOname"/></fo:block>
2023
+ </fo:block-container>
2024
+ </xsl:when>
2025
+ <xsl:otherwise>
2026
+ <fo:block-container margin-top="13mm" height="9mm" width="172mm" border-top="0.5mm solid black" border-bottom="0.5mm solid black" display-align="center" background-color="white">
2027
+ <fo:block text-align-last="justify" font-size="12pt" font-weight="bold">
2018
2028
 
2019
- <xsl:value-of select="$stagename-header-firstpage"/>
2029
+ <xsl:value-of select="$stagename-header-firstpage"/>
2020
2030
 
2021
- <fo:inline keep-together.within-line="always">
2022
- <fo:leader leader-pattern="space"/>
2023
- <fo:inline><xsl:value-of select="$ISOname"/></fo:inline>
2024
- </fo:inline>
2025
- </fo:block>
2026
- </fo:block-container>
2031
+ <fo:inline keep-together.within-line="always">
2032
+ <fo:leader leader-pattern="space"/>
2033
+ <fo:inline><xsl:value-of select="$ISOname"/></fo:inline>
2034
+ </fo:inline>
2035
+ </fo:block>
2036
+ </fo:block-container>
2037
+ </xsl:otherwise>
2038
+ </xsl:choose>
2027
2039
  </fo:static-content>
2028
2040
  <fo:static-content flow-name="header-odd" role="artifact">
2029
2041
  <fo:block-container height="24mm" display-align="before">
@@ -2562,6 +2574,9 @@
2562
2574
  <xsl:attribute-set name="import-style">
2563
2575
  </xsl:attribute-set>
2564
2576
 
2577
+ <xsl:attribute-set name="component-style">
2578
+ </xsl:attribute-set>
2579
+
2565
2580
  <xsl:attribute-set name="recommendation-style">
2566
2581
 
2567
2582
  </xsl:attribute-set>
@@ -6985,6 +7000,10 @@
6985
7000
 
6986
7001
  <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
6987
7002
 
7003
+ <xsl:if test="$doctype = 'amendment' and parent::*[local-name() = 'quote']">
7004
+ <xsl:attribute name="font-size">inherit</xsl:attribute>
7005
+ </xsl:if>
7006
+
6988
7007
  <fo:block-container margin-left="0mm">
6989
7008
 
6990
7009
  <fo:block>
@@ -7035,6 +7054,10 @@
7035
7054
  <xsl:template match="*[local-name() = 'termnote']">
7036
7055
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
7037
7056
 
7057
+ <xsl:if test="$doctype = 'amendment' and parent::*[local-name() = 'quote']">
7058
+ <xsl:attribute name="font-size">inherit</xsl:attribute>
7059
+ </xsl:if>
7060
+
7038
7061
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
7039
7062
 
7040
7063
  <xsl:if test="not(*[local-name() = 'name']/following-sibling::node()[1][self::text()][normalize-space()=''])">
@@ -8525,41 +8548,47 @@
8525
8548
  </fo:block>
8526
8549
  </xsl:template>
8527
8550
 
8528
- <xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
8551
+ <xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit'] | *[local-name() = 'div'][@type = 'requirement-inherit'] | *[local-name() = 'div'][@type = 'recommendation-inherit'] | *[local-name() = 'div'][@type = 'permission-inherit']">
8529
8552
  <fo:block xsl:use-attribute-sets="inherit-style">
8530
8553
  <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
8531
8554
  </fo:block>
8532
8555
  </xsl:template>
8533
8556
 
8534
- <xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
8557
+ <xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description'] | *[local-name() = 'div'][@type = 'requirement-description'] | *[local-name() = 'div'][@type = 'recommendation-description'] | *[local-name() = 'div'][@type = 'permission-description']">
8535
8558
  <fo:block xsl:use-attribute-sets="description-style">
8536
8559
  <xsl:apply-templates/>
8537
8560
  </fo:block>
8538
8561
  </xsl:template>
8539
8562
 
8540
- <xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
8563
+ <xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification'] | *[local-name() = 'div'][@type = 'requirement-specification'] | *[local-name() = 'div'][@type = 'recommendation-specification'] | *[local-name() = 'div'][@type = 'permission-specification']">
8541
8564
  <fo:block xsl:use-attribute-sets="specification-style">
8542
8565
  <xsl:apply-templates/>
8543
8566
  </fo:block>
8544
8567
  </xsl:template>
8545
8568
 
8546
- <xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
8569
+ <xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target'] | *[local-name() = 'div'][@type = 'requirement-measurement-target'] | *[local-name() = 'div'][@type = 'recommendation-measurement-target'] | *[local-name() = 'div'][@type = 'permission-measurement-target']">
8547
8570
  <fo:block xsl:use-attribute-sets="measurement-target-style">
8548
8571
  <xsl:apply-templates/>
8549
8572
  </fo:block>
8550
8573
  </xsl:template>
8551
8574
 
8552
- <xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
8575
+ <xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification'] | *[local-name() = 'div'][@type = 'requirement-verification'] | *[local-name() = 'div'][@type = 'recommendation-verification'] | *[local-name() = 'div'][@type = 'permission-verification']">
8553
8576
  <fo:block xsl:use-attribute-sets="verification-style">
8554
8577
  <xsl:apply-templates/>
8555
8578
  </fo:block>
8556
8579
  </xsl:template>
8557
8580
 
8558
- <xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
8581
+ <xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import'] | *[local-name() = 'div'][@type = 'requirement-import'] | *[local-name() = 'div'][@type = 'recommendation-import'] | *[local-name() = 'div'][@type = 'permission-import']">
8559
8582
  <fo:block xsl:use-attribute-sets="import-style">
8560
8583
  <xsl:apply-templates/>
8561
8584
  </fo:block>
8562
8585
  </xsl:template>
8586
+
8587
+ <xsl:template match="*[local-name() = 'div'][starts-with(@type, 'requirement-component')] | *[local-name() = 'div'][starts-with(@type, 'recommendation-component')] | *[local-name() = 'div'][starts-with(@type, 'permission-component')]">
8588
+ <fo:block xsl:use-attribute-sets="component-style">
8589
+ <xsl:apply-templates/>
8590
+ </fo:block>
8591
+ </xsl:template>
8563
8592
  <!-- ========== -->
8564
8593
  <!-- END -->
8565
8594
  <!-- ========== -->
@@ -8969,6 +8998,11 @@
8969
8998
  <fo:block-container margin-left="0mm">
8970
8999
  <fo:block-container xsl:use-attribute-sets="quote-style">
8971
9000
 
9001
+ <xsl:if test="$doctype = 'amendment' and (*[local-name() = 'note'] or *[local-name() = 'termnote'])">
9002
+ <xsl:attribute name="margin-left">7mm</xsl:attribute>
9003
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
9004
+ </xsl:if>
9005
+
8972
9006
  <fo:block-container margin-left="0mm" margin-right="0mm">
8973
9007
  <fo:block role="BlockQuote">
8974
9008
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
@@ -10,7 +10,7 @@
10
10
 
11
11
  <xsl:variable name="debug">false</xsl:variable>
12
12
 
13
- <xsl:variable name="docidentifierISO_undated" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'iso-undated'])"/>
13
+ <xsl:variable name="docidentifierISO_undated"><xsl:if test="not($stage-abbreviation = 'FDAmd' or $stage-abbreviation = 'FDAM' or $stage-abbreviation = 'DAmd' or $stage-abbreviation = 'DAM')"><xsl:value-of select="normalize-space(/iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'iso-undated'])"/></xsl:if></xsl:variable>
14
14
  <xsl:variable name="docidentifierISO_">
15
15
  <xsl:value-of select="$docidentifierISO_undated"/>
16
16
  <xsl:if test="$docidentifierISO_undated = ''">
@@ -120,8 +120,8 @@
120
120
 
121
121
  <xsl:variable name="stagename-header-coverpage">
122
122
  <xsl:choose>
123
- <xsl:when test="$stage-abbreviation = 'DIS'">DRAFT</xsl:when>
124
- <xsl:when test="$stage-abbreviation = 'FDIS'">FINAL DRAFT</xsl:when>
123
+ <xsl:when test="$stage-abbreviation = 'DIS' or $stage-abbreviation = 'DAmd' or $stage-abbreviation = 'DAM'">DRAFT</xsl:when>
124
+ <xsl:when test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'FDAmd' or $stage-abbreviation = 'FDAM'">FINAL DRAFT</xsl:when>
125
125
  <xsl:when test="$stage-abbreviation = 'PRF'"/>
126
126
  <xsl:when test="$stage-abbreviation = 'IS'"/>
127
127
  <xsl:otherwise>
@@ -460,7 +460,7 @@
460
460
  <xsl:text>THIS DOCUMENT IS A DRAFT CIRCULATED FOR COMMENT AND APPROVAL. IT IS THEREFORE SUBJECT TO CHANGE AND MAY NOT BE REFERRED TO AS AN INTERNATIONAL STANDARD UNTIL PUBLISHED AS SUCH.</xsl:text>
461
461
  </fo:block>
462
462
  </xsl:if>
463
- <xsl:if test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'DIS' or $stage-abbreviation = 'NWIP' or $stage-abbreviation = 'NP' or $stage-abbreviation = 'PWI' or $stage-abbreviation = 'AWI' or $stage-abbreviation = 'WD' or $stage-abbreviation = 'CD'">
463
+ <xsl:if test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'DIS' or $stage-abbreviation = 'FDAmd' or $stage-abbreviation = 'FDAM' or $stage-abbreviation = 'DAmd' or $stage-abbreviation = 'DAM' or $stage-abbreviation = 'NWIP' or $stage-abbreviation = 'NP' or $stage-abbreviation = 'PWI' or $stage-abbreviation = 'AWI' or $stage-abbreviation = 'WD' or $stage-abbreviation = 'CD'">
464
464
  <fo:block margin-bottom="1.5mm">
465
465
  <xsl:text>RECIPIENTS OF THIS DRAFT ARE INVITED TO
466
466
  SUBMIT, WITH THEIR COMMENTS, NOTIFICATION
@@ -769,6 +769,7 @@
769
769
  <fo:table-cell>
770
770
  <fo:block text-align="left">
771
771
  <xsl:choose>
772
+ <xsl:when test="$stage-abbreviation = 'FDAmd' or $stage-abbreviation = 'FDAM' or $stage-abbreviation = 'DAmd' or $stage-abbreviation = 'DAM'"><xsl:value-of select="$doctype_uppercased"/></xsl:when>
772
773
  <xsl:when test="$doctype = 'amendment'">
773
774
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(translate(/iso:iso-standard/iso:bibdata/iso:ext/iso:updates-document-type,'-',' ')))"/>
774
775
  </xsl:when>
@@ -817,7 +818,7 @@
817
818
  </fo:block>
818
819
  <!-- <xsl:value-of select="$linebreak"/>
819
820
  <xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:version/iso:revision-date"/> -->
820
- <xsl:if test="$doctype = 'amendment'">
821
+ <xsl:if test="$doctype = 'amendment' and not($stage-abbreviation = 'FDAmd' or $stage-abbreviation = 'FDAM' or $stage-abbreviation = 'DAmd' or $stage-abbreviation = 'DAM')">
821
822
  <fo:block text-align="right" margin-right="0.5mm">
822
823
  <fo:block font-weight="bold" margin-top="4pt" role="H1">
823
824
  <xsl:value-of select="$doctype_uppercased"/>
@@ -875,11 +876,11 @@
875
876
  <fo:table-row> <!-- border="1pt solid black" height="150mm" -->
876
877
  <fo:table-cell font-size="11pt">
877
878
  <fo:block>
878
- <xsl:if test="$stage-abbreviation = 'FDIS'">
879
+ <xsl:if test="$stage-abbreviation = 'FDIS' or $stage-abbreviation = 'FDAmd' or $stage-abbreviation = 'FDAM' or $stage-abbreviation = 'DAmd' or $stage-abbreviation = 'DAM'">
879
880
  <fo:block-container border="0.5mm solid black" width="51mm">
880
881
  <fo:block margin="2mm">
881
882
  <fo:block margin-bottom="8pt"><xsl:copy-of select="$editorialgroup"/></fo:block>
882
- <fo:block margin-bottom="6pt"><xsl:value-of select="$secretariat"/></fo:block>
883
+ <fo:block margin-bottom="6pt"><xsl:copy-of select="$secretariat"/></fo:block>
883
884
  <fo:block margin-bottom="6pt">Voting begins on:<xsl:value-of select="$linebreak"/>
884
885
  <fo:inline font-weight="bold">
885
886
  <xsl:choose>
@@ -911,7 +912,7 @@
911
912
  <fo:table-cell>
912
913
  <xsl:call-template name="insertTripleLine"/>
913
914
  <fo:block-container line-height="1.1">
914
- <fo:block margin-right="5mm">
915
+ <fo:block margin-right="3.5mm">
915
916
  <fo:block font-size="18pt" font-weight="bold" margin-top="12pt" role="H1">
916
917
 
917
918
  <xsl:apply-templates select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
@@ -928,27 +929,29 @@
928
929
 
929
930
  </fo:block>
930
931
 
931
- <xsl:for-each select="xalan:nodeset($lang_other)/lang">
932
- <xsl:variable name="lang_other" select="."/>
932
+ <xsl:if test="not($stage-abbreviation = 'FDAmd' or $stage-abbreviation = 'FDAM' or $stage-abbreviation = 'DAmd' or $stage-abbreviation = 'DAM')">
933
+ <xsl:for-each select="xalan:nodeset($lang_other)/lang">
934
+ <xsl:variable name="lang_other" select="."/>
933
935
 
934
- <fo:block font-size="12pt"><xsl:value-of select="$linebreak"/></fo:block>
935
- <fo:block font-size="11pt" font-style="italic" line-height="1.1" role="H1">
936
+ <fo:block font-size="12pt"><xsl:value-of select="$linebreak"/></fo:block>
937
+ <fo:block font-size="11pt" font-style="italic" line-height="1.1" role="H1">
936
938
 
937
- <!-- Example: title-intro fr -->
938
- <xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-intro']"/>
939
+ <!-- Example: title-intro fr -->
940
+ <xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-intro']"/>
939
941
 
940
- <xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-main']"/>
942
+ <xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-main']"/>
941
943
 
942
- <xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-part']">
943
- <xsl:with-param name="curr_lang" select="$lang_other"/>
944
- </xsl:apply-templates>
944
+ <xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-part']">
945
+ <xsl:with-param name="curr_lang" select="$lang_other"/>
946
+ </xsl:apply-templates>
945
947
 
946
- <xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-amd']">
947
- <xsl:with-param name="curr_lang" select="$lang_other"/>
948
- </xsl:apply-templates>
948
+ <xsl:apply-templates select="$XML/iso:iso-standard/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-amd']">
949
+ <xsl:with-param name="curr_lang" select="$lang_other"/>
950
+ </xsl:apply-templates>
949
951
 
950
- </fo:block>
951
- </xsl:for-each>
952
+ </fo:block>
953
+ </xsl:for-each>
954
+ </xsl:if>
952
955
 
953
956
  <xsl:if test="$stage-abbreviation = 'NWIP' or $stage-abbreviation = 'NP' or $stage-abbreviation = 'PWI' or $stage-abbreviation = 'AWI' or $stage-abbreviation = 'WD' or $stage-abbreviation = 'CD' or $stage-abbreviation = 'FDIS'">
954
957
  <fo:block margin-top="10mm">
@@ -2012,18 +2015,27 @@
2012
2015
  </fo:table>
2013
2016
  </fo:block-container>
2014
2017
  </fo:static-content>
2015
- <fo:static-content flow-name="header-first">
2016
- <fo:block-container margin-top="13mm" height="9mm" width="172mm" border-top="0.5mm solid black" border-bottom="0.5mm solid black" display-align="center" background-color="white">
2017
- <fo:block text-align-last="justify" font-size="12pt" font-weight="bold">
2018
+ <fo:static-content flow-name="header-first" role="artifact">
2019
+ <xsl:choose>
2020
+ <xsl:when test="$stage-abbreviation = 'FDAmd' or $stage-abbreviation = 'FDAM' or $stage-abbreviation = 'DAmd' or $stage-abbreviation = 'DAM'">
2021
+ <fo:block-container height="24mm" display-align="before">
2022
+ <fo:block font-size="12pt" font-weight="bold" text-align="right" padding-top="12.5mm"><xsl:value-of select="$ISOname"/></fo:block>
2023
+ </fo:block-container>
2024
+ </xsl:when>
2025
+ <xsl:otherwise>
2026
+ <fo:block-container margin-top="13mm" height="9mm" width="172mm" border-top="0.5mm solid black" border-bottom="0.5mm solid black" display-align="center" background-color="white">
2027
+ <fo:block text-align-last="justify" font-size="12pt" font-weight="bold">
2018
2028
 
2019
- <xsl:value-of select="$stagename-header-firstpage"/>
2029
+ <xsl:value-of select="$stagename-header-firstpage"/>
2020
2030
 
2021
- <fo:inline keep-together.within-line="always">
2022
- <fo:leader leader-pattern="space"/>
2023
- <fo:inline><xsl:value-of select="$ISOname"/></fo:inline>
2024
- </fo:inline>
2025
- </fo:block>
2026
- </fo:block-container>
2031
+ <fo:inline keep-together.within-line="always">
2032
+ <fo:leader leader-pattern="space"/>
2033
+ <fo:inline><xsl:value-of select="$ISOname"/></fo:inline>
2034
+ </fo:inline>
2035
+ </fo:block>
2036
+ </fo:block-container>
2037
+ </xsl:otherwise>
2038
+ </xsl:choose>
2027
2039
  </fo:static-content>
2028
2040
  <fo:static-content flow-name="header-odd" role="artifact">
2029
2041
  <fo:block-container height="24mm" display-align="before">
@@ -2562,6 +2574,9 @@
2562
2574
  <xsl:attribute-set name="import-style">
2563
2575
  </xsl:attribute-set>
2564
2576
 
2577
+ <xsl:attribute-set name="component-style">
2578
+ </xsl:attribute-set>
2579
+
2565
2580
  <xsl:attribute-set name="recommendation-style">
2566
2581
 
2567
2582
  </xsl:attribute-set>
@@ -6985,6 +7000,10 @@
6985
7000
 
6986
7001
  <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
6987
7002
 
7003
+ <xsl:if test="$doctype = 'amendment' and parent::*[local-name() = 'quote']">
7004
+ <xsl:attribute name="font-size">inherit</xsl:attribute>
7005
+ </xsl:if>
7006
+
6988
7007
  <fo:block-container margin-left="0mm">
6989
7008
 
6990
7009
  <fo:block>
@@ -7035,6 +7054,10 @@
7035
7054
  <xsl:template match="*[local-name() = 'termnote']">
7036
7055
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
7037
7056
 
7057
+ <xsl:if test="$doctype = 'amendment' and parent::*[local-name() = 'quote']">
7058
+ <xsl:attribute name="font-size">inherit</xsl:attribute>
7059
+ </xsl:if>
7060
+
7038
7061
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
7039
7062
 
7040
7063
  <xsl:if test="not(*[local-name() = 'name']/following-sibling::node()[1][self::text()][normalize-space()=''])">
@@ -8525,41 +8548,47 @@
8525
8548
  </fo:block>
8526
8549
  </xsl:template>
8527
8550
 
8528
- <xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
8551
+ <xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit'] | *[local-name() = 'div'][@type = 'requirement-inherit'] | *[local-name() = 'div'][@type = 'recommendation-inherit'] | *[local-name() = 'div'][@type = 'permission-inherit']">
8529
8552
  <fo:block xsl:use-attribute-sets="inherit-style">
8530
8553
  <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
8531
8554
  </fo:block>
8532
8555
  </xsl:template>
8533
8556
 
8534
- <xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
8557
+ <xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description'] | *[local-name() = 'div'][@type = 'requirement-description'] | *[local-name() = 'div'][@type = 'recommendation-description'] | *[local-name() = 'div'][@type = 'permission-description']">
8535
8558
  <fo:block xsl:use-attribute-sets="description-style">
8536
8559
  <xsl:apply-templates/>
8537
8560
  </fo:block>
8538
8561
  </xsl:template>
8539
8562
 
8540
- <xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
8563
+ <xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification'] | *[local-name() = 'div'][@type = 'requirement-specification'] | *[local-name() = 'div'][@type = 'recommendation-specification'] | *[local-name() = 'div'][@type = 'permission-specification']">
8541
8564
  <fo:block xsl:use-attribute-sets="specification-style">
8542
8565
  <xsl:apply-templates/>
8543
8566
  </fo:block>
8544
8567
  </xsl:template>
8545
8568
 
8546
- <xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
8569
+ <xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target'] | *[local-name() = 'div'][@type = 'requirement-measurement-target'] | *[local-name() = 'div'][@type = 'recommendation-measurement-target'] | *[local-name() = 'div'][@type = 'permission-measurement-target']">
8547
8570
  <fo:block xsl:use-attribute-sets="measurement-target-style">
8548
8571
  <xsl:apply-templates/>
8549
8572
  </fo:block>
8550
8573
  </xsl:template>
8551
8574
 
8552
- <xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
8575
+ <xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification'] | *[local-name() = 'div'][@type = 'requirement-verification'] | *[local-name() = 'div'][@type = 'recommendation-verification'] | *[local-name() = 'div'][@type = 'permission-verification']">
8553
8576
  <fo:block xsl:use-attribute-sets="verification-style">
8554
8577
  <xsl:apply-templates/>
8555
8578
  </fo:block>
8556
8579
  </xsl:template>
8557
8580
 
8558
- <xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
8581
+ <xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import'] | *[local-name() = 'div'][@type = 'requirement-import'] | *[local-name() = 'div'][@type = 'recommendation-import'] | *[local-name() = 'div'][@type = 'permission-import']">
8559
8582
  <fo:block xsl:use-attribute-sets="import-style">
8560
8583
  <xsl:apply-templates/>
8561
8584
  </fo:block>
8562
8585
  </xsl:template>
8586
+
8587
+ <xsl:template match="*[local-name() = 'div'][starts-with(@type, 'requirement-component')] | *[local-name() = 'div'][starts-with(@type, 'recommendation-component')] | *[local-name() = 'div'][starts-with(@type, 'permission-component')]">
8588
+ <fo:block xsl:use-attribute-sets="component-style">
8589
+ <xsl:apply-templates/>
8590
+ </fo:block>
8591
+ </xsl:template>
8563
8592
  <!-- ========== -->
8564
8593
  <!-- END -->
8565
8594
  <!-- ========== -->
@@ -8969,6 +8998,11 @@
8969
8998
  <fo:block-container margin-left="0mm">
8970
8999
  <fo:block-container xsl:use-attribute-sets="quote-style">
8971
9000
 
9001
+ <xsl:if test="$doctype = 'amendment' and (*[local-name() = 'note'] or *[local-name() = 'termnote'])">
9002
+ <xsl:attribute name="margin-left">7mm</xsl:attribute>
9003
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
9004
+ </xsl:if>
9005
+
8972
9006
  <fo:block-container margin-left="0mm" margin-right="0mm">
8973
9007
  <fo:block role="BlockQuote">
8974
9008
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
@@ -178,12 +178,10 @@ module IsoDoc
178
178
  i18nhash: @i18n.get)
179
179
  end
180
180
 
181
- def bibrender(xml)
182
- unless xml.at(ns("./formattedref"))
183
- xml.children =
184
- "#{bibrenderer.render(xml.to_xml)}"\
185
- "#{xml.xpath(ns('./docidentifier | ./uri | ./note')).to_xml}"
186
- end
181
+ def bibrender_formattedref(formattedref, xml)
182
+ return if %w(techreport standard).include? xml["type"]
183
+
184
+ super
187
185
  end
188
186
 
189
187
  def ol_depth(node)
@@ -88,7 +88,6 @@ module Metanorma
88
88
  end
89
89
  end
90
90
 
91
- # TODO sort by authors
92
91
  # sort by: doc class (ISO, IEC, other standard (not DOI &c), other
93
92
  # then standard class (docid class other than DOI &c)
94
93
  # then docnumber if present, numeric sort
@@ -7,33 +7,6 @@ require "open-uri"
7
7
  require "twitter_cldr"
8
8
  require "pubid-iso"
9
9
 
10
- # @param stage [String] stage, eg. "WD", "CD", "DIS"
11
- # @param urn_stage [Float] numeric stage for URN rendering
12
- # @param iteration [Integer] document iteration, eg. "1", "2", "3"
13
- # @param joint_document [Identifier] joint document
14
- # @param supplement [Supplement] supplement
15
- # @param tctype [String] Technical Committee type, eg. "TC", "JTC"
16
- # @param sctype [String] TC subsommittee, eg. "SC"
17
- # @param wgtype [String] TC working group type, eg. "AG", "AHG"
18
- # @param tcnumber [Integer] Technical Committee number, eg. "1", "2"
19
- # @param scnumber [Integer] Subsommittee number, eg. "1", "2"
20
- # @param wgnumber [Integer] Working group number, eg. "1", "2"
21
- # @param dir [Boolean] Directives document
22
- # @param dirtype [String] Directives document type, eg. "JTC"
23
- # @see Supplement
24
- # @see Identifier
25
- # @see Pubid::Core::Identifier
26
- # @see Parser
27
- #
28
- =begin
29
- def initialize(number: nil, stage: nil, iteration: nil, supplement: nil,
30
- joint_document: nil, urn_stage: nil,
31
- tctype: nil, sctype: nil, wgtype: nil, tcnumber: nil,
32
- scnumber: nil, wgnumber:nil,
33
- dir: nil, dirtype: nil, **opts)
34
- super(**opts.merge(number: number))
35
- =end
36
-
37
10
  module Metanorma
38
11
  module ISO
39
12
  class Converter < Standoc::Converter
@@ -100,7 +73,6 @@ module Metanorma
100
73
  def iso_id(node, xml)
101
74
  (!@amd && node.attr("docnumber")) || (@amd && node.attr("updates")) or
102
75
  return
103
-
104
76
  dn = id_stage_prefix(iso_id1(node), node)
105
77
  dns = [id_year(dn, node, mode: :default),
106
78
  id_year(dn, node, mode: :force),
@@ -108,6 +80,25 @@ module Metanorma
108
80
  iso_id_out(node, xml, dns)
109
81
  end
110
82
 
83
+ =begin
84
+ def iso_id(node, _xml)
85
+ (!@amd && node.attr("docnumber")) || (@amd && node.attr("updates")) or
86
+ return
87
+ params = {
88
+ number: (@amd ? node.attr("updates") : node.attr("docnumber")),
89
+ part: node.attr("partnumber"),
90
+ amendment_number: node.attr("amendment-number"),
91
+ corrigendum_number: node.attr("corrigendum-number"),
92
+ language: node.attr("language") || "en",
93
+ urn_stage: "#{get_stage(node)}.#{get_substage(node)}",
94
+ stage: id_stage_abbr(get_stage(node), get_substage(node), node, true),
95
+ type: doctype(node),
96
+ year: node.attr("copyright-year") || node.attr("updated-date")&.sub(/-.*$/, ""),
97
+ copublisher: node.attr("agency"),
98
+ }
99
+ end
100
+ =end
101
+
111
102
  def iso_id_out(node, xml, dns)
112
103
  xml.docidentifier dns[0], **attr_code(type: "ISO")
113
104
  xml.docidentifier dns[2], **attr_code(type: "iso-undated")
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ISO
3
- VERSION = "2.1.6".freeze
3
+ VERSION = "2.1.7".freeze
4
4
  end
5
5
  end