lib/isodoc/itu/itu.recommendation-supplement.xsl in metanorma-itu-2.4.2 vs lib/isodoc/itu/itu.recommendation-supplement.xsl in metanorma-itu-2.4.3
- old
+ new
@@ -2,30 +2,42 @@
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
<xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure' or local-name() = 'localized-strings')] and not(ancestor::*[local-name() = 'name']))]" use="@reference"/>
+ <xsl:variable name="namespace_full">https://www.metanorma.org/ns/itu</xsl:variable>
+
<xsl:variable name="debug">false</xsl:variable>
+ <xsl:variable name="docidentifier_ITU" select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU']"/>
+ <xsl:variable name="docidentifier_ITU_left_part_" select="normalize-space(substring-before($docidentifier_ITU, ' '))"/>
+ <xsl:variable name="docidentifier_ITU_left_part">
+ <xsl:value-of select="$docidentifier_ITU_left_part_"/>
+ <xsl:if test="$docidentifier_ITU_left_part_ = ''"><xsl:text>ITU-T</xsl:text></xsl:if>
+ </xsl:variable>
+
<!-- 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[@type = 'ITU'], ' ')"/>
+ <xsl:value-of select="substring-before($docidentifier_ITU, ' ')"/>
<xsl:text> </xsl:text>
- <xsl:value-of select="substring-after(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
+ <xsl:value-of select="substring-after($docidentifier_ITU, ' ')"/>
<xsl:text> </xsl:text>
</xsl:variable>
+ <xsl:variable name="date_published" select="/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on"/>
<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:with-param name="date" select="$date_published"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="doctype" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
+ <xsl:variable name="bureau" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:bureau"/>
+ <xsl:variable name="docnumber" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:docnumber)"/>
<xsl:variable name="xSTR-ACRONYM">
<xsl:variable name="x" select="/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']/itu:title[@type = 'abbrev']"/>
- <xsl:variable name="acronym" select="/itu:itu-standard/itu:bibdata/itu:docnumber"/>
+ <xsl:variable name="acronym" select="$docnumber"/>
<xsl:value-of select="concat($x,'STR-', $acronym)"/>
</xsl:variable>
<!-- Example:
<item level="1" id="Foreword" display="true">Foreword</item>
@@ -79,22 +91,22 @@
<xsl:choose>
<xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
<xsl:variable name="date_">
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:version/itu:revision-date"/>
<xsl:if test="not(/itu:itu-standard/itu:bibdata/itu:version/itu:revision-date)"/>
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on"/>
+ <xsl:value-of select="$date_published"/>
</xsl:variable>
<xsl:variable name="date" select="concat('(',substring($date_,1,7), ')')"/>
<xsl:value-of select="concat($xSTR-ACRONYM, $additionalIdentifiers, ' ', $date)"/>
</xsl:when>
<xsl:when test="$doctype = 'implementers-guide'">
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype[@language = $lang]"/>
<xsl:value-of select="$additionalIdentifiers"/>
<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:variable name="date" select="concat('(',substring($date_published,1,7), ')')"/>
<xsl:value-of select="$date"/>
</xsl:when>
<xsl:when test="$doctype = 'resolution'">
<!-- WTSA-16 – Resolution 1 -->
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting/@acronym"/>
@@ -124,10 +136,42 @@
<xsl:variable name="isCorrigendum" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:corrigendum[@language = $lang])"/>
<xsl:variable name="TDnumber" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-TemporaryDocument'])"/>
<xsl:variable name="provisionalIdentifier" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-provisional'])"/>
+ <xsl:variable name="en_dash_separator"> – </xsl:variable>
+
+ <xsl:variable name="document_scheme" select="normalize-space(/itu:itu-standard/itu:metanorma-extension/itu:presentation-metadata[itu:name = 'document-scheme']/itu:value)"/>
+ <xsl:variable name="layoutVersion_">
+ <xsl:choose>
+ <xsl:when test="$document_scheme = ''">2023</xsl:when>
+ <xsl:otherwise>default</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="layoutVersion" select="normalize-space($layoutVersion_)"/>
+
+ <xsl:variable name="color_cover_title_value" select="normalize-space(/itu:itu-standard/itu:metanorma-extension/itu:presentation-metadata/itu:color-cover-title)"/>
+ <xsl:variable name="color_cover_title_">
+ <xsl:value-of select="$color_cover_title_value"/>
+ <xsl:if test="$color_cover_title_value = ''">black</xsl:if>
+ </xsl:variable>
+ <xsl:variable name="color_cover_title" select="normalize-space($color_cover_title_)"/>
+
+ <xsl:variable name="cover_header_hide_value" select="normalize-space(/itu:itu-standard/itu:metanorma-extension/itu:presentation-metadata/itu:cover-header-hide)"/>
+ <xsl:variable name="cover_header_hide_">
+ <xsl:value-of select="$cover_header_hide_value"/>
+ <xsl:if test="$cover_header_hide_value = ''">false</xsl:if>
+ </xsl:variable>
+ <xsl:variable name="cover_header_hide" select="normalize-space($cover_header_hide_)"/>
+
+ <xsl:variable name="color_cover_itu_logo_value" select="normalize-space(/itu:itu-standard/itu:metanorma-extension/itu:presentation-metadata/itu:color-cover-itu-logo)"/>
+ <xsl:variable name="color_cover_itu_logo_">
+ <xsl:value-of select="$color_cover_itu_logo_value"/>
+ <xsl:if test="$color_cover_itu_logo_value = ''">#1DA0DB</xsl:if>
+ </xsl:variable>
+ <xsl:variable name="color_cover_itu_logo" select="normalize-space($color_cover_itu_logo_)"/>
+
<xsl:template match="/">
<xsl:call-template name="namespaceCheck"/>
<fo:root xml:lang="{$lang}">
<xsl:variable name="root-style">
<root-style xsl:use-attribute-sets="root-style">
@@ -177,10 +221,32 @@
<fo:region-before region-name="cover-page-header" extent="19.2mm" display-align="center"/>
<fo:region-after/>
<fo:region-start region-name="cover-left-region" extent="19.2mm"/>
<fo:region-end region-name="cover-right-region" extent="19.2mm"/>
</fo:simple-page-master>
+
+ <fo:simple-page-master master-name="cover-page_2023_" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
+ <fo:region-body margin-top="33.5mm" margin-bottom="31mm" margin-left="25mm" margin-right="9.3mm"/>
+ <fo:region-before region-name="header" extent="33.5mm" precedence="true"/>
+ <fo:region-after region-name="footer" extent="31mm" precedence="true"/>
+ <fo:region-start region-name="left-region" extent="25mm"/>
+ <fo:region-end region-name="right-region" extent="9.3mm"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="blankpage" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm"/>
+ <fo:region-before region-name="header-blank" extent="{$marginTop}mm"/>
+ <fo:region-after region-name="footer-blank" extent="{$marginBottom}mm"/>
+ <fo:region-start region-name="left" extent="{$marginLeftRight2}mm"/>
+ <fo:region-end region-name="right" extent="{$marginLeftRight1}mm"/>
+ </fo:simple-page-master>
+ <fo:page-sequence-master master-name="cover-page_2023">
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
+ <fo:conditional-page-master-reference master-reference="cover-page_2023_"/>
+ </fo:repeatable-page-master-alternatives>
+ </fo:page-sequence-master>
+
<!-- contents pages -->
<!-- odd pages Preface -->
<fo:simple-page-master master-name="odd-preface" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
<fo:region-body margin-top="19.2mm" margin-bottom="19.2mm" margin-left="19.2mm" margin-right="19.2mm"/>
<fo:region-before region-name="header-odd" extent="19.2mm" display-align="center"/>
@@ -232,747 +298,1072 @@
<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" id="__internal_layout__meeting_{generate-id()}">
- <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>
+ <xsl:variable name="annexid" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:annexid)"/>
- <fo:table width="175mm" table-layout="fixed" id="__internal_layout__groups_{generate-id()}">
- <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">
- <xsl:variable name="subgroup" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:subgroup/itu:name"/>
- <fo:block><xsl:value-of select="java:replaceAll(java:java.lang.String.new($subgroup),'(.)','$1')"/></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">
- <xsl:variable name="workgroup" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:workgroup/itu:name"/>
- <fo:block><xsl:value-of select="java:replaceAll(java:java.lang.String.new($workgroup),'(.)','$1')"/></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 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>
+ <!-- ============================================= -->
+ <!-- Cover page -->
+ <!-- ============================================= -->
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:person">
- <fo:table width="175mm" table-layout="fixed" line-height="110%" id="__internal_layout__person_{generate-id()}">
- <fo:table-column column-width="29mm"/>
- <fo:table-column column-width="75mm"/>
- <fo:table-column column-width="71mm"/>
- <fo:table-body>
+ <xsl:choose>
+ <xsl:when test="$layoutVersion = '2023'">
+ <!-- cover page, version 2023 -->
+ <fo:page-sequence master-reference="cover-page_2023" writing-mode="lr-tb" font-family="Arial" font-size="12pt">
+ <fo:static-content flow-name="header" role="artifact" id="__internal_layout__coverpage_header_{generate-id()}">
+ <!-- background cover image -->
+ <xsl:call-template name="insertBackgroundPageImage"/>
+ <xsl:choose>
+ <xsl:when test="$cover_header_hide = 'false'">
+ <fo:block-container margin-left="13mm">
+ <xsl:call-template name="setWritingMode"/>
+ <fo:block-container margin-left="0mm">
- <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>
+ <fo:table width="185.5mm" table-layout="fixed" margin-top="11.5mm">
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-body>
+ <fo:table-row height="7mm" font-weight="bold">
+ <fo:table-cell text-align="start">
+ <fo:block font-size="16pt">
+ <xsl:if test="$lang != 'ar'">
+ <fo:inline color="rgb(0,156,214)">ITU</fo:inline>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="$lang = 'es'">Publicaciones</xsl:when>
+ <xsl:when test="$lang = 'ru'">Публикации</xsl:when>
+ <xsl:when test="$lang = 'zh'">出版物</xsl:when>
+ <xsl:when test="$lang = 'ar'">منشورات<fo:inline color="rgb(0,156,214)">ITU</fo:inline></xsl:when>
+ <xsl:otherwise>Publications</xsl:otherwise> <!-- default, en or fr -->
+ </xsl:choose>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell text-align="end" display-align="center">
+ <fo:block>
+ <xsl:call-template name="getLocalizedString">
+ <xsl:with-param name="key">international_telecommunication_union</xsl:with-param>
+ </xsl:call-template>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <!-- collection/series (optional) -->
+ <fo:table-cell text-align="start">
+ <fo:block>
+ <xsl:variable name="collection" select="normalize-space(/itu:itu-standard/itu:metanorma-extension/itu:presentation-metadata/itu:collection)"/>
+ <xsl:if test="$collection != ''">
+ <xsl:value-of select="$collection"/>
+ </xsl:if>
+ </fo:block>
+ </fo:table-cell>
+ <!-- Sector or Bureau name -->
+ <fo:table-cell text-align="end">
+ <fo:block>
+ <xsl:variable name="sector" select="normalize-space(/itu:itu-standard/itu:metanorma-extension/itu:presentation-metadata/itu:sector)"/>
+ <xsl:value-of select="$sector"/>
+ <xsl:if test="$sector = ''">
+ <xsl:variable name="bureau_key">
+ <xsl:choose>
+ <xsl:when test="$bureau = 'T'">tsb</xsl:when>
+ <xsl:when test="$bureau = 'R'">br</xsl:when>
+ <xsl:when test="$bureau = 'D'">bdt</xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:call-template name="getLocalizedString">
+ <xsl:with-param name="key"><xsl:value-of select="$bureau_key"/>_short</xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:block-container>
+ </fo:block-container>
+ <xsl:if test="$doctype != 'service-publication'">
+ <fo:block margin-top="3.4mm">
+ <xsl:call-template name="setWritingMode"/>
+ <fo:instream-foreign-object fox:alt-text="Color bar">
+ <xsl:call-template name="insertImageCoverColorBand"/>
+ </fo:instream-foreign-object>
+ </fo:block>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise><fo:block> </fo:block></xsl:otherwise>
+ </xsl:choose>
+ </fo:static-content>
+ <fo:static-content flow-name="footer" role="artifact">
+ <fo:block text-align="right" margin-left="13mm" margin-right="13.3mm">
+ <xsl:if test="$lang = 'ar'">
+ <xsl:attribute name="text-align">left</xsl:attribute>
</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:instream-foreign-object content-width="20.5mm" fox:alt-text="Image Logo">
+ <xsl:copy-of select="$Image-ITU-Globe-Logo-Blue"/>
+ </fo:instream-foreign-object>
</fo:block>
- </fo:flow>
- </fo:page-sequence>
- </xsl:if>
+ </fo:static-content>
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block-container font-size="22pt" font-weight="bold" color="{$color_cover_title}">
+ <xsl:call-template name="setWritingMode"/>
- <!-- ============================================= -->
- <!-- Cover page for service-publication -->
- <!-- ============================================= -->
- <xsl:if test="$doctype = 'service-publication'">
- <fo:page-sequence master-reference="SP-first-page" force-page-count="no-force">
- <fo:flow flow-name="xsl-region-body">
- <fo:block font-size="10pt" font-style="italic" text-align="center">
- <xsl:if test="$lang = 'ar'"> <!-- to prevent rendering `###` due the missing Arabic glyphs in the italic font (Times New Roman) -->
- <xsl:attribute name="font-style">normal</xsl:attribute>
- </xsl:if>
- <fo:block>
- <xsl:call-template name="getLocalizedString">
- <xsl:with-param name="key">annex_to_itu_ob</xsl:with-param>
- </xsl:call-template>
- </fo:block>
- <fo:block>
- <xsl:call-template name="getLocalizedString">
- <xsl:with-param name="key">number_abbrev</xsl:with-param>
- </xsl:call-template>
- <xsl:value-of select="/*/itu:bibdata/itu:docnumber"/>
- <xsl:text> – </xsl:text>
- <xsl:value-of select="translate(normalize-space(/*/itu:bibdata/itu:date[@type='published' and @format]),' ','')"/>
- </fo:block>
- </fo:block>
+ <xsl:choose>
- <fo:block font-size="14pt" margin-top="7mm">
- <fo:block font-weight="bold">
- <fo:inline baseline-shift="-140%" padding-right="6mm">
- <xsl:if test="$lang = 'ar'">
- <xsl:attribute name="padding-right">0mm</xsl:attribute>
- <xsl:attribute name="padding-left">6mm</xsl:attribute>
- </xsl:if>
- <fo:instream-foreign-object content-height="18.5mm" content-width="16.1mm" fox:alt-text="Image Logo">
- <xsl:copy-of select="$Image-ITU-Globe-Logo"/>
- </fo:instream-foreign-object>
- </fo:inline>
- <xsl:variable name="itu_name">
- <xsl:call-template name="getLocalizedString">
- <xsl:with-param name="key">international_telecommunication_union</xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($itu_name))"/>
- </fo:block>
- </fo:block>
- <fo:block-container margin-left="10mm">
- <fo:block-container margin-left="0mm">
+ <xsl:when test="$doctype = 'service-publication'">
+ <fo:block margin-top="11.5mm" font-size="26pt">
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = $lang]"/>
+ </fo:block>
+ <fo:block margin-top="2mm">
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'subtitle' and @language = $lang]"/>
+ </fo:block>
+ <xsl:variable name="year_published" select="substring($date_published,1,4)"/>
+ <xsl:if test="$year_published != ''">
+ <!-- Examples:
+ 2020 edition
+ Édition 2020
+ Edición 2020
+ طبعة 2020
+ 2020 年版
+ Издание 2020 года -->
+ <fo:block margin-top="3mm" font-size="18pt">
+ <xsl:variable name="editionTitle">
+ <xsl:call-template name="getLocalizedString">
+ <xsl:with-param name="key">edition</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="editionTitleCapitalized">
+ <xsl:call-template name="capitalize">
+ <xsl:with-param name="str" select="$editionTitle"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$lang = 'en' or $lang = 'ar' or $lang = 'zh'">
+ <xsl:value-of select="$year_published"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$editionTitle"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$editionTitleCapitalized"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$year_published"/>
+ <xsl:if test="$lang = 'ru'"> года</xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </fo:block>
+ </xsl:if>
+ </xsl:when> <!-- $doctype = 'service-publication' -->
- <fo:block font-size="20pt" font-weight="bold" space-before="30mm">
- <xsl:call-template name="getLocalizedString">
- <xsl:with-param name="key">tsb</xsl:with-param>
- </xsl:call-template>
- </fo:block>
- <fo:block font-size="14pt" font-weight="bold">
- <xsl:variable name="tsb_full">
- <xsl:call-template name="getLocalizedString">
- <xsl:with-param name="key">tsb_full</xsl:with-param>
- <xsl:with-param name="formatted">true</xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($tsb_full))"/>
- </fo:block>
- <fo:block-container height="20mm" display-align="center" width="90%">
- <fo:block font-weight="bold">
- <!-- complements -->
- <!-- To do: Example: COMPLEMENT TO ITU-T RECOMMENDATIONS F.69 (06/1994) AND F.68 (11/1988) -->
- <fo:inline>COMPLEMENT TO ITU-T RECOMMENDATIONS </fo:inline>
- <xsl:for-each select="/*/itu:bibdata/itu:relation[@type = 'complements']">
- <xsl:value-of select="translate(itu:bibitem/itu:docidentifier, ' ', ' ')"/>
+ <xsl:otherwise>
+ <fo:block margin-top="11.5mm">
<xsl:choose>
- <xsl:when test="count(following-sibling::itu:relation[@type = 'complements']) = 1"> AND </xsl:when>
- <xsl:when test="following-sibling::itu:relation[@type = 'complements']">, </xsl:when>
- </xsl:choose>
- </xsl:for-each>
- </fo:block>
- </fo:block-container>
- <fo:block-container>
- <fo:block font-size="1pt"><fo:leader leader-pattern="rule" leader-length="90%" rule-style="solid" rule-thickness="1pt"/></fo:block>
- <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" 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>
- <fo:block font-size="14pt">
- <xsl:if test="not(starts-with($series_secondary, '('))">
- <xsl:text>(</xsl:text>
- </xsl:if>
- <xsl:value-of select="$series_secondary"/>
- <xsl:if test="not(starts-with($series_secondary, '('))">
- <xsl:text>)</xsl:text>
- </xsl:if>
- </fo:block>
+ <xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
+ <!-- Example: ITU-T Technical Paper -->
+ <xsl:value-of select="$docidentifier_ITU_left_part"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$doctypeTitle"/>
</xsl:when>
- <xsl:when test="$series_main != '' and $series_secondary != '' and $series_tertiary != ''">
- <fo:block font-size="16pt">
- <xsl:value-of select="$series_main"/>
- </fo:block>
- <fo:block font-size="14pt">
- <xsl:if test="not(starts-with($series_secondary, '('))">
- <xsl:text>(</xsl:text>
- </xsl:if>
- <xsl:value-of select="$series_secondary"/>
- <xsl:if test="not(starts-with($series_secondary, '('))">
- <xsl:text>)</xsl:text>
- </xsl:if>
- </fo:block>
- <fo:block font-size="12pt" space-before="12pt" space-after="12pt">
- <xsl:value-of select="$series_tertiary"/>
- </fo:block>
- <fo:block font-size="16pt">
- <xsl:value-of select="$title_main"/>
- </fo:block>
+ <xsl:when test="$doctype = 'implementers-guide'">
+ <xsl:value-of select="$docidentifier_ITU_left_part"/>
+ <xsl:text> </xsl:text>
+ <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:when test="$series_main != '' and $series_secondary = '' and $series_tertiary = ''">
- <fo:block font-size="16pt">
- <xsl:value-of select="$title_main"/>
- </fo:block>
- <fo:block font-size="14pt">
- <xsl:if test="not(starts-with($series_main, '('))">
- <xsl:text>(</xsl:text>
- </xsl:if>
- <xsl:value-of select="$series_main"/>
- <xsl:if test="not(starts-with($series_main, '('))">
- <xsl:text>)</xsl:text>
- </xsl:if>
- </fo:block>
+ <xsl:when test="$doctype = 'resolution'">
+ <xsl:value-of select="$doctypeTitle"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$docidentifier_ITU_left_part"/>
</xsl:when>
<xsl:otherwise>
- <fo:block font-size="16pt">
- <xsl:value-of select="$title_main"/>
- </fo:block>
+ <xsl:value-of select="$doctypeTitle"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$docidentifier_ITU"/>
</xsl:otherwise>
</xsl:choose>
</fo:block>
- <fo:block font-size="14pt">
- </fo:block>
- <fo:block font-size="14pt">
- <fo:block> </fo:block>
- <xsl:variable name="position-sp" select="/*/itu:bibdata/itu:title[@type='position-sp' and @language = $lang]"/>
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($position-sp))"/>
- </fo:block>
- </fo:block-container>
- <fo:block font-size="1pt"><fo:leader leader-pattern="rule" leader-length="90%" rule-style="solid" rule-thickness="1pt"/></fo:block>
- </fo:block-container>
+ <fo:block-container font-size="14pt" margin-top="1mm" margin-right="2mm">
+ <xsl:if test="$bureau = 'T'">
+ <xsl:attribute name="text-align">end</xsl:attribute>
+ </xsl:if>
+ <fo:block-container margin-right="0mm">
- </fo:block-container>
- </fo:block-container>
-
- <fo:block space-before="25mm" font-weight="bold">
- <xsl:variable name="placedate">
- <xsl:call-template name="getLocalizedString">
- <xsl:with-param name="key">placedate</xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="year" select="substring(/*/itu:bibdata/itu:date[@type = 'published']/itu:on,1,4)"/>
- <xsl:if test="normalize-space($year) != ''">
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($placedate),'%',$year)"/>
- </xsl:if>
- </fo:block>
- </fo:flow>
- </fo:page-sequence>
- </xsl:if>
- <!-- ============================================= -->
- <!-- END Cover page for service-publication -->
- <!-- ============================================= -->
-
- <!-- ============================================= -->
- <!-- Cover page -->
- <!-- ============================================= -->
- <xsl:if test="$doctype != 'service-publication'">
- <!-- cover page -->
- <fo:page-sequence master-reference="cover-page" writing-mode="lr-tb">
- <xsl:if test="$doctype = 'resolution'">
- <xsl:attribute name="force-page-count">no-force</xsl:attribute>
- </xsl:if>
- <fo:flow flow-name="xsl-region-body">
-
- <fo:block-container absolute-position="fixed" top="255mm">
- <fo:block text-align="right" margin-right="19mm">
- <xsl:choose>
- <xsl:when test="$doctype = 'resolution'">
- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Logo_resolution))}" content-height="21mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo"/>
- </xsl:when>
- <xsl:otherwise>
- <!-- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Logo))}" content-height="17.7mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo"/> -->
- <fo:instream-foreign-object content-width="24.1mm" fox:alt-text="Image Logo">
- <xsl:copy-of select="$Image-ITU-Logo"/>
- </fo:instream-foreign-object>
- </xsl:otherwise>
- </xsl:choose>
-
- </fo:block>
- </fo:block-container>
-
- <fo:block-container absolute-position="fixed" left="-7mm" top="0" font-size="0">
- <fo:block text-align="left">
- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Fond-Rec))}" width="43.6mm" content-height="299.2mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image Cover Page"/>
- </fo:block>
- </fo:block-container>
- <fo:block-container font-family="Arial">
- <xsl:variable name="annexid" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:annexid)"/>
- <fo:table width="100%" table-layout="fixed" id="__internal_layout__coverpage_{generate-id()}"> <!-- 175.4mm-->
- <fo:table-column column-width="25.2mm"/>
- <fo:table-column column-width="44.4mm"/>
- <fo:table-column column-width="35.8mm"/>
- <fo:table-column column-width="67mm"/>
- <fo:table-body>
- <fo:table-row height="37.5mm"> <!-- 42.5mm -->
- <fo:table-cell>
- <fo:block> </fo:block>
- </fo:table-cell>
- <fo:table-cell number-columns-spanned="3">
- <fo:block-container>
- <xsl:call-template name="setWritingMode"/>
- <fo:block font-family="Arial" font-size="13pt" font-weight="bold" color="gray"> <!-- margin-top="16pt" letter-spacing="4pt", Helvetica for letter-spacing working -->
- <fo:block><xsl:value-of select="$linebreak"/></fo:block>
- <xsl:call-template name="addLetterSpacing">
- <xsl:with-param name="text" select="/itu:itu-standard/itu:bibdata/itu:contributor[itu:role/@type='author']/itu:organization/itu:name"/>
- </xsl:call-template>
- </fo:block>
- </fo:block-container>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell>
- <fo:block> </fo:block>
- </fo:table-cell>
- <fo:table-cell padding-top="2mm" padding-bottom="-1mm">
- <fo:block-container>
- <xsl:call-template name="setWritingMode"/>
- <fo:block font-family="Arial" font-size="36pt" font-weight="bold" margin-top="6pt" letter-spacing="2pt"> <!-- Helvetica for letter-spacing working -->
- <fo:block>
- <xsl:variable name="docidentifier_left_part" select="normalize-space(substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' '))"/>
- <xsl:value-of select="$docidentifier_left_part"/>
- <xsl:if test="$docidentifier_left_part = ''"><xsl:text>ITU-T</xsl:text></xsl:if>
- </fo:block>
- </fo:block>
- </fo:block-container>
- </fo:table-cell>
- <fo:table-cell padding-top="1mm" number-columns-spanned="2" padding-bottom="-1mm">
- <fo:block-container>
- <xsl:call-template name="setWritingMode"/>
- <fo:block font-size="30pt" font-weight="bold" text-align="right" margin-top="12pt" padding="0mm">
- <xsl:choose>
- <xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
- <xsl:value-of select="$doctypeTitle"/>
- </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:when test="$doctype = 'resolution'"/>
- <xsl:when test="$doctype = 'recommendation-supplement'">
- <!-- Series L -->
- <xsl:variable name="title-series">
+ <xsl:variable name="additional_block">
+ <!-- Examples:
+ Amendment 1
+ Supplement 37 -->
+ <xsl:if test="$TDnumber != ''">
+ <fo:block-container>
+ <xsl:call-template name="setWritingMode"/>
+ <fo:block>TD number: <xsl:value-of select="$TDnumber"/></fo:block>
+ </fo:block-container>
+ </xsl:if>
+ <xsl:if test="$provisionalIdentifier != ''">
+ <fo:block-container>
+ <xsl:call-template name="setWritingMode"/>
+ <fo:block>Provisional identifier: <xsl:value-of select="$provisionalIdentifier"/>
+ </fo:block>
+ </fo:block-container>
+ </xsl:if>
+ <xsl:if test="$annexid != ''">
+ <fo:block-container>
+ <xsl:call-template name="setWritingMode"/>
+ <fo:block>
<xsl:call-template name="getLocalizedString">
- <xsl:with-param name="key">series</xsl:with-param>
+ <xsl:with-param name="key">annex</xsl:with-param>
</xsl:call-template>
- </xsl:variable>
- <xsl:call-template name="capitalize">
- <xsl:with-param name="str" select="$title-series"/>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type='main']/itu:title[@type='abbrev']"/>
- <!-- Ex. Supplement 37 -->
- <fo:block font-size="18pt">
- <xsl:call-template name="getLocalizedString">
- <xsl:with-param name="key">doctype_dict.recommendation-supplement</xsl:with-param>
- </xsl:call-template>
<xsl:text> </xsl:text>
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docnumber"/>
+ <xsl:value-of select="$annexid"/>
</fo:block>
+ </fo:block-container>
+ </xsl:if>
+ <xsl:if test="$isAmendment != ''">
+ <fo:block-container>
+ <xsl:call-template name="setWritingMode"/>
+ <fo:block><xsl:value-of select="$isAmendment"/></fo:block>
+ </fo:block-container>
+ </xsl:if>
+ <xsl:if test="$isCorrigendum != ''">
+ <fo:block-container>
+ <xsl:call-template name="setWritingMode"/>
+ <fo:block><xsl:value-of select="$isCorrigendum"/></fo:block>
+ </fo:block-container>
+ </xsl:if>
+
+ <!-- Date, example: (11/2018) -->
+ <xsl:choose>
+ <xsl:when test="($doctype = 'technical-report' or $doctype = 'technical-paper') and /itu:itu-standard/itu:bibdata/itu:version/itu:revision-date">
+ <xsl:call-template name="formatMeetingDate">
+ <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:version/itu:revision-date"/>
+ <xsl:with-param name="inParenthesis">true</xsl:with-param>
+ </xsl:call-template>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="substring-after(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
+ <xsl:call-template name="formatDate">
+ <xsl:with-param name="date" select="$date_published"/>
+ </xsl:call-template>
</xsl:otherwise>
</xsl:choose>
+ </xsl:variable>
+ <fo:block>
+ <xsl:copy-of select="$additional_block"/>
+ <xsl:if test="normalize-space($additional_block) = ''"> </xsl:if>
</fo:block>
</fo:block-container>
- </fo:table-cell>
- </fo:table-row>
- <xsl:variable name="additionalNumbers">
- <xsl:if test="$TDnumber != ''">
- <fo:block-container space-after="2pt">
- <xsl:call-template name="setWritingMode"/>
- <fo:block font-size="14pt">TD number: <xsl:value-of select="$TDnumber"/></fo:block>
- </fo:block-container>
+ </fo:block-container> <!-- end of additional block -->
+
+ <xsl:if test="$doctype = 'resolution'">
+ <fo:block margin-bottom="6pt">
+ <xsl:call-template name="insertMeetingInfo"/>
+ </fo:block>
</xsl:if>
- <xsl:if test="$provisionalIdentifier != ''">
- <fo:block-container space-after="2pt">
- <xsl:call-template name="setWritingMode"/>
- <fo:block font-size="14pt">Provisional identifier: <xsl:value-of select="$provisionalIdentifier"/></fo:block>
+
+ <!-- Series: -->
+ <xsl:variable name="series">
+ <xsl:call-template name="insertSeriesTitleMain"/>
+ <xsl:choose>
+ <xsl:when test="$doctype = 'recommendation-supplement'"/>
+ <xsl:otherwise>
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:series">
+ <fo:block font-weight="normal" margin-top="4mm">
+ <xsl:call-template name="insertSeriesTitleAdditional"/>
+ </fo:block>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:if test="normalize-space($series) != ''">
+ <fo:block-container margin-right="5mm">
+ <fo:block-container margin-right="0mm">
+ <fo:block font-size="18pt" margin-top="5mm">
+ <xsl:copy-of select="$series"/>
+ </fo:block>
+ <fo:block>
+ <fo:leader leader-pattern="rule" rule-thickness="1pt" leader-length="100%"/>
+ </fo:block>
+ </fo:block-container>
</fo:block-container>
</xsl:if>
- <xsl:if test="$annexid != ''">
- <fo:block-container>
- <xsl:call-template name="setWritingMode"/>
- <fo:block font-size="18pt" font-weight="bold">
- <xsl:call-template name="getLocalizedString">
- <xsl:with-param name="key">annex</xsl:with-param>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- <xsl:value-of select="$annexid"/>
- </fo:block>
- </fo:block-container>
- </xsl:if>
+
+ <fo:block role="H1">
+ <!-- margin-top="24mm" -->
+ <xsl:if test="($doctype = 'technical-report' or $doctype = 'technical-paper') and $docnumber != ''">
+ <xsl:attribute name="margin-top">3mm</xsl:attribute>
+ <xsl:value-of select="$docnumber"/>
+ </xsl:if>
+ </fo:block>
+
+ <fo:block margin-top="3pt">
+ <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:if test="$doctype = 'resolution'">
+ <!-- Resolution 1 -->
+ <xsl:value-of select="$doctypeTitle"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
+ <xsl:value-of select="$en_dash_separator"/>
+ </xsl:if>
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = $lang]"/>
+ </fo:block>
+
+ <!-- Example: Annex F1 - ... -->
+ <xsl:for-each select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = $lang]">
+ <fo:block font-size="18pt" margin-top="3mm" role="H1">
+ <xsl:call-template name="getLocalizedString">
+ <xsl:with-param name="key">annex</xsl:with-param>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$annexid"/>
+ <xsl:value-of select="$en_dash_separator"/>
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:for-each>
+
+ <!-- Example: Amendment 1 - ... -->
<xsl:if test="$isAmendment != ''">
- <fo:block-container>
- <xsl:call-template name="setWritingMode"/>
- <fo:block font-size="18pt" font-weight="bold">
- <xsl:value-of select="$isAmendment"/>
- </fo:block>
- </fo:block-container>
+ <fo:block margin-top="3mm" role="H1">
+ <xsl:value-of select="$isAmendment"/>
+ <xsl:variable name="title_amendment" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:title[@type = 'amendment'])"/>
+ <xsl:if test="$title_amendment != ''">
+ <xsl:value-of select="$en_dash_separator"/>
+ <xsl:value-of select="$title_amendment"/>
+ </xsl:if>
+ </fo:block>
</xsl:if>
+ <!-- Example: Corrigendum 1 - ... -->
<xsl:if test="$isCorrigendum != ''">
- <fo:block-container>
- <xsl:call-template name="setWritingMode"/>
- <fo:block font-size="18pt" font-weight="bold">
- <xsl:value-of select="$isCorrigendum"/>
- </fo:block>
- </fo:block-container>
+ <fo:block margin-top="3mm" role="H1">
+ <xsl:value-of select="$isCorrigendum"/>
+ <xsl:variable name="title_corrigendum" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:title[@type = 'corrigendum'])"/>
+ <xsl:if test="$title_corrigendum != ''">
+ <xsl:value-of select="$en_dash_separator"/>
+ <xsl:value-of select="$title_corrigendum"/>
+ </xsl:if>
+ </fo:block>
</xsl:if>
- </xsl:variable>
- <fo:table-row height="17.2mm">
- <fo:table-cell>
- <fo:block> </fo:block>
- </fo:table-cell>
- <fo:table-cell font-size="10pt" number-columns-spanned="2" padding-top="1mm">
- <fo:block-container>
- <xsl:call-template name="setWritingMode"/>
- <fo:block>
- <xsl:text>TELECOMMUNICATION</xsl:text>
- </fo:block>
- <fo:block>
- <xsl:text>STANDARDIZATION SECTOR</xsl:text>
- </fo:block>
- <fo:block>
- <xsl:text>OF ITU</xsl:text>
- </fo:block>
+
+ <xsl:if test="/itu:itu-standard/itu:boilerplate/itu:legal-statement/itu:clause[@id='draft-warning']">
+ <fo:block-container margin-left="1mm" margin-right="1mm" border="0.7mm solid black" margin-top="5mm">
+ <fo:block-container margin-left="1mm" margin-right="1mm">
+ <fo:block padding-top="3mm">
+ <xsl:apply-templates select="/itu:itu-standard/itu:boilerplate/itu:legal-statement/itu:clause[@id='draft-warning']" mode="caution"/>
+ </fo:block>
+ </fo:block-container>
</fo:block-container>
- </fo:table-cell>
- <fo:table-cell text-align="right">
- <xsl:copy-of select="$additionalNumbers"/>
- <fo:block font-size="14pt">
- <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>
+ </xsl:if>
+
+ <xsl:if test="$doctype = 'recommendation-supplement'">
+ <fo:block font-size="16pt" margin-top="3mm">
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:status/itu:stage = 'draft'">Draft </xsl:if>
+ <xsl:text>ITU-</xsl:text>
+ <xsl:value-of select="$bureau"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement']"/>
</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <xsl:variable name="countAdditionalNumbers" select="count(xalan:nodeset($additionalNumbers)/*)"/>
- <fo:table-row height="64mm"> <!-- 59mm -->
- <xsl:if test="$countAdditionalNumbers != 0">
- <xsl:attribute name="height"><xsl:value-of select="64 - $countAdditionalNumbers * 5"/>mm</xsl:attribute>
</xsl:if>
- <fo:table-cell>
- <fo:block> </fo:block>
- </fo:table-cell>
- <fo:table-cell font-size="16pt" number-columns-spanned="3" border-bottom="0.5mm solid black" display-align="after">
- <fo:block-container>
- <xsl:call-template name="setWritingMode"/>
- <fo:block padding-bottom="7mm">
- <xsl:if test="$doctype = 'resolution'">
- <fo:block><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting"/></fo:block>
- <fo:block>
- <xsl:variable name="meeting-place" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-place"/>
- <xsl:variable name="meeting-date_from" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-date/itu:from"/>
- <xsl:variable name="meeting-date_from_year" select="substring($meeting-date_from, 1, 4)"/>
- <xsl:variable name="meeting-date_to" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-date/itu:to"/>
- <xsl:variable name="meeting-date_to_year" select="substring($meeting-date_to, 1, 4)"/>
+ </xsl:otherwise>
- <xsl:variable name="date_format">
- <xsl:choose>
- <xsl:when test="$meeting-date_from_year = $meeting-date_to_year">ddMM</xsl:when>
- <xsl:otherwise>ddMMyyyy</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="meeting-date_from_str">
- <xsl:call-template name="convertDate">
- <xsl:with-param name="date" select="$meeting-date_from"/>
- <xsl:with-param name="format" select="$date_format"/>
- </xsl:call-template>
- </xsl:variable>
+ </xsl:choose>
- <xsl:variable name="meeting-date_to_str">
- <xsl:call-template name="convertDate">
- <xsl:with-param name="date" select="$meeting-date_to"/>
- <xsl:with-param name="format" select="'ddMMyyyy'"/>
- </xsl:call-template>
- </xsl:variable>
+ </fo:block-container>
+ </fo:flow>
+ </fo:page-sequence>
+ <!-- Second cover page -->
+ <xsl:variable name="secondCoverPageData_">
+ <xsl:call-template name="insertBackgroundPageImage">
+ <xsl:with-param name="number">2</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="secondCoverPageData" select="xalan:nodeset($secondCoverPageData_)"/>
+ <xsl:if test="$secondCoverPageData//*[self::fo:instream-foreign-object or self::fo:external-graphic]">
+ <fo:page-sequence master-reference="cover-page_2023">
+ <fo:static-content flow-name="header" role="artifact" id="__internal_layout__coverpage2_header_{generate-id()}">
+ <xsl:copy-of select="$secondCoverPageData"/>
+ </fo:static-content>
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block> </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </xsl:if> <!-- End: Second cover page -->
+ </xsl:when> <!-- $layoutVersion = '2023' -->
- <xsl:value-of select="$meeting-place"/>
- <xsl:if test="$meeting-place != '' and (normalize-space($meeting-date_from_str) != '' or normalize-space($meeting-date_to_str != ''))">
+ <xsl:otherwise>
+
+ <xsl:choose>
+ <xsl:when 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" id="__internal_layout__meeting_{generate-id()}">
+ <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:value-of select="$meeting-date_from_str"/>
- <xsl:if test="normalize-space($meeting-date_from_str) != '' and normalize-space($meeting-date_to_str) != ''">
- <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" id="__internal_layout__groups_{generate-id()}">
+ <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">
+ <xsl:variable name="subgroup" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:subgroup/itu:name"/>
+ <fo:block><xsl:value-of select="java:replaceAll(java:java.lang.String.new($subgroup),'(.)','$1')"/></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">
+ <xsl:variable name="workgroup" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:workgroup/itu:name"/>
+ <fo:block><xsl:value-of select="java:replaceAll(java:java.lang.String.new($workgroup),'(.)','$1')"/></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 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>
+
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:person">
+ <fo:table width="175mm" table-layout="fixed" line-height="110%" id="__internal_layout__person_{generate-id()}">
+ <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>
- <xsl:value-of select="$meeting-date_to_str"/>
- </xsl:if>
- </fo:block>
- </xsl:if>
- <xsl:if test="$doctype = 'focus-group'">
- <xsl:attribute name="padding-bottom">0mm</xsl:attribute>
- <xsl:attribute name="border-bottom">1pt solid black</xsl:attribute>
- </xsl:if>
- <fo:block text-transform="uppercase">
- <xsl:variable name="series_title_full" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']/itu:title[@type = 'full'])"/>
- <xsl:variable name="series_title">
- <xsl:value-of select="$series_title_full"/>
- <xsl:if test="$series_title_full = ''">
- <xsl:value-of select="normalize-space(/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']/itu:title[(@type != 'full' and @type != 'abbrev') or not(@type)])"/>
- </xsl:if>
- </xsl:variable>
- <xsl:if test="$series_title != ''">
- <xsl:variable name="title">
- <xsl:if test="$doctype != 'resolution'">
- <!-- <xsl:text>Series </xsl:text> -->
- <xsl:call-template name="getLocalizedString">
- <xsl:with-param name="key">series</xsl:with-param>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:value-of select="$series_title"/>
- </xsl:variable>
- <xsl:value-of select="$title"/>
- </xsl:if>
- </fo:block>
- <xsl:choose>
- <xsl:when test="$doctype = 'recommendation-supplement'"/>
- <xsl:otherwise>
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:series">
- <fo:block margin-top="6pt">
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type = 'secondary']"/>
- <xsl:if test="normalize-space(/itu:itu-standard/itu:bibdata/itu:series[@type = 'tertiary']) != ''">
- <xsl:text> — </xsl:text>
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type = 'tertiary']"/>
- </xsl:if>
- </fo:block>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
+ <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:when>
+ <!-- ============================================= -->
+ <!-- Cover page for service-publication -->
+ <!-- ============================================= -->
+ <xsl:when test="$doctype = 'service-publication'">
+ <fo:page-sequence master-reference="SP-first-page" force-page-count="no-force">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block font-size="10pt" font-style="italic" text-align="center">
+ <xsl:if test="$lang = 'ar'"> <!-- to prevent rendering `###` due the missing Arabic glyphs in the italic font (Times New Roman) -->
+ <xsl:attribute name="font-style">normal</xsl:attribute>
+ </xsl:if>
+ <fo:block>
+ <xsl:call-template name="getLocalizedString">
+ <xsl:with-param name="key">annex_to_itu_ob</xsl:with-param>
+ </xsl:call-template>
+ </fo:block>
+ <fo:block>
+ <xsl:call-template name="getLocalizedString">
+ <xsl:with-param name="key">number_abbrev</xsl:with-param>
+ </xsl:call-template>
+ <xsl:value-of select="/*/itu:bibdata/itu:docnumber"/>
+ <xsl:text> – </xsl:text>
+ <xsl:value-of select="translate(normalize-space(/*/itu:bibdata/itu:date[@type='published' and @format]),' ','')"/>
+ </fo:block>
+ </fo:block>
+
+ <fo:block font-size="14pt" margin-top="7mm">
+ <fo:block font-weight="bold">
+ <fo:inline baseline-shift="-140%" padding-right="6mm">
+ <xsl:if test="$lang = 'ar'">
+ <xsl:attribute name="padding-right">0mm</xsl:attribute>
+ <xsl:attribute name="padding-left">6mm</xsl:attribute>
+ </xsl:if>
+ <fo:instream-foreign-object content-height="18.5mm" content-width="16.1mm" fox:alt-text="Image Logo">
+ <xsl:copy-of select="$Image-ITU-Globe-Logo"/>
+ </fo:instream-foreign-object>
+ </fo:inline>
+ <xsl:variable name="itu_name">
+ <xsl:call-template name="getLocalizedString">
+ <xsl:with-param name="key">international_telecommunication_union</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($itu_name))"/>
+ </fo:block>
+ </fo:block>
+ <fo:block-container margin-left="10mm">
+ <fo:block-container margin-left="0mm">
+
+ <fo:block font-size="20pt" font-weight="bold" space-before="30mm">
+ <xsl:call-template name="getLocalizedString">
+ <xsl:with-param name="key">tsb</xsl:with-param>
+ </xsl:call-template>
+ </fo:block>
+ <fo:block font-size="14pt" font-weight="bold">
+ <xsl:variable name="tsb_full">
+ <xsl:call-template name="getLocalizedString">
+ <xsl:with-param name="key">tsb_full</xsl:with-param>
+ <xsl:with-param name="formatted">true</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($tsb_full))"/>
+ </fo:block>
+ <fo:block-container height="20mm" display-align="center" width="90%">
+ <fo:block font-weight="bold">
+ <!-- complements -->
+ <!-- To do: Example: COMPLEMENT TO ITU-T RECOMMENDATIONS F.69 (06/1994) AND F.68 (11/1988) -->
+ <fo:inline>COMPLEMENT TO ITU-T RECOMMENDATIONS </fo:inline>
+ <xsl:for-each select="/*/itu:bibdata/itu:relation[@type = 'complements']">
+ <xsl:value-of select="translate(itu:bibitem/itu:docidentifier, ' ', ' ')"/>
+ <xsl:choose>
+ <xsl:when test="count(following-sibling::itu:relation[@type = 'complements']) = 1"> AND </xsl:when>
+ <xsl:when test="following-sibling::itu:relation[@type = 'complements']">, </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
</fo:block>
</fo:block-container>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row height="40mm">
- <fo:table-cell>
- <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" 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">
- <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:if test="$doctype = 'resolution'">
- <!-- Resolution 1 -->
- <xsl:value-of select="$doctypeTitle"/><xsl:text> </xsl:text><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
- <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-size="1pt"><fo:leader leader-pattern="rule" leader-length="90%" rule-style="solid" rule-thickness="1pt"/></fo:block>
+ <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" role="H1">
- <xsl:value-of select="."/>
+ <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>
+ <fo:block font-size="14pt">
+ <xsl:if test="not(starts-with($series_secondary, '('))">
+ <xsl:text>(</xsl:text>
+ </xsl:if>
+ <xsl:value-of select="$series_secondary"/>
+ <xsl:if test="not(starts-with($series_secondary, '('))">
+ <xsl:text>)</xsl:text>
+ </xsl:if>
+ </fo:block>
+ </xsl:when>
+ <xsl:when test="$series_main != '' and $series_secondary != '' and $series_tertiary != ''">
+ <fo:block font-size="16pt">
+ <xsl:value-of select="$series_main"/>
+ </fo:block>
+ <fo:block font-size="14pt">
+ <xsl:if test="not(starts-with($series_secondary, '('))">
+ <xsl:text>(</xsl:text>
+ </xsl:if>
+ <xsl:value-of select="$series_secondary"/>
+ <xsl:if test="not(starts-with($series_secondary, '('))">
+ <xsl:text>)</xsl:text>
+ </xsl:if>
+ </fo:block>
+ <fo:block font-size="12pt" space-before="12pt" space-after="12pt">
+ <xsl:value-of select="$series_tertiary"/>
+ </fo:block>
+ <fo:block font-size="16pt">
+ <xsl:value-of select="$title_main"/>
+ </fo:block>
+ </xsl:when>
+ <xsl:when test="$series_main != '' and $series_secondary = '' and $series_tertiary = ''">
+ <fo:block font-size="16pt">
+ <xsl:value-of select="$title_main"/>
+ </fo:block>
+ <fo:block font-size="14pt">
+ <xsl:if test="not(starts-with($series_main, '('))">
+ <xsl:text>(</xsl:text>
+ </xsl:if>
+ <xsl:value-of select="$series_main"/>
+ <xsl:if test="not(starts-with($series_main, '('))">
+ <xsl:text>)</xsl:text>
+ </xsl:if>
+ </fo:block>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:block font-size="16pt">
+ <xsl:value-of select="$title_main"/>
+ </fo:block>
+ </xsl:otherwise>
+ </xsl:choose>
</fo:block>
- </xsl:for-each>
- <xsl:if test="$isAmendment != ''">
- <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 font-size="14pt">
</fo:block>
+ <fo:block font-size="14pt">
+ <fo:block> </fo:block>
+ <xsl:variable name="position-sp" select="/*/itu:bibdata/itu:title[@type='position-sp' and @language = $lang]"/>
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($position-sp))"/>
+ </fo:block>
+ </fo:block-container>
+ <fo:block font-size="1pt"><fo:leader leader-pattern="rule" leader-length="90%" rule-style="solid" rule-thickness="1pt"/></fo:block>
+ </fo:block-container>
+
+ </fo:block-container>
+ </fo:block-container>
+
+ <fo:block space-before="25mm" font-weight="bold">
+ <xsl:variable name="placedate">
+ <xsl:call-template name="getLocalizedString">
+ <xsl:with-param name="key">placedate</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="year" select="substring(/*/itu:bibdata/itu:date[@type = 'published']/itu:on,1,4)"/>
+ <xsl:if test="normalize-space($year) != ''">
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($placedate),'%',$year)"/>
+ </xsl:if>
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </xsl:when>
+ <!-- ============================================= -->
+ <!-- END Cover page for service-publication -->
+ <!-- ============================================= -->
+ </xsl:choose>
+
+ <xsl:if test="$doctype != 'service-publication'">
+ <!-- cover page -->
+ <fo:page-sequence master-reference="cover-page" writing-mode="lr-tb">
+ <xsl:if test="$doctype = 'resolution'">
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+ </xsl:if>
+ <fo:flow flow-name="xsl-region-body">
+
+ <fo:block-container absolute-position="fixed" top="255mm">
+ <fo:block text-align="right" margin-right="19mm">
+ <xsl:choose>
+ <xsl:when test="$doctype = 'resolution'">
+ <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Logo_resolution))}" content-height="21mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Logo))}" content-height="17.7mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo"/> -->
+ <fo:instream-foreign-object content-width="24.1mm" fox:alt-text="Image Logo">
+ <xsl:copy-of select="$Image-ITU-Logo"/>
+ </fo:instream-foreign-object>
+ </xsl:otherwise>
+ </xsl:choose>
+ </fo:block>
+ </fo:block-container>
+
+ <fo:block-container absolute-position="fixed" left="-7mm" top="0" font-size="0">
+ <fo:block text-align="left">
+ <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Fond-Rec))}" width="43.6mm" content-height="299.2mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image Cover Page"/>
+ </fo:block>
+ </fo:block-container>
+ <fo:block-container font-family="Arial">
+ <fo:table width="100%" table-layout="fixed" id="__internal_layout__coverpage_{generate-id()}"> <!-- 175.4mm-->
+ <fo:table-column column-width="25.2mm"/>
+ <fo:table-column column-width="44.4mm"/>
+ <fo:table-column column-width="35.8mm"/>
+ <fo:table-column column-width="67mm"/>
+ <fo:table-body>
+ <fo:table-row height="37.5mm"> <!-- 42.5mm -->
+ <fo:table-cell>
+ <fo:block> </fo:block>
+ </fo:table-cell>
+ <fo:table-cell number-columns-spanned="3">
+ <fo:block-container>
+ <xsl:call-template name="setWritingMode"/>
+ <fo:block font-family="Arial" font-size="13pt" font-weight="bold" color="gray"> <!-- margin-top="16pt" letter-spacing="4pt", Helvetica for letter-spacing working -->
+ <fo:block><xsl:value-of select="$linebreak"/></fo:block>
+ <xsl:call-template name="addLetterSpacing">
+ <xsl:with-param name="text" select="/itu:itu-standard/itu:bibdata/itu:contributor[itu:role/@type='author']/itu:organization/itu:name"/>
+ </xsl:call-template>
+ </fo:block>
+ </fo:block-container>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="1pt solid green">
+ <fo:table-cell>
+ <fo:block> </fo:block>
+ </fo:table-cell>
+ <fo:table-cell padding-top="2mm" padding-bottom="-1mm">
+ <fo:block-container>
+ <xsl:call-template name="setWritingMode"/>
+ <fo:block font-family="Arial" font-size="36pt" font-weight="bold" margin-top="6pt" letter-spacing="2pt"> <!-- Helvetica for letter-spacing working -->
+ <fo:block>
+ <xsl:value-of select="$docidentifier_ITU_left_part"/>
+ </fo:block>
+ </fo:block>
+ </fo:block-container>
+ </fo:table-cell>
+ <fo:table-cell padding-top="1mm" number-columns-spanned="2" padding-bottom="-1mm">
+ <fo:block-container>
+ <xsl:call-template name="setWritingMode"/>
+ <fo:block font-size="30pt" font-weight="bold" text-align="right" margin-top="12pt" padding="0mm">
+ <xsl:choose>
+ <xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
+ <xsl:value-of select="$doctypeTitle"/>
+ </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:when test="$doctype = 'resolution'"/>
+ <xsl:when test="$doctype = 'recommendation-supplement'">
+ <!-- Series L -->
+ <xsl:variable name="title-series">
+ <xsl:call-template name="getLocalizedString">
+ <xsl:with-param name="key">series</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:call-template name="capitalize">
+ <xsl:with-param name="str" select="$title-series"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type='main']/itu:title[@type='abbrev']"/>
+ <!-- Ex. Supplement 37 -->
+ <fo:block font-size="18pt">
+ <xsl:call-template name="getLocalizedString">
+ <xsl:with-param name="key">doctype_dict.recommendation-supplement</xsl:with-param>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docnumber"/>
+ </fo:block>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="substring-after($docidentifier_ITU, ' ')"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </fo:block>
+ </fo:block-container>
+ </fo:table-cell>
+ </fo:table-row>
+ <xsl:variable name="additionalNumbers">
+ <xsl:if test="$TDnumber != ''">
+ <fo:block-container space-after="2pt">
+ <xsl:call-template name="setWritingMode"/>
+ <fo:block font-size="14pt">TD number: <xsl:value-of select="$TDnumber"/></fo:block>
+ </fo:block-container>
</xsl:if>
+ <xsl:if test="$provisionalIdentifier != ''">
+ <fo:block-container space-after="2pt">
+ <xsl:call-template name="setWritingMode"/>
+ <fo:block font-size="14pt">Provisional identifier: <xsl:value-of select="$provisionalIdentifier"/></fo:block>
+ </fo:block-container>
+ </xsl:if>
+ <xsl:if test="$annexid != ''">
+ <fo:block-container>
+ <xsl:call-template name="setWritingMode"/>
+ <fo:block font-size="18pt" font-weight="bold">
+ <xsl:call-template name="getLocalizedString">
+ <xsl:with-param name="key">annex</xsl:with-param>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$annexid"/>
+ </fo:block>
+ </fo:block-container>
+ </xsl:if>
+ <xsl:if test="$isAmendment != ''">
+ <fo:block-container>
+ <xsl:call-template name="setWritingMode"/>
+ <fo:block font-size="18pt" font-weight="bold">
+ <xsl:value-of select="$isAmendment"/>
+ </fo:block>
+ </fo:block-container>
+ </xsl:if>
<xsl:if test="$isCorrigendum != ''">
- <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>
- </fo:block>
+ <fo:block-container>
+ <xsl:call-template name="setWritingMode"/>
+ <fo:block font-size="18pt" font-weight="bold">
+ <xsl:value-of select="$isCorrigendum"/>
+ </fo:block>
+ </fo:block-container>
</xsl:if>
- </fo:block-container>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row height="40mm">
- <fo:table-cell>
- <fo:block> </fo:block>
- </fo:table-cell>
- <fo:table-cell number-columns-spanned="3">
- <fo:block-container>
- <xsl:call-template name="setWritingMode"/>
- <xsl:choose>
- <xsl:when test="/itu:itu-standard/itu:boilerplate/itu:legal-statement/itu:clause[@id='draft-warning']">
- <xsl:attribute name="border">0.7mm solid black</xsl:attribute>
- <fo:block padding-top="3mm" margin-left="1mm" margin-right="1mm">
- <xsl:apply-templates select="/itu:itu-standard/itu:boilerplate/itu:legal-statement/itu:clause[@id='draft-warning']" mode="caution"/>
+ </xsl:variable>
+ <fo:table-row height="17.2mm" border="1pt solid blue">
+ <fo:table-cell>
+ <fo:block> </fo:block>
+ </fo:table-cell>
+ <fo:table-cell font-size="10pt" number-columns-spanned="2" padding-top="1mm">
+ <fo:block-container>
+ <xsl:call-template name="setWritingMode"/>
+ <fo:block>
+ <xsl:text>TELECOMMUNICATION</xsl:text>
</fo:block>
- </xsl:when>
- <xsl:otherwise>
- <fo:block> </fo:block>
- </xsl:otherwise>
- </xsl:choose>
- </fo:block-container>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row height="25mm">
- <fo:table-cell>
- <fo:block> </fo:block>
- </fo:table-cell>
- <fo:table-cell number-columns-spanned="3">
- <fo:block-container>
- <xsl:call-template name="setWritingMode"/>
- <fo:block font-size="16pt" margin-top="3pt">
- <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 test="$doctype = 'recommendation-supplement'">
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
- </xsl:if>
- </xsl:if>
-
- <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"/>
+ <fo:block>
+ <xsl:text>STANDARDIZATION SECTOR</xsl:text>
+ </fo:block>
+ <fo:block>
+ <xsl:text>OF ITU</xsl:text>
+ </fo:block>
+ </fo:block-container>
+ </fo:table-cell>
+ <fo:table-cell text-align="right">
+ <xsl:copy-of select="$additionalNumbers"/>
+ <fo:block font-size="14pt">
+ <xsl:choose>
+ <xsl:when test="($doctype = 'technical-report' or $doctype = 'technical-paper') and /itu:itu-standard/itu:bibdata/itu:version/itu:revision-date">
+ <xsl:call-template name="formatMeetingDate">
+ <xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:version/itu:revision-date"/>
+ <xsl:with-param name="inParenthesis">true</xsl:with-param>
</xsl:call-template>
- <xsl:text> </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="formatDate">
+ <xsl:with-param name="date" select="$date_published"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <xsl:variable name="countAdditionalNumbers" select="count(xalan:nodeset($additionalNumbers)/*)"/>
+ <fo:table-row height="64mm" border="1pt solid red"> <!-- 59mm -->
+ <xsl:if test="$countAdditionalNumbers != 0">
+ <xsl:attribute name="height"><xsl:value-of select="64 - $countAdditionalNumbers * 5"/>mm</xsl:attribute>
+ </xsl:if>
+ <fo:table-cell>
+ <fo:block> </fo:block>
+ </fo:table-cell>
+ <fo:table-cell font-size="16pt" number-columns-spanned="3" border-bottom="0.5mm solid black" display-align="after">
+ <fo:block-container>
+ <xsl:call-template name="setWritingMode"/>
+ <fo:block padding-bottom="7mm">
+ <xsl:if test="$doctype = 'resolution'">
+ <xsl:call-template name="insertMeetingInfo"/>
</xsl:if>
- <xsl:variable name="identifier" select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
- <xsl:if test="$identifier != ''">
- <xsl:value-of select="$doctypeTitle"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="$identifier"/>
+ <xsl:if test="$doctype = 'focus-group'">
+ <xsl:attribute name="padding-bottom">0mm</xsl:attribute>
+ <xsl:attribute name="border-bottom">1pt solid black</xsl:attribute>
</xsl:if>
- </xsl:when>
- <xsl:when test="$doctype = 'implementers-guide'"/>
- <xsl:when test="$doctype = 'resolution'"/>
- <xsl:when test="$doctype = 'recommendation-supplement'">
- <xsl:if test="/itu:itu-standard/itu:bibdata/itu:status/itu:stage = 'draft'">Draft </xsl:if>
- <xsl:text>ITU-</xsl:text><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:bureau"/><xsl:text> </xsl:text>
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="identifier">
- <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>
+ <fo:block text-transform="uppercase">
+ <xsl:call-template name="insertSeriesTitleMain"/>
+ </fo:block>
+ <xsl:choose>
+ <xsl:when test="$doctype = 'recommendation-supplement'"/>
+ <xsl:otherwise>
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:series">
+ <fo:block margin-top="6pt">
+ <xsl:call-template name="insertSeriesTitleAdditional"/>
+ </fo:block>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </fo:block>
+ </fo:block-container>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row height="40mm" border="1pt solid green">
+ <fo:table-cell>
+ <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" 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">
+ <xsl:value-of select="$docnumber"/>
+ </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:if test="$doctype = 'resolution'">
+ <!-- Resolution 1 -->
+ <xsl:value-of select="$doctypeTitle"/><xsl:text> </xsl:text><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
+ <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" 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" 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>
- <xsl:if test="$doctype != 'recommendation'">
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
- <xsl:text> </xsl:text>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="$isCorrigendum != ''">
+ <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>
- <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
- </xsl:variable>
- <xsl:if test="normalize-space(translate($identifier, ' ', '')) != ''">
- <xsl:value-of select="$doctypeTitle"/>
- <xsl:value-of select="$identifier"/>
+ </fo:block>
+ </xsl:if>
+ </fo:block-container>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row height="40mm" border="1pt solid blue">
+ <fo:table-cell>
+ <fo:block> </fo:block>
+ </fo:table-cell>
+ <fo:table-cell number-columns-spanned="3">
+ <fo:block-container>
+ <xsl:call-template name="setWritingMode"/>
+ <xsl:choose>
+ <xsl:when test="/itu:itu-standard/itu:boilerplate/itu:legal-statement/itu:clause[@id='draft-warning']">
+ <xsl:attribute name="border">0.7mm solid black</xsl:attribute>
+ <fo:block font-family="Times New Roman" padding-top="3mm" margin-left="1mm" margin-right="1mm">
+ <xsl:apply-templates select="/itu:itu-standard/itu:boilerplate/itu:legal-statement/itu:clause[@id='draft-warning']" mode="caution"/>
+ </fo:block>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:block> </fo:block>
+ </xsl:otherwise>
+ </xsl:choose>
+ </fo:block-container>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row height="25mm" border="1pt solid red">
+ <fo:table-cell>
+ <fo:block> </fo:block>
+ </fo:table-cell>
+ <fo:table-cell number-columns-spanned="3">
+ <fo:block-container>
+ <xsl:call-template name="setWritingMode"/>
+ <fo:block font-size="16pt" margin-top="3pt">
+ <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 test="$doctype = 'recommendation-supplement'">
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
+ </xsl:if>
</xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="$annexid != ''">
- <xsl:text> — </xsl:text>
- <xsl:call-template name="getLocalizedString">
- <xsl:with-param name="key">annex</xsl:with-param>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- <xsl:value-of select="$annexid"/>
- </xsl:if>
- </fo:block>
- </fo:block-container>
- </fo:table-cell>
- </fo:table-row>
- </fo:table-body>
- </fo:table>
- </fo:block-container>
- </fo:flow>
- </fo:page-sequence>
- </xsl:if>
+ <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:variable name="identifier" select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
+ <xsl:if test="$identifier != ''">
+ <xsl:value-of select="$doctypeTitle"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$identifier"/>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="$doctype = 'implementers-guide'"/>
+ <xsl:when test="$doctype = 'resolution'"/>
+ <xsl:when test="$doctype = 'recommendation-supplement'">
+ <xsl:if test="/itu:itu-standard/itu:bibdata/itu:status/itu:stage = 'draft'">Draft </xsl:if>
+ <xsl:text>ITU-</xsl:text><xsl:value-of select="$bureau"/><xsl:text> </xsl:text>
+
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement']"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="identifier">
+ <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:if test="$doctype != 'recommendation'">
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space(translate($identifier, ' ', '')) != ''">
+ <xsl:value-of select="$doctypeTitle"/>
+ <xsl:value-of select="$identifier"/>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:if test="$annexid != ''">
+ <xsl:text> — </xsl:text>
+ <xsl:call-template name="getLocalizedString">
+ <xsl:with-param name="key">annex</xsl:with-param>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$annexid"/>
+ </xsl:if>
+ </fo:block>
+ </fo:block-container>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:block-container>
+ </fo:flow>
+ </fo:page-sequence>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
<!-- ============================================= -->
<!-- END Cover page -->
<!-- ============================================= -->
<fo:page-sequence master-reference="document-preface" initial-page-number="1" format="i" force-page-count="no-force">
@@ -1158,10 +1549,79 @@
</fo:page-sequence>
</fo:root>
</xsl:template>
+ <xsl:template name="insertMeetingInfo">
+ <fo:block><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting"/></fo:block>
+ <fo:block>
+ <xsl:variable name="meeting-place" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-place"/>
+ <xsl:variable name="meeting-date_from" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-date/itu:from"/>
+ <xsl:variable name="meeting-date_from_year" select="substring($meeting-date_from, 1, 4)"/>
+ <xsl:variable name="meeting-date_to" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-date/itu:to"/>
+ <xsl:variable name="meeting-date_to_year" select="substring($meeting-date_to, 1, 4)"/>
+
+ <xsl:variable name="date_format">
+ <xsl:choose>
+ <xsl:when test="$meeting-date_from_year = $meeting-date_to_year">ddMM</xsl:when>
+ <xsl:otherwise>ddMMyyyy</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="meeting-date_from_str">
+ <xsl:call-template name="convertDate">
+ <xsl:with-param name="date" select="$meeting-date_from"/>
+ <xsl:with-param name="format" select="$date_format"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="meeting-date_to_str">
+ <xsl:call-template name="convertDate">
+ <xsl:with-param name="date" select="$meeting-date_to"/>
+ <xsl:with-param name="format" select="'ddMMyyyy'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:value-of select="$meeting-place"/>
+ <xsl:if test="$meeting-place != '' and (normalize-space($meeting-date_from_str) != '' or normalize-space($meeting-date_to_str != ''))">
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="$meeting-date_from_str"/>
+ <xsl:if test="normalize-space($meeting-date_from_str) != '' and normalize-space($meeting-date_to_str) != ''">
+ <xsl:text> – </xsl:text>
+ </xsl:if>
+ <xsl:value-of select="$meeting-date_to_str"/>
+ </xsl:if>
+ </fo:block>
+ </xsl:template>
+
+ <xsl:template name="insertSeriesTitleMain">
+ <xsl:variable name="series_title_full" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']/itu:title[@type = 'full'])"/>
+ <xsl:variable name="series_title">
+ <xsl:value-of select="$series_title_full"/>
+ <xsl:if test="$series_title_full = ''">
+ <xsl:value-of select="normalize-space(/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']/itu:title[(@type != 'full' and @type != 'abbrev') or not(@type)])"/>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:if test="$series_title != ''">
+ <!-- Series -->
+ <fo:inline text-transform="uppercase">
+ <xsl:call-template name="getLocalizedString">
+ <xsl:with-param name="key">series</xsl:with-param>
+ </xsl:call-template>
+ </fo:inline>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$series_title"/>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="insertSeriesTitleAdditional">
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type = 'secondary']"/>
+ <xsl:if test="normalize-space(/itu:itu-standard/itu:bibdata/itu:series[@type = 'tertiary']) != ''">
+ <xsl:text> — </xsl:text>
+ <xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type = 'tertiary']"/>
+ </xsl:if>
+ </xsl:template>
+
<xsl:template name="insertListOf_Title">
<xsl:param name="title"/>
<fo:block space-before="36pt" text-align="center" font-weight="bold" keep-with-next="always">
<xsl:value-of select="$title"/>
</fo:block>
@@ -1537,21 +1997,21 @@
<!-- ============================= -->
<!-- ============================= -->
<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" role="H1">
+ <fo:block font-size="16pt" font-style="italic" font-weight="bold" text-align="center" space-after="6pt" role="H1">
<xsl:if test="$lang = 'ar'"> <!-- to prevent rendering `###` due the missing Arabic glyphs in the italic font (Times New Roman) -->
<xsl:attribute name="font-style">normal</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: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">
+ <fo:block font-size="12pt" 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>
@@ -2125,10 +2585,24 @@
<path style="fill:#ffffff;fill-rule:nonzero;fill-opacity:1;stroke:none;" d=" M 164.94485,210.75437 L 164.22235,210.18782 L 163.53891,209.60174 L 162.85546,209.01566 L 162.21107,208.39051 L 161.5862,207.76536 L 160.98087,207.10114 L 160.39505,206.43691 L 159.8483,205.75315 L 159.30154,205.04986 L 158.79384,204.32702 L 158.30566,203.60419 L 157.83701,202.86182 L 157.38789,202.09992 L 156.9583,201.33802 L 156.54823,200.55658 L 156.17722,199.7556 L 155.8062,198.91555 L 155.45472,198.0755 L 155.12276,197.21592 L 154.82985,196.3368 L 154.55647,195.45768 L 154.30262,194.57856 L 154.0683,193.6799 L 153.87303,192.78125 L 153.69728,191.88259 L 153.54107,190.9644 L 153.40438,190.04621 L 153.30674,189.12802 L 153.22863,188.20982 L 153.17005,187.29163 L 153.131,186.3539 L 153.131,185.43571 L 153.131,139.36982 L 153.131,135.26726 L 157.23168,135.26726 L 182.83162,135.26726 L 186.95182,135.26726 L 186.95182,139.36982 L 186.97135,185.39664 L 186.97135,185.8655 L 187.0104,186.31483 L 187.04946,186.76416 L 187.12756,187.19395 L 187.20567,187.62374 L 187.32283,188.05354 L 187.44,188.46379 L 187.57669,188.85451 L 187.7329,189.24523 L 187.90865,189.61642 L 188.10392,189.96806 L 188.29919,190.33925 L 188.51398,190.67136 L 188.74831,191.00347 L 189.00216,191.33558 L 189.25601,191.64816 L 189.54892,191.9412 L 189.82229,192.23424 L 190.13473,192.52728 L 190.42763,192.78125 L 190.75959,193.05475 L 191.09155,193.28918 L 191.44304,193.54315 L 191.79453,193.75805 L 192.14601,193.99248 L 192.51703,194.18784 L 192.90757,194.3832 L 193.29811,194.57856 L 193.68865,194.75438 L 194.09872,194.91067 L 194.48926,195.06696 L 194.91885,195.20371 L 195.64135,195.43814 L 196.40291,195.6335 L 197.16446,195.78979 L 197.92601,195.92654 L 198.7071,196.02422 L 199.5077,196.10237 L 200.28878,196.16098 L 201.08939,196.16098 L 201.89,196.16098 L 202.69061,196.10237 L 203.47169,196.02422 L 204.25277,195.92654 L 205.03385,195.78979 L 205.79541,195.6335 L 206.53744,195.43814 L 207.27946,195.20371 L 207.68953,195.06696 L 208.0996,194.91067 L 208.50967,194.75438 L 208.90021,194.57856 L 209.29075,194.3832 L 209.68129,194.18784 L 210.0523,193.97294 L 210.40379,193.75805 L 210.75527,193.54315 L 211.10676,193.28918 L 211.43872,193.05475 L 211.77068,192.78125 L 212.08311,192.50774 L 212.37602,192.23424 L 212.66892,191.9412 L 212.9423,191.64816 L 213.19615,191.33558 L 213.45001,191.00347 L 213.68433,190.67136 L 213.89913,190.31971 L 214.11392,189.96806 L 214.28967,189.61642 L 214.46541,189.2257 L 214.62163,188.85451 L 214.75832,188.44426 L 214.89501,188.05354 L 214.99264,187.62374 L 215.09028,187.19395 L 215.14886,186.76416 L 215.20744,186.31483 L 215.22697,185.8655 L 215.24649,185.39664 L 215.16838,139.4089 L 215.16838,135.2868 L 219.28859,135.2868 L 244.88853,135.2868 L 248.98921,135.2868 L 248.98921,139.4089 L 248.98921,185.39664 L 248.98921,186.31483 L 248.95015,187.25256 L 248.89157,188.19029 L 248.81346,189.10848 L 248.6963,190.02667 L 248.55961,190.9644 L 248.4034,191.86306 L 248.22765,192.78125 L 248.03238,193.6799 L 247.79806,194.57856 L 247.54421,195.47722 L 247.27083,196.35634 L 246.97792,197.23546 L 246.64596,198.09504 L 246.29448,198.95462 L 245.92346,199.79467 L 245.55245,200.57611 L 245.14238,201.35755 L 244.73231,202.13899 L 244.28319,202.9009 L 243.81454,203.64326 L 243.32637,204.3661 L 242.79914,205.08893 L 242.27191,205.79222 L 241.70562,206.47598 L 241.13934,207.14021 L 240.534,207.80443 L 239.90914,208.42958 L 239.26474,209.05474 L 238.5813,209.64082 L 237.89785,210.2269 L 237.17535,210.79344 L 236.39427,211.35998 L 235.59366,211.90699 L 234.754,212.43446 L 233.87528,212.9424 L 232.95751,213.4308 L 232.03974,213.9192 L 231.06339,214.36853 L 230.08704,214.79832 L 229.05211,215.22811 L 228.01717,215.63837 L 226.96271,216.00955 L 225.8692,216.38074 L 224.75616,216.73238 L 223.62359,217.0645 L 222.4715,217.37707 L 221.3194,217.67011 L 220.12825,217.96315 L 218.91757,218.21712 L 217.7069,218.45155 L 216.4767,218.68598 L 215.24649,218.88134 L 213.99676,219.0767 L 212.72751,219.23299 L 211.45825,219.38928 L 210.16946,219.52603 L 208.88068,219.64325 L 207.5919,219.74093 L 206.30311,219.81907 L 204.9948,219.87768 L 203.68649,219.93629 L 202.37818,219.95582 L 201.06987,219.95582 L 199.76155,219.95582 L 198.45324,219.91675 L 197.16446,219.87768 L 195.85615,219.81907 L 194.54784,219.74093 L 193.25905,219.64325 L 191.97027,219.52603 L 190.68148,219.38928 L 189.41223,219.23299 L 188.14297,219.05717 L 186.89324,218.86181 L 185.66304,218.66645 L 184.43283,218.43202 L 183.20263,218.19758 L 182.01148,217.92408 L 180.82033,217.65058 L 179.64871,217.35754 L 178.49662,217.04496 L 177.36405,216.71285 L 176.27053,216.3612 L 175.17702,215.99002 L 174.10303,215.5993 L 173.0681,215.18904 L 172.05269,214.77878 L 171.05682,214.32946 L 170.09999,213.88013 L 169.16269,213.39173 L 168.24492,212.90333 L 167.36621,212.39539 L 166.52654,211.86792 L 165.72594,211.32091 L 164.94485,210.75437 z " id="path95"/>
<path style="fill:#004086;fill-rule:evenodd;fill-opacity:1;stroke:none;" d=" M 167.42479,207.47232 L 166.78039,206.98392 L 166.17506,206.45645 L 165.58925,205.92898 L 165.00343,205.38197 L 164.45668,204.81542 L 163.92945,204.24888 L 163.42175,203.64326 L 162.93357,203.03765 L 162.46492,202.4125 L 162.0158,201.78734 L 161.5862,201.12312 L 161.17614,200.4589 L 160.7856,199.79467 L 160.41458,199.11091 L 160.08262,198.40762 L 159.75066,197.70432 L 159.43823,196.98149 L 159.14532,196.25866 L 158.89147,195.51629 L 158.63762,194.77392 L 158.42282,194.03155 L 158.20803,193.26965 L 158.01276,192.50774 L 157.85654,191.74584 L 157.70032,190.9644 L 157.58316,190.18296 L 157.466,189.40152 L 157.38789,188.62008 L 157.30978,187.8191 L 157.27073,187.01813 L 157.2512,186.23669 L 157.23168,185.43571 L 157.23168,139.36982 L 182.83162,139.36982 L 182.85114,185.39664 L 182.94878,187.19395 L 183.26121,188.87405 L 183.74939,190.45646 L 184.41331,191.90213 L 185.25297,193.25011 L 186.22932,194.46134 L 187.32283,195.5749 L 188.55304,196.57123 L 189.88088,197.43082 L 191.32588,198.19272 L 192.82946,198.83741 L 194.41115,199.34534 L 196.03189,199.7556 L 197.69169,200.04864 L 199.39054,200.22446 L 201.10892,200.28307 L 202.80777,200.22446 L 204.50662,200.04864 L 206.16642,199.7556 L 207.80669,199.34534 L 209.38838,198.81787 L 210.89196,198.19272 L 212.31744,197.43082 L 213.64528,196.5517 L 214.87548,195.5749 L 215.98852,194.46134 L 216.96487,193.23058 L 217.78501,191.90213 L 218.44893,190.45646 L 218.9371,188.87405 L 219.24953,187.19395 L 219.34717,185.39664 L 219.28859,139.4089 L 244.88853,139.4089 L 244.88853,185.39664 L 244.869,186.19762 L 244.84948,186.99859 L 244.79089,187.78003 L 244.73231,188.58101 L 244.63468,189.38198 L 244.53704,190.16342 L 244.40035,190.94486 L 244.26366,191.7263 L 244.08792,192.50774 L 243.89265,193.26965 L 243.69738,194.03155 L 243.46306,194.77392 L 243.22873,195.53582 L 242.95535,196.25866 L 242.66245,197.00102 L 242.36954,197.72386 L 242.03758,198.42715 L 241.6861,199.13045 L 241.31508,199.81421 L 240.92454,200.49797 L 240.534,201.16219 L 240.10441,201.80688 L 239.65528,202.45157 L 239.18664,203.07672 L 238.69846,203.68234 L 238.19076,204.28795 L 237.66353,204.8545 L 237.09724,205.42104 L 236.53096,205.96805 L 235.94515,206.49552 L 235.33981,207.02299 L 234.69542,207.51139 L 233.25042,208.52726 L 231.68826,209.46499 L 229.9894,210.34411 L 228.19292,211.16462 L 226.27927,211.90699 L 224.28751,212.59075 L 222.19812,213.2159 L 220.05014,213.78245 L 217.82406,214.27085 L 215.5394,214.6811 L 213.19615,215.03275 L 210.81386,215.32579 L 208.41203,215.56022 L 205.97115,215.71651 L 203.51075,215.81419 L 201.05034,215.85326 L 198.58993,215.81419 L 196.14905,215.71651 L 193.70817,215.56022 L 191.28682,215.32579 L 188.92405,215.03275 L 186.58081,214.66157 L 184.29614,214.23178 L 182.07006,213.74338 L 179.92209,213.19637 L 177.8327,212.57122 L 175.84094,211.88746 L 173.92729,211.12555 L 172.1308,210.30504 L 170.43195,209.42592 L 168.86979,208.48819 L 167.42479,207.47232 z M 87.363949,152.57616 L 87.363949,213.41126 L 115.40477,213.41126 L 115.40477,152.57616 L 139.57924,152.57616 L 139.57924,139.36982 L 61.432048,139.36982 L 61.432048,152.57616 L 87.363949,152.57616 z M 17.164263,139.36982 L 45.205083,139.36982 L 45.205083,213.41126 L 17.164263,213.41126 L 17.164263,139.36982 z " id="path97"/>
</svg>
</xsl:variable>
+ <xsl:variable name="Image-ITU-Globe-Logo-Blue">
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 73.7 81.4" style="enable-background:new 0 0 73.7 81.4;" width="20.5mm" height="22.6mm" xml:space="preserve">
+ <style type="text/css">
+ .st0{fill:<xsl:value-of select="$color_cover_itu_logo"/>;}
+ </style>
+ <g>
+ <path class="st0" d="M14.5,33.6 c0.2,0,0.4,0.2,0.4,0.4v23.2c0,0.2-0.2,0.4-0.4,0.4H7.6c-0.2,0-0.4-0.2-0.4-0.4V34c0-0.2,0.2-0.4,0.4-0.4H14.5"/>
+ <path class="st0" d="M39.6,33.6 c0.2,0,0.4,0.2,0.4,0.4v5.7c0,0.2-0.2,0.4-0.4,0.4h-6.1c-0.2,0-0.4,0.2-0.4,0.4v16.7c0,0.2-0.2,0.4-0.4,0.4h-6.9 c-0.2,0-0.4-0.2-0.4-0.4V40.5c0-0.2-0.2-0.4-0.4-0.4h-5.9c-0.2,0-0.4-0.2-0.4-0.4V34c0-0.2,0.2-0.4,0.4-0.4H39.6"/>
+ <path class="st0" d="M66.5,33.6 c0.2,0,0.4,0.2,0.4,0.4v11.8c0,7.8-4.1,12-11.9,12c-7.5,0-11.3-4.1-11.3-12.1V34c0-0.2,0.2-0.4,0.4-0.4h6.9c0.2,0,0.4,0.2,0.4,0.4 v11.6c0,2.5,0.7,5.6,3.9,5.6c2.6,0,3.9-1.8,3.9-5.6V34c0-0.2,0.2-0.4,0.4-0.4H66.5"/>
+ <path class="st0" d="M73.8,81.4 c-4.6-2.3-9.8-4.9-14.6-7.7c0.8-0.6,1.6-1.3,2.4-2c7.4-6.7,12.1-16.3,12.1-27c0-7.6-2.4-14.7-6.4-20.6C60.7,14.3,49.5,7.8,36.8,7.8 c-7.2,0-13.9,2.1-19.6,5.6c-3-4.2-6-8.7-9.2-13.5c1,2,4,8.3,7.4,14.6C7.6,20.3,2,28.9,0.5,38.9C0.2,40.8,0,42.7,0,44.7 c0,5.7,1.3,11.1,3.6,15.9c5.9,12.3,18.6,20.9,33.2,20.9c7.5,0,14.5-2.3,20.3-6.1C62.7,77.6,68.3,79.5,73.8,81.4 M33.3,78.2 c-8.5-0.9-16.1-4.9-21.6-10.8c-0.8-1.2-1.3-2.7-1.5-4.4c3.4,3.3,7.7,6.3,12.6,8.6c5.4,2.6,11,4.2,16.3,4.8 C37.3,77.8,35.3,78.4,33.3,78.2 M9.4,59.9c0,0.3-0.1,0.7-0.1,1c-0.3-0.3-0.6-0.7-0.9-1H7.3c0.6,0.8,1.3,1.5,2,2.2 c0,1,0.2,2,0.4,2.9c-4.3-5.7-6.9-12.7-6.9-20.4c0-6.9,2.1-13.3,5.6-18.6c-0.4,1.6-0.6,3.3-0.5,5.1h0.8c-0.1-2.7,0.3-5.2,1.3-7.4 c1.3-1.7,2.9-3.3,4.5-4.7c0.9-0.5,1.7-0.9,2.6-1.3c2,3.5,4.1,6.9,6,9.3c-0.4,0-3.5,0.2-6.5-0.1l0.4,0.1c-0.1,0-0.2,0-0.3,0 c0.7,1.4,1.4,2.8,2.2,4.1h14c-0.7-0.6-1.4-1.2-2.2-1.9c3.3-2.6,6.6-4.9,10-6.6c1.1,1.2,2.5,2.3,4.2,3.2c2.2,1.1,4.4,1.7,6.5,1.8 c0.2,1.1,0.5,2.3,0.6,3.5H53c-0.2-1.2-0.4-2.4-0.6-3.5c2.1-0.1,3.9-0.8,4.9-2c1.8,1.7,3.3,3.5,4.7,5.5h1c-1.5-2.2-3.2-4.2-5.2-6.1 c0.6-1,0.7-2.2,0.4-3.5c-0.2-0.8-0.6-1.7-1.2-2.4c1.6,0.3,3,1,4.1,1.9c6,6.1,9.8,14.4,9.8,23.6c0,4.3-0.8,8.4-2.3,12.2 c-2.9,6-9.8,9.2-18.4,9.5c3.6-0.9,6.5-2.2,9.9-4.3c-1.3-0.6-2.6-1.2-3.8-1.9c-0.4,0-0.8,0-1.2,0c-7.1,0-11.6-3.1-13-9.3 c-2.2-1.7-4.4-3.5-6.5-5.3v5.2c3,2.7,6,5.2,8.8,7.5c-2.1,1.4-9.1,3.5-10.5,3.8c1.2,0.9,2.4,1.8,3.6,2.7c-2.8-0.8-5.7-1.9-8.6-3.2 c-0.3-0.1-0.6-0.3-0.8-0.4c0,0-0.1,0-0.1-0.1c-0.5-0.3-1-0.5-1.5-0.8c-3.6-1.9-6.6-4.2-9.1-6.7v1.2c0.8,0.8,1.7,1.5,2.6,2.3 c2.7,2.2,5.8,4,9.2,5.6c3.4,1.6,6.8,2.8,10.3,3.6c1.9,1.3,3.8,2.4,5.8,3.5c0,0,0,0.1-0.1,0.1c-1.5,2.6-3.1,4.6-4.9,6 c-5.4-0.5-11.3-2.1-17-4.8c-5.1-2.5-9.6-5.6-13-9.1c0-0.6,0-1.2,0.1-1.8H9.4z M38.9,19.4c0.2,0.9,0.7,1.9,1.4,2.8 c-3.4,1.8-6.8,4-10.1,6.7c-3.7-3.5-7.2-7.5-10.6-12c0,0,0,0,0.1,0c0,0,0,0,0,0c1.5-0.6,3.1-1,4.8-1.4c4.8-0.9,9.8-0.8,14.8,0.4 C38.7,16.9,38.6,18.1,38.9,19.4 M39.7,19.2c-0.3-1.1-0.2-2.2,0.4-3.1c0,0,0,0,0-0.1c2.6,0.7,5.2,1.7,7.7,3 c-0.5,0.1-1.1,0.3-1.6,0.5c-1.7,0.6-3.5,1.3-5.2,2.2C40.4,20.9,40,20,39.7,19.2 M48.2,18.3c-2.4-1.2-4.9-2.2-7.5-2.9 c1-0.9,2.6-1.4,4.4-1.4C46.3,15.1,47.3,16.6,48.2,18.3 M46.4,14c1.7,0.2,3.5,0.7,5.3,1.6c1.3,0.7,2.4,1.5,3.3,2.3 c-1.7-0.1-3.6,0.2-5.6,0.6C48.4,16.8,47.5,15.3,46.4,14 M46.6,20.3c0.8-0.3,1.6-0.5,2.3-0.7c0.3,0.7,0.7,1.5,1,2.3 c0.6,1.6,1.1,3.3,1.5,5c-1.9-0.1-3.9-0.7-5.9-1.7c-1.5-0.8-2.8-1.8-3.8-2.9C43.3,21.6,44.9,20.9,46.6,20.3 M50.6,21.6 c-0.2-0.5-0.4-0.9-0.6-1.4c2.5,1.4,4.7,3.1,6.7,5c-0.9,1.1-2.6,1.7-4.5,1.7C51.8,25.1,51.2,23.3,50.6,21.6 M50.1,19.3 c2.1-0.4,4-0.6,5.7-0.4c0.8,0.9,1.3,1.9,1.6,2.8c0.3,1,0.2,1.9-0.2,2.7C55.1,22.6,52.7,20.8,50.1,19.3 M52,14.9 c-2.2-1.1-4.4-1.7-6.5-1.8c-0.6-0.6-1.3-1.1-1.9-1.6c5.5,1.1,10.5,3.5,14.7,7c-0.7-0.2-1.4-0.4-2.2-0.5 C55.1,16.9,53.7,15.8,52,14.9 M44.3,13.2c-1.9,0.1-3.5,0.8-4.5,1.9c-5.2-1.3-10.4-1.5-15.5-0.5c-1.8,0.3-3.5,0.8-5.1,1.4 c-0.1,0-0.1,0-0.1,0.1c0-0.1-0.1-0.1-0.1-0.2c5.2-3.2,11.3-5,17.8-5c1,0,2,0,3,0.1C41.4,11.3,42.9,12,44.3,13.2 M40.4,76.6 c1.1,0.1,2.1,0.1,3.1,0.1c0.8,0,1.5,0,2.3-0.1c1-0.1,2-0.2,2.9-0.3c-3.5,1.3-7.4,2-11.4,2.1C38.4,78,39.4,77.4,40.4,76.6 M41.3,75.7c1.6-1.5,3.1-3.4,4.4-5.7c0,0,0.1-0.1,0.1-0.1c2.7,1.4,5.3,2.8,8,4c-0.2,0.1-0.4,0.2-0.6,0.3C50,75.5,45.8,76,41.3,75.7 M49.9,67.1c1.1,0,2.3-0.1,3.4-0.2c5.7-0.7,10.2-2.7,13.3-5.8c-2.5,4.4-5.8,8.1-9.9,11C54.2,70.5,51.9,68.8,49.9,67.1"/>
+ </g>
+ </svg>
+ </xsl:variable>
+
<xsl:variable name="Image-ITU-Logo">
<svg xmlns="http://www.w3.org/2000/svg" id="ITU-logo" data-name="Layer 1" width="272" height="300" viewBox="0 0 272 300">
<defs>
<style>.cls-1{fill:#16a0db;}</style>
</defs>
@@ -2138,10 +2612,60 @@
<path class="cls-1" d="M244.46942,124.04334a1.40422,1.40422,0,0,1,1.40663,1.40094v43.22185c0,28.627-15.0027,43.76154-43.38279,43.76154-27.4157,0-41.31559-14.93933-41.31559-44.4046V125.44428a1.39921,1.39921,0,0,1,1.401-1.40094h25.38284a1.40043,1.40043,0,0,1,1.40664,1.40094v42.441c0,9.33564,2.45758,20.46263,14.1585,20.46263,9.5251,0,14.1529-6.69457,14.1529-20.46263v-42.441a1.404,1.404,0,0,1,1.40664-1.40094h25.3832"/>
<path class="cls-1" d="M271.12012,299c-16.84562-8.30792-35.804-17.7871-53.2867-28.20789q4.4696-3.46207,8.635-7.28018A133.03915,133.03915,0,0,0,247.28128,89.2695a134.47457,134.47457,0,0,0-183.33695-38.91C53.0126,35.11588,42.035,18.58043,30.43146,1,34.083,8.41225,44.91131,31.26336,57.60572,54.60822A135.0389,135.0389,0,0,0,.87988,164.51161,132.39673,132.39673,0,0,0,14.19454,222.5522,134.51424,134.51424,0,0,0,209.97884,276.436c20.48556,8.47442,41.07449,15.55367,61.14128,22.564M122.93256,287.31035a124.4229,124.4229,0,0,1-79.12931-39.63342,33.60229,33.60229,0,0,1-5.5575-15.96706,175.63893,175.63893,0,0,0,46.236,31.6298,187.00148,187.00148,0,0,0,59.79738,17.44261c-6.9757,4.87453-14.19285,7.13093-21.34657,6.52807M35.2888,220.36472c-.12055,1.24016-.19519,2.4516-.24705,3.65157-1.11368-1.21145-2.21053-2.42291-3.25517-3.65157H27.79026c2.23365,2.74441,4.65654,5.44865,7.22871,8.107a45.77546,45.77546,0,0,0,1.52718,10.55285A122.68891,122.68891,0,0,1,31.91274,96.4923a67.04283,67.04283,0,0,0-1.91757,18.82631H32.998a60.01641,60.01641,0,0,1,4.93163-27.09979A124.9733,124.9733,0,0,1,54.3905,71.115q4.70245-2.64395,9.6516-4.9262c7.3377,12.87816,14.97957,25.13044,22.00714,34.18475a148.36379,148.36379,0,0,1-23.71234-.49375l1.28609.36171c-.40756-.03445-.8095-.07464-1.223-.11483,2.50313,5.2075,5.24211,10.26575,8.14719,15.192h51.174q-4.01332-3.28127-7.90049-6.80366A214.83757,214.83757,0,0,1,150.4569,84.37778a53.34945,53.34945,0,0,0,15.33,11.7241,55.86873,55.86873,0,0,0,23.69482,6.4649c.90166,4.13961,1.67681,8.39979,2.31986,12.75183h3.05436q-.94722-6.53667-2.29077-12.77481c7.64748-.32152,14.16411-2.77312,18.07423-7.25146a134.07139,134.07139,0,0,1,17.02329,20.02627h3.6459A136.97749,136.97749,0,0,0,212.41925,92.812a16.79184,16.79184,0,0,0,1.36633-12.93552,28.74433,28.74433,0,0,0-4.31767-8.95674,30.75992,30.75992,0,0,1,14.968,7.02761,122.772,122.772,0,0,1,27.39258,131.0722c-10.52418,21.89225-35.98762,33.78285-67.28436,34.65556,13.21689-3.34152,23.74668-7.92323,36.22872-15.82926-4.66776-2.14155-9.35268-4.48408-14.038-6.98737-1.44658.07464-2.91069.12057-4.4207.12057-26.07215,0-42.30907-11.483-47.59113-34.18476-8.18749-6.27545-16.18541-12.815-23.91909-19.48085V186.312c10.95486,9.9787,21.89219,19.14211,32.10623,27.5878-7.85984,5.23625-33.30611,12.96428-38.29,13.837q6.425,5.14149,13.00454,9.78347a193.15732,193.15732,0,0,1-31.4229-11.83893q-1.50755-.72342-2.99724-1.46982c-.14333-.06891-.2814-.13779-.41912-.20669q-2.79014-1.40381-5.506-2.87648a142.74922,142.74922,0,0,1-33.249-24.631v4.21425q4.43541,4.2975,9.41015,8.2907a161.36744,161.36744,0,0,0,33.77149,20.4741,193.87776,193.87776,0,0,0,37.5954,13.00445q10.4809,6.97591,21.226,12.9413c-.08025.14355-.16646.29281-.25267.4421-5.52876,9.37583-11.54042,16.78233-17.79283,22.05875-19.77944-1.72244-41.33837-7.50411-62.26618-17.5115-18.82626-9.00265-35.19529-20.5832-47.72885-33.30632a59.25825,59.25825,0,0,1,.32135-6.74049ZM143.4006,71.93026a29.50071,29.50071,0,0,0,5.09283,10.05906,219.33257,219.33257,0,0,0-36.93484,24.46443c-13.62445-12.64847-26.25017-27.427-38.72625-43.98547.06869-.023.13211-.05738.2008-.08038.01156-.00574.02873-.01147.0403-.01721v.00574A109.521,109.521,0,0,1,90.648,57.42727a126.6736,126.6736,0,0,1,54.11372,1.57318,16.75412,16.75412,0,0,0-1.36108,12.92981m2.917-.77512a13.70221,13.70221,0,0,1,1.3835-11.18439c.0403-.06316.09182-.12059.13212-.18371a143.44783,143.44783,0,0,1,28.32857,10.93177q-2.86792.82678-5.82768,1.83727a157.61385,157.61385,0,0,0-19.06175,8.03234,26.81162,26.81162,0,0,1-4.95476-9.43328m31.05564-3.198A147.18752,147.18752,0,0,0,150.02657,57.255c3.72019-3.37024,9.47919-5.08123,16.14476-5.0927a69.51757,69.51757,0,0,1,11.20191,15.7948m-6.7693-15.5594a54.77565,54.77565,0,0,1,19.40027,5.9941,52.42951,52.42951,0,0,1,12.06888,8.58352,78.61407,78.61407,0,0,0-20.57772,2.34825,79.14234,79.14234,0,0,0-10.89143-16.92587m.70612,23.01761c2.90508-.9933,5.73587-1.83728,8.50884-2.555q1.83451,3.953,3.47944,8.34234a152.17933,152.17933,0,0,1,5.50038,18.37848,53.66044,53.66044,0,0,1-21.61675-6.1606,50.91755,50.91755,0,0,1-13.90024-10.461,154.40473,154.40473,0,0,1,18.02833-7.54427m14.81872,4.731q-.973-2.60091-2.01533-5.05249a142.63376,142.63376,0,0,1,24.3326,18.12584c-3.45071,4.07645-9.43328,6.2295-16.52988,6.40748a157.66347,157.66347,0,0,0-5.78739-19.48083M184.412,71.781a69.52887,69.52887,0,0,1,20.74978-1.487A27.61015,27.61015,0,0,1,210.863,80.65155a14.07557,14.07557,0,0,1-.71769,10.01889A146.12178,146.12178,0,0,0,184.412,71.781m6.98165-16.07038a55.6803,55.6803,0,0,0-23.71794-6.45916,43.3225,43.3225,0,0,0-7.05069-5.71279,124.27675,124.27675,0,0,1,53.95848,25.47493,42.49122,42.49122,0,0,0-7.96322-1.69373,53.22364,53.22364,0,0,0-15.22663-11.60925m-28.1905-6.35583c-6.95293.54545-12.86086,2.89944-16.53549,7.01035a129.93743,129.93743,0,0,0-56.59934-1.90043,113.03233,113.03233,0,0,0-18.574,5.27067v.01148c-.178.0689-.36164.14354-.54527.21245-.13772-.1895-.287-.38469-.42508-.57414a124.53515,124.53515,0,0,1,65.22347-18.31533q5.55453,0,10.9892.47654c5.74709.67747,11.30494,3.353,16.46646,7.80841M148.72892,281.20141c3.85265.30431,7.66465.47655,11.41988.47655,2.78453,0,5.54629-.08612,8.26179-.25837,3.69741-.22965,7.25744-.63156,10.67906-1.17125a124.84385,124.84385,0,0,1-41.6082,7.68209,45.52058,45.52058,0,0,0,11.24747-6.729m3.44475-2.97408a92.61049,92.61049,0,0,0,16.20818-20.83009c.10338-.17224.20115-.34447.29857-.51671,9.70907,5.31086,19.54395,10.08778,29.42508,14.47425-.683.39616-1.3779.76936-2.06685,1.1483-12.26968,4.7482-27.3698,6.68882-43.865,5.72425m31.343-31.515c4.19678-.08612,8.33643-.36171,12.37831-.83826,20.75575-2.46308,37.45173-9.88683,48.60739-21.364a124.33918,124.33918,0,0,1-36.27463,40.34537,214.60728,214.60728,0,0,1-24.71107-18.14309"/>
</svg>
</xsl:variable>
+ <xsl:template name="insertImageCoverColorBand">
+ <xsl:variable name="color">
+ <xsl:choose>
+ <xsl:when test="$bureau = 'R'">
+ <xsl:choose>
+ <!-- Report ITU-R -->
+ <xsl:when test="$doctype = 'report'">#00DA72</xsl:when>
+ <!-- Recommendation ITU-R -->
+ <xsl:when test="$doctype = 'recommendation'">#CC0066</xsl:when>
+ <!-- Handbook ITU-R -->
+ <xsl:when test="$doctype = 'handbook'">#F8A888</xsl:when>
+ <!-- Resolution ITU-R -->
+ <xsl:when test="$doctype = 'resolution'">#3746D1</xsl:when>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$bureau = 'T'">
+ <xsl:choose>
+ <!-- ITU-T Technical Paper -->
+ <xsl:when test="$doctype = 'technical-paper'">#d74900</xsl:when>
+ <!-- ITU-T Technical Report -->
+ <xsl:when test="$doctype = 'technical-report'">#d74900</xsl:when>
+ <!-- ITU-T Recommendations -->
+ <xsl:when test="starts-with($doctype, 'recommendation')">#9d170a</xsl:when>
+ <xsl:otherwise>#d74900</xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>#d74900</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 595.4 17.4" style="enable-background:new 0 0 595.4 17.4;" width="210mm" height="6.2mm" xml:space="preserve">
+ <style type="text/css">
+ .st0{fill-rule:evenodd;clip-rule:evenodd;fill:<xsl:value-of select="$color"/>;}
+ .st1{fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;}
+ </style>
+ <g>
+ <g>
+ <rect x="0.9" y="0.6" class="st0" width="612" height="16.5"/>
+ </g>
+ <xsl:choose>
+ <xsl:when test="$lang = 'ar'">
+ <polygon class="st1" points="505.3,-1.1 537.5,-1.1 521.4,14.6"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <polygon class="st1" points="90.1,-1.1 57.9,-1.1 74,14.6"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </g>
+ </svg>
+ </xsl:template>
+
<!-- convert YYYY-MM-DD to (MM/YYYY) -->
<xsl:template name="formatDate">
<xsl:param name="date"/>
<xsl:variable name="year" select="substring($date, 1, 4)"/>
<xsl:variable name="month" select="substring($date, 6, 2)"/>
@@ -2150,10 +2674,11 @@
</xsl:if>
</xsl:template>
<xsl:template name="formatMeetingDate">
<xsl:param name="date"/>
+ <xsl:param name="inParenthesis">false</xsl:param>
<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">
@@ -2171,11 +2696,13 @@
<xsl:when test="$month = '11'">Nov</xsl:when>
<xsl:when test="$month = '12'">Dec</xsl:when>
</xsl:choose>
</xsl:variable>
+ <xsl:if test="$inParenthesis = 'true'"><xsl:text>(</xsl:text></xsl:if>
<xsl:value-of select="$day"/><xsl:text> </xsl:text><xsl:value-of select="$monthStr"/><xsl:text> </xsl:text><xsl:value-of select="$year"/>
+ <xsl:if test="$inParenthesis = 'true'"><xsl:text>)</xsl:text></xsl:if>
</xsl:template>
<xsl:template name="addLetterSpacing">
<xsl:param name="text"/>
@@ -2186,17 +2713,82 @@
<xsl:with-param name="text" select="substring($text, 2)"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
+ <!-- background cover image -->
+ <xsl:template name="insertBackgroundPageImage">
+ <xsl:param name="number">1</xsl:param>
+ <xsl:param name="name">coverpage-image</xsl:param>
+ <xsl:variable name="num" select="number($number)"/>
+ <!-- background image -->
+ <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage_{$name}_{$number}_{generate-id()}">
+ <fo:block>
+ <xsl:for-each select="/itu:itu-standard/itu:metanorma-extension/itu:presentation-metadata[itu:name = $name][1]/itu:value/itu:image[$num]">
+ <xsl:choose>
+ <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
+ <fo:instream-foreign-object fox:alt-text="Image Front">
+ <xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
+ <xsl:call-template name="getSVG"/>
+ </fo:instream-foreign-object>
+ </xsl:when>
+ <xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
+ <fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
+ </xsl:when>
+ <xsl:otherwise> <!-- bitmap image -->
+ <xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
+ <xsl:if test="$coverimage_src != ''">
+ <xsl:variable name="coverpage">
+ <xsl:call-template name="getImageURL">
+ <xsl:with-param name="src" select="$coverimage_src"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
+ <fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </fo:block>
+ </fo:block-container>
+ </xsl:template>
+
+ <xsl:template name="getImageURL">
+ <xsl:param name="src"/>
+ <xsl:choose>
+ <xsl:when test="starts-with($src, 'data:image')">
+ <xsl:value-of select="$src"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="getSVG">
+ <xsl:choose>
+ <xsl:when test="*[local-name() = 'svg']">
+ <xsl:apply-templates select="*[local-name() = 'svg']" mode="svg_update"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="svg_content" select="document(@src)"/>
+ <xsl:for-each select="xalan:nodeset($svg_content)/node()">
+ <xsl:apply-templates select="." mode="svg_update"/>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
<xsl:strip-space elements="itu:xref"/>
<!-- external parameters -->
<xsl:param name="svg_images"/> <!-- svg images array -->
<xsl:variable name="images" select="document($svg_images)"/>
<xsl:param name="basepath"/> <!-- base path for images -->
+ <xsl:param name="inputxml_basepath"/> <!-- input xml file path -->
+ <xsl:param name="inputxml_filename"/> <!-- input xml file name -->
<xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
<xsl:param name="syntax-highlight">false</xsl:param> <!-- syntax highlighting feature, default - off -->
<xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
<xsl:param name="table_if">false</xsl:param> <!-- generate extended table in IF for autolayout-algorithm -->
@@ -2245,10 +2837,24 @@
<xsl:variable name="lang">
<xsl:call-template name="getLang"/>
</xsl:variable>
+ <xsl:variable name="inputxml_filename_prefix">
+ <xsl:choose>
+ <xsl:when test="contains($inputxml_filename, '.presentation.xml')">
+ <xsl:value-of select="substring-before($inputxml_filename, '.presentation.xml')"/>
+ </xsl:when>
+ <xsl:when test="contains($inputxml_filename, '.xml')">
+ <xsl:value-of select="substring-before($inputxml_filename, '.xml')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$inputxml_filename"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
<!-- Note 1: Each xslt has declated variable `namespace` that allows to set some properties, processing logic, etc. for concrete xslt.
You can put such conditions by using xslt construction `xsl:if test="..."` or <xsl:choose><xsl:when test=""></xsl:when><xsl:otherwiste></xsl:otherwiste></xsl:choose>,
BUT DON'T put any another conditions together with $namespace = '...' (such conditions will be ignored). For another conditions, please use nested xsl:if or xsl:choose -->
<!--
@@ -3180,10 +3786,14 @@
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
</xsl:attribute-set>
+ <xsl:template name="refine_figure-block-style">
+
+ </xsl:template>
+
<xsl:attribute-set name="figure-style">
</xsl:attribute-set>
<xsl:attribute-set name="figure-name-style">
@@ -4117,11 +4727,11 @@
<xsl:call-template name="table_name_fn_display"/>
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
<xsl:variable name="colwidths">
- <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
+ <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col']) and not(@class = 'dl')">
<xsl:call-template name="calculate-column-widths">
<xsl:with-param name="cols-count" select="$cols-count"/>
<xsl:with-param name="table" select="$simple-table"/>
</xsl:call-template>
</xsl:if>
@@ -4229,10 +4839,15 @@
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
<fo:table-column column-width="{@width}"/>
</xsl:for-each>
</xsl:when>
+ <xsl:when test="@class = 'dl'">
+ <xsl:for-each select=".//*[local-name()='tr'][1]/*">
+ <fo:table-column column-width="{@width}"/>
+ </xsl:for-each>
+ </xsl:when>
<xsl:otherwise>
<xsl:call-template name="insertTableColumnWidth">
<xsl:with-param name="colwidths" select="$colwidths"/>
</xsl:call-template>
</xsl:otherwise>
@@ -5524,10 +6139,45 @@
<!-- ===================== -->
<!-- ===================== -->
<!-- Definition List -->
<!-- ===================== -->
+
+ <!-- convert table[@class = 'dl'] to dl with colgroup/col/@colwidth -->
+ <xsl:template match="*[local-name()='table'][@class = 'dl' and count(.//*[local-name() = 'tr'][1]/*) = 2]" priority="4">
+ <xsl:variable name="dl">
+ <xsl:element name="dl" namespace="{$namespace_full}">
+ <xsl:copy-of select="@*"/>
+ <xsl:element name="colgroup" namespace="{$namespace_full}">
+ <xsl:for-each select=".//*[local-name()='tr'][1]/*">
+ <xsl:element name="col" namespace="{$namespace_full}">
+ <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
+ </xsl:element>
+ </xsl:for-each>
+ </xsl:element>
+ <xsl:apply-templates mode="table_to_dl"/>
+ </xsl:element>
+ </xsl:variable>
+ <xsl:apply-templates select="xalan:nodeset($dl)/node()"/>
+ </xsl:template>
+ <xsl:template match="@*|node()" mode="table_to_dl">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()" mode="table_to_dl"/>
+ </xsl:copy>
+ </xsl:template>
+ <xsl:template match="*[local-name() = 'tbody']" mode="table_to_dl">
+ <xsl:apply-templates mode="table_to_dl"/>
+ </xsl:template>
+ <xsl:template match="*[local-name() = 'tr']" mode="table_to_dl">
+ <xsl:element name="dt" namespace="{$namespace_full}">
+ <xsl:apply-templates select="*[1]/node()" mode="table_to_dl"/>
+ </xsl:element>
+ <xsl:element name="dd" namespace="{$namespace_full}">
+ <xsl:apply-templates select="*[2]/node()" mode="table_to_dl"/>
+ </xsl:element>
+ </xsl:template>
+
<xsl:template match="*[local-name()='dl']">
<xsl:variable name="isAdded" select="@added"/>
<xsl:variable name="isDeleted" select="@deleted"/>
<!-- <dl><xsl:copy-of select="."/></dl> -->
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
@@ -5736,14 +6386,25 @@
<xsl:copy-of select="$dl_table"/>
</xsl:variable>
<xsl:variable name="colwidths">
- <xsl:call-template name="calculate-column-widths">
- <xsl:with-param name="cols-count" select="2"/>
- <xsl:with-param name="table" select="$simple-table"/>
- </xsl:call-template>
+ <xsl:choose>
+ <!-- dl from table[@class='dl'] -->
+ <xsl:when test="*[local-name() = 'colgroup']">
+ <autolayout/>
+ <xsl:for-each select="*[local-name() = 'colgroup']/*[local-name() = 'col']">
+ <column><xsl:value-of select="translate(@width,'%m','')"/></column>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="calculate-column-widths">
+ <xsl:with-param name="cols-count" select="2"/>
+ <xsl:with-param name="table" select="$simple-table"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:variable>
<!-- <xsl:text disable-output-escaping="yes"><!- -</xsl:text>
DEBUG
colwidths=<xsl:copy-of select="$colwidths"/>
@@ -6477,11 +7138,12 @@
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
- <xsl:variable name="text" select="normalize-space(.)"/>
+ <!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
+ <xsl:variable name="text" select="."/>
<fo:inline font-size="75%" role="SKIP">
<xsl:if test="string-length($text) > 0">
<xsl:variable name="smallCapsText">
<xsl:call-template name="recursiveSmallCaps">
<xsl:with-param name="text" select="$text"/>
@@ -7845,10 +8507,16 @@
<xsl:variable name="target">
<xsl:choose>
<xsl:when test="@updatetype = 'true'">
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
</xsl:when>
+ <xsl:when test="contains(@target, concat('_', $inputxml_filename_prefix, '_attachments'))">
+ <!-- link to the PDF attachment -->
+ <xsl:variable name="target_" select="translate(@target, '\', '/')"/>
+ <xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
+ <xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
+ </xsl:when>
<xsl:otherwise>
<xsl:value-of select="normalize-space(@target)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
@@ -8258,10 +8926,11 @@
<xsl:template match="*[local-name() = 'figure']" name="figure">
<xsl:variable name="isAdded" select="@added"/>
<xsl:variable name="isDeleted" select="@deleted"/>
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
+ <xsl:call-template name="refine_figure-block-style"/>
<xsl:call-template name="setTrackChangesStyles">
<xsl:with-param name="isAdded" select="$isAdded"/>
<xsl:with-param name="isDeleted" select="$isDeleted"/>
</xsl:call-template>
@@ -8660,20 +9329,25 @@
</xsl:variable>
<xsl:variable name="viewbox" select="xalan:nodeset($viewbox_)"/>
<xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
<xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
+ <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[1][local-name() = 'image']/@width)"/>
+ <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[1][local-name() = 'image']/@height)"/>
+
<xsl:attribute name="width">
<xsl:choose>
+ <xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
<xsl:when test="$width != ''">
<xsl:value-of select="round($width)"/>
</xsl:when>
<xsl:otherwise>400</xsl:otherwise> <!-- default width -->
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="height">
<xsl:choose>
+ <xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
<xsl:when test="$height != ''">
<xsl:value-of select="round($height)"/>
</xsl:when>
<xsl:otherwise>400</xsl:otherwise> <!-- default height -->
</xsl:choose>
@@ -8681,10 +9355,32 @@
<xsl:apply-templates mode="svg_update"/>
</xsl:copy>
</xsl:template>
+ <xsl:template match="*[local-name() = 'svg']/@width" mode="svg_update">
+ <!-- image[@width]/svg -->
+ <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
+ <xsl:attribute name="width">
+ <xsl:choose>
+ <xsl:when test="$parent_image_width != '' and $parent_image_width != 'auto'"><xsl:value-of select="$parent_image_width"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template match="*[local-name() = 'svg']/@height" mode="svg_update">
+ <!-- image[@height]/svg -->
+ <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
+ <xsl:attribute name="height">
+ <xsl:choose>
+ <xsl:when test="$parent_image_height != '' and $parent_image_height != 'auto'"><xsl:value-of select="$parent_image_height"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:template>
+
<!-- regex for 'display: inline-block;' -->
<xsl:variable name="regex_svg_style_notsupported">display(\s|\h)*:(\s|\h)*inline-block(\s|\h)*;</xsl:variable>
<xsl:template match="*[local-name() = 'svg']//*[local-name() = 'style']/text()" mode="svg_update">
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), $regex_svg_style_notsupported, '')"/>
</xsl:template>
@@ -12651,14 +13347,14 @@
</xsl:choose>
</xsl:template>
<xsl:template name="addPDFUAmeta">
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
- <pdf:dictionary type="normal" key="ViewerPreferences">
- <pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
- </pdf:dictionary>
- </pdf:catalog>
+ <pdf:dictionary type="normal" key="ViewerPreferences">
+ <pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
+ </pdf:dictionary>
+ </pdf:catalog>
<x:xmpmeta xmlns:x="adobe:ns:meta/">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
<!-- Dublin Core properties go here -->
<dc:title>
@@ -12706,9 +13402,22 @@
<!-- XMP properties go here -->
<xmp:CreatorTool/>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
+ <!-- add attachments -->
+ <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
+ <xsl:choose>
+ <xsl:when test="normalize-space() != ''">
+ <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{.}" filename="{@name}"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- _{filename}_attachments -->
+ <xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/>
+ <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{@name}"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
</xsl:template> <!-- addPDFUAmeta -->
<xsl:template name="getId">
<xsl:choose>
<xsl:when test="../@id">
\ No newline at end of file