|
|
@@ -82,8 +82,9 @@
|
|
|
</xsl:for-each>
|
|
|
</xsl:variable>
|
|
|
<xsl:variable name="cur_bit_len" select=" string-length($digits)"/>
|
|
|
+ <!--<xsl:message>#85 debug: $variant=<xsl:value-of select="$variant"/>; $curr_bit=<xsl:value-of select="$curr_bit"/>; $cur_bit_len=<xsl:value-of select="$cur_bit_len"/>; $$bit_limit=<xsl:value-of select="$bit_limit"/>;</xsl:message>-->
|
|
|
<xsl:choose>
|
|
|
- <xsl:when test=" string-length($max_possible_bit)> string-length($curr_bit)">
|
|
|
+ <xsl:when test=" string-length($max_possible_bit) < string-length($curr_bit)"><!-- mamy wieksza liczbe niz limit -->
|
|
|
<xsl:value-of select=" $variant - 1 "/>
|
|
|
</xsl:when>
|
|
|
|
|
|
@@ -92,12 +93,12 @@
|
|
|
<xsl:value-of select="$variant"/>
|
|
|
</xsl:when>
|
|
|
<xsl:when test="$curr_bit = $max_possible_bit">
|
|
|
- <!--<xsl:message>#90 brak kolejnych wariantow $variant=<xsl:value-of select="$variant"/>;$bit_limit=<xsl:value-of select="$bit_limit"/>; $curr_bit=<xsl:value-of select="$curr_bit"/></xsl:message>-->
|
|
|
+ <xsl:message>#90 brak kolejnych wariantow $variant=<xsl:value-of select="$variant"/>;$bit_limit=<xsl:value-of select="$bit_limit"/>; $curr_bit=<xsl:value-of select="$curr_bit"/></xsl:message>
|
|
|
<xsl:value-of select="$variant"/>
|
|
|
</xsl:when>
|
|
|
<xsl:when test="number($cur_bit_len) <= number($bit_limit)">
|
|
|
<!--<xsl:variable name="next_bit" select="bp:decimalToBit($variant+1)"/>-->
|
|
|
- <xsl:message>#104 next <xsl:value-of select="$variant"/></xsl:message>
|
|
|
+ <!--<xsl:message>#104 next <xsl:value-of select="$variant"/></xsl:message>-->
|
|
|
<xsl:value-of select="$variant"/>
|
|
|
</xsl:when>
|
|
|
|
|
|
@@ -224,7 +225,23 @@
|
|
|
</xsl:template>
|
|
|
|
|
|
<xsl:template name="main">
|
|
|
- <xsl:call-template name="PE_wariant"/>
|
|
|
+ <!--<xsl:call-template name="PE_wariant"/>-->
|
|
|
+
|
|
|
+ <xsl:call-template name="bp:next_bit_max">
|
|
|
+ <xsl:with-param name="variant" select="9999999"/>
|
|
|
+ <xsl:with-param name="bit_limit" select="2"/> <!-- like 6 -->
|
|
|
+ <xsl:with-param name="max_possible_bit" select="'111111111111111111'"/><!-- like 1111111 -->
|
|
|
+ <xsl:with-param name="loop" select="0"/>
|
|
|
+ </xsl:call-template>
|
|
|
+ next:
|
|
|
+
|
|
|
+ <xsl:value-of select="number(999990000999)"/>
|
|
|
+
|
|
|
+ else
|
|
|
+
|
|
|
+ <xsl:value-of select="number(9.99990000999E11)+1"/>
|
|
|
+ else
|
|
|
+ <xsl:value-of select=" format-number(number(99999000099999999)+2 ,'#')"/>
|
|
|
</xsl:template>
|
|
|
|
|
|
|