metanorma-iso 1.9.2 → 1.9.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -529,7 +529,7 @@
529
529
 
530
530
  <fo:block-container border-top="1mm double black" line-height="1.1" margin-top="3mm">
531
531
  <fo:block margin-right="5mm">
532
- <fo:block font-size="18pt" font-weight="bold" margin-top="6pt">
532
+ <fo:block font-size="18pt" font-weight="bold" margin-top="6pt" role="H1">
533
533
  <xsl:if test="normalize-space($title-intro) != ''">
534
534
  <xsl:value-of select="$title-intro"/>
535
535
  <xsl:text> — </xsl:text>
@@ -541,7 +541,7 @@
541
541
 
542
542
  <xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-amd']"/>
543
543
  <xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
544
- <fo:block margin-top="12pt">
544
+ <fo:block margin-top="12pt" role="H1">
545
545
  <xsl:call-template name="printAmendmentTitle"/>
546
546
  </fo:block>
547
547
  </xsl:if>
@@ -549,7 +549,7 @@
549
549
  </fo:block>
550
550
 
551
551
  <fo:block font-size="9pt"><xsl:value-of select="$linebreak"/></fo:block>
552
- <fo:block font-size="11pt" font-style="italic" line-height="1.5">
552
+ <fo:block font-size="11pt" font-style="italic" line-height="1.5" role="H1">
553
553
 
554
554
  <xsl:if test="normalize-space($title-intro-fr) != ''">
555
555
  <xsl:value-of select="$title-intro-fr"/>
@@ -562,7 +562,7 @@
562
562
 
563
563
  <xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'fr' and @type = 'title-amd']"/>
564
564
  <xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
565
- <fo:block margin-top="6pt">
565
+ <fo:block margin-top="6pt" role="H1">
566
566
  <xsl:call-template name="printAmendmentTitle">
567
567
  <xsl:with-param name="lang" select="'fr'"/>
568
568
  </xsl:call-template>
@@ -654,7 +654,7 @@
654
654
  <xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:version/iso:revision-date"/> -->
655
655
  <xsl:if test="$doctype = 'amendment'">
656
656
  <fo:block text-align="right" margin-right="0.5mm">
657
- <fo:block font-weight="bold" margin-top="4pt">
657
+ <fo:block font-weight="bold" margin-top="4pt" role="H1">
658
658
  <xsl:variable name="title-amendment">
659
659
  <xsl:call-template name="getTitle">
660
660
  <xsl:with-param name="name" select="'title-amendment'"/>
@@ -724,7 +724,7 @@
724
724
  <fo:table-cell>
725
725
  <fo:block-container border-top="1mm double black" line-height="1.1">
726
726
  <fo:block margin-right="5mm">
727
- <fo:block font-size="18pt" font-weight="bold" margin-top="12pt">
727
+ <fo:block font-size="18pt" font-weight="bold" margin-top="12pt" role="H1">
728
728
 
729
729
  <xsl:if test="normalize-space($title-intro) != ''">
730
730
  <xsl:value-of select="$title-intro"/>
@@ -746,14 +746,14 @@
746
746
  </xsl:if> -->
747
747
  <xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'en' and @type = 'title-amd']"/>
748
748
  <xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
749
- <fo:block margin-right="-5mm" margin-top="12pt">
749
+ <fo:block margin-right="-5mm" margin-top="12pt" role="H1">
750
750
  <xsl:call-template name="printAmendmentTitle"/>
751
751
  </fo:block>
752
752
  </xsl:if>
753
753
  </fo:block>
754
754
 
755
755
  <fo:block font-size="9pt"><xsl:value-of select="$linebreak"/></fo:block>
756
- <fo:block font-size="11pt" font-style="italic" line-height="1.5">
756
+ <fo:block font-size="11pt" font-style="italic" line-height="1.5" role="H1">
757
757
 
758
758
  <xsl:if test="normalize-space($title-intro-fr) != ''">
759
759
  <xsl:value-of select="$title-intro-fr"/>
@@ -766,7 +766,7 @@
766
766
 
767
767
  <xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = 'fr' and @type = 'title-amd']"/>
768
768
  <xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
769
- <fo:block margin-right="-5mm" margin-top="6pt">
769
+ <fo:block margin-right="-5mm" margin-top="6pt" role="H1">
770
770
  <xsl:call-template name="printAmendmentTitle">
