Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtsushi Eno <atsushieno@gmail.com>2005-02-23 16:16:44 +0300
committerAtsushi Eno <atsushieno@gmail.com>2005-02-23 16:16:44 +0300
commit4138751ae3b47fb65722e0678baaac03736cfc94 (patch)
tree079f6d26bb7d8e55f74b6c1fa36b3ccbb5a7d0d5 /mcs/class/System.XML/Mono.Xml.Xsl.Operations
parentc7d433768b3b28feaac14e7c43d5ec74a6ae96ca (diff)
2005-02-23 Atsushi Enomoto <atsushi@ximian.com>
* XslNumber.cs : Fixed incorrect 0 padding for 1) unsupported (and thus default '1') pattern and 2) suffixed pattern with non-number char(s). svn path=/trunk/mcs/; revision=41088
Diffstat (limited to 'mcs/class/System.XML/Mono.Xml.Xsl.Operations')
-rw-r--r--mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog5
-rw-r--r--mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslNumber.cs8
2 files changed, 11 insertions, 2 deletions
diff --git a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog
index e324ffaa399..2a9c4e8fba7 100644
--- a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog
+++ b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/ChangeLog
@@ -1,3 +1,8 @@
+2005-02-23 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XslNumber.cs : Fixed incorrect 0 padding for 1) unsupported (and thus
+ default '1') pattern and 2) suffixed pattern with non-number char(s).
+
2005-02-18 Atsushi Enomoto <atsushi@ximian.com>
* XslCopy.cs, XslCopyOf.cs : copy namespace nodes in the
diff --git a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslNumber.cs b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslNumber.cs
index adc5731a5e2..b857262141d 100644
--- a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslNumber.cs
+++ b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslNumber.cs
@@ -329,7 +329,6 @@ namespace Mono.Xml.Xsl.Operations {
if (formatContent)
((FormatItem)fmtList [0]).Format (b, value);
if (lastSep != null) b.Append (lastSep);
-
return b.ToString ();
}
@@ -399,8 +398,13 @@ namespace Mono.Xml.Xsl.Operations {
switch (item [0])
{
default: // See XSLT 1.0 spec 7.7.1.
+ return new DigitItem (sep, 1, gpSep, gpSize);
case '0': case '1':
- return new DigitItem (sep, item.Length, gpSep, gpSize);
+ int len = 1;
+ for (; len < item.Length; len++)
+ if (!Char.IsDigit (item, len))
+ break;
+ return new DigitItem (sep, len, gpSep, gpSize);
case 'a':
return new AlphaItem (sep, false);
case 'A':