metanorma-m3aawg 1.7.9 → 1.7.10

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: 8f4554afad1a13829cd3e450943ce87357dced255dbe6a18e24e1d974176c9bb
4
- data.tar.gz: b238369150c6ecb7b7950f23d7a9db8994004229bb036786756979e56290f641
3
+ metadata.gz: 2c22221721fd7f1d5d2bcfa0916606a836311a8d89d1c698cbffb52def53aa57
4
+ data.tar.gz: e94670e33058185bd681c67a1da16aa4c97dc9078fe6a1a7dbd1fa455f4f9085
5
5
  SHA512:
6
- metadata.gz: 552658ab36591fde8f46fae9e639f68432fc6c5cc2c25930dd04584f66d124a78dcb0f4fb40e883dd8d92ddf1ca468bc83c10e8bb11d79e40096f2c7b25be0eb
7
- data.tar.gz: 8ced9aa5eb541ad9a7ec6c35e29d4837755e0ed5520df50f8cd4960c1089f9881668f06c04716da934d7d9539b4b46ec632ff2d8daab885b45a63236964c0c69
6
+ metadata.gz: '058eda527fafac4a954b984bd25b4a6c7461289c45a3c89388a6eb557def3f88bd0a53a468b562dd2f5e7700eaa2f9cbf15c5e52c3667df38c9870d7fc545d46'
7
+ data.tar.gz: c59535c304c8f0296bea6145d2e78da35945c79de238f6b48eb90888b46d0f8b34803048ee2b23d3a121b05aa9347677a59e0a74c26f8cf3cf854405f1e32bb7
@@ -32,6 +32,18 @@
32
32
  <ref name="DocumentType"/>
33
33
  </element>
34
34
  </define>
35
+ <define name="section-title">
36
+ <element name="title">
37
+ <zeroOrMore>
38
+ <ref name="TextElement"/>
39
+ </zeroOrMore>
40
+ </element>
41
+ <zeroOrMore>
42
+ <element name="variant-title">
43
+ <ref name="TypedTitleString"/>
44
+ </element>
45
+ </zeroOrMore>
46
+ </define>
35
47
  <define name="hyperlink">
36
48
  <element name="link">
37
49
  <attribute name="target">
@@ -158,15 +170,17 @@
158
170
  <data type="boolean"/>
159
171
  </attribute>
160
172
  </optional>
161
- <attribute name="type">
162
- <choice>
163
- <value>roman</value>
164
- <value>alphabet</value>
165
- <value>arabic</value>
166
- <value>roman_upper</value>
167
- <value>alphabet_upper</value>
168
- </choice>
169
- </attribute>
173
+ <optional>
174
+ <attribute name="type">
175
+ <choice>
176
+ <value>roman</value>
177
+ <value>alphabet</value>
178
+ <value>arabic</value>
179
+ <value>roman_upper</value>
180
+ <value>alphabet_upper</value>
181
+ </choice>
182
+ </attribute>
183
+ </optional>
170
184
  <oneOrMore>
171
185
  <ref name="li"/>
172
186
  </oneOrMore>
@@ -114,7 +114,7 @@
114
114
  </fo:block>
115
115
  </fo:block-container>
116
116
  </fo:static-content>
117
- <fo:static-content flow-name="footer">
117
+ <fo:static-content flow-name="footer" role="artifact">
118
118
  <fo:block-container height="31mm" font-size="10pt">
119
119
  <fo:block text-align-last="justify" margin-top="2mm">
120
120
  <fo:inline font-weight="bold">
@@ -173,7 +173,7 @@
173
173
  </fo:inline>
174
174
  </fo:block>
175
175
 
176
- <fo:block font-size="22pt" margin-bottom="12pt">
176
+ <fo:block font-size="22pt" margin-bottom="12pt" role="H1">
177
177
  <xsl:value-of select="$title-en"/>
178
178
  </fo:block>
179
179
  <!-- Version 1.0 -->
@@ -225,8 +225,8 @@
225
225
  <xsl:with-param name="name" select="'title-toc'"/>
226
226
  </xsl:call-template>
227
227
  </xsl:variable>
