diff options
Diffstat (limited to 'mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs')
-rw-r--r-- | mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs index 1790c478aa8..d5702d2445f 100644 --- a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs +++ b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs @@ -181,8 +181,11 @@ namespace System.Xml.Schema set { xmlResolver = value; } } + [MonoTODO] public Uri SourceUri { get { return sourceUri; } + // FIXME: actually there seems no setter, but then + // it will never make sense. set { sourceUri = value; } } #endregion @@ -788,7 +791,7 @@ namespace System.Xml.Schema object parsedValue = null; try { parsedValue = getter (); - } catch (Exception ex) { // It is inevitable and bad manner. + } catch (Exception ex) { // FIXME: (wishlist) It is bad manner ;-( HandleError ("Attribute value is invalid against its data type " + dt.TokenizedType, ex); } XmlSchemaType type = info != null ? info.SchemaType : null; @@ -934,8 +937,8 @@ namespace System.Xml.Schema if (info != null) { info.IsNil = xsiNilDepth >= 0; info.SchemaElement = null; - info.SchemaType = Context.ActualType as XmlSchemaType; - if (info.SchemaType == null) + info.SchemaType = st; + if (st == null) info.SchemaType = XmlSchemaType.GetBuiltInSimpleType (dt.TypeCode); info.SchemaAttribute = null; info.IsDefault = false; // FIXME: might be true @@ -978,7 +981,7 @@ namespace System.Xml.Schema if (itemDatatype != null) { try { retValues [vi] = itemDatatype.ParseValue (each, nameTable, nsResolver); - } catch (Exception ex) { // It is inevitable and bad manner. + } catch (Exception ex) { // FIXME: (wishlist) better exception handling ;-( HandleError ("List type value contains one or more invalid values.", ex); break; } @@ -1000,7 +1003,7 @@ namespace System.Xml.Schema if (itemDatatype != null) { try { ret = itemDatatype.ParseValue (each, nameTable, nsResolver); - } catch (Exception) { // It is inevitable and bad manner. + } catch (Exception) { // FIXME: (wishlist) better exception handling ;-( continue; } } @@ -1045,7 +1048,7 @@ namespace System.Xml.Schema if (validatedDatatype != null) { try { ret = validatedDatatype.ParseValue (value, nameTable, nsResolver); - } catch (Exception ex) { // It is inevitable and bad manner. + } catch (Exception ex) { // FIXME: (wishlist) It is bad manner ;-( HandleError (String.Format ("Invalidly typed data was specified."), ex); } } @@ -1229,7 +1232,7 @@ namespace System.Xml.Schema if (dt != null) { try { identity = dt.ParseValue (value, nameTable, nsResolver); - } catch (Exception ex) { // It is inevitable and bad manner. + } catch (Exception ex) { // FIXME: (wishlist) This is bad manner ;-( HandleError ("Identity value is invalid against its data type " + dt.TokenizedType, ex); } } @@ -1391,7 +1394,7 @@ namespace System.Xml.Schema for (int i = 0; i < tmp.Length; i += 2) { try { schema = ReadExternalSchema (tmp [i + 1]); - } catch (Exception ex) { // It is inevitable and bad manner. + } catch (Exception ex) { // FIXME: (wishlist) It is bad manner ;-( HandleError ("Could not resolve schema location URI: " + schemaLocation, ex, true); continue; } @@ -1420,7 +1423,7 @@ namespace System.Xml.Schema try { schema = ReadExternalSchema (noNsSchemaLocation); - } catch (Exception ex) { // It is inevitable and bad manner. + } catch (Exception ex) { // FIXME: (wishlist) It is bad manner ;-( HandleError ("Could not resolve schema location URI: " + noNsSchemaLocation, ex, true); } if (schema != null && schema.TargetNamespace != null) |