metanorma-un 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b28c1aef3c3e25135a7c96ddde3a01a0eaee668dd7e8f056b34466de59fe2241
4
- data.tar.gz: 0a9b7d475632ed485456f45b70d3ea1a238f35002f7f115b7abf5fc634645731
3
+ metadata.gz: dc1295968cc10b0b89283f1d97d5b5aff3183139823968533503b5fa28c48912
4
+ data.tar.gz: 32d22c30798205724b124e46a9ff083ae2f328234892bd56948d1743a228dbad
5
5
  SHA512:
6
- metadata.gz: e00312eecc133e605ff3ba9a25cbb0179442844b79ccae409f5e4836f72b470da37b9f3f4698051854424fe371a0cb856a1d1081f3b70c9c5aeed204faeb1048
7
- data.tar.gz: 9146431e823c7bc83525ba3e4f925455289265ca8582ff8e0261c55e551c5c06feeae7fca34e48e1c176a4aa248c9e00b29414b95d4a2f85c01f020fee6b3fcd
6
+ metadata.gz: b75a917230a117efcf574e5d07279c59663823e0c34d296a66eda151ea888a0a7f7f0a678eb574879e36db454eac5f28e40da7735b8678f170265a4a2016d408
7
+ data.tar.gz: c051b967d74be693e30f70414b3e419f5591e7a91805dee26a5235b450dae6d2f5b18a46defb3cb77b62e076a25bbbbb604265e10df8ec9d32c6a6275b2c9f9b
@@ -113,7 +113,7 @@ module Asciidoctor
113
113
  end
114
114
 
115
115
  def doctype(node)
116
- d = node.attr("doctype")
116
+ d = super
117
117
  unless %w{plenary recommendation addendum communication corrigendum
118
118
  reissue agenda budgetary sec-gen-notes expert-report resolution
119
119
  plenary-attachment}.include? d
@@ -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">
@@ -65,6 +65,7 @@ module IsoDoc
65
65
  def make_body3(body, docxml)
66
66
  body.div **{ class: "main-section" } do |div3|
67
67
  boilerplate docxml, div3
68
+ preface_block docxml, div3
68
69
  abstract docxml, div3
69
70
  foreword docxml, div3
70
71
  introduction docxml, div3
@@ -2353,14 +2353,36 @@
2353
2353
  <fo:table-cell>
2354
2354
  <fo:block>
2355
2355
 
2356
-
2356
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2357
+ <xsl:if test="local-name(*[1]) != 'stem'">
2358
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2359
+ </xsl:if>
2360
+ </xsl:if> -->
2357
2361
 
2358
2362
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2359
2363
 
2360
2364
  </fo:block>
2361
2365
  </fo:table-cell>
2362
2366
  </fo:table-row>
2363
-
2367
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2368
+ <xsl:if test="local-name(*[1]) = 'stem'">
2369
+ <fo:table-row>
2370
+ <fo:table-cell>
2371
+ <fo:block margin-top="6pt">
2372
+ <xsl:if test="normalize-space($key_iso) = 'true'">
2373
+ <xsl:attribute name="margin-top">0</xsl:attribute>
2374
+ </xsl:if>
2375
+ <xsl:text>&#xA0;</xsl:text>
2376
+ </fo:block>
2377
+ </fo:table-cell>
2378
+ <fo:table-cell>
2379
+ <fo:block>
2380
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2381
+ </fo:block>
2382
+ </fo:table-cell>
2383
+ </fo:table-row>
2384
+ </xsl:if>
2385
+ </xsl:if> -->
2364
2386
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
2365
2387
  <xsl:apply-templates/>
2366
2388
  </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
@@ -3121,22 +3143,30 @@
3121
3143
  </fo:block>
3122
3144
  </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3123
3145
  <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
3146
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3147
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
3148
+ </xsl:if>
3124
3149
  <fo:block-container margin-left="0mm" margin-right="0mm">
3125
- <fo:table id="{@id}" table-layout="fixed" width="100%" border="0pt solid black">
3150
+ <fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black">
3151
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3152
+ <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
3153
+ </xsl:if>
3126
3154
  <xsl:variable name="simple-table">
3127
3155
  <xsl:call-template name="getSimpleTable"/>
3128
3156
  </xsl:variable>