228
- <fo:block font-size="12pt" font-weight="bold" text-decoration="underline" margin-bottom="4pt"><xsl:value-of select="$title-toc"/></fo:block>
229
- <fo:block font-size="10pt">
228
+ <fo:block font-size="12pt" font-weight="bold" text-decoration="underline" margin-bottom="4pt" role="H1"><xsl:value-of select="$title-toc"/></fo:block>
229
+ <fo:block font-size="10pt" role="TOC">
230
230
  <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
231
231
  <xsl:choose>
232
232
  <xsl:when test="@section = ''">
@@ -235,7 +235,7 @@
235
235
  <fo:table-body>
236
236
  <fo:table-row height="6mm">
237
237
  <fo:table-cell>
238
- <fo:block text-align-last="justify">
238
+ <fo:block text-align-last="justify" role="TOCI">
239
239
  <xsl:if test="@level = 1">
240
240
  <xsl:attribute name="font-weight">bold</xsl:attribute>
241
241
  </xsl:if>
@@ -261,7 +261,7 @@
261
261
  <fo:table-body>
262
262
  <fo:table-row height="6mm">
263
263
  <fo:table-cell>
264
- <fo:block font-weight="bold">
264
+ <fo:block font-weight="bold" role="TOCI">
265
265
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
266
266
  <xsl:choose>
267
267
  <!-- <xsl:when test="@section = ''">
@@ -279,7 +279,7 @@
279
279
  </fo:block>
280
280
  </fo:table-cell>
281
281
  <fo:table-cell>
282
- <fo:block text-align-last="justify">
282
+ <fo:block text-align-last="justify" role="TOCI">
283
283
  <xsl:if test="@level = 1">
284
284
  <xsl:attribute name="font-weight">bold</xsl:attribute>
285
285
  </xsl:if>
@@ -447,7 +447,10 @@
447
447
  <!-- ====== -->
448
448
 
449
449
  <xsl:template match="m3d:boilerplate//m3d:title">
450
- <fo:block font-size="14pt" font-weight="bold" text-align="center" margin-top="12pt" margin-bottom="15.5pt" keep-with-next="always">
450
+ <xsl:variable name="level">
451
+ <xsl:call-template name="getLevel"/>
452
+ </xsl:variable>
453
+ <fo:block font-size="14pt" font-weight="bold" text-align="center" margin-top="12pt" margin-bottom="15.5pt" keep-with-next="always" role="H{$level}">
451
454
  <xsl:apply-templates/>
452
455
  </fo:block>
453
456
  </xsl:template>
@@ -463,8 +466,9 @@
463
466
  <xsl:otherwise>12pt</xsl:otherwise>
464
467
  </xsl:choose>
465
468
  </xsl:variable>
466
- <fo:block font-size="{$font-size}" text-align="center" margin-bottom="24pt" keep-with-next="always">
469
+ <fo:block font-size="{$font-size}" text-align="center" margin-bottom="24pt" keep-with-next="always" role="H1">
467
470
  <xsl:apply-templates/>
471
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
468
472
  </fo:block>
469
473
  </xsl:template>
470
474
 
@@ -511,8 +515,10 @@
511
515
  </xsl:choose>
512
516
  </xsl:attribute>
513
517
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
518
+ <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
514
519
 
515
520
  <xsl:apply-templates/>
521
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
516
522
 
517
523
  </xsl:element>
518
524
 
@@ -1066,6 +1072,7 @@
1066
1072
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1067
1073
  <xsl:attribute name="white-space">pre</xsl:attribute>
1068
1074
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
1075
+ <xsl:attribute name="role">Code</xsl:attribute>
1069
1076
 
1070
1077
 
1071
1078
 
@@ -1090,8 +1097,13 @@
1090
1097
 
1091
1098
  </xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
1092
1099
 
1093
- </xsl:attribute-set><xsl:attribute-set name="requirement-subject-style">
1094
- </xsl:attribute-set><xsl:attribute-set name="requirement-inherit-style">
1100
+ </xsl:attribute-set><xsl:attribute-set name="subject-style">
1101
+ </xsl:attribute-set><xsl:attribute-set name="inherit-style">
1102
+ </xsl:attribute-set><xsl:attribute-set name="description-style">
1103
+ </xsl:attribute-set><xsl:attribute-set name="specification-style">
1104
+ </xsl:attribute-set><xsl:attribute-set name="measurement-target-style">
1105
+ </xsl:attribute-set><xsl:attribute-set name="verification-style">
1106
+ </xsl:attribute-set><xsl:attribute-set name="import-style">
1095
1107
  </xsl:attribute-set><xsl:attribute-set name="recommendation-style">