771
771
  <xsl:with-param name="lang" select="'fr'"/>
772
772
  </xsl:call-template>
@@ -857,7 +857,7 @@
857
857
 
858
858
  <fo:block-container border-top="1mm double black" line-height="1.1">
859
859
  <fo:block margin-right="40mm">
860
- <fo:block font-size="18pt" font-weight="bold" margin-top="12pt">
860
+ <fo:block font-size="18pt" font-weight="bold" margin-top="12pt" role="H1">
861
861
 
862
862
  <xsl:if test="normalize-space($title-intro) != ''">
863
863
  <xsl:value-of select="$title-intro"/>
@@ -880,7 +880,7 @@
880
880
  </fo:block>
881
881
 
882
882
  <fo:block font-size="9pt"><xsl:value-of select="$linebreak"/></fo:block>
883
- <fo:block font-size="11pt" font-style="italic" line-height="1.5">
883
+ <fo:block font-size="11pt" font-style="italic" line-height="1.5" role="H1">
884
884
 
885
885
  <xsl:if test="normalize-space($title-intro-fr) != ''">
886
886
  <xsl:value-of select="$title-intro-fr"/>
@@ -972,7 +972,7 @@
972
972
  </fo:block-container>
973
973
  <fo:block-container font-size="16pt">
974
974
  <!-- Information and documentation — Codes for transcription systems -->
975
- <fo:block font-weight="bold">
975
+ <fo:block font-weight="bold" role="H1">
976
976
 
977
977
  <xsl:if test="normalize-space($title-intro) != ''">
978
978
  <xsl:value-of select="$title-intro"/>
@@ -995,7 +995,7 @@
995
995
  </fo:block>
996
996
 
997
997
  <fo:block font-size="12pt"><xsl:value-of select="$linebreak"/></fo:block>
998
- <fo:block>
998
+ <fo:block role="H1">
999
999
  <xsl:if test="normalize-space($title-intro-fr) != ''">
1000
1000
  <xsl:value-of select="$title-intro-fr"/>
1001
1001
  <xsl:text> — </xsl:text>
@@ -1073,79 +1073,80 @@
1073
1073
  <fo:block break-after="page"/>
1074
1074
  </xsl:if>
1075
1075
  <fo:block-container font-weight="bold">
1076
-
1077
- <fo:block text-align-last="justify" font-size="16pt" margin-top="10pt" margin-bottom="18pt">
1078
- <fo:inline font-size="16pt" font-weight="bold">
1079
- <!-- Contents -->
1080
- <xsl:call-template name="getLocalizedString">
1081
- <xsl:with-param name="key">table_of_contents</xsl:with-param>
1082
- </xsl:call-template>
1083
- </fo:inline>
1084
- <fo:inline keep-together.within-line="always">
1085
- <fo:leader leader-pattern="space"/>
1086
- <fo:inline font-weight="normal" font-size="10pt">
1087
- <!-- Page -->
1076
+ <fo:block role="TOC">
1077
+ <fo:block text-align-last="justify" font-size="16pt" margin-top="10pt" margin-bottom="18pt">
1078
+ <fo:inline font-size="16pt" font-weight="bold" role="H1">
1079
+ <!-- Contents -->
1088
1080
  <xsl:call-template name="getLocalizedString">
1089
- <xsl:with-param name="key">locality.page</xsl:with-param>
1090
- </xsl:call-template>
1081
+ <xsl:with-param name="key">table_of_contents</xsl:with-param>
1082
+ </xsl:call-template>
1091
1083
  </fo:inline>
1092
- </fo:inline>
1093
- </fo:block>
1094
-
1095
- <xsl:if test="$debug = 'true'">
1096
- <xsl:text disable-output-escaping="yes">&lt;!--</xsl:text>
1097
- DEBUG
1098
- contents=<xsl:copy-of select="xalan:nodeset($contents)"/>
1099
- <xsl:text disable-output-escaping="yes">--&gt;</xsl:text>
1100
- </xsl:if>
1101
-
1102
- <xsl:variable name="margin-left">12</xsl:variable>
1103
- <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
1084
+ <fo:inline keep-together.within-line="always">
1085
+ <fo:leader leader-pattern="space"/>
1086
+ <fo:inline font-weight="normal" font-size="10pt">
1087
+ <!-- Page -->
1088
+ <xsl:call-template name="getLocalizedString">
1089
+ <xsl:with-param name="key">locality.page</xsl:with-param>
1090
+ </xsl:call-template>
1091
+ </fo:inline>
1092
+ </fo:inline>
1093
+ </fo:block>
1104
1094
 
