metanorma-iho 0.2.1 → 0.2.2

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: 8e664d8fbff7cd6b332768ec2d2b8758ca0ca8fbb54dff3ce2f3ac4b71120293
4
- data.tar.gz: 1c30862f7a7617224108e5d1454f3437dca09f6f1e48dcace31f20602210cf18
3
+ metadata.gz: 230c4f5b1dc54f38626964d1c566b3b7075de0242981bcb822df9bf8d2f3a520
4
+ data.tar.gz: aa34f761d872455e1c0ce4110b305cb9502fa9a7c90d5f8e834f48dd7d8b1f16
5
5
  SHA512:
6
- metadata.gz: 235b2e4860250fc5e1a85d8b0cbd66f4df4c2200b8ae3d8d0dd1104309d716d269e826b99a1bb9e02c8d0ff768ad0ac7e37f61f312e535218aaa0c11c3fe504f
7
- data.tar.gz: cd69caafbbfae68ab3482c6f23f7b20933995bae7c1d57985b4fd63a44dac2b23c0d0e80933f7ca7df5378b564b392bd2a1c245c5bb68d534920b5f25006d2c9
6
+ metadata.gz: e6e8f57daa7026e6b7c06a85af9265a7292ca1c57b9bda45d247f7575c02e281424fda42ee42be3d33ca99890bde00980307b64bc7b6244413508cc89c6e42c0
7
+ data.tar.gz: 1e32207b9ea840768639bf095e87efd04e3ab5b2778bdc84f63c0a6676f925cceea42a5479ec6edbd26789c93b81ef65942aaebb6a17a3a76c2ca5561f6482a8
@@ -67,14 +67,22 @@ module Asciidoctor
67
67
 
68
68
  def metadata_committee1(node, xml)
69
69
  xml.editorialgroup do |a|
70
- a.committee node.attr("committee")
71
- a.workgroup node.attr("workgroup")
70
+ a.committee do |n|
71
+ n.abbreviation node.attr("committee").upcase
72
+ end
73
+ a.workgroup do |n|
74
+ n.abbreviation node.attr("workgroup").upcase
75
+ end
72
76
  end
73
77
  i = 2
74
78
  while node.attr("workgroup_#{i}") do
75
79
  xml.editorialgroup do |a|
76
- a.committee node.attr("committee_#{i}")
77
- a.workgroup node.attr("workgroup_#{i}")
80
+ a.committee do |n|
81
+ n.abbreviation node.attr("committee_#{i}").upcase
82
+ end
83
+ a.workgroup do |n|
84
+ n.abbreviation node.attr("workgroup_#{i}").upcase
85
+ end
78
86
  end
79
87
  i += 1
80
88
  end
@@ -23,8 +23,13 @@
23
23
  </define>
24
24
  <define name="editorialgroup">
25
25
  <element name="editorialgroup">
26
- <ref name="committee"/>
27
- <ref name="workgroup"/>
26
+ <oneOrMore>
27
+ <choice>
28
+ <ref name="committee"/>
29
+ <ref name="workgroup"/>
30
+ <ref name="commission"/>
31
+ </choice>
32
+ </oneOrMore>
28
33
  </element>
29
34
  </define>
30
35
  <define name="BibDataExtensionType">
@@ -94,16 +99,35 @@
94
99
  </include>
95
100
  <define name="committee">
96
101
  <element name="committee">
97
- <choice>
98
- <value>hssc</value>
99
- <value>ircc</value>
100
- </choice>
102
+ <ref name="IHO_Group"/>
101
103
  </element>
102
104
  </define>
103
105
  <define name="workgroup">
104
106
  <element name="workgroup">
107
+ <ref name="IHO_Group"/>
108
+ </element>
109
+ </define>
110
+ <define name="commission">
111
+ <element name="commission">
112
+ <ref name="IHO_Group"/>
113
+ </element>
114
+ </define>
115
+ <define name="IHO_Group">
116
+ <optional>
117
+ <element name="name">
118
+ <text/>
119
+ </element>
120
+ </optional>
121
+ <element name="abbreviation">
105
122
  <text/>
106
123
  </element>
124
+ <optional>
125
+ <choice>
126
+ <ref name="committee"/>
127
+ <ref name="workgroup"/>
128
+ <ref name="commission"/>
129
+ </choice>
130
+ </optional>
107
131
  </define>