3129
3157
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
3130
3158
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
3131
- <fo:table-column column-width="35mm"/>
3132
- <fo:table-column column-width="115mm"/>
3159
+ <!-- <fo:table-column column-width="35mm"/>
3160
+ <fo:table-column column-width="115mm"/> -->
3161
+ <fo:table-column column-width="25%"/>
3162
+ <fo:table-column column-width="75%"/>
3133
3163
  </xsl:if>
3134
3164
  <xsl:apply-templates mode="requirement"/>
3135
3165
  </fo:table>
3136
3166
  <!-- fn processing -->
3137
3167
  <xsl:if test=".//*[local-name() = 'fn']">
3138
3168
  <xsl:for-each select="*[local-name() = 'tbody']">
3139
- <fo:block font-size="90%" border-bottom="1.pt solid black">
3169
+ <fo:block font-size="90%" border-bottom="1pt solid black">
3140
3170
  <xsl:call-template name="fn_display"/>
3141
3171
  </fo:block>
3142
3172
  </xsl:for-each>
@@ -3152,17 +3182,20 @@
3152
3182
  <xsl:apply-templates mode="requirement"/>
3153
3183
  </fo:table-body>
3154
3184
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
3155
- <fo:table-row>
3185
+ <fo:table-row height="7mm">
3186
+ <xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])">
3187
+ <xsl:attribute name="border">1pt solid black</xsl:attribute>
3188
+ </xsl:if>
3156
3189
  <xsl:apply-templates mode="requirement"/>
3157
3190
  </fo:table-row>
3158
3191
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
3159
- <fo:table-cell text-align="{@align}">
3192
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3160
3193
  <xsl:attribute name="text-align">
3161
3194
  <xsl:choose>
3162
3195
  <xsl:when test="@align">
3163
3196
  <xsl:value-of select="@align"/>
3164
3197
  </xsl:when>
3165
- <xsl:otherwise>center</xsl:otherwise>
3198
+ <xsl:otherwise>left</xsl:otherwise>
3166
3199
  </xsl:choose>
3167
3200
  </xsl:attribute>
3168
3201
  <xsl:if test="@colspan">
@@ -3176,21 +3209,25 @@
3176
3209
  </xsl:attribute>
3177
3210
  </xsl:if>
3178
3211
 
3179
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3212
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3180
3213
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3181
3214
  <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
3182
3215
  </xsl:if>
3183
3216
  <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
3184
3217
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3185
3218
  <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3186
- </xsl:if>
3219
+ </xsl:if> -->
3187
3220
 
3188
3221
  <fo:block>
3189
3222
  <xsl:apply-templates/>
3190
3223
  </fo:block>
3191
3224
  </fo:table-cell>
3192
3225
  </xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
3193
- <fo:table-cell text-align="{@align}">
3226
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3227
+ <xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3228
+ <xsl:attribute name="padding">0mm</xsl:attribute>
3229
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
3230
+ </xsl:if>
3194
3231
  <xsl:attribute name="text-align">
3195
3232
  <xsl:choose>
3196
3233
  <xsl:when test="@align">
@@ -3210,24 +3247,25 @@
3210
3247
  </xsl:attribute>
3211
3248
  </xsl:if>
3212
3249
 
3213
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3250
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3214
3251
  <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
3215
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3216
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])"> <!-- 2nd line and below -->
3252
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3253
+ <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
3217
3254
  <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3218
3255
  </xsl:if>
3219
- </xsl:if>
3256
+ </xsl:if> -->
3257
+ <!-- 2nd line and below -->
3220
3258
 
3221
3259
  <fo:block>
3222
3260
  <xsl:apply-templates/>
3223
3261
  </fo:block>
3224
3262
  </fo:table-cell>
3225
3263
  </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
3226
- <fo:block font-size="11pt" font-weight="bold" text-align="center" margin-bottom="4pt">
3264
+ <fo:block font-size="11pt" font-weight="bold"> <!-- margin-bottom="4pt" text-align="center" -->
3227
3265
  <xsl:apply-templates/>
3228
3266
  </fo:block>
3229
- </xsl:template><xsl:template match="*[local-name() = 'p'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
3230
- <fo:block margin-bottom="10pt">
3267
+ </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
3268
+ <fo:block> <!-- margin-bottom="10pt" -->
3231
3269
  <xsl:apply-templates/>
3232
3270
  </fo:block>
3233
3271
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
@@ -3568,6 +3606,44 @@
3568
3606
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
3569
3607
  <fo:block><xsl:apply-templates/></fo:block>
3570
3608
  </fo:table-cell>