1105
- <fo:block>
1106
- <xsl:if test="@level = 1">
1107
- <xsl:attribute name="margin-top">5pt</xsl:attribute>
1108
- </xsl:if>
1109
- <xsl:if test="@level = 3">
1110
- <xsl:attribute name="margin-top">-0.7pt</xsl:attribute>
1111
- </xsl:if>
1112
- <fo:list-block>
1113
- <xsl:attribute name="margin-left"><xsl:value-of select="$margin-left * (@level - 1)"/>mm</xsl:attribute>
1114
- <xsl:if test="@level &gt;= 2 or @type = 'annex'">
1115
- <xsl:attribute name="font-weight">normal</xsl:attribute>
1095
+ <xsl:if test="$debug = 'true'">
1096
+ <xsl:text disable-output-escaping="yes">&lt;!--</xsl:text>
1097
+ DEBUG
1098
+ contents=<xsl:copy-of select="xalan:nodeset($contents)"/>
1099
+ <xsl:text disable-output-escaping="yes">--&gt;</xsl:text>
1100
+ </xsl:if>
1101
+
1102
+ <xsl:variable name="margin-left">12</xsl:variable>
1103
+ <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
1104
+
1105
+ <fo:block role="TOCI">
1106
+ <xsl:if test="@level = 1">
1107
+ <xsl:attribute name="margin-top">5pt</xsl:attribute>
1116
1108
  </xsl:if>
1117
- <xsl:attribute name="provisional-distance-between-starts">
1118
- <xsl:choose>
1119
- <!-- skip 0 section without subsections -->
1120
- <xsl:when test="@level &gt;= 3"><xsl:value-of select="$margin-left * 1.2"/>mm</xsl:when>
1121
- <xsl:when test="@section != ''"><xsl:value-of select="$margin-left"/>mm</xsl:when>
1122
- <xsl:otherwise>0mm</xsl:otherwise>
1123
- </xsl:choose>
1124
- </xsl:attribute>
1125
- <fo:list-item>
1126
- <fo:list-item-label end-indent="label-end()">
1127
- <fo:block>
1128
- <xsl:value-of select="@section"/>
1129
- </fo:block>
1130
- </fo:list-item-label>
1131
- <fo:list-item-body start-indent="body-start()">
1132
- <fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
1133
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
1134
-
1135
- <xsl:apply-templates select="title"/>
1109
+ <xsl:if test="@level = 3">
1110
+ <xsl:attribute name="margin-top">-0.7pt</xsl:attribute>
1111
+ </xsl:if>
1112
+ <fo:list-block>
1113
+ <xsl:attribute name="margin-left"><xsl:value-of select="$margin-left * (@level - 1)"/>mm</xsl:attribute>
1114
+ <xsl:if test="@level &gt;= 2 or @type = 'annex'">
1115
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1116
+ </xsl:if>
1117
+ <xsl:attribute name="provisional-distance-between-starts">
1118
+ <xsl:choose>
1119
+ <!-- skip 0 section without subsections -->
1120
+ <xsl:when test="@level &gt;= 3"><xsl:value-of select="$margin-left * 1.2"/>mm</xsl:when>
1121
+ <xsl:when test="@section != ''"><xsl:value-of select="$margin-left"/>mm</xsl:when>
1122
+ <xsl:otherwise>0mm</xsl:otherwise>
1123
+ </xsl:choose>
1124
+ </xsl:attribute>
1125
+ <fo:list-item>
1126
+ <fo:list-item-label end-indent="label-end()">
1127
+ <fo:block>
1128
+ <xsl:value-of select="@section"/>
1129
+ </fo:block>
1130
+ </fo:list-item-label>
1131
+ <fo:list-item-body start-indent="body-start()">
1132
+ <fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
1133
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
1136
1134
 