108
132
  <define name="annex-appendix">
109
133
  <element name="appendix">
@@ -42,8 +42,11 @@
42
42
  </define>
43
43
  <define name="xref">
44
44
  <element name="xref">
45
+ <!-- attribute target { xsd:IDREF }, -->
45
46
  <attribute name="target">
46
- <data type="IDREF"/>
47
+ <data type="string">
48
+ <param name="pattern">\i\c*|\c+#\c+</param>
49
+ </data>
47
50
  </attribute>
48
51
  <optional>
49
52
  <attribute name="type">
@@ -15,6 +15,7 @@ module IsoDoc
15
15
  def make_body3(body, docxml)
16
16
  body.div **{ class: "main-section" } do |div3|
17
17
  boilerplate docxml, div3
18
+ preface_block docxml, div3
18
19
  abstract docxml, div3
19
20
  foreword docxml, div3
20
21
  introduction docxml, div3
@@ -2249,14 +2249,36 @@
2249
2249
  <fo:table-cell>
2250
2250
  <fo:block>
2251
2251
 
2252
-
2252
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2253
+ <xsl:if test="local-name(*[1]) != 'stem'">
2254
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2255
+ </xsl:if>
2256
+ </xsl:if> -->
2253
2257
 
2254
2258
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2255
2259
 
2256
2260
  </fo:block>
2257
2261
  </fo:table-cell>
2258
2262
  </fo:table-row>
2259
-
2263
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2264
+ <xsl:if test="local-name(*[1]) = 'stem'">
2265
+ <fo:table-row>
2266
+ <fo:table-cell>
2267
+ <fo:block margin-top="6pt">
2268
+ <xsl:if test="normalize-space($key_iso) = 'true'">
2269
+ <xsl:attribute name="margin-top">0</xsl:attribute>
2270
+ </xsl:if>
2271
+ <xsl:text>&#xA0;</xsl:text>
2272
+ </fo:block>
2273
+ </fo:table-cell>
2274
+ <fo:table-cell>
2275
+ <fo:block>
2276
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2277
+ </fo:block>
2278
+ </fo:table-cell>
2279
+ </fo:table-row>
2280
+ </xsl:if>
2281
+ </xsl:if> -->
2260
2282
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
2261
2283
  <xsl:apply-templates/>
2262
2284
  </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
@@ -3008,22 +3030,30 @@
3008
3030
  </fo:block>
3009
3031
  </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3010
3032
  <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
3033
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3034
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
3035
+ </xsl:if>
3011
3036
  <fo:block-container margin-left="0mm" margin-right="0mm">
3012
- <fo:table id="{@id}" table-layout="fixed" width="100%" border="0pt solid black">
3037
+ <fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black">
3038
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3039
+ <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
3040
+ </xsl:if>
3013
3041
  <xsl:variable name="simple-table">
3014
3042
  <xsl:call-template name="getSimpleTable"/>
3015
3043
  </xsl:variable>
3016
3044
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
3017
3045
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
3018
- <fo:table-column column-width="35mm"/>
3019
- <fo:table-column column-width="115mm"/>
3046
+ <!-- <fo:table-column column-width="35mm"/>
3047
+ <fo:table-column column-width="115mm"/> -->
3048
+ <fo:table-column column-width="25%"/>
3049
+ <fo:table-column column-width="75%"/>
3020
3050
  </xsl:if>
3021
3051
  <xsl:apply-templates mode="requirement"/>
3022
3052
  </fo:table>
3023
3053
  <!-- fn processing -->
3024
3054
  <xsl:if test=".//*[local-name() = 'fn']">
3025
3055
  <xsl:for-each select="*[local-name() = 'tbody']">
3026
- <fo:block font-size="90%" border-bottom="1.pt solid black">
3056
+ <fo:block font-size="90%" border-bottom="1pt solid black">
3027
3057
  <xsl:call-template name="fn_display"/>
3028
3058
  </fo:block>
3029
3059
  </xsl:for-each>
@@ -3039,17 +3069,20 @@
3039
3069
  <xsl:apply-templates mode="requirement"/>
3040
3070
  </fo:table-body>
3041
3071
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
3042
- <fo:table-row>
3072
+ <fo:table-row height="7mm">
3073
+ <xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])">
3074
+ <xsl:attribute name="border">1pt solid black</xsl:attribute>
3075
+ </xsl:if>
3043
3076
  <xsl:apply-templates mode="requirement"/>
