XSLT regeneration for r3998.
This commit is contained in:
parent
6af6d60ce8
commit
75639f81d9
1 changed files with 30 additions and 11 deletions
|
@ -4,23 +4,29 @@
|
|||
<xsl:output encoding="koi8-r" method="text"/>
|
||||
|
||||
<xsl:param select="'en'" name="lang"/>
|
||||
|
||||
<xsl:param select="'../xml/change_log_conf.xml'" name="configuration"/>
|
||||
|
||||
<xsl:variable select="document($configuration)/configuration" name="conf"/>
|
||||
|
||||
<xsl:variable select="$conf/start" name="start"/>
|
||||
|
||||
<xsl:variable select="$conf/indent" name="indent"/>
|
||||
|
||||
<xsl:variable select="$conf/length" name="max"/>
|
||||
|
||||
<xsl:variable name="br"><br></xsl:variable>
|
||||
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="change_log"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="change_log">
|
||||
<xsl:apply-templates select="changes"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="changes">
|
||||
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
|
||||
|
@ -31,10 +37,14 @@
|
|||
</xsl:if>
|
||||
|
||||
<xsl:if test="$lang='en'">
|
||||
|
||||
<xsl:value-of select="substring(@date, 1, 2)"/>
|
||||
|
||||
<xsl:value-of select="$conf/changes[@lang=$lang]/month[number(substring(current()/@date, 4, 2))]"/>
|
||||
|
||||
<xsl:value-of select="substring(@date, 7, 4)"/>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
|
||||
|
@ -44,8 +54,8 @@
|
|||
</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="change">
|
||||
|
||||
<xsl:variable select="$conf/changes[@lang=$lang]/*[local-name(.)=current()/@type]" name="prefix"/>
|
||||
|
||||
<xsl:variable name="postfix">
|
||||
|
@ -59,9 +69,9 @@
|
|||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="para" name="para">
|
||||
<xsl:param name="prefix"/>
|
||||
|
||||
<xsl:variable name="text">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:variable>
|
||||
|
@ -73,6 +83,7 @@
|
|||
<xsl:with-param select="normalize-space($text)" name="text"/>
|
||||
<xsl:with-param name="prefix">
|
||||
<xsl:choose>
|
||||
|
||||
<xsl:when test="position() = 1">
|
||||
<xsl:value-of select="$prefix"/>
|
||||
</xsl:when>
|
||||
|
@ -84,28 +95,34 @@
|
|||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="wrap">
|
||||
<xsl:param name="text"/>
|
||||
<xsl:param name="prefix"/>
|
||||
|
||||
<xsl:if test="$text">
|
||||
|
||||
<xsl:variable name="offset">
|
||||
<xsl:choose>
|
||||
|
||||
<xsl:when test="starts-with($text, concat($br, ' '))">
|
||||
|
||||
<xsl:value-of select="string-length($br) + 2"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
1</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="length">
|
||||
|
||||
<xsl:call-template name="length">
|
||||
<xsl:with-param select="substring($text, $offset)" name="text"/>
|
||||
<xsl:with-param select="string-length($prefix)" name="prefix"/>
|
||||
<xsl:with-param select="$max" name="length"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:value-of select="$prefix"/>
|
||||
|
||||
<xsl:value-of select="translate(substring($text, $offset, $length), ' ', ' ')"/>
|
||||
|
@ -119,12 +136,14 @@
|
|||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="length">
|
||||
<xsl:param name="text"/>
|
||||
<xsl:param name="prefix"/>
|
||||
<xsl:param name="length"/>
|
||||
|
||||
<xsl:variable select="substring-before(substring($text, 1, $length - $prefix), $br)" name="break"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$break">
|
||||
<xsl:value-of select="string-length($break)"/>
|
||||
|
@ -145,14 +164,14 @@
|
|||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="at">@</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="br">
|
||||
<xsl:value-of select="$br"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="nobr">
|
||||
<xsl:value-of select="translate(., ' ', ' ')"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
Loading…
Reference in a new issue