1096
1108
 
1097
1109
 
@@ -1303,7 +1315,8 @@
1303
1315
 
1304
1316
 
1305
1317
 
1306
- </xsl:attribute-set><xsl:attribute-set name="quote-style">
1318
+ </xsl:attribute-set><xsl:attribute-set name="quote-style">
1319
+ <xsl:attribute name="role">BlockQuote</xsl:attribute>
1307
1320
 
1308
1321
 
1309
1322
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
@@ -1503,7 +1516,9 @@
1503
1516
 
1504
1517
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1505
1518
 
1506
-
1519
+
1520
+
1521
+
1507
1522
 
1508
1523
  <xsl:call-template name="fn_name_display"/>
1509
1524
 
@@ -3356,16 +3371,68 @@
3356
3371
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
3357
3372
  </xsl:call-template>
3358
3373
 
3374
+
3375
+
3359
3376
  <xsl:variable name="mathml">
3360
3377
  <xsl:apply-templates select="." mode="mathml"/>
3361
3378
  </xsl:variable>
3362
3379
  <fo:instream-foreign-object fox:alt-text="Math">
3363
3380
 
3364
3381
 
3382
+ <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
3383
+ <xsl:variable name="comment_text_">
3384
+ <xsl:choose>
3385
+ <xsl:when test="normalize-space($comment_text_following) != ''">
3386
+ <xsl:value-of select="$comment_text_following"/>
3387
+ </xsl:when>
3388
+ <xsl:otherwise>
3389
+ <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/>
3390
+ </xsl:otherwise>
3391
+ </xsl:choose>
3392
+ </xsl:variable>
3393
+ <xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
3394
+
3395
+ <xsl:if test="normalize-space($comment_text) != ''">
3396
+ <!-- put Mathin Alternate Text -->
3397
+ <xsl:attribute name="fox:alt-text">
3398
+ <xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
3399
+ </xsl:attribute>
3400
+ </xsl:if>
3401
+
3402
+ <xsl:variable name="mathml_content">
3403
+ <xsl:apply-templates select="." mode="mathml_actual_text"/>
3404
+ </xsl:variable>
3405
+ <!-- put MathML in Actual Text -->
3406
+ <xsl:attribute name="fox:actual-text">
3407
+ <xsl:value-of select="$mathml_content"/>
3408
+ </xsl:attribute>
3409
+
3410
+
3365
3411
  <!-- <xsl:copy-of select="."/> -->
3366
3412
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
3367
3413
  </fo:instream-foreign-object>
3368
3414
  </fo:inline>
3415
+ </xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
3416
+ <!-- <xsl:text>a+b</xsl:text> -->
3417
+ <xsl:text>&lt;</xsl:text>
3418
+ <xsl:value-of select="local-name()"/>
3419
+ <xsl:if test="local-name() = 'math'">
3420
+ <xsl:text> xmlns="http://www.w3.org/1998/Math/MathML"</xsl:text>
3421
+ </xsl:if>
3422
+ <xsl:for-each select="@*">
3423
+ <xsl:text> </xsl:text>
3424
+ <xsl:value-of select="local-name()"/>
3425
+ <xsl:text>="</xsl:text>
3426
+ <xsl:value-of select="."/>
3427
+ <xsl:text>"</xsl:text>
3428
+ </xsl:for-each>
3429
+ <xsl:text>&gt;</xsl:text>
3430
+ <xsl:apply-templates mode="mathml_actual_text"/>
3431
+ <xsl:text>&lt;/</xsl:text>
3432
+ <xsl:value-of select="local-name()"/>
3433
+ <xsl:text>&gt;</xsl:text>
3434
+ </xsl:template><xsl:template match="text()" mode="mathml_actual_text">
3435
+ <xsl:value-of select="normalize-space()"/>
3369
3436
  </xsl:template><xsl:template match="@*|node()" mode="mathml">
3370
3437
  <xsl:copy>
3371
3438
  <xsl:apply-templates select="@*|node()" mode="mathml"/>
@@ -3427,7 +3494,10 @@
3427
3494
  </fo:block>
3428
3495
  <xsl:apply-templates/>