3044
3077
  </fo:table-row>
3045
3078
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
3046
- <fo:table-cell text-align="{@align}">
3079
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3047
3080
  <xsl:attribute name="text-align">
3048
3081
  <xsl:choose>
3049
3082
  <xsl:when test="@align">
3050
3083
  <xsl:value-of select="@align"/>
3051
3084
  </xsl:when>
3052
- <xsl:otherwise>center</xsl:otherwise>
3085
+ <xsl:otherwise>left</xsl:otherwise>
3053
3086
  </xsl:choose>
3054
3087
  </xsl:attribute>
3055
3088
  <xsl:if test="@colspan">
@@ -3063,21 +3096,25 @@
3063
3096
  </xsl:attribute>
3064
3097
  </xsl:if>
3065
3098
 
3066
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3099
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3067
3100
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3068
3101
  <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
3069
3102
  </xsl:if>
3070
3103
  <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
3071
3104
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3072
3105
  <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3073
- </xsl:if>
3106
+ </xsl:if> -->
3074
3107
 
3075
3108
  <fo:block>
3076
3109
  <xsl:apply-templates/>
3077
3110
  </fo:block>
3078
3111
  </fo:table-cell>
3079
3112
  </xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
3080
- <fo:table-cell text-align="{@align}">
3113
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3114
+ <xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3115
+ <xsl:attribute name="padding">0mm</xsl:attribute>
3116
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
3117
+ </xsl:if>
3081
3118
  <xsl:attribute name="text-align">
3082
3119
  <xsl:choose>
3083
3120
  <xsl:when test="@align">
@@ -3097,24 +3134,25 @@
3097
3134
  </xsl:attribute>
3098
3135
  </xsl:if>
3099
3136
 
3100
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3137
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3101
3138
  <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
3102
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3103
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])"> <!-- 2nd line and below -->
3139
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3140
+ <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
3104
3141
  <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3105
3142
  </xsl:if>
3106
- </xsl:if>
3143
+ </xsl:if> -->
3144
+ <!-- 2nd line and below -->
3107
3145
 
3108
3146
  <fo:block>
3109
3147
  <xsl:apply-templates/>
3110
3148
  </fo:block>
3111
3149
  </fo:table-cell>
3112
3150
  </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
3113
- <fo:block font-size="11pt" font-weight="bold" text-align="center" margin-bottom="4pt">
3151
+ <fo:block font-size="11pt" font-weight="bold"> <!-- margin-bottom="4pt" text-align="center" -->
3114
3152
  <xsl:apply-templates/>
3115
3153
  </fo:block>
3116
- </xsl:template><xsl:template match="*[local-name() = 'p'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
3117
- <fo:block margin-bottom="10pt">
3154
+ </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
3155
+ <fo:block> <!-- margin-bottom="10pt" -->
3118
3156
  <xsl:apply-templates/>
3119
3157
  </fo:block>
3120
3158
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
@@ -3447,6 +3485,44 @@
3447
3485
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
3448
3486
  <fo:block><xsl:apply-templates/></fo:block>
3449
3487
  </fo:table-cell>
3488
+ </xsl:template><xsl:template name="processBibitem">
3489
+
3490
+ </xsl:template><xsl:template name="processPersonalAuthor">
3491
+ <xsl:choose>
3492
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
3493
+ <author>
3494
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
3495
+ </author>
3496
+ </xsl:when>
3497
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
3498
+ <author>
3499
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3500
+ <xsl:text> </xsl:text>
3501
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
3502
+ </author>
3503
+ </xsl:when>
3504
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
3505
+ <author>
3506
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3507
+ <xsl:text> </xsl:text>
3508
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
3509
+ </author>
3510
+ </xsl:when>
3511
+ <xsl:otherwise>
3512
+ <xsl:apply-templates/>
3513
+ </xsl:otherwise>
3514
+ </xsl:choose>
3515
+ </xsl:template><xsl:template name="renderDate">
3516
+ <xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
3517
+ <xsl:value-of select="*[local-name() = 'on']"/>
3518
+ </xsl:if>
3519
+ <xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
3520
+ <xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
3521
+ </xsl:if>
3522
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
3523
+ <xsl:value-of select="translate(.,'. ','')"/>
3524
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
3525
+ <xsl:value-of select="substring(.,1,1)"/>
3450
3526
  </xsl:template><xsl:template name="convertDate">