3609
+ </xsl:template><xsl:template name="processBibitem">
3610
+
3611
+ </xsl:template><xsl:template name="processPersonalAuthor">
3612
+ <xsl:choose>
3613
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
3614
+ <author>
3615
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
3616
+ </author>
3617
+ </xsl:when>
3618
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
3619
+ <author>
3620
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3621
+ <xsl:text> </xsl:text>
3622
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
3623
+ </author>
3624
+ </xsl:when>
3625
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
3626
+ <author>
3627
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3628
+ <xsl:text> </xsl:text>
3629
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
3630
+ </author>
3631
+ </xsl:when>
3632
+ <xsl:otherwise>
3633
+ <xsl:apply-templates/>
3634
+ </xsl:otherwise>
3635
+ </xsl:choose>
3636
+ </xsl:template><xsl:template name="renderDate">
3637
+ <xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
3638
+ <xsl:value-of select="*[local-name() = 'on']"/>
3639
+ </xsl:if>
3640
+ <xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
3641
+ <xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
3642
+ </xsl:if>
3643
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
3644
+ <xsl:value-of select="translate(.,'. ','')"/>
3645
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
3646
+ <xsl:value-of select="substring(.,1,1)"/>
3571
3647
  </xsl:template><xsl:template name="convertDate">
3572
3648
  <xsl:param name="date"/>
3573
3649
  <xsl:param name="format" select="'short'"/>
@@ -2353,14 +2353,36 @@
2353
2353
  <fo:table-cell>
2354
2354
  <fo:block>
2355
2355
 
2356
-
2356
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2357
+ <xsl:if test="local-name(*[1]) != 'stem'">
2358
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2359
+ </xsl:if>
2360
+ </xsl:if> -->
2357
2361
 
2358
2362
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2359
2363
 
2360
2364
  </fo:block>
2361
2365
  </fo:table-cell>
2362
2366
  </fo:table-row>
2363
-
2367
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2368
+ <xsl:if test="local-name(*[1]) = 'stem'">
2369
+ <fo:table-row>
2370
+ <fo:table-cell>
2371
+ <fo:block margin-top="6pt">
2372
+ <xsl:if test="normalize-space($key_iso) = 'true'">
2373
+ <xsl:attribute name="margin-top">0</xsl:attribute>
2374
+ </xsl:if>
2375
+ <xsl:text>&#xA0;</xsl:text>
2376
+ </fo:block>
2377
+ </fo:table-cell>
2378
+ <fo:table-cell>
2379
+ <fo:block>
2380
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2381
+ </fo:block>
2382
+ </fo:table-cell>
2383
+ </fo:table-row>
2384
+ </xsl:if>
2385
+ </xsl:if> -->
2364
2386
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
2365
2387
  <xsl:apply-templates/>
2366
2388
  </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
@@ -3121,22 +3143,30 @@
3121
3143
  </fo:block>
3122
3144
  </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3123
3145
  <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
3146
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3147
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
3148
+ </xsl:if>
3124
3149
  <fo:block-container margin-left="0mm" margin-right="0mm">
3125
- <fo:table id="{@id}" table-layout="fixed" width="100%" border="0pt solid black">
3150
+ <fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black">
3151
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3152
+ <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
3153
+ </xsl:if>
3126
3154
  <xsl:variable name="simple-table">
3127
3155
  <xsl:call-template name="getSimpleTable"/>
3128
3156
  </xsl:variable>
3129
3157
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
3130
3158
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
3131
- <fo:table-column column-width="35mm"/>
3132
- <fo:table-column column-width="115mm"/>
3159
+ <!-- <fo:table-column column-width="35mm"/>
3160
+ <fo:table-column column-width="115mm"/> -->
3161
+ <fo:table-column column-width="25%"/>
3162
+ <fo:table-column column-width="75%"/>
3133
3163
  </xsl:if>
3134
3164
  <xsl:apply-templates mode="requirement"/>
3135
3165
  </fo:table>
3136
3166
  <!-- fn processing -->
3137
3167
  <xsl:if test=".//*[local-name() = 'fn']">
3138
3168
  <xsl:for-each select="*[local-name() = 'tbody']">
3139
- <fo:block font-size="90%" border-bottom="1.pt solid black">
3169
+ <fo:block font-size="90%" border-bottom="1pt solid black">
3140
3170
  <xsl:call-template name="fn_display"/>
3141
3171
  </fo:block>
3142
3172
  </xsl:for-each>
@@ -3152,17 +3182,20 @@
3152
3182
  <xsl:apply-templates mode="requirement"/>
