lib/isodoc/un/un.plenary-attachment.xsl in metanorma-un-0.9.3 vs lib/isodoc/un/un.plenary-attachment.xsl in metanorma-un-0.9.4

- old
+ new

@@ -1078,12 +1078,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"> @@ -1177,10 +1180,11 @@ </xsl:attribute-set><xsl:attribute-set name="termexample-name-style"> + </xsl:attribute-set><xsl:variable name="table-border_"> @@ -1523,26 +1527,28 @@ </xsl:attribute-set><xsl:attribute-set name="note-p-style"> - + + <xsl:attribute name="margin-bottom">12pt</xsl:attribute> <xsl:attribute name="text-indent">0</xsl:attribute> </xsl:attribute-set><xsl:attribute-set name="termnote-style"> + <xsl:attribute name="margin-top">4pt</xsl:attribute> @@ -1978,18 +1984,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"> @@ -3165,87 +3174,95 @@ <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: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: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}"> + + - - - <!-- fn will be processed inside 'note' processing --> - - - - - - - <!-- 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> + <!-- fn will be processed inside 'note' processing --> + + + + + + + <!-- 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> @@ -3540,10 +3557,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> @@ -3561,12 +3579,16 @@ <fo:block-container xsl:use-attribute-sets="fn-container-body-style"> <fo:block xsl:use-attribute-sets="fn-body-style"> + <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> @@ -5247,10 +5269,12 @@ + + <xsl:choose> <xsl:when test="$target_text = ''"> <xsl:apply-templates/> </xsl:when> <xsl:otherwise> @@ -5468,10 +5492,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> @@ -5489,10 +5514,11 @@ <xsl:when test="$sfx != ''"> <xsl:value-of select="$sfx"/> </xsl:when> <xsl:otherwise> + <xsl:text>:</xsl:text> </xsl:otherwise> </xsl:choose> @@ -5508,10 +5534,11 @@ <xsl:when test="$sfx != ''"> <xsl:value-of select="$sfx"/> </xsl:when> <xsl:otherwise> + <xsl:text> – </xsl:text> </xsl:otherwise> </xsl:choose> @@ -6286,10 +6313,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> @@ -6346,11 +6376,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> @@ -6422,10 +6452,13 @@ <!-- 9 --> + <!-- <xsl:if test="$namespace = 'ieee'"> + <xsl:if test="$doctype = 'standard' and $stage = 'published'">8</xsl:if> + </xsl:if> --> @@ -6866,14 +6899,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> @@ -6977,10 +7014,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:if test="$num = 1"> <xsl:attribute name="margin-left">5mm</xsl:attribute> </xsl:if> <xsl:apply-templates/> @@ -7137,10 +7175,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'"> @@ -7560,10 +7600,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> @@ -7815,11 +7857,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> @@ -8555,10 +8597,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