lib/isodoc/itu/itu.technical-report.xsl in metanorma-itu-2.1.3 vs lib/isodoc/itu/itu.technical-report.xsl in metanorma-itu-2.1.4

- old
+ new

@@ -2376,12 +2376,15 @@ </xsl:attribute-set><xsl:attribute-set name="permission-label-style"> </xsl:attribute-set><xsl:attribute-set name="requirement-style"> + </xsl:attribute-set><xsl:attribute-set name="requirement-name-style"> + <xsl:attribute name="keep-with-next">always</xsl:attribute> + </xsl:attribute-set><xsl:attribute-set name="requirement-label-style"> </xsl:attribute-set><xsl:attribute-set name="subject-style"> </xsl:attribute-set><xsl:attribute-set name="inherit-style"> </xsl:attribute-set><xsl:attribute-set name="description-style"> @@ -2475,10 +2478,11 @@ </xsl:attribute-set><xsl:attribute-set name="termexample-name-style"> + </xsl:attribute-set><xsl:variable name="table-border_"> @@ -2810,13 +2814,14 @@ </xsl:attribute-set><xsl:attribute-set name="note-p-style"> - + + <xsl:attribute name="space-before">4pt</xsl:attribute> @@ -2825,10 +2830,11 @@ </xsl:attribute-set><xsl:attribute-set name="termnote-style"> + <xsl:attribute name="margin-top">4pt</xsl:attribute> @@ -3258,18 +3264,21 @@ <xsl:attribute name="margin-bottom">12pt</xsl:attribute> + <!-- <xsl:if test="$namespace = 'ieee'"> + <xsl:attribute name="margin-bottom">6pt</xsl:attribute> + <xsl:attribute name="provisional-distance-between-starts">9.5mm</xsl:attribute> + </xsl:if> --> - </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-style"> <xsl:attribute name="margin-top">6pt</xsl:attribute> @@ -4473,106 +4482,114 @@ <xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/> </xsl:otherwise> </xsl:choose> </xsl:variable> - <fo:table keep-with-previous="always"> - <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*"> - <xsl:variable name="name" select="local-name()"/> + + <xsl:variable name="tableWithNotesAndFootnotes"> + + <fo:table keep-with-previous="always"> + <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*"> + <xsl:variable name="name" select="local-name()"/> + <xsl:choose> + <xsl:when test="$name = 'border-top'"> + <xsl:attribute name="{$name}">0pt solid black</xsl:attribute> + </xsl:when> + <xsl:when test="$name = 'border'"> + <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute> + <xsl:attribute name="border-top">0pt solid black</xsl:attribute> + </xsl:when> + <xsl:otherwise> + <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute> + </xsl:otherwise> + </xsl:choose> + </xsl:for-each> + + + <xsl:if test="$doctype = 'service-publication'"> + <xsl:attribute name="border">none</xsl:attribute> + <xsl:attribute name="font-family">Arial</xsl:attribute> + <xsl:attribute name="font-size">8pt</xsl:attribute> + </xsl:if> + + <xsl:choose> - <xsl:when test="$name = 'border-top'"> - <xsl:attribute name="{$name}">0pt solid black</xsl:attribute> + <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']"> + <xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']"> + <fo:table-column column-width="{@width}"/> + </xsl:for-each> </xsl:when> - <xsl:when test="$name = 'border'"> - <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute> - <xsl:attribute name="border-top">0pt solid black</xsl:attribute> - </xsl:when> <xsl:otherwise> - <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute> + <!-- $colwidths=<xsl:copy-of select="$colwidths"/> --> + <xsl:call-template name="insertTableColumnWidth"> + <xsl:with-param name="colwidths" select="$colwidths"/> + </xsl:call-template> </xsl:otherwise> </xsl:choose> - </xsl:for-each> - - - <xsl:if test="$doctype = 'service-publication'"> - <xsl:attribute name="border">none</xsl:attribute> - <xsl:attribute name="font-family">Arial</xsl:attribute> - <xsl:attribute name="font-size">8pt</xsl:attribute> - </xsl:if> - - - <xsl:choose> - <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']"> - <xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']"> - <fo:table-column column-width="{@width}"/> - </xsl:for-each> - </xsl:when> - <xsl:otherwise> - <!-- $colwidths=<xsl:copy-of select="$colwidths"/> --> - <xsl:call-template name="insertTableColumnWidth"> - <xsl:with-param name="colwidths" select="$colwidths"/> - </xsl:call-template> - </xsl:otherwise> - </xsl:choose> - - <fo:table-body> - <fo:table-row> - <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}"> - - + + <fo:table-body> + <fo:table-row> + <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}"> + + - - <xsl:if test="ancestor::*[local-name()='preface']"> - <xsl:if test="$doctype != 'service-publication'"> - <xsl:attribute name="border">solid black 0pt</xsl:attribute> + + <xsl:if test="ancestor::*[local-name()='preface']"> + <xsl:if test="$doctype != 'service-publication'"> + <xsl:attribute name="border">solid black 0pt</xsl:attribute> + </xsl:if> </xsl:if> - </xsl:if> - <xsl:if test="$doctype = 'service-publication'"> - <xsl:attribute name="border">none</xsl:attribute> - </xsl:if> - - - <!-- fn will be processed inside 'note' processing --> - - - - - - <xsl:if test="$doctype = 'service-publication'"> - <fo:block margin-top="7pt" margin-bottom="2pt"><fo:inline>____________</fo:inline></fo:block> - </xsl:if> - - - <!-- for BSI (not PAS) display Notes before footnotes --> - - - <!-- except gb and bsi --> - - <xsl:apply-templates select="../*[local-name()='note']"/> + <xsl:if test="$doctype = 'service-publication'"> + <xsl:attribute name="border">none</xsl:attribute> + </xsl:if> - - - <!-- horizontal row separator --> - - - <!-- fn processing --> - - <xsl:call-template name="table_fn_display"/> - - - <!-- for PAS display Notes after footnotes --> - - - </fo:table-cell> - </fo:table-row> - </fo:table-body> - - </fo:table> + <!-- fn will be processed inside 'note' processing --> + + + + + + <xsl:if test="$doctype = 'service-publication'"> + <fo:block margin-top="7pt" margin-bottom="2pt"><fo:inline>____________</fo:inline></fo:block> + </xsl:if> + + + <!-- for BSI (not PAS) display Notes before footnotes --> + + + <!-- except gb and bsi --> + + <xsl:apply-templates select="../*[local-name()='note']"/> + + + + <!-- horizontal row separator --> + + + <!-- fn processing --> + + <xsl:call-template name="table_fn_display"/> + + + + <!-- for PAS display Notes after footnotes --> + + + </fo:table-cell> + </fo:table-row> + </fo:table-body> + + </fo:table> + </xsl:variable> + <xsl:if test="normalize-space($tableWithNotesAndFootnotes) != ''"> + <xsl:copy-of select="$tableWithNotesAndFootnotes"/> + </xsl:if> + </xsl:if> </xsl:template><xsl:template match="*[local-name()='tbody']"> <xsl:variable name="cols-count"> <xsl:choose> @@ -4886,10 +4903,11 @@ <xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/> <xsl:variable name="footnote_inline"> <fo:inline xsl:use-attribute-sets="fn-num-style"> + <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}"> <xsl:value-of select="$current_fn_number_text"/> </fo:basic-link> </fo:inline> </xsl:variable> @@ -4907,16 +4925,20 @@ <fo:block-container xsl:use-attribute-sets="fn-container-body-style"> <fo:block xsl:use-attribute-sets="fn-body-style"> + <xsl:if test="$doctype = 'service-publication'"> <xsl:attribute name="font-size">10pt</xsl:attribute> </xsl:if> <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style"> + + + <xsl:value-of select="$current_fn_number_text"/> </fo:inline> <xsl:apply-templates/> </fo:block> </fo:block-container> @@ -6619,10 +6641,12 @@ + + <xsl:choose> <xsl:when test="$target_text = ''"> <xsl:apply-templates/> </xsl:when> <xsl:otherwise> @@ -6830,10 +6854,11 @@ </xsl:if> + <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' --> <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> --> <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]"> <xsl:call-template name="append_add-style"/> </xsl:if> @@ -6851,10 +6876,11 @@ <xsl:when test="$sfx != ''"> <xsl:value-of select="$sfx"/> </xsl:when> <xsl:otherwise> + <xsl:text> – </xsl:text> </xsl:otherwise> </xsl:choose> @@ -6870,10 +6896,11 @@ <xsl:when test="$sfx != ''"> <xsl:value-of select="$sfx"/> </xsl:when> <xsl:otherwise> + <xsl:text> – </xsl:text> </xsl:otherwise> </xsl:choose> @@ -7648,10 +7675,13 @@ </xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']"> <xsl:if test="normalize-space() != ''"> <fo:block xsl:use-attribute-sets="figure-name-style"> + + + <xsl:apply-templates/> </fo:block> </xsl:if> </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']"/><xsl:template match="*[local-name() = 'title']" mode="contents_item"> <xsl:param name="mode">bookmarks</xsl:param> @@ -7708,11 +7738,11 @@ </xsl:when> <xsl:otherwise> <xsl:apply-templates/> </xsl:otherwise> </xsl:choose> - </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'xref']" mode="contents"> + </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'xref'] | *[local-name() = 'eref']" mode="contents"> <xsl:value-of select="."/> </xsl:template><xsl:template match="*[local-name() = 'review']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item"> <xsl:text> </xsl:text> </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item"> <xsl:copy> @@ -7784,10 +7814,13 @@ <!-- 9 --> + <!-- <xsl:if test="$namespace = 'ieee'"> + <xsl:if test="$doctype = 'standard' and $stage = 'published'">8</xsl:if> + </xsl:if> --> 10 @@ -8228,14 +8261,18 @@ </fo:inline> </xsl:if> </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']"> <xsl:variable name="element">inline + </xsl:variable> <xsl:choose> <xsl:when test="contains($element, 'block')"> <fo:block xsl:use-attribute-sets="example-p-style"> + + + <xsl:apply-templates/> </fo:block> </xsl:when> <xsl:otherwise> <fo:inline><xsl:apply-templates/></fo:inline> @@ -8339,10 +8376,11 @@ <xsl:attribute name="margin-left">0mm</xsl:attribute> <xsl:attribute name="margin-right">0mm</xsl:attribute> </xsl:if> <fo:block xsl:use-attribute-sets="example-p-style"> + <xsl:apply-templates/> </fo:block> </fo:block-container> </xsl:when> <xsl:otherwise> @@ -8495,10 +8533,12 @@ <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets --> <xsl:variable name="text" select="normalize-space()"/> + + <fo:basic-link fox:alt-text="{@citeas}"> <xsl:if test="normalize-space(@citeas) = ''"> <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute> </xsl:if> <xsl:if test="@type = 'inline'"> @@ -8922,10 +8962,12 @@ <fo:list-item-label end-indent="label-end()"> <fo:block xsl:use-attribute-sets="list-item-label-style"> + + <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' --> <xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]"> <xsl:call-template name="append_add-style"/> </xsl:if> @@ -9179,11 +9221,11 @@ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style"> <xsl:call-template name="processBibitem"/> </fo:block> - </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2"> + </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2"> <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style"> <xsl:call-template name="processBibitem"/> </fo:block> @@ -9959,10 +10001,10 @@ </xsl:for-each> </dc:creator> <dc:description> <xsl:variable name="abstract"> - <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/> + <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'title'])]"/> </xsl:variable> <xsl:value-of select="normalize-space($abstract)"/> </dc:description> <pdf:Keywords> \ No newline at end of file