3153
3183
  </fo:table-body>
3154
3184
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
3155
- <fo:table-row>
3185
+ <fo:table-row height="7mm">
3186
+ <xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])">
3187
+ <xsl:attribute name="border">1pt solid black</xsl:attribute>
3188
+ </xsl:if>
3156
3189
  <xsl:apply-templates mode="requirement"/>
3157
3190
  </fo:table-row>
3158
3191
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
3159
- <fo:table-cell text-align="{@align}">
3192
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3160
3193
  <xsl:attribute name="text-align">
3161
3194
  <xsl:choose>
3162
3195
  <xsl:when test="@align">
3163
3196
  <xsl:value-of select="@align"/>
3164
3197
  </xsl:when>
3165
- <xsl:otherwise>center</xsl:otherwise>
3198
+ <xsl:otherwise>left</xsl:otherwise>
3166
3199
  </xsl:choose>
3167
3200
  </xsl:attribute>
3168
3201
  <xsl:if test="@colspan">
@@ -3176,21 +3209,25 @@
3176
3209
  </xsl:attribute>
3177
3210
  </xsl:if>
3178
3211
 
3179
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3212
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3180
3213
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3181
3214
  <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
3182
3215
  </xsl:if>
3183
3216
  <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
3184
3217
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3185
3218
  <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3186
- </xsl:if>
3219
+ </xsl:if> -->
3187
3220
 
3188
3221
  <fo:block>
3189
3222
  <xsl:apply-templates/>
3190
3223
  </fo:block>
3191
3224
  </fo:table-cell>
3192
3225
  </xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
3193
- <fo:table-cell text-align="{@align}">
3226
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3227
+ <xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3228
+ <xsl:attribute name="padding">0mm</xsl:attribute>
3229
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
3230
+ </xsl:if>
3194
3231
  <xsl:attribute name="text-align">
3195
3232
  <xsl:choose>
3196
3233
  <xsl:when test="@align">
@@ -3210,24 +3247,25 @@
3210
3247
  </xsl:attribute>
3211
3248
  </xsl:if>
3212
3249
 
3213
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3250
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3214
3251
  <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
3215
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3216
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])"> <!-- 2nd line and below -->
3252
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3253
+ <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
3217
3254
  <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3218
3255
  </xsl:if>
3219
- </xsl:if>
3256
+ </xsl:if> -->
3257
+ <!-- 2nd line and below -->
3220
3258
 
3221
3259
  <fo:block>
3222
3260
  <xsl:apply-templates/>
3223
3261
  </fo:block>
3224
3262
  </fo:table-cell>
3225
3263
  </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
3226
- <fo:block font-size="11pt" font-weight="bold" text-align="center" margin-bottom="4pt">
3264
+ <fo:block font-size="11pt" font-weight="bold"> <!-- margin-bottom="4pt" text-align="center" -->
3227
3265
  <xsl:apply-templates/>
3228
3266
  </fo:block>
3229
- </xsl:template><xsl:template match="*[local-name() = 'p'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
3230
- <fo:block margin-bottom="10pt">
3267
+ </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
3268
+ <fo:block> <!-- margin-bottom="10pt" -->
3231
3269
  <xsl:apply-templates/>
3232
3270
  </fo:block>
3233
3271
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
@@ -3568,6 +3606,44 @@
3568
3606
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
3569
3607
  <fo:block><xsl:apply-templates/></fo:block>
3570
3608
  </fo:table-cell>
3609
+ </xsl:template><xsl:template name="processBibitem">
3610
+
3611
+ </xsl:template><xsl:template name="processPersonalAuthor">
3612
+ <xsl:choose>
3613
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
3614
+ <author>
3615
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
3616
+ </author>
3617
+ </xsl:when>
3618
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
3619
+ <author>
3620
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3621
+ <xsl:text> </xsl:text>
3622
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
3623
+ </author>
3624
+ </xsl:when>
3625
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
3626
+ <author>
3627
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3628
+ <xsl:text> </xsl:text>
3629
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
3630
+ </author>
3631
+ </xsl:when>
3632
+ <xsl:otherwise>
3633
+ <xsl:apply-templates/>
3634
+ </xsl:otherwise>
3635
+ </xsl:choose>
3636
+ </xsl:template><xsl:template name="renderDate">
3637
+ <xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
3638
+ <xsl:value-of select="*[local-name() = 'on']"/>
3639
+ </xsl:if>
3640
+ <xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
3641
+ <xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
3642
+ </xsl:if>
3643
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
3644
+ <xsl:value-of select="translate(.,'. ','')"/>
3645
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
3646
+ <xsl:value-of select="substring(.,1,1)"/>
3571
3647
  </xsl:template><xsl:template name="convertDate">
