Bladeren bron

2004-02-03 Atsushi Enomoto <[email protected]>

	* XsdValidatingReader.cs : schemaLocation is not NMTOKENS. It is list
	  of anyURI. Just split names and handle as anyURI.

svn path=/trunk/mcs/; revision=22729
Atsushi Eno 22 jaren geleden
bovenliggende
commit
33b5f6d8a2

+ 5 - 0
mcs/class/System.XML/Mono.Xml.Schema/ChangeLog

@@ -1,3 +1,8 @@
+2004-02-03  Atsushi Enomoto <[email protected]>
+
+	* XsdValidatingReader.cs : schemaLocation is not NMTOKENS. It is list
+	  of anyURI. Just split names and handle as anyURI.
+
 2004-01-26  Atsushi Enomoto <[email protected]>
 
 	* XsdParticleValidationState.cs :

+ 8 - 1
mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs

@@ -1557,7 +1557,14 @@ namespace Mono.Xml.Schema
 			XmlSchema schema = null;
 			string schemaLocation = reader.GetAttribute ("schemaLocation", XmlSchema.InstanceNamespace);
 			if (schemaLocation != null) {
-				string [] tmp = XmlSchemaDatatype.FromName ("NMTOKENS").ParseValue (schemaLocation, NameTable, null) as string [];
+				string [] tmp = null;
+				try {
+					schemaLocation = XmlSchemaDatatype.FromName ("token").Normalize (schemaLocation);
+					tmp = schemaLocation.Split (XmlChar.WhitespaceChars);
+				} catch (Exception ex) {
+					HandleError ("Invalid schemaLocation attribute format.", ex, true);
+					tmp = new string [0];
+				}
 				if (tmp.Length % 2 != 0)
 					HandleError ("Invalid schemaLocation attribute format.");
 				for (int i = 0; i < tmp.Length; i += 2) {