lib/isodoc/itu/itu.recommendation-supplement.xsl in metanorma-itu-1.3.9 vs lib/isodoc/itu/itu.recommendation-supplement.xsl in metanorma-itu-1.3.10
- old
+ new
@@ -300,11 +300,11 @@
<fo:table-row>
<fo:table-cell padding-left="1mm" padding-top="2mm">
<fo:block font-weight="bold">Title:</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="4" padding-top="2mm">
- <fo:block><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@language='en' and @type='main']"/></fo:block>
+ <fo:block role="H1"><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@language='en' and @type='main']"/></fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
@@ -416,11 +416,11 @@
<fo:block-container height="75mm" display-align="center">
<xsl:variable name="title_main" select="/*/itu:bibdata/itu:title[@type='main' and @language = $lang]"/>
<xsl:variable name="series_main" select="normalize-space(/*/itu:bibdata/itu:series[@type='main']/itu:title)"/>
<xsl:variable name="series_secondary" select="normalize-space(/*/itu:bibdata/itu:series[@type='secondary']/itu:title)"/>
<xsl:variable name="series_tertiary" select="normalize-space(/*/itu:bibdata/itu:series[@type='tertiary']/itu:title)"/>
- <fo:block font-weight="bold">
+ <fo:block font-weight="bold" role="H1">
<xsl:choose>
<xsl:when test="$series_main != '' and $series_secondary != '' and $series_tertiary = ''">
<fo:block font-size="16pt">
<xsl:value-of select="$series_main"/>
</fo:block>
@@ -772,11 +772,11 @@
<fo:block> </fo:block>
</fo:table-cell>
<fo:table-cell font-size="18pt" number-columns-spanned="3">
<fo:block-container>
<xsl:call-template name="setWritingMode"/>
- <fo:block padding-right="2mm" margin-top="6pt">
+ <fo:block padding-right="2mm" margin-top="6pt" role="H1">
<xsl:if test="not(/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = 'en']) and $isAmendment = '' and $isCorrigendum = ''">
<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:if>
<xsl:if test="($doctype = 'technical-report' or $doctype = 'technical-paper') and /itu:itu-standard/itu:bibdata/itu:docnumber">
<fo:block font-weight="bold">
@@ -793,25 +793,25 @@
<xsl:text> – </xsl:text>
</xsl:if>
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = 'en']"/>
</fo:block>
<xsl:for-each select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = 'en']">
- <fo:block font-weight="bold">
+ <fo:block font-weight="bold" role="H1">
<xsl:value-of select="."/>
</fo:block>
</xsl:for-each>
<xsl:if test="$isAmendment != ''">
- <fo:block padding-right="2mm" margin-top="6pt" font-weight="bold">
+ <fo:block padding-right="2mm" margin-top="6pt" font-weight="bold" role="H1">
<xsl:value-of select="$isAmendment"/>
<xsl:if test="/itu:itu-standard/itu:bibdata/itu:title[@type = 'amendment']">
<xsl:text>: </xsl:text>
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'amendment']"/>
</xsl:if>
</fo:block>
</xsl:if>
<xsl:if test="$isCorrigendum != ''">
- <fo:block padding-right="2mm" margin-top="6pt" font-weight="bold">
+ <fo:block padding-right="2mm" margin-top="6pt" font-weight="bold" role="H1">
<xsl:value-of select="$isCorrigendum"/>
<xsl:if test="/itu:itu-standard/itu:bibdata/itu:title[@type = 'corrigendum']">
<xsl:text>: </xsl:text>
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'corrigendum']"/>
</xsl:if>
@@ -943,11 +943,11 @@
<xsl:text> </xsl:text>
<xsl:value-of select="$docname"/>
</fo:block>
</xsl:otherwise>
</xsl:choose>
- <fo:block text-align="center" margin-top="15pt" margin-bottom="15pt">
+ <fo:block text-align="center" margin-top="15pt" margin-bottom="15pt" role="H1">
<xsl:if test="$doctype = 'service-publication'">
<xsl:attribute name="margin-top">0pt</xsl:attribute>
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
</xsl:if>
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = $lang]"/>
@@ -995,141 +995,142 @@
<xsl:text disable-output-escaping="yes">--></xsl:text>
</xsl:if>
<xsl:if test="xalan:nodeset($contents)//item[@display = 'true'] and $doctype != 'resolution' and $doctype != 'service-publication'">
<fo:block break-after="page"/>
- <fo:block-container>
- <fo:block margin-top="6pt" text-align="center" font-weight="bold">
- <xsl:call-template name="getLocalizedString">
- <xsl:with-param name="key">table_of_contents</xsl:with-param>
- </xsl:call-template>
- </fo:block>
- <fo:block margin-top="6pt" text-align="end" font-weight="bold">
- <xsl:call-template name="getLocalizedString">
- <xsl:with-param name="key">Page.sg</xsl:with-param>
- </xsl:call-template>
- </fo:block>
-
- <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
- <fo:block>
- <xsl:if test="@level = 1">
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
- </xsl:if>
- <xsl:if test="@level = 2">
- <xsl:attribute name="margin-top">4pt</xsl:attribute>
- <!-- <xsl:attribute name="margin-left">12mm</xsl:attribute> -->
- </xsl:if>
- <fo:list-block provisional-label-separation="3mm">
- <xsl:attribute name="provisional-distance-between-starts">
- <xsl:choose>
- <xsl:when test="@section != ''">
- <xsl:if test="@level = 1">
- <xsl:choose>
- <xsl:when test="string-length(@section) > 10">27mm</xsl:when>
- <xsl:when test="string-length(@section) > 5">22mm</xsl:when>
- <!-- <xsl:when test="@type = 'annex'">20mm</xsl:when> -->
- <xsl:otherwise>12mm</xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- <xsl:if test="@level = 2">26mm</xsl:if>
- </xsl:when> <!-- -->
- <xsl:otherwise>0mm</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <fo:list-item>
- <fo:list-item-label end-indent="label-end()">
- <xsl:if test="@level =2">
- <xsl:attribute name="start-indent">12mm</xsl:attribute>
- </xsl:if>
- <fo:block>
- <xsl:if test="@section">
- <xsl:value-of select="@section"/>
- </xsl:if>
- </fo:block>
- </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block text-align-last="justify">
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
- <xsl:apply-templates select="title"/>
- <fo:inline keep-together.within-line="always">
- <fo:leader leader-pattern="dots"/>
- <fo:page-number-citation ref-id="{@id}"/>
- </fo:inline>
- </fo:basic-link>
- </fo:block>
- </fo:list-item-body>
- </fo:list-item>
- </fo:list-block>
- </fo:block>
- </xsl:for-each>
-
-
- <xsl:if test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
- <xsl:if test="//itu:table[@id and itu:name]">
- <xsl:variable name="title-list-tables">
- <xsl:call-template name="getTitle">
- <xsl:with-param name="name" select="'title-list-tables'"/>
- </xsl:call-template>
- </xsl:variable>
-
- <fo:block space-before="36pt" text-align="center" font-weight="bold" keep-with-next="always">
- <xsl:value-of select="$title-list-tables"/>
- </fo:block>
- <fo:block margin-top="6pt" text-align="end" font-weight="bold" keep-with-next="always">
+ <fo:block-container>
+ <fo:block role="TOC">
+ <fo:block margin-top="6pt" text-align="center" font-weight="bold" role="H1">
<xsl:call-template name="getLocalizedString">
- <xsl:with-param name="key">Page.sg</xsl:with-param>
+ <xsl:with-param name="key">table_of_contents</xsl:with-param>
</xsl:call-template>
</fo:block>
-
- <fo:block-container>
- <xsl:for-each select="//itu:table[@id and itu:name]">
- <fo:block text-align-last="justify" margin-top="6pt">
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{itu:name}">
- <xsl:apply-templates select="itu:name" mode="contents"/>
- <fo:inline keep-together.within-line="always">
- <fo:leader leader-pattern="dots"/>
- <fo:page-number-citation ref-id="{@id}"/>
- </fo:inline>
- </fo:basic-link>
- </fo:block>
- </xsl:for-each>
- </fo:block-container>
- </xsl:if>
-
- <xsl:if test="//itu:figure[@id and itu:name]">
- <xsl:variable name="title-list-figures">
- <xsl:call-template name="getTitle">
- <xsl:with-param name="name" select="'title-list-figures'"/>
- </xsl:call-template>
- </xsl:variable>
-
-
- <fo:block space-before="36pt" text-align="center" font-weight="bold" keep-with-next="always">
- <xsl:value-of select="$title-list-figures"/>
- </fo:block>
- <fo:block margin-top="6pt" text-align="end" font-weight="bold" keep-with-next="always">
+ <fo:block margin-top="6pt" text-align="end" font-weight="bold">
<xsl:call-template name="getLocalizedString">
<xsl:with-param name="key">Page.sg</xsl:with-param>
</xsl:call-template>
</fo:block>
- <fo:block-container>
- <xsl:for-each select="//itu:figure[@id and itu:name]">
- <fo:block text-align-last="justify" margin-top="6pt">
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{itu:name}">
- <xsl:apply-templates select="itu:name" mode="contents"/>
- <fo:inline keep-together.within-line="always">
- <fo:leader leader-pattern="dots"/>
- <fo:page-number-citation ref-id="{@id}"/>
- </fo:inline>
- </fo:basic-link>
- </fo:block>
- </xsl:for-each>
- </fo:block-container>
+ <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
+ <fo:block role="TOCI">
+ <xsl:if test="@level = 1">
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@level = 2">
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
+ <!-- <xsl:attribute name="margin-left">12mm</xsl:attribute> -->
+ </xsl:if>
+ <fo:list-block provisional-label-separation="3mm">
+ <xsl:attribute name="provisional-distance-between-starts">
+ <xsl:choose>
+ <xsl:when test="@section != ''">
+ <xsl:if test="@level = 1">
+ <xsl:choose>
+ <xsl:when test="string-length(@section) > 10">27mm</xsl:when>
+ <xsl:when test="string-length(@section) > 5">22mm</xsl:when>
+ <!-- <xsl:when test="@type = 'annex'">20mm</xsl:when> -->
+ <xsl:otherwise>12mm</xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="@level = 2">26mm</xsl:if>
+ </xsl:when> <!-- -->
+ <xsl:otherwise>0mm</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <fo:list-item>
+ <fo:list-item-label end-indent="label-end()">
+ <xsl:if test="@level =2">
+ <xsl:attribute name="start-indent">12mm</xsl:attribute>
+ </xsl:if>
+ <fo:block>
+ <xsl:if test="@section">
+ <xsl:value-of select="@section"/>
+ </xsl:if>
+ </fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()">
+ <fo:block text-align-last="justify">
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
+ <xsl:apply-templates select="title"/>
+ <fo:inline keep-together.within-line="always">
+ <fo:leader leader-pattern="dots"/>
+ <fo:page-number-citation ref-id="{@id}"/>
+ </fo:inline>
+ </fo:basic-link>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ </fo:block>
+ </xsl:for-each>
+
+
+ <xsl:if test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
+ <xsl:if test="//itu:table[@id and itu:name]">
+ <xsl:variable name="title-list-tables">
+ <xsl:call-template name="getTitle">
+ <xsl:with-param name="name" select="'title-list-tables'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <fo:block space-before="36pt" text-align="center" font-weight="bold" keep-with-next="always">
+ <xsl:value-of select="$title-list-tables"/>
+ </fo:block>
+ <fo:block margin-top="6pt" text-align="end" font-weight="bold" keep-with-next="always">
+ <xsl:call-template name="getLocalizedString">
+ <xsl:with-param name="key">Page.sg</xsl:with-param>
+ </xsl:call-template>
+ </fo:block>
+
+ <fo:block-container>
+ <xsl:for-each select="//itu:table[@id and itu:name]">
+ <fo:block text-align-last="justify" margin-top="6pt" role="TOCI">
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{itu:name}">
+ <xsl:apply-templates select="itu:name" mode="contents"/>
+ <fo:inline keep-together.within-line="always">
+ <fo:leader leader-pattern="dots"/>
+ <fo:page-number-citation ref-id="{@id}"/>
+ </fo:inline>
+ </fo:basic-link>
+ </fo:block>
+ </xsl:for-each>
+ </fo:block-container>
+ </xsl:if>
+
+ <xsl:if test="//itu:figure[@id and itu:name]">
+ <xsl:variable name="title-list-figures">
+ <xsl:call-template name="getTitle">
+ <xsl:with-param name="name" select="'title-list-figures'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+
+ <fo:block space-before="36pt" text-align="center" font-weight="bold" keep-with-next="always">
+ <xsl:value-of select="$title-list-figures"/>
+ </fo:block>
+ <fo:block margin-top="6pt" text-align="end" font-weight="bold" keep-with-next="always">
+ <xsl:call-template name="getLocalizedString">
+ <xsl:with-param name="key">Page.sg</xsl:with-param>
+ </xsl:call-template>
+ </fo:block>
+
+ <fo:block-container>
+ <xsl:for-each select="//itu:figure[@id and itu:name]">
+ <fo:block text-align-last="justify" margin-top="6pt" role="TOCI">
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{itu:name}">
+ <xsl:apply-templates select="itu:name" mode="contents"/>
+ <fo:inline keep-together.within-line="always">
+ <fo:leader leader-pattern="dots"/>
+ <fo:page-number-citation ref-id="{@id}"/>
+ </fo:inline>
+ </fo:basic-link>
+ </fo:block>
+ </xsl:for-each>
+ </fo:block-container>
+ </xsl:if>
</xsl:if>
- </xsl:if>
-
+ </fo:block>
</fo:block-container>
</xsl:if>
</fo:flow>
</fo:page-sequence>
@@ -1176,11 +1177,11 @@
<xsl:value-of select="$docname"/>
</fo:block>
</xsl:otherwise>
</xsl:choose>
- <fo:block font-weight="bold" text-align="center" margin-top="15pt" margin-bottom="15pt">
+ <fo:block font-weight="bold" text-align="center" margin-top="15pt" margin-bottom="15pt" role="H1">
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = $lang]"/>
<xsl:variable name="subtitle" select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'subtitle' and @language = $lang]"/>
<xsl:if test="$subtitle != ''">
<fo:block margin-top="18pt" font-weight="normal" font-style="italic">
@@ -1385,17 +1386,21 @@
<xsl:template match="itu:preface//itu:title" priority="3">
<!-- <xsl:if test="$doctype = 'service-publication'">
<fo:block> </fo:block>
<fo:block> </fo:block>
</xsl:if> -->
- <fo:block font-weight="bold" margin-top="18pt" margin-bottom="18pt" keep-with-next="always">
+ <xsl:variable name="level">
+ <xsl:call-template name="getLevel"/>
+ </xsl:variable>
+ <fo:block font-weight="bold" margin-top="18pt" margin-bottom="18pt" keep-with-next="always" role="H{$level}">
<xsl:if test="$doctype = 'service-publication'">
<xsl:attribute name="margin-top">24pt</xsl:attribute>
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
<xsl:attribute name="font-size">12pt</xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
</fo:block>
<!-- <xsl:if test="$doctype = 'service-publication'">
<fo:block keep-with-next="always"> </fo:block>
</xsl:if> -->
</xsl:template>
@@ -1580,27 +1585,32 @@
<!-- ============================= -->
<xsl:template match="itu:clause[@id='draft-warning']/itu:title" mode="caution">
- <fo:block font-size="16pt" font-family="Times New Roman" font-style="italic" font-weight="bold" text-align="center" space-after="6pt">
+ <fo:block font-size="16pt" font-family="Times New Roman" font-style="italic" font-weight="bold" text-align="center" space-after="6pt" role="H1">
<xsl:apply-templates/>
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
</fo:block>
</xsl:template>
<xsl:template match="itu:clause[@id='draft-warning']/itu:p" mode="caution">
<fo:block font-size="12pt" font-family="Times New Roman" text-align="justify">
<xsl:apply-templates/>
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
</fo:block>
</xsl:template>
<!-- ====== -->
<!-- title -->
<!-- ====== -->
<xsl:template match="itu:annex/itu:title">
- <fo:block font-size="14pt" font-weight="bold" text-align="center" margin-bottom="18pt">
- <fo:block><xsl:apply-templates/></fo:block>
+ <fo:block font-size="14pt" font-weight="bold" text-align="center" margin-bottom="18pt" role="H1">
+ <fo:block>
+ <xsl:apply-templates/>
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
+ </fo:block>
<xsl:if test="$doctype != 'resolution'">
<fo:block font-size="12pt" font-weight="normal" margin-top="6pt">
<xsl:choose>
<xsl:when test="parent::*[@obligation = 'informative']">
<xsl:text>(This appendix does not form an integral part of this Recommendation.)</xsl:text>
@@ -1614,11 +1624,11 @@
</fo:block>
</xsl:template>
<!-- Bibliography -->
<xsl:template match="itu:references[not(@normative='true')]/itu:title">
- <fo:block font-size="14pt" font-weight="bold" text-align="center" margin-bottom="18pt">
+ <fo:block font-size="14pt" font-weight="bold" text-align="center" margin-bottom="18pt" role="H1">
<xsl:if test="$doctype = 'implementers-guide'">
<xsl:attribute name="text-align">left</xsl:attribute>
<xsl:attribute name="font-size">12pt</xsl:attribute>
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
</xsl:if>
@@ -1690,22 +1700,27 @@
<xsl:when test="$level = 3">6.5mm</xsl:when>
<xsl:otherwise>4mm</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:if>
+ <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
<xsl:apply-templates/>
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
</xsl:element>
<xsl:if test="$element-name = 'fo:inline' and not(following-sibling::itu:p)">
<fo:block margin-bottom="12pt"><xsl:value-of select="$linebreak"/></fo:block>
</xsl:if>
</xsl:template>
<xsl:template match="itu:legal-statement//itu:title | itu:license-statement//itu:title">
- <fo:block text-align="center" margin-top="6pt">
+ <xsl:variable name="level">
+ <xsl:call-template name="getLevel"/>
+ </xsl:variable>
+ <fo:block text-align="center" margin-top="6pt" role="H{$level}">
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<!-- ====== -->
@@ -1735,15 +1750,18 @@
</xsl:template>
<xsl:template match="itu:preferred">
<!-- DEBUG need -->
- <fo:block space-before="6pt" text-align="justify">
+ <xsl:variable name="level">
+ <xsl:call-template name="getLevel"/>
+ </xsl:variable>
+ <xsl:variable name="levelTerm">
+ <xsl:call-template name="getLevelTermName"/>
+ </xsl:variable>
+ <fo:block space-before="6pt" text-align="justify" role="H{$levelTerm}">
<fo:inline padding-right="5mm" font-weight="bold">
- <xsl:variable name="level">
- <xsl:call-template name="getLevel"/>
- </xsl:variable>
<!-- level=<xsl:value-of select="$level"/> -->
<xsl:attribute name="padding-right">
<xsl:choose>
<xsl:when test="$level = 4">2mm</xsl:when>
<xsl:when test="$level = 3">4mm</xsl:when>
@@ -2125,11 +2143,11 @@
</xsl:template>
<xsl:template name="insertHeaderFooter">
- <fo:static-content flow-name="footer-even" font-family="Times New Roman" font-size="11pt">
+ <fo:static-content flow-name="footer-even" font-family="Times New Roman" font-size="11pt" role="artifact">
<fo:block-container height="19mm" display-align="after">
<fo:table table-layout="fixed" width="100%" display-align="after">
<fo:table-column column-width="10%"/>
<fo:table-column column-width="90%"/>
<fo:table-body>
@@ -2143,11 +2161,11 @@
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block-container>
</fo:static-content>
- <fo:static-content flow-name="footer-odd" font-family="Times New Roman" font-size="11pt">
+ <fo:static-content flow-name="footer-odd" font-family="Times New Roman" font-size="11pt" role="artifact">
<fo:block-container height="19mm" display-align="after">
<fo:table table-layout="fixed" width="100%" display-align="after">
<fo:table-column column-width="90%"/>
<fo:table-column column-width="10%"/>
<fo:table-body>
@@ -2164,11 +2182,11 @@
</fo:block-container>
</fo:static-content>
</xsl:template>
<xsl:template name="insertHeaderFooterSP">
- <fo:static-content flow-name="footer-even">
+ <fo:static-content flow-name="footer-even" role="artifact">
<fo:block-container height="20mm">
<fo:table table-layout="fixed" width="100%" margin-top="3mm">
<fo:table-column column-width="proportional-column-width(2)"/>
<fo:table-column column-width="proportional-column-width(2)"/>
<fo:table-column column-width="proportional-column-width(2)"/>
@@ -2186,11 +2204,11 @@
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block-container>
</fo:static-content>
- <fo:static-content flow-name="footer-odd">
+ <fo:static-content flow-name="footer-odd" role="artifact">
<fo:block-container height="20mm">
<fo:table table-layout="fixed" width="100%" margin-top="3mm">
<fo:table-column column-width="proportional-column-width(2)"/>
<fo:table-column column-width="proportional-column-width(2)"/>
<fo:table-column column-width="proportional-column-width(2)"/>
@@ -2498,10 +2516,11 @@
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
<xsl:attribute name="white-space">pre</xsl:attribute>
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
+ <xsl:attribute name="role">Code</xsl:attribute>
@@ -2523,12 +2542,17 @@
</xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
</xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
- </xsl:attribute-set><xsl:attribute-set name="requirement-subject-style">
- </xsl:attribute-set><xsl:attribute-set name="requirement-inherit-style">
+ </xsl:attribute-set><xsl:attribute-set name="subject-style">
+ </xsl:attribute-set><xsl:attribute-set name="inherit-style">
+ </xsl:attribute-set><xsl:attribute-set name="description-style">
+ </xsl:attribute-set><xsl:attribute-set name="specification-style">
+ </xsl:attribute-set><xsl:attribute-set name="measurement-target-style">
+ </xsl:attribute-set><xsl:attribute-set name="verification-style">
+ </xsl:attribute-set><xsl:attribute-set name="import-style">
</xsl:attribute-set><xsl:attribute-set name="recommendation-style">
</xsl:attribute-set><xsl:attribute-set name="recommendation-name-style">
@@ -2724,11 +2748,12 @@
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
- </xsl:attribute-set><xsl:attribute-set name="quote-style">
+ </xsl:attribute-set><xsl:attribute-set name="quote-style">
+ <xsl:attribute name="role">BlockQuote</xsl:attribute>
@@ -2932,12 +2957,14 @@
<!-- Display table's name before table as standalone block -->
<!-- $namespace = 'iso' or -->
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
-
+
+
+
<xsl:call-template name="fn_name_display"/>
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
@@ -4883,20 +4910,72 @@
<xsl:call-template name="setTrackChangesStyles">
<xsl:with-param name="isAdded" select="$isAdded"/>
<xsl:with-param name="isDeleted" select="$isDeleted"/>
</xsl:call-template>
+
+
<xsl:variable name="mathml">
<xsl:apply-templates select="." mode="mathml"/>
</xsl:variable>
<fo:instream-foreign-object fox:alt-text="Math">
+ <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
+ <xsl:variable name="comment_text_">
+ <xsl:choose>
+ <xsl:when test="normalize-space($comment_text_following) != ''">
+ <xsl:value-of select="$comment_text_following"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="normalize-space(translate(.,' ',' '))"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
+
+ <xsl:if test="normalize-space($comment_text) != ''">
+ <!-- put Mathin Alternate Text -->
+ <xsl:attribute name="fox:alt-text">
+ <xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:variable name="mathml_content">
+ <xsl:apply-templates select="." mode="mathml_actual_text"/>
+ </xsl:variable>
+ <!-- put MathML in Actual Text -->
+ <xsl:attribute name="fox:actual-text">
+ <xsl:value-of select="$mathml_content"/>
+ </xsl:attribute>
+
+
<!-- <xsl:copy-of select="."/> -->
<xsl:copy-of select="xalan:nodeset($mathml)"/>
</fo:instream-foreign-object>
</fo:inline>
+ </xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
+ <!-- <xsl:text>a+b</xsl:text> -->
+ <xsl:text><</xsl:text>
+ <xsl:value-of select="local-name()"/>
+ <xsl:if test="local-name() = 'math'">
+ <xsl:text> xmlns="http://www.w3.org/1998/Math/MathML"</xsl:text>
+ </xsl:if>
+ <xsl:for-each select="@*">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="local-name()"/>
+ <xsl:text>="</xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>"</xsl:text>
+ </xsl:for-each>
+ <xsl:text>></xsl:text>
+ <xsl:apply-templates mode="mathml_actual_text"/>
+ <xsl:text></</xsl:text>
+ <xsl:value-of select="local-name()"/>
+ <xsl:text>></xsl:text>
+ </xsl:template><xsl:template match="text()" mode="mathml_actual_text">
+ <xsl:value-of select="normalize-space()"/>
</xsl:template><xsl:template match="@*|node()" mode="mathml">
<xsl:copy>
<xsl:apply-templates select="@*|node()" mode="mathml"/>
</xsl:copy>
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
@@ -4954,11 +5033,14 @@
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
</fo:block>
<xsl:apply-templates/>
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
- <fo:inline><xsl:apply-templates/></fo:inline>
+ <xsl:variable name="level">
+ <xsl:call-template name="getLevel"/>
+ </xsl:variable>
+ <fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
</fo:block>
<xsl:apply-templates/>
@@ -4989,13 +5071,14 @@
<xsl:with-param name="name" select="'title-modified'"/>
</xsl:call-template>
</xsl:variable>
+ <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
<xsl:choose>
- <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
- <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
+ <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>
+ <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>
</xsl:choose>
<xsl:apply-templates/>
</xsl:template><xsl:template match="*[local-name() = 'xref']">
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
@@ -5143,11 +5226,14 @@
<xsl:apply-templates/>
</fo:block>
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
<xsl:if test="normalize-space() != ''">
- <fo:inline>
+ <xsl:variable name="level">
+ <xsl:call-template name="getLevelTermName"/>
+ </xsl:variable>
+ <fo:inline role="H{$level}">
<xsl:apply-templates/>
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
<xsl:text>.</xsl:text>
</xsl:if> -->
</fo:inline>
@@ -5774,10 +5860,11 @@
<xsl:when test="*[local-name() = 'tab']">
<xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
</xsl:otherwise>
</xsl:choose>
</fo:block>
</fo:list-item-body>
</fo:list-item>
@@ -5914,18 +6001,10 @@
</fo:block>
</xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
<fo:block>
<fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
</fo:block>
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
- <fo:block xsl:use-attribute-sets="requirement-subject-style">
- <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
- </fo:block>
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
- <fo:block xsl:use-attribute-sets="requirement-inherit-style">
- <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
- </fo:block>
</xsl:template><xsl:template match="*[local-name() = 'recommendation']">
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
<xsl:apply-templates/>
</fo:block>
@@ -5938,10 +6017,42 @@
</xsl:if>
</xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'label']">
<fo:block xsl:use-attribute-sets="recommendation-label-style">
<xsl:apply-templates/>
</fo:block>
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
+ <fo:block xsl:use-attribute-sets="subject-style">
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
+ </fo:block>
+ </xsl:template><xsl:template match="*[local-name() = 'subject']">
+ <fo:block xsl:use-attribute-sets="subject-style">
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
+ </fo:block>
+ </xsl:template><xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
+ <fo:block xsl:use-attribute-sets="inherit-style">
+ <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
+ </fo:block>
+ </xsl:template><xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
+ <fo:block xsl:use-attribute-sets="description-style">
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:template><xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
+ <fo:block xsl:use-attribute-sets="specification-style">
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:template><xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
+ <fo:block xsl:use-attribute-sets="measurement-target-style">
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:template><xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
+ <fo:block xsl:use-attribute-sets="verification-style">
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:template><xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
+ <fo:block xsl:use-attribute-sets="import-style">
+ <xsl:apply-templates/>
+ </fo:block>
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
</xsl:if>
@@ -6807,10 +6918,13 @@
</fo:inline>
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']">
<fo:block-container border="1pt solid black" width="50%">
<fo:block> </fo:block>
</fo:block-container>
+ </xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
+ <fo:inline padding-right="5mm"> </fo:inline>
+ <fo:inline><xsl:apply-templates/></fo:inline>
</xsl:template><xsl:template name="convertDate">
<xsl:param name="date"/>
<xsl:param name="format" select="'short'"/>
<xsl:variable name="year" select="substring($date, 1, 4)"/>
<xsl:variable name="month" select="substring($date, 6, 2)"/>
@@ -7043,9 +7157,29 @@
<xsl:value-of select="$level_total - 1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:value-of select="$level"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template><xsl:template name="getLevelTermName">
+ <xsl:choose>
+ <xsl:when test="normalize-space(../@depth) != ''">
+ <xsl:value-of select="../@depth"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="title_level_">
+ <xsl:for-each select="../preceding-sibling::*[local-name() = 'title'][1]">
+ <xsl:call-template name="getLevel"/>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:variable name="title_level" select="normalize-space($title_level_)"/>
+ <xsl:choose>
+ <xsl:when test="$title_level != ''"><xsl:value-of select="$title_level + 1"/></xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="getLevel"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template><xsl:template name="split">
<xsl:param name="pText" select="."/>
<xsl:param name="sep" select="','"/>
\ No newline at end of file