3572
3648
  <xsl:param name="date"/>
3573
3649
  <xsl:param name="format" select="'short'"/>
@@ -2323,14 +2323,36 @@
2323
2323
  <fo:table-cell>
2324
2324
  <fo:block>
2325
2325
 
2326
-
2326
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2327
+ <xsl:if test="local-name(*[1]) != 'stem'">
2328
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2329
+ </xsl:if>
2330
+ </xsl:if> -->
2327
2331
 
2328
2332
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2329
2333
 
2330
2334
  </fo:block>
2331
2335
  </fo:table-cell>
2332
2336
  </fo:table-row>
2333
-
2337
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2338
+ <xsl:if test="local-name(*[1]) = 'stem'">
2339
+ <fo:table-row>
2340
+ <fo:table-cell>
2341
+ <fo:block margin-top="6pt">
2342
+ <xsl:if test="normalize-space($key_iso) = 'true'">
2343
+ <xsl:attribute name="margin-top">0</xsl:attribute>
2344
+ </xsl:if>
2345
+ <xsl:text>&#xA0;</xsl:text>
2346
+ </fo:block>
2347
+ </fo:table-cell>
2348
+ <fo:table-cell>
2349
+ <fo:block>
2350
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2351
+ </fo:block>
2352
+ </fo:table-cell>
2353
+ </fo:table-row>
2354
+ </xsl:if>
2355
+ </xsl:if> -->
2334
2356
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
2335
2357
  <xsl:apply-templates/>
2336
2358
  </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
@@ -3100,22 +3122,30 @@
3100
3122
  </fo:block>
3101
3123
  </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3102
3124
  <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
3125
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3126
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
3127
+ </xsl:if>
3103
3128
  <fo:block-container margin-left="0mm" margin-right="0mm">
3104
- <fo:table id="{@id}" table-layout="fixed" width="100%" border="0pt solid black">
3129
+ <fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black">
3130
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3131
+ <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
3132
+ </xsl:if>
3105
3133
  <xsl:variable name="simple-table">
3106
3134
  <xsl:call-template name="getSimpleTable"/>
3107
3135
  </xsl:variable>
3108
3136
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
3109
3137
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
3110
- <fo:table-column column-width="35mm"/>
3111
- <fo:table-column column-width="115mm"/>
3138
+ <!-- <fo:table-column column-width="35mm"/>
3139
+ <fo:table-column column-width="115mm"/> -->
3140
+ <fo:table-column column-width="25%"/>
3141
+ <fo:table-column column-width="75%"/>
3112
3142
  </xsl:if>
3113
3143
  <xsl:apply-templates mode="requirement"/>
3114
3144
  </fo:table>
3115
3145
  <!-- fn processing -->
3116
3146
  <xsl:if test=".//*[local-name() = 'fn']">
3117
3147
  <xsl:for-each select="*[local-name() = 'tbody']">
3118
- <fo:block font-size="90%" border-bottom="1.pt solid black">
3148
+ <fo:block font-size="90%" border-bottom="1pt solid black">
3119
3149
  <xsl:call-template name="fn_display"/>
3120
3150
  </fo:block>
3121
3151
  </xsl:for-each>
@@ -3131,17 +3161,20 @@
3131
3161
  <xsl:apply-templates mode="requirement"/>
3132
3162
  </fo:table-body>
3133
3163
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
3134
- <fo:table-row>
3164
+ <fo:table-row height="7mm">
3165
+ <xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])">
3166
+ <xsl:attribute name="border">1pt solid black</xsl:attribute>
3167
+ </xsl:if>
3135
3168
  <xsl:apply-templates mode="requirement"/>
3136
3169
  </fo:table-row>
3137
3170
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
3138
- <fo:table-cell text-align="{@align}">
3171
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3139
3172
  <xsl:attribute name="text-align">
3140
3173
  <xsl:choose>
3141
3174
  <xsl:when test="@align">
3142
3175
  <xsl:value-of select="@align"/>
3143
3176
  </xsl:when>
3144
- <xsl:otherwise>center</xsl:otherwise>
3177
+ <xsl:otherwise>left</xsl:otherwise>
3145
3178
  </xsl:choose>
