lib/isodoc/un/un.recommendation.xsl in metanorma-un-0.7.4 vs lib/isodoc/un/un.recommendation.xsl in metanorma-un-0.7.5
- old
+ new
@@ -628,12 +628,13 @@
</xsl:variable>
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block>
<xsl:choose>
- <!-- <xsl:when test="local-name(..) = 'ul'">—</xsl:when> --> <!-- dash -->
- <xsl:when test="local-name(..) = 'ul'">•</xsl:when>
+ <xsl:when test="local-name(..) = 'ul'">
+ <xsl:call-template name="setULLabel"/>
+ </xsl:when>
<xsl:otherwise> <!-- for ordered lists -->
<xsl:choose>
<xsl:when test="../@type = 'arabic'">
<xsl:number format="a)" lang="en"/>
</xsl:when>
@@ -761,11 +762,11 @@
</xsl:choose>
</xsl:template>
<xsl:template match="un:title[parent::un:clause[@inline-header = 'true']]" priority="3"/>
- <xsl:template match="un:title">
+ <xsl:template match="un:title" name="title">
<xsl:variable name="level">
<xsl:call-template name="getLevel"/>
</xsl:variable>
@@ -3271,10 +3272,11 @@
</xsl:if>
</xsl:if> -->
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
<xsl:apply-templates/>
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
+ <xsl:apply-templates select="@language"/>
<xsl:apply-templates/>
</xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
</xsl:template><xsl:template match="*[local-name()='em']">
<fo:inline font-style="italic">
@@ -5496,10 +5498,55 @@
<!-- <fo:block font-weight="bold">Review:</fo:block>
<xsl:apply-templates /> -->
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
<!-- 0xA0 to space replacement -->
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
+ </xsl:template><xsl:variable name="ul_labels_">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <label>•</label>
+
+ </xsl:variable><xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/><xsl:template name="setULLabel">
+ <xsl:variable name="list_level_" select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
+ <xsl:variable name="list_level">
+ <xsl:choose>
+ <xsl:when test="$list_level_ <= 3"><xsl:value-of select="$list_level_"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="$list_level_ mod 3"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$ul_labels/label[not(@level)]"> <!-- one label for all levels -->
+ <xsl:apply-templates select="$ul_labels/label[not(@level)]" mode="ul_labels"/>
+ </xsl:when>
+ <xsl:when test="$list_level mod 3 = 0">
+ <xsl:apply-templates select="$ul_labels/label[@level = 3]" mode="ul_labels"/>
+ </xsl:when>
+ <xsl:when test="$list_level mod 2 = 0">
+ <xsl:apply-templates select="$ul_labels/label[@level = 2]" mode="ul_labels"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="$ul_labels/label[@level = 1]" mode="ul_labels"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template><xsl:template match="label" mode="ul_labels">
+ <xsl:copy-of select="@*[not(local-name() = 'level')]"/>
+ <xsl:value-of select="."/>
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
<xsl:choose>
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
<fo:block-container>
<xsl:attribute name="margin-left">
@@ -5949,9 +5996,13 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
<rect x="0" y="0" width="2" height="2" fill="black"/>
</svg>
</fo:instream-foreign-object>
</fo:inline>
+ </xsl:template><xsl:template match="@language">
+ <xsl:copy-of select="."/>
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="4">
+ <xsl:call-template name="title"/>
</xsl:template><xsl:template name="convertDate">
<xsl:param name="date"/>
<xsl:param name="format" select="'short'"/>
<xsl:variable name="year" select="substring($date, 1, 4)"/>
<xsl:variable name="month" select="substring($date, 6, 2)"/>
\ No newline at end of file