1137
- <fo:inline keep-together.within-line="always">
1138
- <fo:leader font-size="9pt" font-weight="normal" leader-pattern="dots"/>
1139
- <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
1140
- </fo:inline>
1141
- </fo:basic-link>
1142
- </fo:block>
1143
- </fo:list-item-body>
1144
- </fo:list-item>
1145
- </fo:list-block>
1146
- </fo:block>
1147
-
1148
- </xsl:for-each>
1135
+ <xsl:apply-templates select="title"/>
1136
+
1137
+ <fo:inline keep-together.within-line="always">
1138
+ <fo:leader font-size="9pt" font-weight="normal" leader-pattern="dots"/>
1139
+ <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
1140
+ </fo:inline>
1141
+ </fo:basic-link>
1142
+ </fo:block>
1143
+ </fo:list-item-body>
1144
+ </fo:list-item>
1145
+ </fo:list-block>
1146
+ </fo:block>
1147
+
1148
+ </xsl:for-each>
1149
+ </fo:block>
1149
1150
  </fo:block-container>
1150
1151
  </xsl:otherwise>
1151
1152
  </xsl:choose>
@@ -1179,7 +1180,7 @@
1179
1180
 
1180
1181
  <xsl:variable name="title-intro-doc-lang" select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
1181
1182
 
1182
- <fo:block>
1183
+ <fo:block role="H1">
1183
1184
  <xsl:if test="normalize-space($title-intro-doc-lang) != ''">
1184
1185
  <xsl:value-of select="$title-intro-doc-lang"/>
1185
1186
  <xsl:text> — </xsl:text>
@@ -1201,13 +1202,13 @@
1201
1202
  </xsl:if>
1202
1203
  </xsl:if>
1203
1204
  </fo:block>
1204
- <fo:block>
1205
+ <fo:block role="H1">
1205
1206
  <xsl:value-of select="$title-part-doc-lang"/>
1206
1207
  </fo:block>
1207
1208
 
1208
1209
  <xsl:variable name="title-amd" select="/iso:iso-standard/iso:bibdata/iso:title[@language = $lang and @type = 'title-amd']"/>
1209
1210
  <xsl:if test="$doctype = 'amendment' and normalize-space($title-amd) != ''">
1210
- <fo:block margin-top="12pt">
1211
+ <fo:block margin-top="12pt" role="H1">
1211
1212
  <xsl:call-template name="printAmendmentTitle"/>
1212
1213
  </fo:block>
1213
1214
  </xsl:if>
@@ -1454,7 +1455,10 @@
1454
1455
 
1455
1456
 
1456
1457
  <xsl:template match="iso:license-statement//iso:title">
1457
- <fo:block text-align="center" font-weight="bold">
1458
+ <xsl:variable name="level">
1459
+ <xsl:call-template name="getLevel"/>
1460
+ </xsl:variable>
1461
+ <fo:block text-align="center" font-weight="bold" role="H{$level}">
1458
1462
  <xsl:apply-templates/>
1459
1463
  </fo:block>
1460
1464
  </xsl:template>
@@ -1482,7 +1486,7 @@
1482
1486
  </fo:block> -->
1483
1487
 
1484
1488
  <xsl:template match="iso:copyright-statement/iso:clause[1]/iso:title">
1485
- <fo:block margin-bottom="3mm">
1489
+ <fo:block margin-bottom="3mm" role="H1">
1486
1490
  <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Attention))}" width="14mm" content-height="13mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image {@alt}"/>
1487
1491
  <!-- <fo:inline padding-left="6mm" font-size="12pt" font-weight="bold">COPYRIGHT PROTECTED DOCUMENT</fo:inline> -->
1488
1492
  <fo:inline padding-left="6mm" font-size="12pt" font-weight="bold"><xsl:apply-templates/></fo:inline>
@@ -1519,8 +1523,9 @@
1519
1523
  <xsl:call-template name="titleAmendment"/>
1520
1524
  </xsl:when>
1521
1525
  <xsl:otherwise>
1522
- <fo:block font-size="16pt" text-align="center" margin-bottom="48pt" keep-with-next="always">
1526
+ <fo:block font-size="16pt" text-align="center" margin-bottom="48pt" keep-with-next="always" role="H1">
1523
1527
  <xsl:apply-templates/>
1528
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
1524
1529
  </fo:block>
1525
1530
  </xsl:otherwise>
1526
1531
  </xsl:choose>
@@ -1533,7 +1538,7 @@
1533
1538
  <xsl:call-template name="titleAmendment"/>
1534
1539
  </xsl:when>
1535
1540
  <xsl:otherwise>
1536
- <fo:block font-size="16pt" font-weight="bold" text-align="center" margin-top="6pt" margin-bottom="36pt" keep-with-next="always">
1541
+ <fo:block font-size="16pt" font-weight="bold" text-align="center" margin-top="6pt" margin-bottom="36pt" keep-with-next="always" role="H1">
1537
1542
  <xsl:apply-templates/>
1538
1543
  </fo:block>
1539
1544
  </xsl:otherwise>
@@ -1566,8 +1571,9 @@
1566
1571
 
1567
1572
  <xsl:choose>
1568
1573
  <xsl:when test="$doctype = 'amendment' and not(ancestor::iso:preface)">
1569
- <fo:block font-size="11pt" font-style="italic" margin-bottom="12pt" keep-with-next="always">
1574
+ <fo:block font-size="11pt" font-style="italic" margin-bottom="12pt" keep-with-next="always" role="H{$level}">
1570
1575
  <xsl:apply-templates/>
1576
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
1571
1577
  </fo:block>
1572
1578
  </xsl:when>
1573
1579
 
@@ -1593,6 +1599,7 @@
1593
1599
  </xsl:choose>
1594
1600
  </xsl:attribute>
1595
1601
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1602
+ <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
1596
1603
  <xsl:if test="$element-name = 'fo:inline'">
1597
1604
  <xsl:choose>
1598
1605
  <xsl:when test="$lang = 'zh'">
@@ -1604,6 +1611,7 @@
1604
1611
  </xsl:choose>
1605
1612
  </xsl:if>
1606
1613
  <xsl:apply-templates/>
1614
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
1607
1615
  </xsl:element>
1608
1616
 
1609
1617
  <xsl:if test="$element-name = 'fo:inline' and not(following-sibling::iso:p)">
@@ -1784,8 +1792,11 @@
1784
1792
  <xsl:apply-templates select="."/>
1785
1793
  </xsl:template>
1786
1794
 
1787
- <xsl:template match="iso:preferred">
1788
- <fo:block line-height="1.1">
1795
+ <xsl:template match="iso:preferred">
1796
+ <xsl:variable name="levelTerm">
1797
+ <xsl:call-template name="getLevelTermName"/>
1798
+ </xsl:variable>
1799
+ <fo:block line-height="1.1" role="H{$levelTerm}">
1789
1800
  <fo:block font-weight="bold" keep-with-next="always">
1790
1801
  <xsl:apply-templates select="ancestor::iso:term/iso:name" mode="presentation"/>
1791
1802
  </fo:block>
@@ -1949,7 +1960,7 @@
1949
1960
  <fo:block id="{@id}" span="all">
1950
1961
  <xsl:apply-templates select="iso:title"/>
1951
1962
  </fo:block>
1952
- <fo:block>
1963
+ <fo:block role="Index">
1953
1964
  <xsl:apply-templates select="*[not(local-name() = 'title')]"/>
1954
1965
  </fo:block>
1955
1966
  </fo:flow>
@@ -1958,7 +1969,7 @@
1958
1969
 
1959
1970
  <!-- <xsl:template match="iso:clause[@type = 'index']/iso:title" priority="4"> -->
1960
1971
  <xsl:template match="iso:indexsect/iso:title" priority="4">
1961
- <fo:block font-size="16pt" font-weight="bold" margin-bottom="84pt">
1972
+ <fo:block font-size="16pt" font-weight="bold" margin-bottom="84pt" role="H1">
1962
1973
  <!-- Index -->
1963
1974
  <xsl:apply-templates/>
1964
1975
  </fo:block>
@@ -2003,7 +2014,7 @@
2003
2014
  <xsl:template name="insertHeaderFooter">
2004
2015
  <xsl:param name="font-weight" select="'bold'"/>
2005
2016
  <xsl:call-template name="insertHeaderEven"/>
2006
- <fo:static-content flow-name="footer-even">
2017
+ <fo:static-content flow-name="footer-even" role="artifact">
2007
2018
  <fo:block-container> <!-- display-align="after" -->
2008
2019
  <fo:table table-layout="fixed" width="100%">
2009
2020
  <fo:table-column column-width="33%"/>
@@ -2042,12 +2053,12 @@
2042
2053
  </fo:block>
2043
2054
  </fo:block-container>
2044
2055
  </fo:static-content>
2045
- <fo:static-content flow-name="header-odd">
2056
+ <fo:static-content flow-name="header-odd" role="artifact">
2046
2057
  <fo:block-container height="24mm" display-align="before">
2047
2058
  <fo:block font-size="12pt" font-weight="bold" text-align="right" padding-top="12.5mm"><xsl:value-of select="$ISOname"/></fo:block>
2048
2059
  </fo:block-container>
2049
2060
  </fo:static-content>
2050
- <fo:static-content flow-name="footer-odd">
2061
+ <fo:static-content flow-name="footer-odd" role="artifact">
2051
2062
  <fo:block-container> <!-- display-align="after" -->
2052
2063
  <fo:table table-layout="fixed" width="100%">
2053
2064
  <fo:table-column column-width="33%"/>
@@ -2075,7 +2086,7 @@
2075
2086
  </fo:static-content>
2076
2087
  </xsl:template>
2077
2088
  <xsl:template name="insertHeaderEven">
2078
- <fo:static-content flow-name="header-even">
2089
+ <fo:static-content flow-name="header-even" role="artifact">
2079
2090
  <fo:block-container height="24mm" display-align="before">
2080
2091
  <fo:block font-size="12pt" font-weight="bold" padding-top="12.5mm"><xsl:value-of select="$ISOname"/></fo:block>
2081
2092
  </fo:block-container>
@@ -2326,6 +2337,7 @@
2326
2337
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
2327
2338
  <xsl:attribute name="white-space">pre</xsl:attribute>
2328
2339
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
2340
+ <xsl:attribute name="role">Code</xsl:attribute>
2329
2341
 
2330
2342
  <xsl:attribute name="font-family">Courier New</xsl:attribute>
2331
2343
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
@@ -2350,8 +2362,13 @@
2350
2362
 
2351
2363
  </xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
2352
2364
 
2353
- </xsl:attribute-set><xsl:attribute-set name="requirement-subject-style">
2354
- </xsl:attribute-set><xsl:attribute-set name="requirement-inherit-style">
2365
+ </xsl:attribute-set><xsl:attribute-set name="subject-style">
2366
+ </xsl:attribute-set><xsl:attribute-set name="inherit-style">
2367
+ </xsl:attribute-set><xsl:attribute-set name="description-style">
2368
+ </xsl:attribute-set><xsl:attribute-set name="specification-style">
2369
+ </xsl:attribute-set><xsl:attribute-set name="measurement-target-style">
2370
+ </xsl:attribute-set><xsl:attribute-set name="verification-style">
2371
+ </xsl:attribute-set><xsl:attribute-set name="import-style">
2355
2372
  </xsl:attribute-set><xsl:attribute-set name="recommendation-style">
2356
2373
 
2357
2374
 
@@ -2576,7 +2593,8 @@
2576
2593
 
2577
2594
 
2578
2595
 
2579
- </xsl:attribute-set><xsl:attribute-set name="quote-style">
2596
+ </xsl:attribute-set><xsl:attribute-set name="quote-style">
2597
+ <xsl:attribute name="role">BlockQuote</xsl:attribute>
2580
2598
 
2581
2599
 
2582
2600
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
@@ -2778,7 +2796,9 @@
2778
2796
  <!-- Display table's name before table as standalone block -->
2779
2797
  <!-- $namespace = 'iso' or -->
2780
2798
 
2781
-
2799
+
2800
+
2801
+
2782
2802
 
2783
2803
 
2784
2804
 
@@ -4765,12 +4785,43 @@
4765
4785
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
4766
4786
  </xsl:call-template>
4767
4787
 
4788
+
4789
+
4768
4790
  <xsl:variable name="mathml">
4769
4791
  <xsl:apply-templates select="." mode="mathml"/>
4770
4792
  </xsl:variable>
4771
4793
  <fo:instream-foreign-object fox:alt-text="Math">
4772
4794
 
4773
4795
 
4796
+ <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
4797
+ <xsl:variable name="comment_text_">
4798
+ <xsl:choose>
4799
+ <xsl:when test="normalize-space($comment_text_following) != ''">
4800
+ <xsl:value-of select="$comment_text_following"/>
4801
+ </xsl:when>
4802
+ <xsl:otherwise>
4803
+ <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/>
4804
+ </xsl:otherwise>
4805
+ </xsl:choose>
4806
+ </xsl:variable>
4807
+ <xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
4808
+
4809
+ <xsl:if test="normalize-space($comment_text) != ''">
4810
+ <!-- put Mathin Alternate Text -->
4811
+ <xsl:attribute name="fox:alt-text">
4812
+ <xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
4813
+ </xsl:attribute>
4814
+ </xsl:if>
4815
+
4816
+ <xsl:variable name="mathml_content">
4817
+ <xsl:apply-templates select="." mode="mathml_actual_text"/>
4818
+ </xsl:variable>
4819
+ <!-- put MathML in Actual Text -->
4820
+ <xsl:attribute name="fox:actual-text">
4821
+ <xsl:value-of select="$mathml_content"/>
4822
+ </xsl:attribute>
4823
+
4824
+
4774
4825
  <xsl:if test="count(ancestor::*[local-name() = 'table']) &gt; 1">
4775
4826
  <xsl:attribute name="width">95%</xsl:attribute>
4776
4827
  <xsl:attribute name="content-height">100%</xsl:attribute>
@@ -4782,6 +4833,27 @@
4782
4833
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
4783
4834
  </fo:instream-foreign-object>
4784
4835
  </fo:inline>
4836
+ </xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
4837
+ <!-- <xsl:text>a+b</xsl:text> -->
4838
+ <xsl:text>&lt;</xsl:text>
4839
+ <xsl:value-of select="local-name()"/>
4840
+ <xsl:if test="local-name() = 'math'">
4841
+ <xsl:text> xmlns="http://www.w3.org/1998/Math/MathML"</xsl:text>
4842
+ </xsl:if>
4843
+ <xsl:for-each select="@*">
4844
+ <xsl:text> </xsl:text>
4845
+ <xsl:value-of select="local-name()"/>
4846
+ <xsl:text>="</xsl:text>
4847
+ <xsl:value-of select="."/>
4848
+ <xsl:text>"</xsl:text>
4849
+ </xsl:for-each>
4850
+ <xsl:text>&gt;</xsl:text>
4851
+ <xsl:apply-templates mode="mathml_actual_text"/>
4852
+ <xsl:text>&lt;/</xsl:text>
4853
+ <xsl:value-of select="local-name()"/>
4854
+ <xsl:text>&gt;</xsl:text>
4855
+ </xsl:template><xsl:template match="text()" mode="mathml_actual_text">
4856
+ <xsl:value-of select="normalize-space()"/>
4785
4857
  </xsl:template><xsl:template match="@*|node()" mode="mathml">
4786
4858
  <xsl:copy>
4787
4859
  <xsl:apply-templates select="@*|node()" mode="mathml"/>
@@ -4843,7 +4915,10 @@
4843
4915
  </fo:block>
4844
4916
  <xsl:apply-templates/>
4845
4917
  </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
4846
- <fo:inline><xsl:apply-templates/></fo:inline>
4918
+ <xsl:variable name="level">
4919
+ <xsl:call-template name="getLevel"/>
4920
+ </xsl:variable>
4921
+ <fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
4847
4922
  </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
4848
4923
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
4849
4924
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
@@ -4878,9 +4953,10 @@
4878
4953
 
4879
4954
  </xsl:variable>
4880
4955
 
4956
+ <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
4881
4957
  <xsl:choose>
4882
- <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
4883
- <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
4958
+ <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>
4959
+ <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>
4884
4960
  </xsl:choose>
4885
4961
  <xsl:apply-templates/>
4886
4962
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
@@ -5026,7 +5102,10 @@
5026
5102
  </fo:block>
5027
5103
  </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
5028
5104
  <xsl:if test="normalize-space() != ''">
5029
- <fo:inline>
5105
+ <xsl:variable name="level">
5106
+ <xsl:call-template name="getLevelTermName"/>
5107
+ </xsl:variable>
5108
+ <fo:inline role="H{$level}">
5030
5109
  <xsl:apply-templates/>
5031
5110
  <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
5032
5111
  <xsl:text>.</xsl:text>
@@ -5657,6 +5736,7 @@
5657
5736
  </xsl:when>
5658
5737
  <xsl:otherwise>
5659
5738
  <xsl:apply-templates/>
5739
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
5660
5740
  </xsl:otherwise>
5661
5741
  </xsl:choose>
5662
5742
  </fo:block>
@@ -5797,14 +5877,6 @@
5797
5877
  <fo:block>
5798
5878
  <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
5799
5879
  </fo:block>
5800
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
5801
- <fo:block xsl:use-attribute-sets="requirement-subject-style">
5802
- <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
5803
- </fo:block>
5804
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
5805
- <fo:block xsl:use-attribute-sets="requirement-inherit-style">
5806
- <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
5807
- </fo:block>
5808
5880
  </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
5809
5881
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
5810
5882
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
@@ -5821,6 +5893,38 @@
5821
5893
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
5822
5894
  <xsl:apply-templates/>
5823
5895
  </fo:block>
5896
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
5897
+ <fo:block xsl:use-attribute-sets="subject-style">
5898
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
5899
+ </fo:block>
5900
+ </xsl:template><xsl:template match="*[local-name() = 'subject']">
5901
+ <fo:block xsl:use-attribute-sets="subject-style">
5902
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
5903
+ </fo:block>
5904
+ </xsl:template><xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
5905
+ <fo:block xsl:use-attribute-sets="inherit-style">
5906
+ <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
5907
+ </fo:block>
5908
+ </xsl:template><xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
5909
+ <fo:block xsl:use-attribute-sets="description-style">
5910
+ <xsl:apply-templates/>
5911
+ </fo:block>
5912
+ </xsl:template><xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
5913
+ <fo:block xsl:use-attribute-sets="specification-style">
5914
+ <xsl:apply-templates/>
5915
+ </fo:block>
5916
+ </xsl:template><xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
5917
+ <fo:block xsl:use-attribute-sets="measurement-target-style">
5918
+ <xsl:apply-templates/>
5919
+ </fo:block>
5920
+ </xsl:template><xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
5921
+ <fo:block xsl:use-attribute-sets="verification-style">
5922
+ <xsl:apply-templates/>
5923
+ </fo:block>
5924
+ </xsl:template><xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
5925
+ <fo:block xsl:use-attribute-sets="import-style">
5926
+ <xsl:apply-templates/>
5927
+ </fo:block>
5824
5928
  </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
5825
5929
  <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
5826
5930
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
@@ -6725,6 +6829,9 @@
6725
6829
  <fo:block-container border="1pt solid black" width="50%">
6726
6830
  <fo:block> </fo:block>
6727
6831
  </fo:block-container>
6832
+ </xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
6833
+ <fo:inline padding-right="5mm"> </fo:inline>
6834
+ <fo:inline><xsl:apply-templates/></fo:inline>
6728
6835
  </xsl:template><xsl:template name="convertDate">
6729
6836
  <xsl:param name="date"/>
6730
6837
  <xsl:param name="format" select="'short'"/>
@@ -6963,6 +7070,26 @@
6963
7070
  <xsl:value-of select="$level"/>
6964
7071
  </xsl:otherwise>
6965
7072
  </xsl:choose>
7073
+ </xsl:template><xsl:template name="getLevelTermName">
7074
+ <xsl:choose>
7075
+ <xsl:when test="normalize-space(../@depth) != ''">
7076
+ <xsl:value-of select="../@depth"/>
7077
+ </xsl:when>
7078
+ <xsl:otherwise>
7079
+ <xsl:variable name="title_level_">
7080
+ <xsl:for-each select="../preceding-sibling::*[local-name() = 'title'][1]">
7081
+ <xsl:call-template name="getLevel"/>
7082
+ </xsl:for-each>
7083
+ </xsl:variable>
7084
+ <xsl:variable name="title_level" select="normalize-space($title_level_)"/>
7085
+ <xsl:choose>
7086
+ <xsl:when test="$title_level != ''"><xsl:value-of select="$title_level + 1"/></xsl:when>
7087
+ <xsl:otherwise>
7088
+ <xsl:call-template name="getLevel"/>
7089
+ </xsl:otherwise>
7090
+ </xsl:choose>
7091
+ </xsl:otherwise>
7092
+ </xsl:choose>
6966
7093
  </xsl:template><xsl:template name="split">
6967
7094
  <xsl:param name="pText" select="."/>
6968
7095
  <xsl:param name="sep" select="','"/>