3146
3179
  </xsl:attribute>
3147
3180
  <xsl:if test="@colspan">
@@ -3155,21 +3188,25 @@
3155
3188
  </xsl:attribute>
3156
3189
  </xsl:if>
3157
3190
 
3158
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3191
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3159
3192
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3160
3193
  <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
3161
3194
  </xsl:if>
3162
3195
  <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
3163
3196
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3164
3197
  <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3165
- </xsl:if>
3198
+ </xsl:if> -->
3166
3199
 
3167
3200
  <fo:block>
3168
3201
  <xsl:apply-templates/>
3169
3202
  </fo:block>
3170
3203
  </fo:table-cell>
3171
3204
  </xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
3172
- <fo:table-cell text-align="{@align}">
3205
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3206
+ <xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3207
+ <xsl:attribute name="padding">0mm</xsl:attribute>
3208
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
3209
+ </xsl:if>
3173
3210
  <xsl:attribute name="text-align">
3174
3211
  <xsl:choose>
3175
3212
  <xsl:when test="@align">
@@ -3189,24 +3226,25 @@
3189
3226
  </xsl:attribute>
3190
3227
  </xsl:if>
3191
3228
 
3192
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3229
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3193
3230
  <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
3194
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3195
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])"> <!-- 2nd line and below -->
3231
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3232
+ <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
3196
3233
  <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3197
3234
  </xsl:if>
3198
- </xsl:if>
3235
+ </xsl:if> -->
3236
+ <!-- 2nd line and below -->
3199
3237
 
3200
3238
  <fo:block>
3201
3239
  <xsl:apply-templates/>
3202
3240
  </fo:block>
3203
3241
  </fo:table-cell>
3204
3242
  </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
3205
- <fo:block font-size="11pt" font-weight="bold" text-align="center" margin-bottom="4pt">
3243
+ <fo:block font-size="11pt" font-weight="bold"> <!-- margin-bottom="4pt" text-align="center" -->
3206
3244
  <xsl:apply-templates/>
3207
3245
  </fo:block>
3208
- </xsl:template><xsl:template match="*[local-name() = 'p'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
3209
- <fo:block margin-bottom="10pt">
3246
+ </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
3247
+ <fo:block> <!-- margin-bottom="10pt" -->
3210
3248
  <xsl:apply-templates/>
3211
3249
  </fo:block>
3212
3250
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
@@ -3547,6 +3585,44 @@
3547
3585
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
3548
3586
  <fo:block><xsl:apply-templates/></fo:block>
3549
3587
  </fo:table-cell>
3588
+ </xsl:template><xsl:template name="processBibitem">
3589
+
3590
+ </xsl:template><xsl:template name="processPersonalAuthor">
3591
+ <xsl:choose>
3592
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
3593
+ <author>
3594
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
3595
+ </author>
3596
+ </xsl:when>
3597
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
3598
+ <author>
3599
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3600
+ <xsl:text> </xsl:text>
3601
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
3602
+ </author>
3603
+ </xsl:when>
3604
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
3605
+ <author>
3606
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3607
+ <xsl:text> </xsl:text>
3608
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
3609
+ </author>
3610
+ </xsl:when>
3611
+ <xsl:otherwise>
3612
+ <xsl:apply-templates/>
3613
+ </xsl:otherwise>
3614
+ </xsl:choose>
3615
+ </xsl:template><xsl:template name="renderDate">
3616
+ <xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
3617
+ <xsl:value-of select="*[local-name() = 'on']"/>
3618
+ </xsl:if>
3619
+ <xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
3620
+ <xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
3621
+ </xsl:if>
3622
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
3623
+ <xsl:value-of select="translate(.,'. ','')"/>
3624
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
3625
+ <xsl:value-of select="substring(.,1,1)"/>
3550
3626
  </xsl:template><xsl:template name="convertDate">
3551
3627
  <xsl:param name="date"/>
3552
3628
  <xsl:param name="format" select="'short'"/>
@@ -67,6 +67,7 @@ module IsoDoc
67
67
  body.div **{ class: "WordSection2" } do |div2|
68
68
  info docxml, div2
69
69
  boilerplate docxml, div2
70
+ preface_block docxml, div2
70
71
  abstract docxml, div2
71
72
  foreword docxml, div2
72
73
  introduction docxml, div2
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module UN
3
- VERSION = "0.5.1"
3
+ VERSION = "0.5.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-un
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.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: roman-numerals