3429
3496
  </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
3430
- <fo:inline><xsl:apply-templates/></fo:inline>
3497
+ <xsl:variable name="level">
3498
+ <xsl:call-template name="getLevel"/>
3499
+ </xsl:variable>
3500
+ <fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
3431
3501
  </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
3432
3502
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
3433
3503
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
@@ -3462,9 +3532,10 @@
3462
3532
 
3463
3533
  </xsl:variable>
3464
3534
 
3535
+ <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
3465
3536
  <xsl:choose>
3466
- <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
3467
- <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
3537
+ <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
3538
+ <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
3468
3539
  </xsl:choose>
3469
3540
  <xsl:apply-templates/>
3470
3541
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
@@ -3614,7 +3685,10 @@
3614
3685
  </fo:block>
3615
3686
  </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
3616
3687
  <xsl:if test="normalize-space() != ''">
3617
- <fo:inline>
3688
+ <xsl:variable name="level">
3689
+ <xsl:call-template name="getLevelTermName"/>
3690
+ </xsl:variable>
3691
+ <fo:inline role="H{$level}">
3618
3692
  <xsl:apply-templates/>
3619
3693
  <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
3620
3694
  <xsl:text>.</xsl:text>
@@ -4245,6 +4319,7 @@
4245
4319
  </xsl:when>
4246
4320
  <xsl:otherwise>
4247
4321
  <xsl:apply-templates/>
4322
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
4248
4323
  </xsl:otherwise>
4249
4324
  </xsl:choose>
4250
4325
  </fo:block>
@@ -4385,14 +4460,6 @@
4385
4460
  <fo:block>
4386
4461
  <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
4387
4462
  </fo:block>
4388
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
4389
- <fo:block xsl:use-attribute-sets="requirement-subject-style">
4390
- <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
4391
- </fo:block>
4392
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
4393
- <fo:block xsl:use-attribute-sets="requirement-inherit-style">
4394
- <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
4395
- </fo:block>
4396
4463
  </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
4397
4464
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
4398
4465
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
@@ -4409,6 +4476,38 @@
4409
4476
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
4410
4477
  <xsl:apply-templates/>
4411
4478
  </fo:block>
4479
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
4480
+ <fo:block xsl:use-attribute-sets="subject-style">
4481
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
4482
+ </fo:block>
4483
+ </xsl:template><xsl:template match="*[local-name() = 'subject']">
4484
+ <fo:block xsl:use-attribute-sets="subject-style">
4485
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
4486
+ </fo:block>
4487
+ </xsl:template><xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
4488
+ <fo:block xsl:use-attribute-sets="inherit-style">
4489
+ <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
4490
+ </fo:block>
4491
+ </xsl:template><xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
4492
+ <fo:block xsl:use-attribute-sets="description-style">
4493
+ <xsl:apply-templates/>
4494
+ </fo:block>
4495
+ </xsl:template><xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
4496
+ <fo:block xsl:use-attribute-sets="specification-style">
4497
+ <xsl:apply-templates/>
4498
+ </fo:block>
4499
+ </xsl:template><xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
4500
+ <fo:block xsl:use-attribute-sets="measurement-target-style">
4501
+ <xsl:apply-templates/>
4502
+ </fo:block>
4503
+ </xsl:template><xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
4504
+ <fo:block xsl:use-attribute-sets="verification-style">
4505
+ <xsl:apply-templates/>
4506
+ </fo:block>
4507
+ </xsl:template><xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
4508
+ <fo:block xsl:use-attribute-sets="import-style">
4509
+ <xsl:apply-templates/>
4510
+ </fo:block>
4412
4511
  </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
4413
4512
  <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
4414
4513
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
@@ -5274,6 +5373,9 @@
5274
5373
  <fo:block-container border="1pt solid black" width="50%">
5275
5374
  <fo:block> </fo:block>
5276
5375
  </fo:block-container>
5376
+ </xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
5377
+ <fo:inline padding-right="5mm"> </fo:inline>
5378
+ <fo:inline><xsl:apply-templates/></fo:inline>
5277
5379
  </xsl:template><xsl:template name="convertDate">
5278
5380
  <xsl:param name="date"/>
5279
5381
  <xsl:param name="format" select="'short'"/>
