lib/isodoc/itu/itu.technical-report.xsl in metanorma-itu-2.4.1 vs lib/isodoc/itu/itu.technical-report.xsl in metanorma-itu-2.4.2

- old
+ new

@@ -2701,10 +2701,14 @@ <xsl:attribute-set name="termexample-style"> </xsl:attribute-set> + <xsl:template name="refine_termexample-style"> + + </xsl:template> + <xsl:attribute-set name="example-style"> <xsl:attribute name="font-size">10pt</xsl:attribute> <xsl:attribute name="margin-top">12pt</xsl:attribute> @@ -3843,10 +3847,40 @@ <xsl:sort select="@displayorder" data-type="number"/> <xsl:apply-templates select="."/> </xsl:for-each> </xsl:template> + <xsl:template name="processMainSectionsDefault_flatxml"> + <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"> + <xsl:sort select="@displayorder" data-type="number"/> + <xsl:variable name="flatxml"> + <xsl:apply-templates select="." mode="flatxml"/> + </xsl:variable> + <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' --> + <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/> + + </xsl:for-each> + + <xsl:for-each select="/*/*[local-name()='annex']"> + <xsl:sort select="@displayorder" data-type="number"/> + <xsl:variable name="flatxml"> + <xsl:apply-templates select="." mode="flatxml"/> + </xsl:variable> + <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' --> + <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/> + </xsl:for-each> + + <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]"> + <xsl:sort select="@displayorder" data-type="number"/> + <xsl:variable name="flatxml"> + <xsl:apply-templates select="." mode="flatxml"/> + </xsl:variable> + <!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' --> + <xsl:apply-templates select="xalan:nodeset($flatxml)/*"/> + </xsl:for-each> + </xsl:template> + <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable> <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable> <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable> <xsl:template match="text()" name="text"> @@ -5957,17 +5991,17 @@ <xsl:param name="id"/> <xsl:variable name="row_number" select="count(preceding-sibling::*[local-name()='dt']) + 1"/> <tr> <td> <xsl:attribute name="id"> - <xsl:value-of select="concat($id,'_',$row_number,'_1')"/> + <xsl:value-of select="concat($id,'@',$row_number,'_1')"/> </xsl:attribute> <xsl:apply-templates/> </td> <td> <xsl:attribute name="id"> - <xsl:value-of select="concat($id,'_',$row_number,'_2')"/> + <xsl:value-of select="concat($id,'@',$row_number,'_2')"/> </xsl:attribute> <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]"> <xsl:with-param name="process">true</xsl:with-param> </xsl:apply-templates> @@ -6578,10 +6612,14 @@ </xsl:template> <xsl:template match="text()[not(ancestor::*[local-name() = 'table']) and preceding-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear'] and following-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']]" priority="2"> <fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline> </xsl:template> + <xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5"> + <xsl:value-of select="."/> + </xsl:template> + <!-- ========================= --> <!-- END Rich text formatting --> <!-- ========================= --> <!-- split string 'text' by 'separator' --> @@ -7208,19 +7246,19 @@ <xsl:when test="@divide"><xsl:value-of select="@divide"/></xsl:when> <xsl:otherwise>1</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:attribute name="id"> - <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/> + <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_',$divide)"/> </xsl:attribute> <xsl:for-each select="*[local-name() = 'p']"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/> <xsl:attribute name="id"> - <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/> + <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/> </xsl:attribute> <!-- <xsl:copy-of select="node()" /> --> <xsl:apply-templates mode="simple-table-noid"/> @@ -7280,11 +7318,11 @@ <xsl:for-each select="xalan:nodeset($words)/word"> <xsl:variable name="num" select="count(preceding-sibling::word) + 1"/> <xsl:copy> <xsl:attribute name="id"> - <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/> + <xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/> </xsl:attribute> <xsl:copy-of select="node()"/> </xsl:copy> </xsl:for-each> </xsl:if> @@ -10089,10 +10127,10 @@ <!-- ====== --> <!-- termexample --> <!-- ====== --> <xsl:template match="*[local-name() = 'termexample']"> <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style"> - + <xsl:call-template name="refine_termexample-style"/> <xsl:call-template name="setBlockSpanAll"/> <xsl:apply-templates select="*[local-name()='name']"/> <xsl:apply-templates select="node()[not(local-name() = 'name')]"/> </fo:block> \ No newline at end of file