这是我在代码中发现的错误:
Invalid datatype was found for namespace 'http://whattf.org/datatype-draft' and local name 'string'.
这是我的代码段:
RelaxngPattern g = Compile("C:\\nu\\validator-master\\validator-master\\schema\\html5\\xhtml5.rnc");
XmlTextReader xml_memori = new XmlTextReader(memStream);
RelaxngValidatingReader r= new RelaxngValidatingReader(xml_memori,g);
try
{
while (!r.EOF)
r.Read();
}
finally
{
r.Close();
}
RelaxngPattern Compile(string file)
{
using (StreamReader sr = new StreamReader(file))
{
return Compile(sr, file);
}
}
RelaxngPattern Compile(TextReader reader)
{
return Compile(reader, null);
}
RelaxngPattern Compile(TextReader reader, string baseUri)
{
RncParser parser = new RncParser(new NameTable());
RelaxngPattern g = parser.Parse(reader, baseUri);
g.Compile();
return g;
}