@@ -5512,6 +5614,26 @@
5512
5614
  <xsl:value-of select="$level"/>
5513
5615
  </xsl:otherwise>
5514
5616
  </xsl:choose>
5617
+ </xsl:template><xsl:template name="getLevelTermName">
5618
+ <xsl:choose>
5619
+ <xsl:when test="normalize-space(../@depth) != ''">
5620
+ <xsl:value-of select="../@depth"/>
5621
+ </xsl:when>
5622
+ <xsl:otherwise>
5623
+ <xsl:variable name="title_level_">
5624
+ <xsl:for-each select="../preceding-sibling::*[local-name() = 'title'][1]">
5625
+ <xsl:call-template name="getLevel"/>
5626
+ </xsl:for-each>
5627
+ </xsl:variable>
5628
+ <xsl:variable name="title_level" select="normalize-space($title_level_)"/>
5629
+ <xsl:choose>
5630
+ <xsl:when test="$title_level != ''"><xsl:value-of select="$title_level + 1"/></xsl:when>
5631
+ <xsl:otherwise>
5632
+ <xsl:call-template name="getLevel"/>
5633
+ </xsl:otherwise>
5634
+ </xsl:choose>
5635
+ </xsl:otherwise>
5636
+ </xsl:choose>
5515
5637
  </xsl:template><xsl:template name="split">
5516
5638
  <xsl:param name="pText" select="."/>
5517
5639
  <xsl:param name="sep" select="','"/>
@@ -114,7 +114,7 @@
114
114
  </fo:block>
115
115
  </fo:block-container>
116
116
  </fo:static-content>
117
- <fo:static-content flow-name="footer">
117
+ <fo:static-content flow-name="footer" role="artifact">
118
118
  <fo:block-container height="31mm" font-size="10pt">
119
119
  <fo:block text-align-last="justify" margin-top="2mm">
120
120
  <fo:inline font-weight="bold">
@@ -173,7 +173,7 @@
173
173
  </fo:inline>
174
174
  </fo:block>
175
175
 
176
- <fo:block font-size="22pt" margin-bottom="12pt">
176
+ <fo:block font-size="22pt" margin-bottom="12pt" role="H1">
177
177
  <xsl:value-of select="$title-en"/>
178
178
  </fo:block>
179
179
  <!-- Version 1.0 -->
@@ -225,8 +225,8 @@
225
225
  <xsl:with-param name="name" select="'title-toc'"/>
226
226
  </xsl:call-template>
227
227
  </xsl:variable>
228
- <fo:block font-size="12pt" font-weight="bold" text-decoration="underline" margin-bottom="4pt"><xsl:value-of select="$title-toc"/></fo:block>
229
- <fo:block font-size="10pt">
228
+ <fo:block font-size="12pt" font-weight="bold" text-decoration="underline" margin-bottom="4pt" role="H1"><xsl:value-of select="$title-toc"/></fo:block>
229
+ <fo:block font-size="10pt" role="TOC">
230
230
  <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
231
231
  <xsl:choose>
232
232
  <xsl:when test="@section = ''">
@@ -235,7 +235,7 @@
235
235
  <fo:table-body>
236
236
  <fo:table-row height="6mm">
237
237
  <fo:table-cell>
238
- <fo:block text-align-last="justify">
238
+ <fo:block text-align-last="justify" role="TOCI">
239
239
  <xsl:if test="@level = 1">
240
240
  <xsl:attribute name="font-weight">bold</xsl:attribute>
241
241
  </xsl:if>
@@ -261,7 +261,7 @@
261
261
  <fo:table-body>
262
262
  <fo:table-row height="6mm">
263
263
  <fo:table-cell>
264
- <fo:block font-weight="bold">
264
+ <fo:block font-weight="bold" role="TOCI">
265
265
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
266
266
  <xsl:choose>
267
267
  <!-- <xsl:when test="@section = ''">
@@ -279,7 +279,7 @@
279
279
  </fo:block>
280
280
  </fo:table-cell>
281
281
  <fo:table-cell>
282
- <fo:block text-align-last="justify">
282
+ <fo:block text-align-last="justify" role="TOCI">
283
283
  <xsl:if test="@level = 1">
284
284
  <xsl:attribute name="font-weight">bold</xsl:attribute>
285
285
  </xsl:if>