3451
3527
  <xsl:param name="date"/>
3452
3528
  <xsl:param name="format" select="'short'"/>
@@ -2249,14 +2249,36 @@
2249
2249
  <fo:table-cell>
2250
2250
  <fo:block>
2251
2251
 
2252
-
2252
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2253
+ <xsl:if test="local-name(*[1]) != 'stem'">
2254
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2255
+ </xsl:if>
2256
+ </xsl:if> -->
2253
2257
 
2254
2258
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2255
2259
 
2256
2260
  </fo:block>
2257
2261
  </fo:table-cell>
2258
2262
  </fo:table-row>
2259
-
2263
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2264
+ <xsl:if test="local-name(*[1]) = 'stem'">
2265
+ <fo:table-row>
2266
+ <fo:table-cell>
2267
+ <fo:block margin-top="6pt">
2268
+ <xsl:if test="normalize-space($key_iso) = 'true'">
2269
+ <xsl:attribute name="margin-top">0</xsl:attribute>
2270
+ </xsl:if>
2271
+ <xsl:text>&#xA0;</xsl:text>
2272
+ </fo:block>
2273
+ </fo:table-cell>
2274
+ <fo:table-cell>
2275
+ <fo:block>
2276
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2277
+ </fo:block>
2278
+ </fo:table-cell>
2279
+ </fo:table-row>
2280
+ </xsl:if>
2281
+ </xsl:if> -->
2260
2282
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
2261
2283
  <xsl:apply-templates/>
2262
2284
  </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
@@ -3008,22 +3030,30 @@
3008
3030
  </fo:block>
3009
3031
  </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3010
3032
  <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
3033
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3034
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
3035
+ </xsl:if>
3011
3036
  <fo:block-container margin-left="0mm" margin-right="0mm">
3012
- <fo:table id="{@id}" table-layout="fixed" width="100%" border="0pt solid black">
3037
+ <fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black">
3038
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3039
+ <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
3040
+ </xsl:if>
3013
3041
  <xsl:variable name="simple-table">
3014
3042
  <xsl:call-template name="getSimpleTable"/>
3015
3043
  </xsl:variable>
3016
3044
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
3017
3045
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
3018
- <fo:table-column column-width="35mm"/>
3019
- <fo:table-column column-width="115mm"/>
3046
+ <!-- <fo:table-column column-width="35mm"/>
3047
+ <fo:table-column column-width="115mm"/> -->
3048
+ <fo:table-column column-width="25%"/>
3049
+ <fo:table-column column-width="75%"/>
3020
3050
  </xsl:if>
3021
3051
  <xsl:apply-templates mode="requirement"/>
3022
3052
  </fo:table>
3023
3053
  <!-- fn processing -->
3024
3054
  <xsl:if test=".//*[local-name() = 'fn']">
3025
3055
  <xsl:for-each select="*[local-name() = 'tbody']">
3026
- <fo:block font-size="90%" border-bottom="1.pt solid black">
3056
+ <fo:block font-size="90%" border-bottom="1pt solid black">
3027
3057
  <xsl:call-template name="fn_display"/>
3028
3058
  </fo:block>
3029
3059
  </xsl:for-each>
@@ -3039,17 +3069,20 @@
3039
3069
  <xsl:apply-templates mode="requirement"/>
3040
3070
  </fo:table-body>
3041
3071
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
3042
- <fo:table-row>
3072
+ <fo:table-row height="7mm">
3073
+ <xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])">
3074
+ <xsl:attribute name="border">1pt solid black</xsl:attribute>
3075
+ </xsl:if>
3043
3076
  <xsl:apply-templates mode="requirement"/>
3044
3077
  </fo:table-row>
3045
3078
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
3046
- <fo:table-cell text-align="{@align}">
3079
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3047
3080
  <xsl:attribute name="text-align">
3048
3081
  <xsl:choose>
3049
3082
  <xsl:when test="@align">
3050
3083
  <xsl:value-of select="@align"/>
3051
3084
  </xsl:when>
3052
- <xsl:otherwise>center</xsl:otherwise>
3085
+ <xsl:otherwise>left</xsl:otherwise>
3053
3086
  </xsl:choose>
3054
3087
  </xsl:attribute>
3055
3088
  <xsl:if test="@colspan">
