lib/isodoc/ogc/ogc.reference-model.xsl in metanorma-ogc-1.5.4.1 vs lib/isodoc/ogc/ogc.reference-model.xsl in metanorma-ogc-1.5.5

- old
+ new

@@ -921,11 +921,11 @@ <fo:block font-size="12pt" text-align="center" margin-bottom="12pt" keep-with-next="always"> <xsl:apply-templates/> </fo:block> </xsl:template> - <xsl:template match="ogc:title"> + <xsl:template match="ogc:title" name="title"> <xsl:variable name="level"> <xsl:call-template name="getLevel"/> </xsl:variable> @@ -1171,17 +1171,14 @@ <xsl:template match="ogc:li"> <fo:list-item id="{@id}"> <fo:list-item-label end-indent="label-end()"> <fo:block> - <xsl:if test="local-name(..) = 'ul'"> - <xsl:attribute name="color"> - <xsl:value-of select="$color_design"/> - </xsl:attribute> - </xsl:if> <xsl:choose> - <xsl:when test="local-name(..) = 'ul'">•</xsl:when> <!-- &#x2014; dash --> + <xsl:when test="local-name(..) = 'ul'"> + <xsl:call-template name="setULLabel"/> + </xsl:when> <xsl:otherwise> <!-- for ordered lists --> <xsl:choose> <xsl:when test="../@class = 'steps'"> <xsl:number format="1."/> </xsl:when> @@ -4005,10 +4002,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"> @@ -6301,10 +6299,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 color="{$color_design}">•</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_ &lt;= 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"> @@ -6896,9 +6939,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