metanorma-ribose 2.5.12 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ribose/ribose.standard.xsl +371 -97
- data/lib/metanorma/ribose/converter.rb +2 -2
- data/lib/metanorma/ribose/isodoc.rng +12 -6
- data/lib/metanorma/ribose/ribose.rng +27 -30
- data/lib/metanorma/ribose/version.rb +1 -1
- data/metanorma-ribose.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6564315d303f559c3b02f986dbdaf791a830048de59e7f1fd90ac66857b32ea5
|
4
|
+
data.tar.gz: c5f7df73fcfae2f7ec7b5d42ef6913a1efb23e534e715a772e636386bfdb5d57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9369ebd2fadda928159f17f61eaa4f8250c23dcbdd9bb8039265e0a623312bbc112ab5aaad3dfb6e4aa0fa27610206891b27318b2ee43ca9c8ea5e916dc6795
|
7
|
+
data.tar.gz: 691a58a3a08e9770b78aec5bd77657a53f0b8f0af7e556d1280ac607800c6d0707f846821dde6d045fbd67ca125ee11624ae13665d16b8f0b2ae45cbe4531b03
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ribose="https://www.metanorma.org/ns/
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ribose="https://www.metanorma.org/ns/standoc" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:redirect="http://xml.apache.org/xalan/redirect" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java redirect" extension-element-prefixes="redirect" version="1.0">
|
2
2
|
|
3
3
|
<xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/>
|
4
4
|
|
@@ -8,24 +8,24 @@
|
|
8
8
|
|
9
9
|
<xsl:variable name="color_blue">rgb(22, 97, 173)</xsl:variable>
|
10
10
|
|
11
|
-
<xsl:variable name="copyright_year" select="/ribose:
|
11
|
+
<xsl:variable name="copyright_year" select="/ribose:metanorma/ribose:bibdata/ribose:copyright/ribose:from"/>
|
12
12
|
|
13
13
|
<xsl:variable name="copyright">
|
14
14
|
<xsl:text>© </xsl:text>
|
15
15
|
<xsl:value-of select="$copyright_year"/>
|
16
16
|
<xsl:text> </xsl:text>
|
17
|
-
<xsl:value-of select="/ribose:
|
17
|
+
<xsl:value-of select="/ribose:metanorma/ribose:bibdata/ribose:copyright/ribose:owner/ribose:organization/ribose:name"/>
|
18
18
|
</xsl:variable>
|
19
19
|
|
20
20
|
<xsl:variable name="contents_">
|
21
21
|
<contents>
|
22
22
|
|
23
|
-
<xsl:apply-templates select="/ribose:
|
24
|
-
<xsl:apply-templates select="/ribose:
|
25
|
-
<xsl:apply-templates select="/ribose:
|
26
|
-
<xsl:apply-templates select="/ribose:
|
27
|
-
<xsl:apply-templates select="/ribose:
|
28
|
-
<xsl:apply-templates select="/ribose:
|
23
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:preface/ribose:abstract" mode="contents"/>
|
24
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:preface/ribose:foreword" mode="contents"/>
|
25
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:preface/ribose:executivesummary" mode="contents"/>
|
26
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:preface/ribose:introduction" mode="contents"/>
|
27
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:preface/ribose:clause" mode="contents"/>
|
28
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:preface/ribose:acknowledgements" mode="contents"/>
|
29
29
|
|
30
30
|
<xsl:call-template name="processMainSectionsDefault_Contents"/>
|
31
31
|
|
@@ -35,11 +35,11 @@
|
|
35
35
|
<xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
|
36
36
|
|
37
37
|
<xsl:variable name="docnumber_version">
|
38
|
-
<xsl:value-of select="/ribose:
|
38
|
+
<xsl:value-of select="/ribose:metanorma/ribose:bibdata/ribose:docidentifier[@type = 'rsd' or @type = 'Ribose']"/>
|
39
39
|
<xsl:text>:</xsl:text>
|
40
40
|
<xsl:value-of select="$copyright_year"/>
|
41
41
|
|
42
|
-
<xsl:variable name="edition" select="normalize-space(/ribose:
|
42
|
+
<xsl:variable name="edition" select="normalize-space(/ribose:metanorma/ribose:bibdata/ribose:edition[normalize-space(@language) = ''])"/>
|
43
43
|
<xsl:if test="$edition != ''">
|
44
44
|
<xsl:variable name="title-version">
|
45
45
|
<xsl:call-template name="capitalize">
|
@@ -362,7 +362,7 @@
|
|
362
362
|
<fo:table-cell display-align="before" border-right="0.5pt solid black" padding-top="1.5mm" padding-right="5mm">
|
363
363
|
<!-- Author's list -->
|
364
364
|
<fo:block>
|
365
|
-
<xsl:for-each select="/ribose:
|
365
|
+
<xsl:for-each select="/ribose:metanorma/ribose:bibdata/ribose:contributor[ribose:role/@type='author']/ribose:person/ribose:name/ribose:completename">
|
366
366
|
<fo:block>
|
367
367
|
<xsl:apply-templates/>
|
368
368
|
</fo:block>
|
@@ -371,20 +371,20 @@
|
|
371
371
|
</fo:table-cell>
|
372
372
|
<fo:table-cell display-align="before" padding-top="1.5mm" padding-left="8mm">
|
373
373
|
<fo:block>
|
374
|
-
<xsl:apply-templates select="/ribose:
|
374
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:bibdata/ribose:ext/ribose:security"/>
|
375
375
|
<fo:block>
|
376
376
|
<xsl:call-template name="convertDate">
|
377
|
-
<xsl:with-param name="date" select="/ribose:
|
377
|
+
<xsl:with-param name="date" select="/ribose:metanorma/ribose:bibdata/ribose:date[@type = 'published']/ribose:on"/>
|
378
378
|
<xsl:with-param name="format" select="'Month DD, YYYY'"/>
|
379
379
|
</xsl:call-template>
|
380
380
|
</fo:block>
|
381
381
|
<fo:block><xsl:value-of select="$docnumber_version"/></fo:block>
|
382
|
-
<xsl:apply-templates select="/ribose:
|
382
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:bibdata/ribose:ext/ribose:editorialgroup/ribose:committee"/>
|
383
383
|
<fo:block>
|
384
384
|
<xsl:text>© </xsl:text>
|
385
385
|
<xsl:value-of select="$copyright_year"/>
|
386
386
|
<xsl:text> </xsl:text>
|
387
|
-
<xsl:variable name="publisher" select="/ribose:
|
387
|
+
<xsl:variable name="publisher" select="/ribose:metanorma/ribose:bibdata/ribose:contributor[ribose:role/@type='publisher']/ribose:organization/ribose:name"/>
|
388
388
|
<xsl:value-of select="$publisher"/>
|
389
389
|
<xsl:if test="substring($publisher, string-length($publisher)) != '.'"><xsl:text>.</xsl:text></xsl:if>
|
390
390
|
<xsl:text> </xsl:text>
|
@@ -408,12 +408,12 @@
|
|
408
408
|
|
409
409
|
<!-- title and version -->
|
410
410
|
<fo:block-container margin-top="{$pageHeight - 279.4}mm" height="60mm" display-align="center">
|
411
|
-
<xsl:variable name="title" select="/ribose:
|
411
|
+
<xsl:variable name="title" select="/ribose:metanorma/ribose:bibdata/ribose:title[@language = $lang]"/>
|
412
412
|
<xsl:if test="string-length($title) > 80">
|
413
413
|
<xsl:attribute name="margin-right">-30mm</xsl:attribute>
|
414
414
|
</xsl:if>
|
415
415
|
<fo:block font-size="27pt" font-weight="bold" role="H1">
|
416
|
-
<xsl:apply-templates select="/ribose:
|
416
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:bibdata/ribose:title[@language = $lang]" mode="cover_page"/>
|
417
417
|
</fo:block>
|
418
418
|
<fo:block space-before="9pt" font-size="16.8pt" font-weight="600">
|
419
419
|
<xsl:value-of select="$docnumber_version"/>
|
@@ -437,20 +437,26 @@
|
|
437
437
|
<xsl:for-each select="xalan:nodeset($updated_xml)/*">
|
438
438
|
|
439
439
|
<!-- ToC pages -->
|
440
|
-
<
|
441
|
-
<xsl:
|
442
|
-
|
443
|
-
|
444
|
-
<fo:flow flow-name="xsl-region-body">
|
440
|
+
<xsl:variable name="toc_and_boilerplate">
|
441
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:preface/ribose:clause[@type = 'toc']"/>
|
442
|
+
|
443
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:boilerplate/ribose:legal-statement"/>
|
445
444
|
|
446
|
-
|
445
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:boilerplate/ribose:feedback-statement"/>
|
446
|
+
</xsl:variable>
|
447
447
|
|
448
|
-
|
448
|
+
<xsl:if test="normalize-space($toc_and_boilerplate) != ''">
|
449
|
+
<fo:page-sequence master-reference="document" force-page-count="no-force"> <!-- master-reference="toc" -->
|
450
|
+
<xsl:call-template name="insertHeaderFooter">
|
451
|
+
<xsl:with-param name="section">toc</xsl:with-param>
|
452
|
+
</xsl:call-template>
|
453
|
+
<fo:flow flow-name="xsl-region-body">
|
449
454
|
|
450
|
-
|
455
|
+
<xsl:copy-of select="$toc_and_boilerplate"/>
|
451
456
|
|
452
|
-
|
453
|
-
|
457
|
+
</fo:flow>
|
458
|
+
</fo:page-sequence>
|
459
|
+
</xsl:if>
|
454
460
|
<!-- ============== -->
|
455
461
|
<!-- END ToC pages -->
|
456
462
|
<!-- ============== -->
|
@@ -482,12 +488,12 @@
|
|
482
488
|
|
483
489
|
<fo:block line-height="130%">
|
484
490
|
|
485
|
-
<!-- <xsl:apply-templates select="/ribose:
|
486
|
-
<xsl:apply-templates select="/ribose:
|
487
|
-
<xsl:apply-templates select="/ribose:
|
488
|
-
<xsl:apply-templates select="/ribose:
|
489
|
-
<xsl:apply-templates select="/ribose:
|
490
|
-
<xsl:apply-templates select="/ribose:
|
491
|
+
<!-- <xsl:apply-templates select="/ribose:metanorma/ribose:preface/ribose:abstract" />
|
492
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:preface/ribose:foreword" />
|
493
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:preface/ribose:executivesummary" />
|
494
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:preface/ribose:introduction" />
|
495
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:preface/ribose:clause[not(@type = 'toc')]" />
|
496
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:preface/ribose:acknowledgements" />
|
491
497
|
|
492
498
|
<xsl:call-template name="processMainSectionsDefault"/> -->
|
493
499
|
|
@@ -514,22 +520,22 @@
|
|
514
520
|
|
515
521
|
<xsl:element name="preface" namespace="{$namespace_full}"> <!-- save context element -->
|
516
522
|
|
517
|
-
<xsl:apply-templates select="/ribose:
|
523
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:preface/ribose:abstract" mode="update_xml_step_move_pagebreak">
|
518
524
|
<xsl:with-param name="page_sequence_at_top">true</xsl:with-param>
|
519
525
|
</xsl:apply-templates>
|
520
|
-
<xsl:apply-templates select="/ribose:
|
526
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:preface/ribose:foreword" mode="update_xml_step_move_pagebreak">
|
521
527
|
<xsl:with-param name="page_sequence_at_top">true</xsl:with-param>
|
522
528
|
</xsl:apply-templates>
|
523
|
-
<xsl:apply-templates select="/ribose:
|
529
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:preface/ribose:executivesummary" mode="update_xml_step_move_pagebreak">
|
524
530
|
<xsl:with-param name="page_sequence_at_top">true</xsl:with-param>
|
525
531
|
</xsl:apply-templates>
|
526
|
-
<xsl:apply-templates select="/ribose:
|
532
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:preface/ribose:introduction" mode="update_xml_step_move_pagebreak">
|
527
533
|
<xsl:with-param name="page_sequence_at_top">true</xsl:with-param>
|
528
534
|
</xsl:apply-templates>
|
529
|
-
<xsl:apply-templates select="/ribose:
|
535
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:preface/ribose:clause[not(@type = 'toc')]" mode="update_xml_step_move_pagebreak">
|
530
536
|
<xsl:with-param name="page_sequence_at_top">true</xsl:with-param>
|
531
537
|
</xsl:apply-templates>
|
532
|
-
<xsl:apply-templates select="/ribose:
|
538
|
+
<xsl:apply-templates select="/ribose:metanorma/ribose:preface/ribose:acknowledgements" mode="update_xml_step_move_pagebreak">
|
533
539
|
<xsl:with-param name="page_sequence_at_top">true</xsl:with-param>
|
534
540
|
</xsl:apply-templates>
|
535
541
|
|
@@ -1219,7 +1225,7 @@
|
|
1219
1225
|
<xsl:text>Ribose</xsl:text>
|
1220
1226
|
<xsl:text> </xsl:text>
|
1221
1227
|
<xsl:call-template name="capitalize">
|
1222
|
-
<xsl:with-param name="str" select="/ribose:
|
1228
|
+
<xsl:with-param name="str" select="/ribose:metanorma/ribose:bibdata/ribose:ext/ribose:doctype"/>
|
1223
1229
|
</xsl:call-template>
|
1224
1230
|
</xsl:variable>
|
1225
1231
|
<fo:static-content flow-name="footer-odd" role="artifact">
|
@@ -1326,21 +1332,21 @@
|
|
1326
1332
|
|
1327
1333
|
<xsl:variable name="namespace_full_">
|
1328
1334
|
<xsl:choose>
|
1329
|
-
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[
|
1330
|
-
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/
|
1335
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[local-name() = 'metanorma'][1])"/></xsl:when>
|
1336
|
+
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/standoc -->
|
1331
1337
|
</xsl:choose>
|
1332
1338
|
</xsl:variable>
|
1333
1339
|
<xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
|
1334
1340
|
|
1335
1341
|
<xsl:variable name="root_element_">
|
1336
1342
|
<xsl:choose>
|
1337
|
-
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[
|
1338
|
-
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
|
1343
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[local-name() = 'metanorma'][1])"/></xsl:when>
|
1344
|
+
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: metanorma (former iso-standard) -->
|
1339
1345
|
</xsl:choose>
|
1340
1346
|
</xsl:variable>
|
1341
1347
|
<xsl:variable name="root_element" select="normalize-space($root_element_)"/>
|
1342
1348
|
|
1343
|
-
<xsl:variable name="document_scheme" select="normalize-space(//*[
|
1349
|
+
<xsl:variable name="document_scheme" select="normalize-space(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'document-scheme']/*[local-name() = 'value'])"/>
|
1344
1350
|
|
1345
1351
|
<!-- external parameters -->
|
1346
1352
|
|
@@ -1441,7 +1447,7 @@
|
|
1441
1447
|
</metanorma-extension>
|
1442
1448
|
-->
|
1443
1449
|
|
1444
|
-
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[
|
1450
|
+
<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/>
|
1445
1451
|
<xsl:variable name="papersize_width_">
|
1446
1452
|
<xsl:choose>
|
1447
1453
|
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
@@ -1503,7 +1509,7 @@
|
|
1503
1509
|
<xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/>
|
1504
1510
|
|
1505
1511
|
<xsl:variable name="layout_columns_default">1</xsl:variable>
|
1506
|
-
<xsl:variable name="layout_columns_" select="normalize-space((//*[
|
1512
|
+
<xsl:variable name="layout_columns_" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'layout-columns'])"/>
|
1507
1513
|
<xsl:variable name="layout_columns">
|
1508
1514
|
<xsl:choose>
|
1509
1515
|
<xsl:when test="$layout_columns_ != ''"><xsl:value-of select="$layout_columns_"/></xsl:when>
|
@@ -1564,7 +1570,7 @@
|
|
1564
1570
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
1565
1571
|
|
1566
1572
|
<xsl:variable name="title-list-tables">
|
1567
|
-
<xsl:variable name="toc_table_title" select="//*[
|
1573
|
+
<xsl:variable name="toc_table_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
1568
1574
|
<xsl:value-of select="$toc_table_title"/>
|
1569
1575
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
1570
1576
|
<xsl:call-template name="getLocalizedString">
|
@@ -1574,7 +1580,7 @@
|
|
1574
1580
|
</xsl:variable>
|
1575
1581
|
|
1576
1582
|
<xsl:variable name="title-list-figures">
|
1577
|
-
<xsl:variable name="toc_figure_title" select="//*[
|
1583
|
+
<xsl:variable name="toc_figure_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
1578
1584
|
<xsl:value-of select="$toc_figure_title"/>
|
1579
1585
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
1580
1586
|
<xsl:call-template name="getLocalizedString">
|
@@ -1584,7 +1590,7 @@
|
|
1584
1590
|
</xsl:variable>
|
1585
1591
|
|
1586
1592
|
<xsl:variable name="title-list-recommendations">
|
1587
|
-
<xsl:variable name="toc_requirement_title" select="//*[
|
1593
|
+
<xsl:variable name="toc_requirement_title" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
1588
1594
|
<xsl:value-of select="$toc_requirement_title"/>
|
1589
1595
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
1590
1596
|
<xsl:call-template name="getLocalizedString">
|
@@ -1594,8 +1600,8 @@
|
|
1594
1600
|
</xsl:variable>
|
1595
1601
|
|
1596
1602
|
<xsl:variable name="bibdata">
|
1597
|
-
<xsl:copy-of select="//*[
|
1598
|
-
<xsl:copy-of select="//*[
|
1603
|
+
<xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']"/>
|
1604
|
+
<xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'localized-strings']"/>
|
1599
1605
|
</xsl:variable>
|
1600
1606
|
|
1601
1607
|
<!-- Characters -->
|
@@ -1662,7 +1668,7 @@
|
|
1662
1668
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
1663
1669
|
|
1664
1670
|
<xsl:variable name="additional_fonts_">
|
1665
|
-
<xsl:for-each select="//*[
|
1671
|
+
<xsl:for-each select="//*[local-name() = 'metanorma'][1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[local-name() = 'metanorma'][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
|
1666
1672
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
1667
1673
|
</xsl:for-each>
|
1668
1674
|
</xsl:variable>
|
@@ -3080,10 +3086,10 @@
|
|
3080
3086
|
|
3081
3087
|
<xsl:template name="processTablesFigures_Contents">
|
3082
3088
|
<xsl:param name="always"/>
|
3083
|
-
<xsl:if test="(//*[
|
3089
|
+
<xsl:if test="(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
3084
3090
|
<xsl:call-template name="processTables_Contents"/>
|
3085
3091
|
</xsl:if>
|
3086
|
-
<xsl:if test="(//*[
|
3092
|
+
<xsl:if test="(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
3087
3093
|
<xsl:call-template name="processFigures_Contents"/>
|
3088
3094
|
</xsl:if>
|
3089
3095
|
</xsl:template>
|
@@ -3163,7 +3169,7 @@
|
|
3163
3169
|
</xsl:template><!-- END: processMainSectionsDefault -->
|
3164
3170
|
|
3165
3171
|
<!-- Example:
|
3166
|
-
<
|
3172
|
+
<metanorma>
|
3167
3173
|
<preface>
|
3168
3174
|
<page_sequence>
|
3169
3175
|
<clause...
|
@@ -3186,7 +3192,7 @@
|
|
3186
3192
|
<page_sequence>
|
3187
3193
|
<annex ..
|
3188
3194
|
</page_sequence>
|
3189
|
-
</
|
3195
|
+
</metanorma>
|
3190
3196
|
-->
|
3191
3197
|
<xsl:template name="processPrefaceAndMainSectionsDefault_items">
|
3192
3198
|
|
@@ -3229,15 +3235,8 @@
|
|
3229
3235
|
</xsl:template> <!-- END: insertPrefaceSectionsPageSequences -->
|
3230
3236
|
|
3231
3237
|
<xsl:template name="insertMainSectionsPageSequences">
|
3232
|
-
<xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
|
3233
|
-
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
3234
|
-
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
3235
|
-
<xsl:sort select="@displayorder" data-type="number"/>
|
3236
|
-
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
3237
3238
|
|
3238
|
-
|
3239
|
-
</xsl:element>
|
3240
|
-
</xsl:element>
|
3239
|
+
<xsl:call-template name="insertSectionsInPageSequence"/>
|
3241
3240
|
|
3242
3241
|
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
3243
3242
|
<xsl:for-each select="/*/*[local-name()='annex']">
|
@@ -3256,6 +3255,18 @@
|
|
3256
3255
|
</xsl:element>
|
3257
3256
|
</xsl:template> <!-- END: insertMainSectionsPageSequences -->
|
3258
3257
|
|
3258
|
+
<xsl:template name="insertSectionsInPageSequence">
|
3259
|
+
<xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
|
3260
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
3261
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
3262
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3263
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
3264
|
+
|
3265
|
+
</xsl:for-each>
|
3266
|
+
</xsl:element>
|
3267
|
+
</xsl:element>
|
3268
|
+
</xsl:template>
|
3269
|
+
|
3259
3270
|
<xsl:template name="insertMainSectionsInSeparatePageSequences">
|
3260
3271
|
<xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
|
3261
3272
|
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
@@ -4772,7 +4783,7 @@
|
|
4772
4783
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
4773
4784
|
|
4774
4785
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
4775
|
-
<xsl:variable name="lang" select="ancestor::*[
|
4786
|
+
<xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
4776
4787
|
<xsl:variable name="reference_">
|
4777
4788
|
<xsl:value-of select="@reference"/>
|
4778
4789
|
<xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
|
@@ -4893,13 +4904,13 @@
|
|
4893
4904
|
footnotes in bibliography
|
4894
4905
|
footnotes in document's body (except table's head/body/foot and figure text)
|
4895
4906
|
-->
|
4896
|
-
<xsl:for-each select="ancestor::*[
|
4907
|
+
<xsl:for-each select="ancestor::*[local-name() = 'metanorma']/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
4897
4908
|
<fn gen_id="{generate-id(.)}">
|
4898
4909
|
<xsl:copy-of select="@*"/>
|
4899
4910
|
<xsl:copy-of select="node()"/>
|
4900
4911
|
</fn>
|
4901
4912
|
</xsl:for-each>
|
4902
|
-
<xsl:for-each select="ancestor::*[
|
4913
|
+
<xsl:for-each select="ancestor::*[local-name() = 'metanorma']/*[local-name()='boilerplate']/* | ancestor::*[local-name() = 'metanorma']//*[local-name()='preface']/* | ancestor::*[local-name() = 'metanorma']//*[local-name()='sections']/* | ancestor::*[local-name() = 'metanorma']//*[local-name()='annex'] | ancestor::*[local-name() = 'metanorma']//*[local-name()='bibliography']/*">
|
4903
4914
|
<xsl:sort select="@displayorder" data-type="number"/>
|
4904
4915
|
<!-- commented:
|
4905
4916
|
.//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
|
@@ -7271,6 +7282,8 @@
|
|
7271
7282
|
<!-- ======================================= -->
|
7272
7283
|
<!-- math -->
|
7273
7284
|
<!-- ======================================= -->
|
7285
|
+
<xsl:template match="*[local-name() = 'stem'][following-sibling::*[1][local-name() = 'fmt-stem']]"/> <!-- for tablesonly.xml generated by mn2pdf -->
|
7286
|
+
|
7274
7287
|
<xsl:template match="mathml:math">
|
7275
7288
|
<xsl:variable name="isAdded" select="@added"/>
|
7276
7289
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -7630,10 +7643,10 @@
|
|
7630
7643
|
<xsl:template match="*[local-name()='localityStack']"/>
|
7631
7644
|
|
7632
7645
|
<xsl:variable name="pdfAttachmentsList_">
|
7633
|
-
<xsl:for-each select="//*[
|
7646
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
7634
7647
|
<attachment filename="{@name}"/>
|
7635
7648
|
</xsl:for-each>
|
7636
|
-
<xsl:if test="not(//*[
|
7649
|
+
<xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
7637
7650
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
7638
7651
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
7639
7652
|
<attachment filename="{$attachment_path}"/>
|
@@ -9100,7 +9113,9 @@
|
|
9100
9113
|
<xsl:apply-templates mode="bookmarks"/>
|
9101
9114
|
</xsl:template>
|
9102
9115
|
|
9103
|
-
<xsl:template match="*[local-name() = '
|
9116
|
+
<xsl:template match="*[local-name() = 'stem']" mode="contents"/>
|
9117
|
+
|
9118
|
+
<xsl:template match="*[local-name() = 'title' or local-name() = 'name' or local-name() = 'fmt-title' or local-name() = 'fmt-name']//*[local-name() = 'fmt-stem']" mode="contents">
|
9104
9119
|
<xsl:apply-templates select="."/>
|
9105
9120
|
</xsl:template>
|
9106
9121
|
|
@@ -9117,7 +9132,15 @@
|
|
9117
9132
|
<xsl:apply-templates mode="contents"/>
|
9118
9133
|
</xsl:template>
|
9119
9134
|
|
9120
|
-
<xsl:template match="*[local-name() = '
|
9135
|
+
<xsl:template match="*[local-name() = 'concept']" mode="contents"/>
|
9136
|
+
<xsl:template match="*[local-name() = 'eref']" mode="contents"/>
|
9137
|
+
<xsl:template match="*[local-name() = 'xref']" mode="contents"/>
|
9138
|
+
<xsl:template match="*[local-name() = 'link']" mode="contents"/>
|
9139
|
+
<xsl:template match="*[local-name() = 'origin']" mode="contents"/>
|
9140
|
+
<xsl:template match="*[local-name() = 'erefstack ']" mode="contents"/>
|
9141
|
+
|
9142
|
+
<xsl:template match="*[local-name() = 'stem']" mode="bookmarks"/>
|
9143
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="bookmarks">
|
9121
9144
|
<xsl:apply-templates mode="bookmarks"/>
|
9122
9145
|
</xsl:template>
|
9123
9146
|
|
@@ -9130,6 +9153,13 @@
|
|
9130
9153
|
<xsl:apply-templates mode="bookmarks"/>
|
9131
9154
|
</xsl:template>
|
9132
9155
|
|
9156
|
+
<xsl:template match="*[local-name() = 'concept']" mode="bookmarks"/>
|
9157
|
+
<xsl:template match="*[local-name() = 'eref']" mode="bookmarks"/>
|
9158
|
+
<xsl:template match="*[local-name() = 'xref']" mode="bookmarks"/>
|
9159
|
+
<xsl:template match="*[local-name() = 'link']" mode="bookmarks"/>
|
9160
|
+
<xsl:template match="*[local-name() = 'origin']" mode="bookmarks"/>
|
9161
|
+
<xsl:template match="*[local-name() = 'erefstack ']" mode="bookmarks"/>
|
9162
|
+
|
9133
9163
|
<!-- Bookmarks -->
|
9134
9164
|
<xsl:template name="addBookmarks">
|
9135
9165
|
<xsl:param name="contents"/>
|
@@ -9414,6 +9444,13 @@
|
|
9414
9444
|
|
9415
9445
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="contents_item"/>
|
9416
9446
|
|
9447
|
+
<xsl:template match="*[local-name() = 'concept']" mode="contents_item"/>
|
9448
|
+
<xsl:template match="*[local-name() = 'eref']" mode="contents_item"/>
|
9449
|
+
<xsl:template match="*[local-name() = 'xref']" mode="contents_item"/>
|
9450
|
+
<xsl:template match="*[local-name() = 'link']" mode="contents_item"/>
|
9451
|
+
<xsl:template match="*[local-name() = 'origin']" mode="contents_item"/>
|
9452
|
+
<xsl:template match="*[local-name() = 'erefstack ']" mode="contents_item"/>
|
9453
|
+
|
9417
9454
|
<xsl:template name="getSection">
|
9418
9455
|
<xsl:choose>
|
9419
9456
|
<xsl:when test="*[local-name() = 'fmt-title']">
|
@@ -9533,7 +9570,8 @@
|
|
9533
9570
|
</xsl:copy>
|
9534
9571
|
</xsl:template>
|
9535
9572
|
|
9536
|
-
<xsl:template match="*[local-name() = 'stem']" mode="contents_item"
|
9573
|
+
<xsl:template match="*[local-name() = 'stem']" mode="contents_item"/>
|
9574
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="contents_item">
|
9537
9575
|
<xsl:copy-of select="."/>
|
9538
9576
|
</xsl:template>
|
9539
9577
|
|
@@ -9597,7 +9635,7 @@
|
|
9597
9635
|
<!-- sourcecode -->
|
9598
9636
|
<!-- =============== -->
|
9599
9637
|
|
9600
|
-
<xsl:variable name="source-highlighter-css_" select="//*[
|
9638
|
+
<xsl:variable name="source-highlighter-css_" select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
|
9601
9639
|
<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
|
9602
9640
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
9603
9641
|
|
@@ -11059,7 +11097,7 @@
|
|
11059
11097
|
|
11060
11098
|
</xsl:template> <!-- sections_element_style -->
|
11061
11099
|
|
11062
|
-
<xsl:template match="//*[
|
11100
|
+
<xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
|
11063
11101
|
|
11064
11102
|
<fo:block break-after="page"/>
|
11065
11103
|
|
@@ -11163,7 +11201,7 @@
|
|
11163
11201
|
<fo:block id="{@id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@id}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
11164
11202
|
</xsl:when>
|
11165
11203
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
11166
|
-
<xsl:when test="ancestor::*[
|
11204
|
+
<xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
|
11167
11205
|
<fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
11168
11206
|
</xsl:when>
|
11169
11207
|
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
@@ -12497,7 +12535,7 @@
|
|
12497
12535
|
<xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
|
12498
12536
|
|
12499
12537
|
<!-- move section 'Normative references' inside 'sections' -->
|
12500
|
-
<xsl:for-each select="* | ancestor::*[
|
12538
|
+
<xsl:for-each select="* | ancestor::*[local-name() = 'metanorma']/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | ancestor::*[local-name() = 'metanorma']/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
|
12501
12539
|
<xsl:sort select="@displayorder" data-type="number"/>
|
12502
12540
|
|
12503
12541
|
<!-- process Section's title -->
|
@@ -12558,10 +12596,126 @@
|
|
12558
12596
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
|
12559
12597
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_pres"/>
|
12560
12598
|
|
12561
|
-
<xsl:template match="*[local-name() = 'stem']
|
12599
|
+
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_step1"/>
|
12600
|
+
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_pres"/>
|
12601
|
+
|
12602
|
+
<xsl:template match="*[local-name() = 'fmt-stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])]" mode="update_xml_step1">
|
12603
|
+
<xsl:element name="stem" namespace="{$namespace_full}">
|
12604
|
+
<xsl:copy-of select="@*"/>
|
12605
|
+
<xsl:choose>
|
12606
|
+
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
12607
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
12608
|
+
</xsl:when>
|
12609
|
+
<xsl:otherwise>
|
12610
|
+
<xsl:copy-of select="node()"/>
|
12611
|
+
</xsl:otherwise>
|
12612
|
+
</xsl:choose>
|
12613
|
+
</xsl:element>
|
12614
|
+
</xsl:template>
|
12615
|
+
<xsl:template match="*[local-name() = 'fmt-stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])]" mode="update_xml_pres">
|
12616
|
+
<xsl:element name="stem" namespace="{$namespace_full}">
|
12617
|
+
<xsl:copy-of select="@*"/>
|
12618
|
+
<xsl:choose>
|
12619
|
+
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
12620
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
12621
|
+
</xsl:when>
|
12622
|
+
<xsl:otherwise>
|
12623
|
+
<xsl:copy-of select="node()"/>
|
12624
|
+
</xsl:otherwise>
|
12625
|
+
</xsl:choose>
|
12626
|
+
</xsl:element>
|
12627
|
+
</xsl:template>
|
12628
|
+
|
12629
|
+
<xsl:template match="*[local-name() = 'image'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'bibdata'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
|
12562
12630
|
<xsl:copy-of select="."/>
|
12563
12631
|
</xsl:template>
|
12564
12632
|
|
12633
|
+
<!-- https://github.com/metanorma/isodoc/issues/651 -->
|
12634
|
+
<!-- *[local-name() = 'sourcecode'][not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])] -->
|
12635
|
+
<xsl:template match="*[local-name() = 'sourcecode']" mode="update_xml_step1">
|
12636
|
+
<xsl:copy>
|
12637
|
+
<xsl:copy-of select="@*"/>
|
12638
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
|
12639
|
+
<xsl:choose>
|
12640
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode']">
|
12641
|
+
<xsl:choose>
|
12642
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode'][not(.//*[local-name() = 'passthrough'])] and not(.//*[local-name() = 'fmt-name'])">
|
12643
|
+
<xsl:copy-of select="*[local-name() = 'fmt-sourcecode']/node()"/>
|
12644
|
+
</xsl:when>
|
12645
|
+
<xsl:otherwise>
|
12646
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-sourcecode']/node()" mode="update_xml_step1"/>
|
12647
|
+
</xsl:otherwise>
|
12648
|
+
</xsl:choose>
|
12649
|
+
</xsl:when>
|
12650
|
+
<xsl:otherwise> <!-- If fmt-sourcecode is not present -->
|
12651
|
+
<xsl:choose>
|
12652
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])">
|
12653
|
+
<xsl:copy-of select="node()"/>
|
12654
|
+
</xsl:when>
|
12655
|
+
<xsl:otherwise>
|
12656
|
+
<xsl:apply-templates select="node()[not(local-name() = 'fmt-name')]" mode="update_xml_step1"/>
|
12657
|
+
</xsl:otherwise>
|
12658
|
+
</xsl:choose>
|
12659
|
+
</xsl:otherwise>
|
12660
|
+
</xsl:choose>
|
12661
|
+
</xsl:copy>
|
12662
|
+
</xsl:template>
|
12663
|
+
<xsl:template match="*[local-name() = 'sourcecode']" mode="update_xml_pres">
|
12664
|
+
<xsl:copy>
|
12665
|
+
<xsl:copy-of select="@*"/>
|
12666
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_pres"/>
|
12667
|
+
<xsl:choose>
|
12668
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode']">
|
12669
|
+
<xsl:choose>
|
12670
|
+
<xsl:when test="*[local-name() = 'fmt-sourcecode'][not(.//*[local-name() = 'passthrough'])] and not(.//*[local-name() = 'fmt-name'])">
|
12671
|
+
<xsl:copy-of select="*[local-name() = 'fmt-sourcecode']/node()"/>
|
12672
|
+
</xsl:when>
|
12673
|
+
<xsl:otherwise>
|
12674
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-sourcecode']/node()" mode="update_xml_pres"/>
|
12675
|
+
</xsl:otherwise>
|
12676
|
+
</xsl:choose>
|
12677
|
+
</xsl:when>
|
12678
|
+
<xsl:otherwise> <!-- If fmt-sourcecode is not present -->
|
12679
|
+
<xsl:choose>
|
12680
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[local-name() = 'fmt-name'])">
|
12681
|
+
<xsl:copy-of select="node()"/>
|
12682
|
+
</xsl:when>
|
12683
|
+
<xsl:otherwise>
|
12684
|
+
<xsl:apply-templates select="node()[not(local-name() = 'fmt-name')]" mode="update_xml_pres"/>
|
12685
|
+
</xsl:otherwise>
|
12686
|
+
</xsl:choose>
|
12687
|
+
</xsl:otherwise>
|
12688
|
+
</xsl:choose>
|
12689
|
+
</xsl:copy>
|
12690
|
+
</xsl:template>
|
12691
|
+
|
12692
|
+
<!-- https://github.com/metanorma/isodoc/issues/651 -->
|
12693
|
+
<xsl:template match="*[local-name() = 'figure'][*[local-name() = 'fmt-figure']]" mode="update_xml_step1" priority="2">
|
12694
|
+
<xsl:copy>
|
12695
|
+
<xsl:copy-of select="@*"/>
|
12696
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
|
12697
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-figure']/node()" mode="update_xml_step1"/>
|
12698
|
+
</xsl:copy>
|
12699
|
+
</xsl:template>
|
12700
|
+
<xsl:template match="*[local-name() = 'figure'][*[local-name() = 'fmt-figure']]" mode="update_xml_pres" priority="2">
|
12701
|
+
<xsl:copy>
|
12702
|
+
<xsl:copy-of select="@*"/>
|
12703
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_pres"/>
|
12704
|
+
<xsl:apply-templates select="*[local-name() = 'fmt-figure']/node()" mode="update_xml_pres"/>
|
12705
|
+
</xsl:copy>
|
12706
|
+
</xsl:template>
|
12707
|
+
|
12708
|
+
<!-- https://github.com/metanorma/isodoc/issues/652 -->
|
12709
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']"/>
|
12710
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']"/>
|
12711
|
+
<xsl:template match="*[local-name() = 'amend']"/>
|
12712
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']" mode="update_xml_step1"/>
|
12713
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_step1"/>
|
12714
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'source']" mode="update_xml_pres"/>
|
12715
|
+
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
|
12716
|
+
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
|
12717
|
+
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
|
12718
|
+
|
12565
12719
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
12566
12720
|
<xsl:copy>
|
12567
12721
|
<xsl:copy-of select="@*"/>
|
@@ -12592,7 +12746,7 @@
|
|
12592
12746
|
<!-- add @id - first element with @id plus '_element_name' -->
|
12593
12747
|
<xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
|
12594
12748
|
<xsl:variable name="prefix_id"><xsl:value-of select="$prefix_id_"/><xsl:if test="normalize-space($prefix_id_) = ''"><xsl:value-of select="generate-id()"/></xsl:if></xsl:variable>
|
12595
|
-
<xsl:variable name="document_suffix" select="ancestor::*[
|
12749
|
+
<xsl:variable name="document_suffix" select="ancestor::*[local-name() = 'metanorma']/@document_suffix"/>
|
12596
12750
|
<xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
|
12597
12751
|
</xsl:if>
|
12598
12752
|
</xsl:template>
|
@@ -12842,6 +12996,126 @@
|
|
12842
12996
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_step1"/>
|
12843
12997
|
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="update_xml_pres"/>
|
12844
12998
|
|
12999
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="update_xml_step1">
|
13000
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13001
|
+
</xsl:template>
|
13002
|
+
|
13003
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="update_xml_pres">
|
13004
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13005
|
+
</xsl:template>
|
13006
|
+
|
13007
|
+
<xsl:template match="*[local-name() = 'requirement']/*[not(starts-with(local-name(), 'fmt-'))] | *[local-name() = 'recommendation']/*[not(starts-with(local-name(), 'fmt-'))] | *[local-name() = 'permission']/*[not(starts-with(local-name(), 'fmt-'))]" mode="update_xml_step1"/>
|
13008
|
+
|
13009
|
+
<xsl:template match="*[local-name() = 'requirement']/*[not(starts-with(local-name(), 'fmt-'))] | *[local-name() = 'recommendation']/*[not(starts-with(local-name(), 'fmt-'))] | *[local-name() = 'permission']/*[not(starts-with(local-name(), 'fmt-'))]" mode="update_xml_pres"/>
|
13010
|
+
|
13011
|
+
<xsl:template match="*[local-name() = 'fmt-provision']" mode="update_xml_step1">
|
13012
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13013
|
+
</xsl:template>
|
13014
|
+
<xsl:template match="*[local-name() = 'fmt-provision']" mode="update_xml_pres">
|
13015
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13016
|
+
</xsl:template>
|
13017
|
+
|
13018
|
+
<xsl:template match="*[local-name() = 'identifier']" mode="update_xml_step1"/>
|
13019
|
+
<xsl:template match="*[local-name() = 'identifier']" mode="update_xml_pres"/>
|
13020
|
+
<xsl:template match="*[local-name() = 'fmt-identifier']" mode="update_xml_step1">
|
13021
|
+
<xsl:element name="identifier" namespace="{$namespace_full}">
|
13022
|
+
<xsl:copy-of select="@*"/>
|
13023
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13024
|
+
</xsl:element>
|
13025
|
+
</xsl:template>
|
13026
|
+
<xsl:template match="*[local-name() = 'fmt-identifier']" mode="update_xml_pres">
|
13027
|
+
<xsl:element name="identifier" namespace="{$namespace_full}">
|
13028
|
+
<xsl:copy-of select="@*"/>
|
13029
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13030
|
+
</xsl:element>
|
13031
|
+
</xsl:template>
|
13032
|
+
|
13033
|
+
<xsl:template match="*[local-name() = 'concept']"/>
|
13034
|
+
<xsl:template match="*[local-name() = 'concept']" mode="update_xml_step1"/>
|
13035
|
+
<xsl:template match="*[local-name() = 'concept']" mode="update_xml_pres"/>
|
13036
|
+
|
13037
|
+
<xsl:template match="*[local-name() = 'fmt-concept']">
|
13038
|
+
<xsl:apply-templates/>
|
13039
|
+
</xsl:template>
|
13040
|
+
<xsl:template match="*[local-name() = 'fmt-concept']" mode="update_xml_step1">
|
13041
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13042
|
+
</xsl:template>
|
13043
|
+
<xsl:template match="*[local-name() = 'fmt-concept']" mode="update_xml_pres">
|
13044
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13045
|
+
</xsl:template>
|
13046
|
+
|
13047
|
+
<xsl:template match="*[local-name() = 'eref']" mode="update_xml_step1"/>
|
13048
|
+
<xsl:template match="*[local-name() = 'eref']" mode="update_xml_pres"/>
|
13049
|
+
|
13050
|
+
<xsl:template match="*[local-name() = 'fmt-eref']" mode="update_xml_step1">
|
13051
|
+
<xsl:element name="eref" namespace="{$namespace_full}">
|
13052
|
+
<xsl:copy-of select="@*"/>
|
13053
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13054
|
+
</xsl:element>
|
13055
|
+
</xsl:template>
|
13056
|
+
<xsl:template match="*[local-name() = 'fmt-eref']" mode="update_xml_pres">
|
13057
|
+
<xsl:element name="eref" namespace="{$namespace_full}">
|
13058
|
+
<xsl:copy-of select="@*"/>
|
13059
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13060
|
+
</xsl:element>
|
13061
|
+
</xsl:template>
|
13062
|
+
|
13063
|
+
<xsl:template match="*[local-name() = 'xref']" mode="update_xml_step1"/>
|
13064
|
+
<xsl:template match="*[local-name() = 'xref']" mode="update_xml_pres"/>
|
13065
|
+
|
13066
|
+
<xsl:template match="*[local-name() = 'fmt-xref']" mode="update_xml_step1">
|
13067
|
+
<xsl:element name="xref" namespace="{$namespace_full}">
|
13068
|
+
<xsl:copy-of select="@*"/>
|
13069
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13070
|
+
</xsl:element>
|
13071
|
+
</xsl:template>
|
13072
|
+
<xsl:template match="*[local-name() = 'fmt-xref']" mode="update_xml_pres">
|
13073
|
+
<xsl:element name="xref" namespace="{$namespace_full}">
|
13074
|
+
<xsl:copy-of select="@*"/>
|
13075
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13076
|
+
</xsl:element>
|
13077
|
+
</xsl:template>
|
13078
|
+
|
13079
|
+
<xsl:template match="*[local-name() = 'link']" mode="update_xml_step1"/>
|
13080
|
+
<xsl:template match="*[local-name() = 'link']" mode="update_xml_pres"/>
|
13081
|
+
|
13082
|
+
<xsl:template match="*[local-name() = 'fmt-link']" mode="update_xml_step1">
|
13083
|
+
<xsl:element name="link" namespace="{$namespace_full}">
|
13084
|
+
<xsl:copy-of select="@*"/>
|
13085
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13086
|
+
</xsl:element>
|
13087
|
+
</xsl:template>
|
13088
|
+
<xsl:template match="*[local-name() = 'fmt-link']" mode="update_xml_pres">
|
13089
|
+
<xsl:element name="link" namespace="{$namespace_full}">
|
13090
|
+
<xsl:copy-of select="@*"/>
|
13091
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13092
|
+
</xsl:element>
|
13093
|
+
</xsl:template>
|
13094
|
+
|
13095
|
+
<xsl:template match="*[local-name() = 'origin']" mode="update_xml_step1"/>
|
13096
|
+
<xsl:template match="*[local-name() = 'origin']" mode="update_xml_pres"/>
|
13097
|
+
|
13098
|
+
<xsl:template match="*[local-name() = 'fmt-origin']" mode="update_xml_step1">
|
13099
|
+
<xsl:element name="origin" namespace="{$namespace_full}">
|
13100
|
+
<xsl:copy-of select="@*"/>
|
13101
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13102
|
+
</xsl:element>
|
13103
|
+
</xsl:template>
|
13104
|
+
<xsl:template match="*[local-name() = 'fmt-origin']" mode="update_xml_pres">
|
13105
|
+
<xsl:element name="origin" namespace="{$namespace_full}">
|
13106
|
+
<xsl:copy-of select="@*"/>
|
13107
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13108
|
+
</xsl:element>
|
13109
|
+
</xsl:template>
|
13110
|
+
|
13111
|
+
<xsl:template match="*[local-name() = 'erefstack']"/>
|
13112
|
+
<xsl:template match="*[local-name() = 'erefstack']" mode="update_xml_step1"/>
|
13113
|
+
<xsl:template match="*[local-name() = 'erefstack']" mode="update_xml_pres"/>
|
13114
|
+
|
13115
|
+
<xsl:template match="*[local-name() = 'svgmap']"/>
|
13116
|
+
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_step1"/>
|
13117
|
+
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_pres"/>
|
13118
|
+
|
12845
13119
|
<!-- END: update new Presentation XML -->
|
12846
13120
|
|
12847
13121
|
<!-- =========================================================================== -->
|
@@ -12914,7 +13188,7 @@
|
|
12914
13188
|
|
12915
13189
|
<xsl:choose>
|
12916
13190
|
<xsl:when test="$page_sequence_at_top = 'true'">
|
12917
|
-
<xsl:for-each select="ancestor::*[ancestor::*[
|
13191
|
+
<xsl:for-each select="ancestor::*[ancestor::*[local-name() = 'metanorma']]">
|
12918
13192
|
<element pos="{position()}">
|
12919
13193
|
<xsl:copy-of select="@*[local-name() != 'id']"/>
|
12920
13194
|
<xsl:value-of select="name()"/>
|
@@ -13342,7 +13616,7 @@
|
|
13342
13616
|
</xsl:when>
|
13343
13617
|
<xsl:when test="contains($text, $replace)">
|
13344
13618
|
<xsl:value-of select="substring-before($text,$replace)"/>
|
13345
|
-
<xsl:element name="inlineChar" namespace="https://www.metanorma.org/ns/
|
13619
|
+
<xsl:element name="inlineChar" namespace="https://www.metanorma.org/ns/standoc"><xsl:value-of select="$by"/></xsl:element>
|
13346
13620
|
<xsl:call-template name="replaceChar">
|
13347
13621
|
<xsl:with-param name="text" select="substring-after($text,$replace)"/>
|
13348
13622
|
<xsl:with-param name="replace" select="$replace"/>
|
@@ -13379,7 +13653,7 @@
|
|
13379
13653
|
</xsl:variable>
|
13380
13654
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
13381
13655
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
13382
|
-
<xsl:variable name="lang" select="ancestor::*[
|
13656
|
+
<xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
13383
13657
|
<xsl:variable name="reference" select="@reference"/>
|
13384
13658
|
<!-- fn sequence number in document -->
|
13385
13659
|
<xsl:variable name="current_fn_number" select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
@@ -13424,7 +13698,7 @@
|
|
13424
13698
|
</xsl:template>
|
13425
13699
|
|
13426
13700
|
<xsl:template name="printEdition">
|
13427
|
-
<xsl:variable name="edition_i18n" select="normalize-space((//*[
|
13701
|
+
<xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
13428
13702
|
|
13429
13703
|
<xsl:choose>
|
13430
13704
|
<xsl:when test="$edition_i18n != ''">
|
@@ -13434,7 +13708,7 @@
|
|
13434
13708
|
</xsl:call-template>
|
13435
13709
|
</xsl:when>
|
13436
13710
|
<xsl:otherwise>
|
13437
|
-
<xsl:variable name="edition" select="normalize-space((//*[
|
13711
|
+
<xsl:variable name="edition" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'])"/>
|
13438
13712
|
<xsl:if test="$edition != ''"> <!-- Example: 1.3 -->
|
13439
13713
|
<xsl:call-template name="capitalize">
|
13440
13714
|
<xsl:with-param name="str">
|
@@ -13568,7 +13842,7 @@
|
|
13568
13842
|
<xsl:param name="charDelim" select="', '"/>
|
13569
13843
|
<xsl:choose>
|
13570
13844
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
13571
|
-
<xsl:for-each select="//*[
|
13845
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
13572
13846
|
<xsl:sort data-type="text" order="ascending"/>
|
13573
13847
|
<xsl:call-template name="insertKeyword">
|
13574
13848
|
<xsl:with-param name="meta" select="$meta"/>
|
@@ -13578,7 +13852,7 @@
|
|
13578
13852
|
</xsl:for-each>
|
13579
13853
|
</xsl:when>
|
13580
13854
|
<xsl:otherwise>
|
13581
|
-
<xsl:for-each select="//*[
|
13855
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
13582
13856
|
<xsl:call-template name="insertKeyword">
|
13583
13857
|
<xsl:with-param name="meta" select="$meta"/>
|
13584
13858
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -13653,7 +13927,7 @@
|
|
13653
13927
|
<!-- Dublin Core properties go here -->
|
13654
13928
|
<dc:title>
|
13655
13929
|
<xsl:variable name="title">
|
13656
|
-
<xsl:for-each select="(//*[
|
13930
|
+
<xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
|
13657
13931
|
|
13658
13932
|
<xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
|
13659
13933
|
|
@@ -13673,7 +13947,7 @@
|
|
13673
13947
|
</rdf:Alt>
|
13674
13948
|
</dc:title>
|
13675
13949
|
<xsl:variable name="dc_creator">
|
13676
|
-
<xsl:for-each select="(//*[
|
13950
|
+
<xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
|
13677
13951
|
|
13678
13952
|
<rdf:Seq>
|
13679
13953
|
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
@@ -13695,7 +13969,7 @@
|
|
13695
13969
|
<xsl:variable name="dc_description">
|
13696
13970
|
<xsl:variable name="abstract">
|
13697
13971
|
|
13698
|
-
<xsl:copy-of select="//*[
|
13972
|
+
<xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'fmt-title']) and not(ancestor::*[local-name() = 'title']) and not(ancestor::*[local-name() = 'fmt-xref-label'])]"/>
|
13699
13973
|
|
13700
13974
|
</xsl:variable>
|
13701
13975
|
<rdf:Alt>
|
@@ -13723,7 +13997,7 @@
|
|
13723
13997
|
</rdf:RDF>
|
13724
13998
|
</x:xmpmeta>
|
13725
13999
|
<!-- add attachments -->
|
13726
|
-
<xsl:for-each select="//*[
|
14000
|
+
<xsl:for-each select="//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
13727
14001
|
<xsl:variable name="bibitem_attachment_" select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]"/>
|
13728
14002
|
<xsl:variable name="bibitem_attachment" select="xalan:nodeset($bibitem_attachment_)"/>
|
13729
14003
|
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
|
@@ -13757,7 +14031,7 @@
|
|
13757
14031
|
</pdf:embedded-file>
|
13758
14032
|
</xsl:for-each>
|
13759
14033
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
13760
|
-
<xsl:if test="not(//*[
|
14034
|
+
<xsl:if test="not(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
13761
14035
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
13762
14036
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
13763
14037
|
<xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
|
@@ -13961,9 +14235,9 @@
|
|
13961
14235
|
<xsl:value-of select="document('')//*/namespace::ribose"/>
|
13962
14236
|
|
13963
14237
|
</xsl:variable>
|
13964
|
-
<xsl:if test="$documentNS != $XSLNS">
|
14238
|
+
<!-- <xsl:if test="$documentNS != $XSLNS">
|
13965
14239
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
13966
|
-
</xsl:if>
|
14240
|
+
</xsl:if> -->
|
13967
14241
|
</xsl:template> <!-- namespaceCheck -->
|
13968
14242
|
|
13969
14243
|
<xsl:template name="getLanguage">
|
@@ -14042,10 +14316,10 @@
|
|
14042
14316
|
|
14043
14317
|
<xsl:variable name="data_value">
|
14044
14318
|
<xsl:choose>
|
14045
|
-
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) !=
|
14319
|
+
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != 0">
|
14046
14320
|
<xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
14047
14321
|
</xsl:when>
|
14048
|
-
<xsl:when test="string-length($bibdata_updated) !=
|
14322
|
+
<xsl:when test="string-length($bibdata_updated) != 0">
|
14049
14323
|
<xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
14050
14324
|
</xsl:when>
|
14051
14325
|
<xsl:when test="$formatted = 'true'">
|
@@ -14183,7 +14457,7 @@
|
|
14183
14457
|
<!-- background image -->
|
14184
14458
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
14185
14459
|
<fo:block>
|
14186
|
-
<xsl:for-each select="/*[
|
14460
|
+
<xsl:for-each select="/*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = $name][1]/*[local-name() = 'value']/*[local-name() = 'image'][$num]">
|
14187
14461
|
<xsl:choose>
|
14188
14462
|
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
14189
14463
|
<fo:instream-foreign-object fox:alt-text="Image Front">
|
@@ -7,8 +7,8 @@ module Metanorma
|
|
7
7
|
# schema encapsulation of the document for validation
|
8
8
|
#
|
9
9
|
class Converter < Metanorma::Generic::Converter
|
10
|
-
XML_ROOT_TAG = "rsd-standard".freeze
|
11
|
-
XML_NAMESPACE = "https://www.metanorma.org/ns/ribose".freeze
|
10
|
+
#XML_ROOT_TAG = "rsd-standard".freeze
|
11
|
+
#XML_NAMESPACE = "https://www.metanorma.org/ns/ribose".freeze
|
12
12
|
|
13
13
|
register_for "ribose"
|
14
14
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
these elements; we just want one namespace for any child grammars
|
18
18
|
of this.
|
19
19
|
-->
|
20
|
-
<!-- VERSION
|
20
|
+
<!-- VERSION v2.0.0 -->
|
21
21
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
22
22
|
<include href="reqt.rng"/>
|
23
23
|
<include href="basicdoc.rng">
|
@@ -459,11 +459,14 @@ gives an explicit page orientation</a:documentation>
|
|
459
459
|
<a:documentation>Description of location in a reference, which can be combined with other locations in a single citation</a:documentation>
|
460
460
|
</ref>
|
461
461
|
</zeroOrMore>
|
462
|
-
<
|
463
|
-
<
|
462
|
+
<optional>
|
463
|
+
<element name="display-text">
|
464
464
|
<a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `<xx>my link text</xx>`)</a:documentation>
|
465
|
-
|
466
|
-
|
465
|
+
<oneOrMore>
|
466
|
+
<ref name="PureTextElement"/>
|
467
|
+
</oneOrMore>
|
468
|
+
</element>
|
469
|
+
</optional>
|
467
470
|
</define>
|
468
471
|
</include>
|
469
472
|
<!-- end overrides -->
|
@@ -1205,10 +1208,13 @@ numbers</a:documentation>
|
|
1205
1208
|
<value>presentation</value>
|
1206
1209
|
</choice>
|
1207
1210
|
</attribute>
|
1211
|
+
<attribute name="flavor">
|
1212
|
+
<a:documentation>Metanorma flavor, indicating SDO whose requiremnts the realisation aligns to</a:documentation>
|
1213
|
+
</attribute>
|
1208
1214
|
</define>
|
1209
1215
|
<define name="standard-document">
|
1210
1216
|
<a:documentation>Representation of a standardisation document</a:documentation>
|
1211
|
-
<element name="
|
1217
|
+
<element name="metanorma">
|
1212
1218
|
<ref name="Root-Attributes"/>
|
1213
1219
|
<ref name="bibdata">
|
1214
1220
|
<a:documentation>Bibliographic description of the document itself, expressed in the Relaton model</a:documentation>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<grammar ns='https://www.metanorma.org/ns/
|
2
|
+
<grammar ns='https://www.metanorma.org/ns/standoc' xmlns="http://relaxng.org/ns/structure/1.0">
|
3
3
|
<!--
|
4
4
|
VERSION v1.2.1
|
5
5
|
Currently we inherit from a namespaced grammar, isostandard. Until we inherit from isodoc,
|
@@ -8,34 +8,31 @@
|
|
8
8
|
-->
|
9
9
|
<include href="relaton-ribose.rng"/>
|
10
10
|
<include href="isodoc.rng">
|
11
|
-
<
|
12
|
-
<
|
13
|
-
|
11
|
+
<define name="standard-document">
|
12
|
+
<element name="metanorma">
|
13
|
+
<ref name="Root-Attributes"/>
|
14
|
+
<ref name="bibdata"/>
|
15
|
+
<zeroOrMore>
|
16
|
+
<ref name="termdocsource"/>
|
17
|
+
</zeroOrMore>
|
18
|
+
<optional>
|
19
|
+
<ref name="misccontainer"/>
|
20
|
+
</optional>
|
21
|
+
<optional>
|
22
|
+
<ref name="boilerplate"/>
|
23
|
+
</optional>
|
24
|
+
<ref name="preface"/>
|
25
|
+
<oneOrMore>
|
26
|
+
<ref name="sections"/>
|
27
|
+
</oneOrMore>
|
28
|
+
<zeroOrMore>
|
29
|
+
<ref name="annex"/>
|
30
|
+
</zeroOrMore>
|
31
|
+
<ref name="bibliography"/>
|
32
|
+
<zeroOrMore>
|
33
|
+
<ref name="indexsect"/>
|
34
|
+
</zeroOrMore>
|
35
|
+
</element>
|
36
|
+
</define>
|
14
37
|
</include>
|
15
|
-
<define name="rsd-standard">
|
16
|
-
<element name="rsd-standard">
|
17
|
-
<ref name="Root-Attributes"/>
|
18
|
-
<ref name="bibdata"/>
|
19
|
-
<zeroOrMore>
|
20
|
-
<ref name="termdocsource"/>
|
21
|
-
</zeroOrMore>
|
22
|
-
<optional>
|
23
|
-
<ref name="misccontainer"/>
|
24
|
-
</optional>
|
25
|
-
<optional>
|
26
|
-
<ref name="boilerplate"/>
|
27
|
-
</optional>
|
28
|
-
<ref name="preface"/>
|
29
|
-
<oneOrMore>
|
30
|
-
<ref name="sections"/>
|
31
|
-
</oneOrMore>
|
32
|
-
<zeroOrMore>
|
33
|
-
<ref name="annex"/>
|
34
|
-
</zeroOrMore>
|
35
|
-
<ref name="bibliography"/>
|
36
|
-
<zeroOrMore>
|
37
|
-
<ref name="indexsect"/>
|
38
|
-
</zeroOrMore>
|
39
|
-
</element>
|
40
|
-
</define>
|
41
38
|
</grammar>
|
data/metanorma-ribose.gemspec
CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.require_paths = ["lib"]
|
30
30
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
|
31
31
|
|
32
|
-
spec.add_dependency "metanorma-generic", "~>
|
32
|
+
spec.add_dependency "metanorma-generic", "~> 3.0.0"
|
33
33
|
|
34
34
|
spec.add_development_dependency "debug"
|
35
35
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-ribose
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-02-
|
11
|
+
date: 2025-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 3.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 3.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|