@@ -447,7 +447,10 @@
447
447
  <!-- ====== -->
448
448
 
449
449
  <xsl:template match="m3d:boilerplate//m3d:title">
450
- <fo:block font-size="14pt" font-weight="bold" text-align="center" margin-top="12pt" margin-bottom="15.5pt" keep-with-next="always">
450
+ <xsl:variable name="level">
451
+ <xsl:call-template name="getLevel"/>
452
+ </xsl:variable>
453
+ <fo:block font-size="14pt" font-weight="bold" text-align="center" margin-top="12pt" margin-bottom="15.5pt" keep-with-next="always" role="H{$level}">
451
454
  <xsl:apply-templates/>
452
455
  </fo:block>
453
456
  </xsl:template>
@@ -463,8 +466,9 @@
463
466
  <xsl:otherwise>12pt</xsl:otherwise>
464
467
  </xsl:choose>
465
468
  </xsl:variable>
466
- <fo:block font-size="{$font-size}" text-align="center" margin-bottom="24pt" keep-with-next="always">
469
+ <fo:block font-size="{$font-size}" text-align="center" margin-bottom="24pt" keep-with-next="always" role="H1">
467
470
  <xsl:apply-templates/>
471
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
468
472
  </fo:block>
469
473
  </xsl:template>
470
474
 
@@ -511,8 +515,10 @@
511
515
  </xsl:choose>
512
516
  </xsl:attribute>
513
517
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
518
+ <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
514
519
 
515
520
  <xsl:apply-templates/>
521
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
516
522
 
517
523
  </xsl:element>
518
524
 
@@ -1066,6 +1072,7 @@
1066
1072
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1067
1073
  <xsl:attribute name="white-space">pre</xsl:attribute>
1068
1074
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
1075
+ <xsl:attribute name="role">Code</xsl:attribute>
1069
1076
 
1070
1077
 
1071
1078
 
@@ -1090,8 +1097,13 @@
1090
1097
 
1091
1098
  </xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
1092
1099
 
1093
- </xsl:attribute-set><xsl:attribute-set name="requirement-subject-style">
1094
- </xsl:attribute-set><xsl:attribute-set name="requirement-inherit-style">
1100
+ </xsl:attribute-set><xsl:attribute-set name="subject-style">
1101
+ </xsl:attribute-set><xsl:attribute-set name="inherit-style">
1102
+ </xsl:attribute-set><xsl:attribute-set name="description-style">
1103
+ </xsl:attribute-set><xsl:attribute-set name="specification-style">
1104
+ </xsl:attribute-set><xsl:attribute-set name="measurement-target-style">
1105
+ </xsl:attribute-set><xsl:attribute-set name="verification-style">
1106
+ </xsl:attribute-set><xsl:attribute-set name="import-style">
1095
1107
  </xsl:attribute-set><xsl:attribute-set name="recommendation-style">
1096
1108
 
1097
1109
 
@@ -1303,7 +1315,8 @@
1303
1315
 
1304
1316
 
1305
1317
 
1306
- </xsl:attribute-set><xsl:attribute-set name="quote-style">
1318
+ </xsl:attribute-set><xsl:attribute-set name="quote-style">
1319
+ <xsl:attribute name="role">BlockQuote</xsl:attribute>
1307
1320
 
1308
1321
 
1309
1322
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
@@ -1503,7 +1516,9 @@
1503
1516
 
1504
1517
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1505
1518
 
1506
-
1519
+
1520
+
1521
+
1507
1522
 
1508
1523
  <xsl:call-template name="fn_name_display"/>
1509
1524
 
@@ -3356,16 +3371,68 @@
3356
3371
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
3357
3372
  </xsl:call-template>
3358
3373
 
3374
+
3375
+
3359
3376
  <xsl:variable name="mathml">
3360
3377
  <xsl:apply-templates select="." mode="mathml"/>
3361
3378
  </xsl:variable>
3362
3379
  <fo:instream-foreign-object fox:alt-text="Math">
3363
3380
 
3364
3381
 
3382
+ <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
3383
+ <xsl:variable name="comment_text_">
3384
+ <xsl:choose>
3385
+ <xsl:when test="normalize-space($comment_text_following) != ''">
3386
+ <xsl:value-of select="$comment_text_following"/>
3387
+ </xsl:when>
3388
+ <xsl:otherwise>
3389
+ <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/>
3390
+ </xsl:otherwise>
3391
+ </xsl:choose>
3392
+ </xsl:variable>
3393
+ <xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
3394
+
3395
+ <xsl:if test="normalize-space($comment_text) != ''">
3396
+ <!-- put Mathin Alternate Text -->
3397
+ <xsl:attribute name="fox:alt-text">
3398
+ <xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
3399
+ </xsl:attribute>
3400
+ </xsl:if>
3401
+
3402
+ <xsl:variable name="mathml_content">
3403
+ <xsl:apply-templates select="." mode="mathml_actual_text"/>
3404
+ </xsl:variable>
3405
+ <!-- put MathML in Actual Text -->
3406
+ <xsl:attribute name="fox:actual-text">
3407
+ <xsl:value-of select="$mathml_content"/>
3408
+ </xsl:attribute>
3409
+
3410
+
3365
3411
  <!-- <xsl:copy-of select="."/> -->
3366
3412
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
3367
3413
  </fo:instream-foreign-object>
3368
3414
  </fo:inline>
3415
+ </xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
3416
+ <!-- <xsl:text>a+b</xsl:text> -->
3417
+ <xsl:text>&lt;</xsl:text>
3418
+ <xsl:value-of select="local-name()"/>
3419
+ <xsl:if test="local-name() = 'math'">
3420
+ <xsl:text> xmlns="http://www.w3.org/1998/Math/MathML"</xsl:text>
3421
+ </xsl:if>
3422
+ <xsl:for-each select="@*">
3423
+ <xsl:text> </xsl:text>
3424
+ <xsl:value-of select="local-name()"/>
3425
+ <xsl:text>="</xsl:text>
3426
+ <xsl:value-of select="."/>
3427
+ <xsl:text>"</xsl:text>
3428
+ </xsl:for-each>
3429
+ <xsl:text>&gt;</xsl:text>
3430
+ <xsl:apply-templates mode="mathml_actual_text"/>
3431
+ <xsl:text>&lt;/</xsl:text>
3432
+ <xsl:value-of select="local-name()"/>
3433
+ <xsl:text>&gt;</xsl:text>
3434
+ </xsl:template><xsl:template match="text()" mode="mathml_actual_text">
3435
+ <xsl:value-of select="normalize-space()"/>
3369
3436
  </xsl:template><xsl:template match="@*|node()" mode="mathml">
3370
3437
  <xsl:copy>
3371
3438
  <xsl:apply-templates select="@*|node()" mode="mathml"/>
@@ -3427,7 +3494,10 @@
3427
3494
  </fo:block>
3428
3495
  <xsl:apply-templates/>
3429
3496
  </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
3430
- <fo:inline><xsl:apply-templates/></fo:inline>
3497
+ <xsl:variable name="level">
3498
+ <xsl:call-template name="getLevel"/>
3499
+ </xsl:variable>
3500
+ <fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
3431
3501
  </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
3432
3502
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
3433
3503
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
@@ -3462,9 +3532,10 @@
3462
3532
 
3463
3533
  </xsl:variable>
3464
3534
 
3535
+ <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
3465
3536
  <xsl:choose>
3466
- <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
3467
- <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
3537
+ <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
3538
+ <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
3468
3539
  </xsl:choose>
3469
3540
  <xsl:apply-templates/>
3470
3541
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
@@ -3614,7 +3685,10 @@
3614
3685
  </fo:block>
3615
3686
  </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
3616
3687
  <xsl:if test="normalize-space() != ''">
3617
- <fo:inline>
3688
+ <xsl:variable name="level">
3689
+ <xsl:call-template name="getLevelTermName"/>
3690
+ </xsl:variable>
3691
+ <fo:inline role="H{$level}">
3618
3692
  <xsl:apply-templates/>
3619
3693
  <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
3620
3694
  <xsl:text>.</xsl:text>
@@ -4245,6 +4319,7 @@
4245
4319
  </xsl:when>
4246
4320
  <xsl:otherwise>
4247
4321
  <xsl:apply-templates/>
4322
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
4248
4323
  </xsl:otherwise>
4249
4324
  </xsl:choose>
4250
4325
  </fo:block>
@@ -4385,14 +4460,6 @@
4385
4460
  <fo:block>
4386
4461
  <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
