2006-04-18 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / class / Commons.Xml.Relaxng / Commons.Xml.Nvdl / NvdlBuiltInValidationProvider.cs
old mode 100755 (executable)
new mode 100644 (file)
index ba72c60..7ff4973
@@ -17,7 +17,7 @@ namespace Commons.Xml.Nvdl
                {
                        reader.MoveToContent ();
                        if (reader.NodeType != XmlNodeType.Element ||
-                               reader.NamespaceURI != Nvdl.BuiltInValidationUri)
+                               reader.NamespaceURI != Nvdl.BuiltInValidationNamespace)
                                return null;
                        return new NvdlBuiltInValidatorGenerator (reader.LocalName == "allow");
                }
@@ -55,9 +55,11 @@ namespace Commons.Xml.Nvdl
 
                public override bool Read ()
                {
-                       if (Reader.Read () && !allow)
+                       if (!Reader.Read ())
+                               return false;
+                       if (!allow)
                                throw new NvdlValidationException (String.Format ("The NVDL script does not allow an element whose namespace is '{0}'", Reader.NamespaceURI), Reader as IXmlLineInfo);
-                       return false;
+                       return true;
                }
        }
 }