@@ -3063,21 +3096,25 @@
3063
3096
  </xsl:attribute>
3064
3097
  </xsl:if>
3065
3098
 
3066
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3099
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3067
3100
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3068
3101
  <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
3069
3102
  </xsl:if>
3070
3103
  <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
3071
3104
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3072
3105
  <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3073
- </xsl:if>
3106
+ </xsl:if> -->
3074
3107
 
3075
3108
  <fo:block>
3076
3109
  <xsl:apply-templates/>
3077
3110
  </fo:block>
3078
3111
  </fo:table-cell>
3079
3112
  </xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
3080
- <fo:table-cell text-align="{@align}">
3113
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3114
+ <xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3115
+ <xsl:attribute name="padding">0mm</xsl:attribute>
3116
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
3117
+ </xsl:if>
3081
3118
  <xsl:attribute name="text-align">
3082
3119
  <xsl:choose>
3083
3120
  <xsl:when test="@align">
@@ -3097,24 +3134,25 @@
3097
3134
  </xsl:attribute>
3098
3135
  </xsl:if>
3099
3136
 
3100
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3137
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3101
3138
  <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
3102
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3103
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])"> <!-- 2nd line and below -->
3139
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3140
+ <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
3104
3141
  <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3105
3142
  </xsl:if>
3106
- </xsl:if>
3143
+ </xsl:if> -->
3144
+ <!-- 2nd line and below -->
3107
3145
 
3108
3146
  <fo:block>
3109
3147
  <xsl:apply-templates/>
3110
3148
  </fo:block>
3111
3149
  </fo:table-cell>
3112
3150
  </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
3113
- <fo:block font-size="11pt" font-weight="bold" text-align="center" margin-bottom="4pt">
3151
+ <fo:block font-size="11pt" font-weight="bold"> <!-- margin-bottom="4pt" text-align="center" -->
3114
3152
  <xsl:apply-templates/>
3115
3153
  </fo:block>
3116
- </xsl:template><xsl:template match="*[local-name() = 'p'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
3117
- <fo:block margin-bottom="10pt">
3154
+ </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
3155
+ <fo:block> <!-- margin-bottom="10pt" -->
3118
3156
  <xsl:apply-templates/>
3119
3157
  </fo:block>
3120
3158
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
@@ -3447,6 +3485,44 @@
3447
3485
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
3448
3486
  <fo:block><xsl:apply-templates/></fo:block>
3449
3487
  </fo:table-cell>
3488
+ </xsl:template><xsl:template name="processBibitem">
3489
+
3490
+ </xsl:template><xsl:template name="processPersonalAuthor">
3491
+ <xsl:choose>
3492
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
3493
+ <author>
3494
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
3495
+ </author>
3496
+ </xsl:when>
3497
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
3498
+ <author>
3499
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3500
+ <xsl:text> </xsl:text>
3501
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
3502
+ </author>
3503
+ </xsl:when>
3504
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
3505
+ <author>
3506
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3507
+ <xsl:text> </xsl:text>
3508
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
3509
+ </author>
3510
+ </xsl:when>
3511
+ <xsl:otherwise>
3512
+ <xsl:apply-templates/>
3513
+ </xsl:otherwise>
3514
+ </xsl:choose>
3515
+ </xsl:template><xsl:template name="renderDate">
3516
+ <xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
3517
+ <xsl:value-of select="*[local-name() = 'on']"/>
3518
+ </xsl:if>
3519
+ <xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
3520
+ <xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
3521
+ </xsl:if>
3522
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
3523
+ <xsl:value-of select="translate(.,'. ','')"/>
3524
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
3525
+ <xsl:value-of select="substring(.,1,1)"/>
3450
3526
  </xsl:template><xsl:template name="convertDate">
3451
3527
  <xsl:param name="date"/>
3452
3528
  <xsl:param name="format" select="'short'"/>
@@ -23,6 +23,7 @@ module IsoDoc
23
23
  def make_body2(body, docxml)
24
24
  body.div **{ class: "WordSection2" } do |div2|
25
25
  boilerplate docxml, div2
26
+ preface_block docxml, div2
26
27
  abstract docxml, div2
27
28
  foreword docxml, div2
28
29
  introduction docxml, div2
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module IHO
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iho
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-14 00:00:00.000000000 Z
11
+ date: 2020-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities