Docs: extended xsls template for changelogs generation.
This commit is contained in:
@@ -219,9 +219,17 @@ X:template padded_day(date) {
|
|||||||
|
|
||||||
X:template string_in_list(list, string) {
|
X:template string_in_list(list, string) {
|
||||||
X:choose {
|
X:choose {
|
||||||
X:when "contains($list, ',')" {
|
X:when "contains($list, ' ')" {
|
||||||
X:var str = "substring-before($list, ',')";
|
X:var str = "substring-before($list, ' ')";
|
||||||
!string_in_list(list="substring-after($list, ',')", string="$string")
|
X:choose {
|
||||||
|
X:when "$str=$string" {
|
||||||
|
!{$string}
|
||||||
|
}
|
||||||
|
X:otherwise {
|
||||||
|
!string_in_list(list="substring-after($list, ' ')",
|
||||||
|
string="$string")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
X:otherwise {
|
X:otherwise {
|
||||||
X:if "$list=$string" { !{$string} }
|
X:if "$list=$string" { !{$string} }
|
||||||
|
|||||||
@@ -213,9 +213,16 @@
|
|||||||
|
|
||||||
<xsl:template name="string_in_list"><xsl:param name="list"/><xsl:param name="string"/>
|
<xsl:template name="string_in_list"><xsl:param name="list"/><xsl:param name="string"/>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="contains($list, ',')">
|
<xsl:when test="contains($list, ' ')">
|
||||||
<xsl:variable select="substring-before($list, ',')" name="str"/>
|
<xsl:variable select="substring-before($list, ' ')" name="str"/>
|
||||||
<xsl:call-template name="string_in_list"><xsl:with-param select="substring-after($list, ',')" name="list"/><xsl:with-param select="$string" name="string"/></xsl:call-template></xsl:when>
|
<xsl:choose>
|
||||||
|
<xsl:when test="$str=$string">
|
||||||
|
<xsl:value-of select="$string"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:call-template name="string_in_list"><xsl:with-param select="substring-after($list, ' ')" name="list"/><xsl:with-param select="$string" name="string"/></xsl:call-template></xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:if test="$list=$string"> <xsl:value-of select="$string"/> </xsl:if>
|
<xsl:if test="$list=$string"> <xsl:value-of select="$string"/> </xsl:if>
|
||||||
<xsl:if test="$list='*'"> <xsl:value-of select="$string"/> </xsl:if>
|
<xsl:if test="$list='*'"> <xsl:value-of select="$string"/> </xsl:if>
|
||||||
|
|||||||
Reference in New Issue
Block a user