Changeset 2618


Ignore:
Timestamp:
Jul 3, 2012, 11:04:25 PM (14 years ago)
Author:
Александър Шопов
Message:

Нов параметър

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/xml-stats/format.xsl

    r2617 r2618  
    1515<xsl:variable name="po-prefix" select="'po-'"/>
    1616<xsl:variable name="true-false-replace" select="'truefals'"/>
     17<xsl:variable name="ellipsis" select="'⋯'"/>
    1718
    1819
     
    3637<xsl:value-of select="$maxTodoLength"/>@maxTodoLength
    3738-->
    38 <xsl:call-template name="draw-table"/>
     39<xsl:call-template name="draw-table">
     40<xsl:with-param name="type" select="'full'"/>
     41</xsl:call-template>
     42<xsl:value-of select="$nl"/>
     43<xsl:value-of select="$nl"/>
     44<xsl:value-of select="$nl"/>
     45<xsl:value-of select="$nl"/>
     46<xsl:value-of select="$nl"/>
     47<xsl:call-template name="draw-table">
     48<xsl:with-param name="type" select="'short'"/>
     49</xsl:call-template>
    3950</xsl:template>
    4051
    4152
    4253<xsl:template name="draw-table">
    43 <xsl:param name="type" select="'long'"/><!-- or 'short' -->
     54<xsl:param name="type" select="'full'"/><!-- or 'short' -->
    4455<!-- DEBUG -->
    4556<!--
    4657<xsl:value-of select="$type"/>#type
    4758-->
    48 
     59<xsl:if test="($type != 'full') and ($type != 'short')">
     60<xsl:message>ПРОБЛЕМ В ПОДАДЕНИЯ ПАРАМЕТЪР НА draw-table</xsl:message>
     61</xsl:if>
     62
     63<xsl:variable name="minTodoShown">
     64<xsl:choose>
     65<xsl:when test="$type = 'full'">0</xsl:when>
     66<xsl:otherwise>1</xsl:otherwise>
     67</xsl:choose>
     68</xsl:variable>
     69
     70<xsl:variable name="ellipsisLine">
     71<xsl:choose>
     72<xsl:when test="$type = 'full'"/>
     73<xsl:otherwise>
     74<xsl:call-template name="draw-ellipsis"/>
     75</xsl:otherwise>
     76</xsl:choose>
     77</xsl:variable>
     78
     79<!-- DEBUG -->
     80<!--
     81<xsl:value-of select="$minTodoShown"/>#minTodoShown
     82<xsl:value-of select="$ellipsisLine"/>#ellipsisLine
     83-->
    4984
    5085<xsl:call-template name="draw-heading"/>
    5186<xsl:call-template name="draw-separator"/>
    5287
    53 <xsl:for-each select="//domain">
     88<xsl:for-each select="//domain[fuzzy + untranslated >= $minTodoShown]">
    5489<xsl:sort order="descending" select="fuzzy + untranslated" data-type="number"/>
    5590<xsl:sort order="descending" select="untranslated" data-type="number"/>
     
    77112
    78113</xsl:for-each>
     114
     115<xsl:value-of select="$ellipsisLine"/>
    79116
    80117<xsl:call-template name="draw-separator"/>
     
    192229</xsl:template>
    193230
     231<xsl:template name="draw-ellipsis">
     232<xsl:call-template name="draw-line">
     233<xsl:with-param name="name" select="''"/>
     234<xsl:with-param name="nameLength" select="$maxNameLength"/>
     235<xsl:with-param name="translated" select="''"/>
     236<xsl:with-param name="translatedLength" select="$maxTranslatedLength"/>
     237<xsl:with-param name="fuzzy" select="''"/>
     238<xsl:with-param name="fuzzyLength" select="$maxFuzzzyLength"/>
     239<xsl:with-param name="untranslated" select="''"/>
     240<xsl:with-param name="untranslatedLength" select="$maxUntranslatedLength"/>
     241<xsl:with-param name="all" select="''"/>
     242<xsl:with-param name="allLength" select="$maxAllLength"/>
     243<xsl:with-param name="todo" select="''"/>
     244<xsl:with-param name="todoLength" select="$maxTodoLength"/>
     245<xsl:with-param name="separator" select="'|'"/>
     246<xsl:with-param name="pad" select="$ellipsis"/>
     247</xsl:call-template>
     248</xsl:template>
     249
    194250</xsl:stylesheet>
Note: See TracChangeset for help on using the changeset viewer.