lib/isodoc/itu/itu.resolution.xsl in metanorma-itu-1.3.8 vs lib/isodoc/itu/itu.resolution.xsl in metanorma-itu-1.3.9

- old
+ new

@@ -1889,11 +1889,11 @@ <xsl:when test="normalize-space(ancestor::itu:p[1]//text()[not(parent::itu:tt)]) != ''">fo:inline</xsl:when> <xsl:otherwise>fo:block</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:element name="{$element-name}"> - <xsl:attribute name="font-family">Courier</xsl:attribute> + <xsl:attribute name="font-family">Courier New</xsl:attribute> <xsl:attribute name="font-size">10pt</xsl:attribute> <xsl:if test="local-name(..) != 'dt' and not(ancestor::itu:dd) and not(ancestor::itu:title)"> <xsl:attribute name="text-align">center</xsl:attribute> </xsl:if> <xsl:if test="ancestor::itu:title"> @@ -2503,11 +2503,11 @@ - <xsl:attribute name="font-family">Courier</xsl:attribute> + <xsl:attribute name="font-family">Courier New</xsl:attribute> <xsl:attribute name="margin-top">6pt</xsl:attribute> <xsl:attribute name="margin-bottom">6pt</xsl:attribute> @@ -2587,10 +2587,11 @@ + <xsl:attribute name="font-size">10pt</xsl:attribute> <xsl:attribute name="margin-top">12pt</xsl:attribute> <xsl:attribute name="margin-bottom">12pt</xsl:attribute> @@ -3068,10 +3069,12 @@ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/> <xsl:if test="$isNoteOrFnExist = 'true'"> <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer --> </xsl:if> + + <xsl:choose> <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> @@ -3355,14 +3358,14 @@ <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black"> <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"> <xsl:with-param name="continued">true</xsl:with-param> </xsl:apply-templates> - <xsl:for-each select="ancestor::*[local-name()='table'][1]"> - <xsl:call-template name="fn_name_display"/> - </xsl:for-each> + + + </fo:table-cell> </fo:table-row> </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody"> <fo:table-body> <xsl:apply-templates/> @@ -3443,12 +3446,16 @@ <xsl:param name="colwidths"/> <xsl:param name="colgroup"/> <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/> - <xsl:if test="$isNoteOrFnExist = 'true'"> + <xsl:variable name="isNoteOrFnExistShowAfterTable"> + + </xsl:variable> + <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'"> + <xsl:variable name="cols-count"> <xsl:choose> <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']"> <xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/> </xsl:when> @@ -3601,10 +3608,23 @@ <xsl:apply-templates/> <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> --> </fo:table-body> + </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name"> + <xsl:choose> + <xsl:when test="substring-after(., '—') != ''"> + <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="."/> + </xsl:otherwise> + </xsl:choose> + </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name"> + <xsl:apply-templates mode="presentation_name"/> + </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name"> + <xsl:apply-templates select="."/> </xsl:template><xsl:template match="*[local-name()='tr']"> <xsl:variable name="parent-name" select="local-name(..)"/> <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> --> <fo:table-row min-height="4mm"> <xsl:if test="$parent-name = 'thead'"> @@ -3799,22 +3819,16 @@ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process"> <xsl:apply-templates/> </xsl:template><xsl:template name="fn_display"> <xsl:variable name="references"> + <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']"> - <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}"> - - <xsl:if test="ancestor::*[local-name()='preface']"> - <xsl:attribute name="preface">true</xsl:attribute> - </xsl:if> - - - <xsl:apply-templates/> - </fn> + <xsl:call-template name="create_fn"/> </xsl:for-each> </xsl:variable> + <xsl:for-each select="xalan:nodeset($references)//fn"> <xsl:variable name="reference" select="@reference"/> <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note--> <fo:block margin-bottom="12pt"> @@ -3858,10 +3872,20 @@ <xsl:copy-of select="./node()"/> </fo:inline> </fo:block> </xsl:if> </xsl:for-each> + </xsl:template><xsl:template name="create_fn"> + <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}"> + + <xsl:if test="ancestor::*[local-name()='preface']"> + <xsl:attribute name="preface">true</xsl:attribute> + </xsl:if> + + + <xsl:apply-templates/> + </fn> </xsl:template><xsl:template name="fn_name_display"> <!-- <xsl:variable name="references"> <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']"> <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}"> <xsl:apply-templates /> @@ -4878,23 +4902,10 @@ </xsl:template><xsl:template match="mathml:mtext" mode="mathml"> <xsl:copy> <!-- replace start and end spaces to non-break space --> <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/> </xsl:copy> - </xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml"> - <xsl:copy> - <xsl:apply-templates select="@*|node()" mode="mathml"/> - </xsl:copy> - <xsl:choose> - <!-- if in msub, then don't add space --> - <xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/> - <!-- if next char in digit, don't add space --> - <xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/> - <xsl:otherwise> - <mathml:mspace width="0.5ex"/> - </xsl:otherwise> - </xsl:choose> </xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link"> <xsl:variable name="target"> <xsl:choose> <xsl:when test="@updatetype = 'true'"> <xsl:value-of select="concat(normalize-space(@target), '.pdf')"/> @@ -6078,11 +6089,23 @@ <fo:inline xsl:use-attribute-sets="termexample-name-style"> <xsl:apply-templates/> </fo:inline> </xsl:if> </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']"> - <fo:inline><xsl:apply-templates/></fo:inline> + <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> + </xsl:otherwise> + </xsl:choose> </xsl:template><xsl:template match="*[local-name() = 'example']"> <fo:block id="{@id}" xsl:use-attribute-sets="example-style"> <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/> @@ -6655,10 +6678,9 @@ <fo:block><xsl:apply-templates/></fo:block> </fo:table-cell> </xsl:template><xsl:template name="processBibitem"> - <!-- end BIPM bibitem processing--> \ No newline at end of file