4387
4462
  </fo:block>
4388
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
4389
- <fo:block xsl:use-attribute-sets="requirement-subject-style">
4390
- <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
4391
- </fo:block>
4392
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
4393
- <fo:block xsl:use-attribute-sets="requirement-inherit-style">
4394
- <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
4395
- </fo:block>
4396
4463
  </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
4397
4464
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
4398
4465
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
@@ -4409,6 +4476,38 @@
4409
4476
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
4410
4477
  <xsl:apply-templates/>
4411
4478
  </fo:block>
4479
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
4480
+ <fo:block xsl:use-attribute-sets="subject-style">
4481
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
4482
+ </fo:block>
4483
+ </xsl:template><xsl:template match="*[local-name() = 'subject']">
4484
+ <fo:block xsl:use-attribute-sets="subject-style">
4485
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
4486
+ </fo:block>
4487
+ </xsl:template><xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
4488
+ <fo:block xsl:use-attribute-sets="inherit-style">
4489
+ <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
4490
+ </fo:block>
4491
+ </xsl:template><xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
4492
+ <fo:block xsl:use-attribute-sets="description-style">
4493
+ <xsl:apply-templates/>
4494
+ </fo:block>
4495
+ </xsl:template><xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
4496
+ <fo:block xsl:use-attribute-sets="specification-style">
4497
+ <xsl:apply-templates/>
4498
+ </fo:block>
4499
+ </xsl:template><xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
4500
+ <fo:block xsl:use-attribute-sets="measurement-target-style">
4501
+ <xsl:apply-templates/>
4502
+ </fo:block>
4503
+ </xsl:template><xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
4504
+ <fo:block xsl:use-attribute-sets="verification-style">
4505
+ <xsl:apply-templates/>
4506
+ </fo:block>
4507
+ </xsl:template><xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
4508
+ <fo:block xsl:use-attribute-sets="import-style">
4509
+ <xsl:apply-templates/>
4510
+ </fo:block>
4412
4511
  </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
4413
4512
  <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
4414
4513
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
@@ -5274,6 +5373,9 @@
5274
5373
  <fo:block-container border="1pt solid black" width="50%">
5275
5374
  <fo:block> </fo:block>
5276
5375
  </fo:block-container>
5376
+ </xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
5377
+ <fo:inline padding-right="5mm"> </fo:inline>
5378
+ <fo:inline><xsl:apply-templates/></fo:inline>
5277
5379
  </xsl:template><xsl:template name="convertDate">
5278
5380
  <xsl:param name="date"/>
5279
5381
  <xsl:param name="format" select="'short'"/>
@@ -5512,6 +5614,26 @@
5512
5614
  <xsl:value-of select="$level"/>
5513
5615
  </xsl:otherwise>
5514
5616
  </xsl:choose>
5617
+ </xsl:template><xsl:template name="getLevelTermName">
5618
+ <xsl:choose>
5619
+ <xsl:when test="normalize-space(../@depth) != ''">
5620
+ <xsl:value-of select="../@depth"/>
5621
+ </xsl:when>
5622
+ <xsl:otherwise>
5623
+ <xsl:variable name="title_level_">
5624
+ <xsl:for-each select="../preceding-sibling::*[local-name() = 'title'][1]">
5625
+ <xsl:call-template name="getLevel"/>
5626
+ </xsl:for-each>
5627
+ </xsl:variable>
5628
+ <xsl:variable name="title_level" select="normalize-space($title_level_)"/>
5629
+ <xsl:choose>
5630
+ <xsl:when test="$title_level != ''"><xsl:value-of select="$title_level + 1"/></xsl:when>
5631
+ <xsl:otherwise>
5632
+ <xsl:call-template name="getLevel"/>
5633
+ </xsl:otherwise>
5634
+ </xsl:choose>
5635
+ </xsl:otherwise>
5636
+ </xsl:choose>
5515
5637
  </xsl:template><xsl:template name="split">
5516
5638
  <xsl:param name="pText" select="."/>
5517
5639
  <xsl:param name="sep" select="','"/>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module M3AAWG
3
- VERSION = "1.7.9".freeze
3
+ VERSION = "1.7.10".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-m3aawg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.9
4
+ version: 1.7.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-16 00:00:00.000000000 Z
11
+ date: 2021-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities