lib/isodoc/itu/itu.resolution.xsl in metanorma-itu-1.2.7 vs lib/isodoc/itu/itu.resolution.xsl in metanorma-itu-1.2.8
- old
+ new
@@ -16,62 +16,100 @@
<xsl:variable name="pageHeight" select="'297mm'"/>
<!-- Rec. ITU-T G.650.1 (03/2018) -->
<xsl:variable name="footerprefix" select="'Rec. '"/>
<xsl:variable name="docname">
- <xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier, ' ')"/>
+ <xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
<xsl:text> </xsl:text>
- <xsl:value-of select="substring-after(/itu:itu-standard/itu:bibdata/itu:docidentifier, ' ')"/>
+ <xsl:value-of select="substring-after(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
<xsl:text> </xsl:text>
</xsl:variable>
<xsl:variable name="docdate">
<xsl:call-template name="formatDate">
<xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on"/>
</xsl:call-template>
</xsl:variable>
- <xsl:variable name="doctype">
+ <xsl:variable name="doctype" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype"/>
+ <xsl:variable name="doctypeTitle">
<xsl:call-template name="capitalize">
- <xsl:with-param name="str" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype"/>
+ <xsl:with-param name="str" select="$doctype"/>
</xsl:call-template>
</xsl:variable>
+ <xsl:variable name="doctypeCapitalizedTitle">
+ <xsl:call-template name="capitalizeWords">
+ <xsl:with-param name="str" select="$doctype"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="xSTR-ACRONYM">
+ <xsl:variable name="x" select="substring(/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']/itu:title, 1, 1)"/>
+ <xsl:variable name="acronym" select="/itu:itu-standard/itu:bibdata/itu:docnumber"/>
+ <xsl:value-of select="concat($x,'STR-', $acronym)"/>
+ </xsl:variable>
-
+
<!-- Example:
<item level="1" id="Foreword" display="true">Foreword</item>
<item id="term-script" display="false">3.2</item>
-->
<xsl:variable name="contents">
<contents>
<!-- <xsl:apply-templates select="/itu:itu-standard/itu:preface/node()" mode="contents"/> -->
- <xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[1]" mode="contents"/> <!-- @id = 'scope' -->
+ <xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[@type='scope']" mode="contents"/> <!-- @id = 'scope' -->
<!-- Normative references -->
- <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[1]" mode="contents"/> <!-- @id = 'references' -->
+ <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[@normative='true']" mode="contents"/> <!-- @id = 'references' -->
- <xsl:apply-templates select="/itu:itu-standard/itu:sections/*[position() != 1]" mode="contents"/> <!-- @id != 'scope' -->
+ <xsl:apply-templates select="/itu:itu-standard/itu:sections/*[not(@type='scope')]" mode="contents"/> <!-- @id != 'scope' -->
<xsl:apply-templates select="/itu:itu-standard/itu:annex" mode="contents"/>
<!-- Bibliography -->
- <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[position() != 1]" mode="contents"/> <!-- @id = 'bibliography' -->
+ <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[not(@normative='true')]" mode="contents"/> <!-- @id = 'bibliography' -->
<xsl:apply-templates select="//itu:table" mode="contents"/>
</contents>
</xsl:variable>
<xsl:variable name="lang">
<xsl:call-template name="getLang"/>
</xsl:variable>
+
+ <xsl:variable name="footer-TR">
+ <xsl:variable name="date" select="concat('(',substring(/itu:itu-standard/itu:bibdata/itu:version/itu:revision-date,1,7), ')')"/>
+ <xsl:value-of select="concat($xSTR-ACRONYM, ' ', $date)"/>
+ </xsl:variable>
+
+ <xsl:variable name="footer-IG">
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype[@language = $lang]"/>
+ <xsl:text> for </xsl:text>
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU-Recommendation']"/>
+ <xsl:text> </xsl:text>
+ <xsl:variable name="date" select="concat('(',substring(/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on,1,7), ')')"/>
+ <xsl:value-of select="$date"/>
+ </xsl:variable>
+
<xsl:variable name="isAmendment" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:amendment[@language = $lang])"/>
<xsl:variable name="isCorrigendum" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:corrigendum[@language = $lang])"/>
<xsl:template match="/">
<xsl:call-template name="namespaceCheck"/>
<fo:root font-family="Times New Roman, STIX Two Math" font-size="12pt" xml:lang="{$lang}">
<fo:layout-master-set>
+
+
+ <!-- Technical Report first page -->
+ <fo:simple-page-master master-name="TR-first-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
+ <fo:region-body margin-top="21.6mm" margin-bottom="25.4mm" margin-left="20.1mm" margin-right="22.6mm"/>
+ <fo:region-before region-name="TR-first-page-header" extent="21.6mm" display-align="center"/>
+ <fo:region-after region-name="TR-first-page-footer" extent="25.4mm" display-align="center"/>
+ <fo:region-start region-name="TR-first-page-left-region" extent="20.1mm"/>
+ <fo:region-end region-name="TR-first-page-right-region" extent="22.6mm"/>
+ </fo:simple-page-master>
+
<!-- cover page -->
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
<fo:region-body margin-top="19.2mm" margin-bottom="5mm" margin-left="19.2mm" margin-right="19.2mm"/>
<fo:region-before region-name="cover-page-header" extent="19.2mm" display-align="center"/>
<fo:region-after/>
@@ -129,10 +167,134 @@
<xsl:call-template name="addBookmarks">
<xsl:with-param name="contents" select="$contents"/>
</xsl:call-template>
+
+ <xsl:if test="$doctype = 'technical-report' or $doctype = 'technical-paper' or $doctype = 'implementers-guide'">
+ <fo:page-sequence master-reference="TR-first-page">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>
+ <fo:table width="175mm" table-layout="fixed" border-top="1.5pt solid black">
+ <fo:table-column column-width="29mm"/>
+ <fo:table-column column-width="45mm"/>
+ <fo:table-column column-width="28mm"/>
+ <fo:table-column column-width="72mm"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell padding-left="1mm" padding-top="3mm">
+ <fo:block font-weight="bold">Question(s):</fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="3mm">
+ <fo:block><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:group/itu:name"/></fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="3mm">
+ <fo:block font-weight="bold">Meeting, date:</fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="3mm" text-align="right" padding-right="1mm">
+ <fo:block>
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting"/>
+ <xsl:text>, </xsl:text>
+ <xsl:call-template name="formatMeetingDate">
+ <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-date/itu:from"/>
+ </xsl:call-template>
+ <xsl:text>/</xsl:text>
+ <xsl:call-template name="formatMeetingDate">
+ <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-date/itu:to"/>
+ </xsl:call-template>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+
+ <fo:table width="175mm" table-layout="fixed">
+ <fo:table-column column-width="29mm"/>
+ <fo:table-column column-width="10mm"/>
+ <fo:table-column column-width="35mm"/>
+ <fo:table-column column-width="9mm"/>
+ <fo:table-column column-width="83mm"/>
+ <fo:table-column column-width="6mm"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell padding-left="1mm" padding-top="2mm">
+ <fo:block font-weight="bold">Study Group:</fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2mm">
+ <fo:block><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:subgroup/itu:name"/></fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2mm">
+ <fo:block font-weight="bold">Working Party:</fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2mm">
+ <fo:block><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:workgroup/itu:name"/></fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2mm">
+ <fo:block font-weight="bold">Intended type of document <fo:inline font-weight="normal">(R-C-TD)</fo:inline>:</fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2mm">
+ <fo:block font-weight="normal"><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:intended-type"/></fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell padding-left="1mm" padding-top="2mm">
+ <fo:block font-weight="bold">Source:</fo:block>
+ </fo:table-cell>
+ <fo:table-cell number-columns-spanned="4" padding-top="2mm">
+ <fo:block><xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/itu:itu-standard/itu:bibdata/itu:ext/itu:source))"/></fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <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:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:person">
+ <fo:table width="175mm" table-layout="fixed" line-height="110%">
+ <fo:table-column column-width="29mm"/>
+ <fo:table-column column-width="75mm"/>
+ <fo:table-column column-width="71mm"/>
+ <fo:table-body>
+
+ <xsl:for-each select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:person">
+
+
+ <fo:table-row border-top="1.5pt solid black">
+ <xsl:if test="position() = last()">
+ <xsl:attribute name="border-bottom">1.5pt solid black</xsl:attribute>
+ </xsl:if>
+ <fo:table-cell padding-left="1mm" padding-top="2.5mm">
+ <fo:block font-weight="bold">Contact:</fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="3mm">
+ <fo:block><xsl:value-of select="itu:name/itu:completename"/></fo:block>
+ <fo:block><xsl:value-of select="itu:affiliation/itu:organization/itu:name"/></fo:block>
+ <fo:block><xsl:value-of select="itu:affiliation/itu:organization/itu:address/itu:formattedAddress"/></fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="3mm">
+ <fo:block>Tel: <xsl:value-of select="itu:phone[not(@type)]"/></fo:block>
+ <fo:block>Fax: <xsl:value-of select="itu:phone[@type = 'fax']"/></fo:block>
+ <fo:block>E-mail: <xsl:value-of select="itu:email"/></fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </xsl:for-each>
+ </fo:table-body>
+ </fo:table>
+ </xsl:if>
+ <fo:block space-before="0.5mm" font-size="9pt" margin-left="1mm">Please do not change the structure of this table, just insert the necessary information.</fo:block>
+ <fo:block space-before="6pt"><INSERT TEXT></fo:block>
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </xsl:if>
+
<!-- cover page -->
<fo:page-sequence master-reference="cover-page">
<fo:flow flow-name="xsl-region-body">
<fo:block-container absolute-position="fixed" left="148mm" top="265mm">
@@ -170,16 +332,28 @@
<fo:table-cell>
<fo:block> </fo:block>
</fo:table-cell>
<fo:table-cell padding-top="2mm" padding-bottom="-1mm">
<fo:block font-family="Arial" font-size="36pt" font-weight="bold" margin-top="6pt" letter-spacing="2pt"> <!-- Helvetica for letter-spacing working -->
- <xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier, ' ')"/>
+ <xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
</fo:block>
</fo:table-cell>
<fo:table-cell padding-top="1mm" number-columns-spanned="2" padding-bottom="-1mm">
<fo:block font-size="30pt" font-weight="bold" text-align="right" margin-top="12pt" padding="0mm">
- <xsl:value-of select="substring-after(/itu:itu-standard/itu:bibdata/itu:docidentifier, ' ')"/>
+ <xsl:choose>
+ <xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
+ <xsl:value-of select="$doctypeCapitalizedTitle"/>
+ </xsl:when>
+ <xsl:when test="$doctype = 'implementers-guide'">
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU-Recommendation']"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype[@language = $lang]"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="substring-after(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
+ </xsl:otherwise>
+ </xsl:choose>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row height="17.2mm">
<fo:table-cell>
@@ -216,13 +390,24 @@
<fo:block font-size="18pt" font-weight="bold">
<xsl:value-of select="$isCorrigendum"/>
</fo:block>
</xsl:if>
<fo:block font-size="14pt">
- <xsl:call-template name="formatDate">
- <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on"/>
- </xsl:call-template>
+ <xsl:choose>
+ <xsl:when test="($doctype = 'technical-report' or $doctype = 'technical-paper') and /itu:itu-standard/itu:bibdata/itu:version/itu:revision-date">
+ <xsl:text>(</xsl:text>
+ <xsl:call-template name="formatMeetingDate">
+ <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:version/itu:revision-date"/>
+ </xsl:call-template>
+ <xsl:text>)</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="formatDate">
+ <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row height="64mm"> <!-- 59mm -->
<fo:table-cell>
@@ -258,10 +443,19 @@
<fo:table-cell font-size="18pt" number-columns-spanned="3">
<fo:block padding-right="2mm" margin-top="6pt">
<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">
+ <xsl:value-of select="$xSTR-ACRONYM"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="$doctype = 'implementers-guide'">
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype[@language = $lang]"/>
+ <xsl:text> for </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">
<xsl:value-of select="."/>
@@ -309,19 +503,41 @@
<fo:table-cell>
<fo:block> </fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="3">
<fo:block font-size="16pt" margin-top="3pt">
- <xsl:value-of select="$doctype"/>
- <xsl:text> </xsl:text>
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
- <xsl:text>-</xsl:text>
+ <xsl:if test="/itu:itu-standard/itu:boilerplate/itu:legal-statement/itu:clause[@id='draft-warning']">
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
</xsl:if>
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
+
+ <xsl:choose>
+ <xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:status/itu:stage">
+ <xsl:call-template name="capitalizeWords">
+ <xsl:with-param name="str" select="/itu:itu-standard/itu:bibdata/itu:status/itu:stage"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="$doctypeCapitalizedTitle"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
+ </xsl:when>
+ <xsl:when test="$doctype = 'implementers-guide'">
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$doctypeCapitalizedTitle"/>
+ <xsl:text> </xsl:text>
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
+ <xsl:text>-</xsl:text>
+ </xsl:if>
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
<xsl:if test="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:annexid">
<xsl:variable name="title-annex">
<xsl:call-template name="getTitle">
<xsl:with-param name="name" select="'title-annex'"/>
</xsl:call-template>
@@ -341,11 +557,11 @@
<fo:page-sequence master-reference="document-preface" initial-page-number="1" format="i" force-page-count="no-force">
<xsl:call-template name="insertHeaderFooter"/>
<fo:flow flow-name="xsl-region-body">
<fo:block-container font-size="14pt" font-weight="bold">
<fo:block>
- <xsl:value-of select="$doctype"/>
+ <xsl:value-of select="$doctypeCapitalizedTitle"/>
<xsl:text> </xsl:text>
<xsl:value-of select="$docname"/>
</fo:block>
<fo:block text-align="center" margin-top="15pt" margin-bottom="15pt">
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = 'en']"/>
@@ -403,62 +619,121 @@
</xsl:call-template>
</xsl:variable>
<fo:block margin-top="6pt" text-align="center" font-weight="bold"><xsl:value-of select="$title-toc"/></fo:block>
<fo:block margin-top="6pt" text-align="right" font-weight="bold"><xsl:value-of select="$title-page"/></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: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>
- <fo:block>
- <xsl:if test="@section">
- <xsl:value-of select="@section"/>
- </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-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>
+ </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="right" font-weight="bold" keep-with-next="always"><xsl:value-of select="$title-page"/></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="right" font-weight="bold" keep-with-next="always"><xsl:value-of select="$title-page"/></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:if>
+ </xsl:if>
+
</fo:block-container>
</xsl:if>
</fo:flow>
</fo:page-sequence>
@@ -475,34 +750,44 @@
<fo:flow flow-name="xsl-region-body">
<fo:block-container font-size="14pt" font-weight="bold">
<fo:block>
- <xsl:value-of select="$doctype"/>
+ <xsl:value-of select="$doctypeCapitalizedTitle"/>
<xsl:text> </xsl:text>
<xsl:value-of select="$docname"/>
</fo:block>
<fo:block text-align="center" margin-top="15pt" margin-bottom="15pt">
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = 'en']"/>
+
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:title[@type = 'subtitle' and @language = 'en']">
+ <fo:block margin-top="18pt" font-weight="normal" font-style="italic">
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'subtitle' and @language = 'en']"/>
+ </fo:block>
+ </xsl:if>
+
</fo:block>
+
+
+
</fo:block-container>
<!-- Clause(s) -->
<fo:block>
<!-- Scope -->
- <xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[1]"/> <!-- @id = 'scope' -->
+ <xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[@type='scope']"/> <!-- @id = 'scope' -->
<!-- Normative references -->
- <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[1]"/> <!-- @id = 'references' -->
+ <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[@normative='true']"/> <!-- @id = 'references' -->
- <xsl:apply-templates select="/itu:itu-standard/itu:sections/*[position() != 1]"/> <!-- @id != 'scope' -->
+ <xsl:apply-templates select="/itu:itu-standard/itu:sections/*[not(@type='scope')]"/> <!-- @id != 'scope' -->
<xsl:apply-templates select="/itu:itu-standard/itu:annex"/>
<!-- Bibliography -->
- <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[position() != 1]"/> <!-- @id = 'bibliography' -->
+ <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[not(@normative='true')]"/> <!-- @id = 'bibliography' -->
</fo:block>
</fo:flow>
</fo:page-sequence>
@@ -771,11 +1056,11 @@
<!-- ============================= -->
<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">
+ <fo:block font-size="16pt" font-family="Times New Roman" font-style="italic" font-weight="bold" text-align="center" space-after="6pt">
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match="itu:clause[@id='draft-warning']/itu:p" mode="caution">
@@ -1207,11 +1492,21 @@
<fo:table-cell text-align="left" padding-bottom="8mm">
<fo:block><fo:page-number/></fo:block>
</fo:table-cell>
<fo:table-cell font-weight="bold" text-align="left" padding-bottom="8mm">
<fo:block>
- <xsl:value-of select="concat($footerprefix, $docname, ' ', $docdate)"/>
+ <xsl:choose>
+ <xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
+ <xsl:value-of select="$footer-TR"/>
+ </xsl:when>
+ <xsl:when test="$doctype = 'implementers-guide'">
+ <xsl:value-of select="$footer-IG"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat($footerprefix, $docname, ' ', $docdate)"/>
+ </xsl:otherwise>
+ </xsl:choose>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
@@ -1224,11 +1519,21 @@
<fo:table-column column-width="10%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell font-weight="bold" text-align="right" padding-bottom="8mm">
<fo:block>
- <xsl:value-of select="concat($footerprefix, $docname, ' ', $docdate)"/>
+ <xsl:choose>
+ <xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
+ <xsl:value-of select="$footer-TR"/>
+ </xsl:when>
+ <xsl:when test="$doctype = 'implementers-guide'">
+ <xsl:value-of select="$footer-IG"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat($footerprefix, $docname, ' ', $docdate)"/>
+ </xsl:otherwise>
+ </xsl:choose>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right" padding-bottom="8mm" padding-right="2mm">
<fo:block><fo:page-number/></fo:block>
</fo:table-cell>
@@ -1256,11 +1561,38 @@
<xsl:if test="$month != '' and $year != ''">
<xsl:text>(</xsl:text><xsl:value-of select="$month"/>/<xsl:value-of select="$year"/><xsl:text>)</xsl:text>
</xsl:if>
</xsl:template>
+ <xsl:template name="formatMeetingDate">
+ <xsl:param name="date"/>
+ <xsl:variable name="year" select="substring($date, 1, 4)"/>
+ <xsl:variable name="month" select="substring($date, 6, 2)"/>
+ <xsl:variable name="day" select="substring($date, 9)"/>
+
+ <xsl:variable name="monthStr">
+ <xsl:choose>
+ <xsl:when test="$month = '01'">Jan</xsl:when>
+ <xsl:when test="$month = '02'">Feb</xsl:when>
+ <xsl:when test="$month = '03'">Mar</xsl:when>
+ <xsl:when test="$month = '04'">Apr</xsl:when>
+ <xsl:when test="$month = '05'">May</xsl:when>
+ <xsl:when test="$month = '06'">Jun</xsl:when>
+ <xsl:when test="$month = '07'">Jul</xsl:when>
+ <xsl:when test="$month = '08'">Aug</xsl:when>
+ <xsl:when test="$month = '09'">Sep</xsl:when>
+ <xsl:when test="$month = '10'">Oct</xsl:when>
+ <xsl:when test="$month = '11'">Nov</xsl:when>
+ <xsl:when test="$month = '12'">Dec</xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:value-of select="$day"/><xsl:text> </xsl:text><xsl:value-of select="$monthStr"/><xsl:text> </xsl:text><xsl:value-of select="$year"/>
+
+ </xsl:template>
+
+
<xsl:template name="addLetterSpacing">
<xsl:param name="text"/>
<xsl:if test="string-length($text) > 0">
<xsl:variable name="char" select="substring($text, 1, 1)"/>
<xsl:value-of select="$char"/><fo:inline font-size="15pt"><xsl:value-of select="' '"/></fo:inline>
@@ -1666,10 +1998,11 @@
</xsl:attribute-set><xsl:attribute-set name="term-style">
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
+
@@ -2995,10 +3328,11 @@
<fo:inline font-style="italic">
<xsl:apply-templates/>
</fo:inline>
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
<fo:inline font-weight="bold">
+
<xsl:apply-templates/>
</fo:inline>
</xsl:template><xsl:template match="*[local-name()='sup']">
<fo:inline font-size="80%" vertical-align="super">
<xsl:apply-templates/>
@@ -3399,10 +3733,11 @@
<xsl:value-of select="normalize-space(@target)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<fo:inline xsl:use-attribute-sets="link-style">
+
<xsl:choose>
<xsl:when test="$target = ''">
<xsl:apply-templates/>
</xsl:when>
<xsl:otherwise>
@@ -3618,11 +3953,12 @@
<xsl:text>.</xsl:text>
</xsl:if> -->
</fo:inline>
</xsl:if>
</xsl:template><xsl:template match="*[local-name() = 'figure']">
- <fo:block-container id="{@id}">
+ <fo:block-container id="{@id}">
+
<fo:block>
<xsl:apply-templates/>
</fo:block>
<xsl:call-template name="fn_display_figure"/>
<xsl:for-each select="*[local-name() = 'note']">
@@ -3669,11 +4005,11 @@
<xsl:apply-templates mode="contents"/>
</xsl:template><xsl:template match="node()" mode="bookmarks">
<xsl:apply-templates mode="bookmarks"/>
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
<xsl:apply-templates select="."/>
- </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
<xsl:apply-templates mode="bookmarks"/>
</xsl:template><xsl:template name="addBookmarks">
<xsl:param name="contents"/>
<xsl:if test="xalan:nodeset($contents)//item">
<fo:bookmark-tree>
@@ -4392,10 +4728,10 @@
</fo:block>
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
<fo:block id="{@id}">
<xsl:apply-templates/>
</fo:block>
- </xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
<fo:block id="{@id}">
<xsl:apply-templates/>
</fo:block>
</xsl:template><xsl:template match="*[local-name() = 'annex']">
\ No newline at end of file