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
path: root/mcs
diff options
context:
space:
mode:
authorAtsushi Eno <atsushieno@gmail.com>2004-06-18 05:25:07 +0400
committerAtsushi Eno <atsushieno@gmail.com>2004-06-18 05:25:07 +0400
commit4cf0759319da9d0a4a46d6488d8d3c2b30f0cf92 (patch)
tree644e3519cecce68017dd70346e67ba5d975a1a05 /mcs
parent47029604e8b3f44f3798873a96157091309f12b4 (diff)
2004-06-18 Atsushi Enomoto <atsushi@ximian.com>
* CustomSerializer.cs, XmlSchemaException.cs, XmlSchemaParticle.cs, XmlSchemaSimpleTypeRestriction.cs : Globalization. svn path=/trunk/mcs/; revision=29827
Diffstat (limited to 'mcs')
-rwxr-xr-xmcs/class/System.XML/System.Xml.Schema/ChangeLog6
-rwxr-xr-xmcs/class/System.XML/System.Xml.Schema/CustomSerializer.cs6
-rwxr-xr-xmcs/class/System.XML/System.Xml.Schema/XmlSchemaException.cs5
-rwxr-xr-xmcs/class/System.XML/System.Xml.Schema/XmlSchemaParticle.cs14
-rwxr-xr-xmcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleTypeRestriction.cs28
5 files changed, 34 insertions, 25 deletions
diff --git a/mcs/class/System.XML/System.Xml.Schema/ChangeLog b/mcs/class/System.XML/System.Xml.Schema/ChangeLog
index f5624b8ca1f..14dd692e892 100755
--- a/mcs/class/System.XML/System.Xml.Schema/ChangeLog
+++ b/mcs/class/System.XML/System.Xml.Schema/ChangeLog
@@ -1,3 +1,9 @@
+2004-06-18 Atsushi Enomoto <atsushi@ximian.com>
+
+ * CustomSerializer.cs, XmlSchemaException.cs,
+ XmlSchemaParticle.cs, XmlSchemaSimpleTypeRestriction.cs
+ : Globalization.
+
2004-06-10 Atsushi Enomoto <atsushi@ximian.com>
* XmlSchemaFacet.cs : Fixed internal protected --> internal.
diff --git a/mcs/class/System.XML/System.Xml.Schema/CustomSerializer.cs b/mcs/class/System.XML/System.Xml.Schema/CustomSerializer.cs
index 0677e16853d..2eb824b7b0a 100755
--- a/mcs/class/System.XML/System.Xml.Schema/CustomSerializer.cs
+++ b/mcs/class/System.XML/System.Xml.Schema/CustomSerializer.cs
@@ -134,7 +134,7 @@ namespace System.Xml.Schema
{
case System.Xml.Schema.XmlSchemaForm.Qualified: return "qualified";
case System.Xml.Schema.XmlSchemaForm.Unqualified: return "unqualified";
- default: return ((long)val).ToString();
+ default: return ((long)val).ToString (CultureInfo.InvariantCulture);
}
}
@@ -705,7 +705,7 @@ namespace System.Xml.Schema
case System.Xml.Schema.XmlSchemaUse.Optional: return "optional";
case System.Xml.Schema.XmlSchemaUse.Prohibited: return "prohibited";
case System.Xml.Schema.XmlSchemaUse.Required: return "required";
- default: return ((long)val).ToString();
+ default: return ((long)val).ToString (CultureInfo.InvariantCulture);
}
}
@@ -1381,7 +1381,7 @@ namespace System.Xml.Schema
case System.Xml.Schema.XmlSchemaContentProcessing.Skip: return "skip";
case System.Xml.Schema.XmlSchemaContentProcessing.Lax: return "lax";
case System.Xml.Schema.XmlSchemaContentProcessing.Strict: return "strict";
- default: return ((long)val).ToString();
+ default: return ((long)val).ToString (CultureInfo.InvariantCulture);
}
}
diff --git a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaException.cs b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaException.cs
index 3d46ddf2f8c..ca9fd5c7385 100755
--- a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaException.cs
+++ b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaException.cs
@@ -1,6 +1,7 @@
// Author: Dwivedi, Ajay kumar
// Adwiv@Yahoo.com
using System;
+using System.Globalization;
using System.Runtime.Serialization;
@@ -90,12 +91,12 @@ namespace System.Xml.Schema
get {
string msg = "XmlSchema error: " + base.Message;
if (hasLineInfo)
- msg += String.Format (" XML {0} Line {1}, Position {2}.",
+ msg += String.Format (CultureInfo.InvariantCulture, " XML {0} Line {1}, Position {2}.",
(sourceUri != null && sourceUri != "") ? "URI: " + sourceUri + " ." : "",
lineNumber,
linePosition);
if (sourceObj != null)
- msg += String.Format (" Related schema item SourceUri: {0}, Line {1}, Position {2}.",
+ msg += String.Format (CultureInfo.InvariantCulture, " Related schema item SourceUri: {0}, Line {1}, Position {2}.",
sourceObj.SourceUri, sourceObj.LineNumber, sourceObj.LinePosition);
return msg;
}
diff --git a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaParticle.cs b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaParticle.cs
index 80872fde701..fff16eb2451 100755
--- a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaParticle.cs
+++ b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaParticle.cs
@@ -2,6 +2,7 @@
// Adwiv@Yahoo.com
using System;
using System.Collections;
+using System.Globalization;
using System.Xml.Serialization;
namespace System.Xml.Schema
@@ -48,11 +49,11 @@ namespace System.Xml.Schema
return;
}
- decimal val = decimal.Parse(value);
+ decimal val = decimal.Parse (value, CultureInfo.InvariantCulture);
if(val >= 0 && (val == Decimal.Truncate(val)))
{
minOccurs = val;
- minstr = val.ToString();
+ minstr = val.ToString (CultureInfo.InvariantCulture);
}
else
{
@@ -75,11 +76,11 @@ namespace System.Xml.Schema
}
else
{
- decimal val = decimal.Parse(value);
+ decimal val = decimal.Parse (value, CultureInfo.InvariantCulture);
if(val >= 0 && (val == Decimal.Truncate(val)))
{
maxOccurs = val;
- maxstr = val.ToString();
+ maxstr = val.ToString (CultureInfo.InvariantCulture);
}
else
{
@@ -102,7 +103,7 @@ namespace System.Xml.Schema
get{ return minOccurs; }
set
{
- MinOccursString = value.ToString ();
+ MinOccursString = value.ToString (CultureInfo.InvariantCulture);
}
}
@@ -112,7 +113,7 @@ namespace System.Xml.Schema
get{ return maxOccurs; }
set
{
- MaxOccursString = value.ToString ();
+ MaxOccursString = value.ToString (CultureInfo.InvariantCulture);
}
}
@@ -124,6 +125,7 @@ namespace System.Xml.Schema
internal decimal ValidatedMaxOccurs
{
get { return validatedMaxOccurs; }
+// set { validatedMaxOccurs = value; }
}
#endregion
diff --git a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleTypeRestriction.cs b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleTypeRestriction.cs
index d602197d7af..17ec61dcc0b 100755
--- a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleTypeRestriction.cs
+++ b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleTypeRestriction.cs
@@ -384,12 +384,12 @@ namespace System.Xml.Schema
* ·derived· from decimal. The value of totalDigits ·must· be a
* positiveInteger. */
try {
- decimal newTotalDigits = decimal.Parse (totf.Value.Trim (), lengthStyle);
+ decimal newTotalDigits = decimal.Parse (totf.Value.Trim (), lengthStyle, CultureInfo.InvariantCulture);
if (newTotalDigits <= 0)
- totf.error(h, String.Format("The value '{0}' is an invalid totalDigits value", newTotalDigits));
+ totf.error(h, String.Format(CultureInfo.InvariantCulture, "The value '{0}' is an invalid totalDigits value", newTotalDigits));
// Valid restriction
if ((totalDigitsFacet > 0) && (newTotalDigits > totalDigitsFacet)) {
- totf.error(h, String.Format("The value '{0}' is not a valid restriction of the base totalDigits facet '{1}'", newTotalDigits, totalDigitsFacet));
+ totf.error(h, String.Format(CultureInfo.InvariantCulture, "The value '{0}' is not a valid restriction of the base totalDigits facet '{1}'", newTotalDigits, totalDigitsFacet));
}
totalDigitsFacet = newTotalDigits;
}
@@ -405,12 +405,12 @@ namespace System.Xml.Schema
if (fracf != null) {
try {
- decimal newFractionDigits = decimal.Parse (fracf.Value.Trim (), lengthStyle);
+ decimal newFractionDigits = decimal.Parse (fracf.Value.Trim (), lengthStyle, CultureInfo.InvariantCulture);
if (newFractionDigits< 0)
- fracf.error(h, String.Format("The value '{0}' is an invalid fractionDigits value", newFractionDigits));
+ fracf.error(h, String.Format(CultureInfo.InvariantCulture, "The value '{0}' is an invalid fractionDigits value", newFractionDigits));
if ((fractionDigitsFacet >= 0) && (newFractionDigits > fractionDigitsFacet)) {
- fracf.error(h, String.Format("The value '{0}' is not a valid restriction of the base fractionDigits facet '{1}'", newFractionDigits, fractionDigitsFacet));
+ fracf.error(h, String.Format(CultureInfo.InvariantCulture, "The value '{0}' is not a valid restriction of the base fractionDigits facet '{1}'", newFractionDigits, fractionDigitsFacet));
}
fractionDigitsFacet = newFractionDigits;
}
@@ -433,7 +433,7 @@ namespace System.Xml.Schema
XsdAnySimpleType dt = getDatatype();
if (dt.Compare (newValue, baseFacet) != XsdOrdering.Equal) {
facet.error (h,
- String.Format("{0} is not the same as fixed parent {1} facet.",
+ String.Format(CultureInfo.InvariantCulture, "{0} is not the same as fixed parent {1} facet.",
facet.Value, facet.ThisFacet));
}
}
@@ -455,7 +455,7 @@ namespace System.Xml.Schema
if ((facetsDefined & (XmlSchemaFacet.Facet.minLength | XmlSchemaFacet.Facet.maxLength)) != 0)
lf.error(h, "It is an error for both length and minLength or maxLength to be present.");
else {
- lengthFacet = decimal.Parse (lf.Value.Trim (), lengthStyle);
+ lengthFacet = decimal.Parse (lf.Value.Trim (), lengthStyle, CultureInfo.InvariantCulture);
/* TODO: Check that it is between inherited max/min lengths */
if (lengthFacet < 0)
lf.error(h, "The value '" + lengthFacet + "' is an invalid length");
@@ -474,12 +474,12 @@ namespace System.Xml.Schema
if ((facetsDefined & XmlSchemaFacet.Facet.length) != 0)
maxlf.error(h, "It is an error for both length and minLength or maxLength to be present.");
else {
- decimal newMaxLengthFacet = decimal.Parse (maxlf.Value.Trim (), lengthStyle);
+ decimal newMaxLengthFacet = decimal.Parse (maxlf.Value.Trim (), lengthStyle, CultureInfo.InvariantCulture);
if (((fixedFacets & XmlSchemaFacet.Facet.maxLength)!=0) && (newMaxLengthFacet != maxLengthFacet))
- maxlf.error(h, String.Format("The value '{0}' is not the same as the fixed value '{1}' on the base type", maxlf.Value.Trim (), maxLengthFacet));
+ maxlf.error(h, String.Format(CultureInfo.InvariantCulture, "The value '{0}' is not the same as the fixed value '{1}' on the base type", maxlf.Value.Trim (), maxLengthFacet));
if ((maxLengthFacet >0) && (newMaxLengthFacet > maxLengthFacet))
- maxlf.error(h, String.Format("The value '{0}' is not a valid restriction of the value '{1}' on the base maxLength facet", maxlf.Value.Trim (), maxLengthFacet));
+ maxlf.error(h, String.Format(CultureInfo.InvariantCulture, "The value '{0}' is not a valid restriction of the value '{1}' on the base maxLength facet", maxlf.Value.Trim (), maxLengthFacet));
else
maxLengthFacet = newMaxLengthFacet;
if (maxLengthFacet < 0)
@@ -502,12 +502,12 @@ namespace System.Xml.Schema
if (lengthFacet >=0)
minlf.error(h, "It is an error for both length and minLength or maxLength to be present.");
else {
- decimal newMinLengthFacet = decimal.Parse (minlf.Value.Trim (), lengthStyle);
+ decimal newMinLengthFacet = decimal.Parse (minlf.Value.Trim (), lengthStyle, CultureInfo.InvariantCulture);
if (((fixedFacets & XmlSchemaFacet.Facet.minLength)!=0) && (newMinLengthFacet != minLengthFacet))
- minlf.error(h, String.Format("The value '{0}' is not the same as the fixed value '{1}' on the base type", minlf.Value.Trim (), minLengthFacet));
+ minlf.error(h, String.Format(CultureInfo.InvariantCulture, "The value '{0}' is not the same as the fixed value '{1}' on the base type", minlf.Value.Trim (), minLengthFacet));
if (newMinLengthFacet < minLengthFacet)
- minlf.error(h, String.Format("The value '{0}' is not a valid restriction of the value '{1}' on the base minLength facet", minlf.Value.Trim (), minLengthFacet));
+ minlf.error(h, String.Format(CultureInfo.InvariantCulture, "The value '{0}' is not a valid restriction of the value '{1}' on the base minLength facet", minlf.Value.Trim (), minLengthFacet));
else
minLengthFacet = newMinLengthFacet;
if (minLengthFacet < 0)