Is There A Relaxer For .net? Is Relaxer Alive? Is Relaxng Viable?
Solution 1:
Just use Mono's RelaxngValidatingReader.
I've made a NuGet Package by compiling the Mono Commons.Xml.Relaxng project.
PS: I use this in production for some AlpineBits projects.
XmlReaderinstance=newXmlTextReader ("instance.xml");
XmlReadergrammar=newXmlTextReader ("grammar.rng");
using (RelaxngValidatingReaderreader=newRelaxngValidatingReader (instance, grammar)) {
try {
while (!reader.EOF) {
reader.Read();
}
Console.WriteLine("validation succeeded");
}
catch (Exception ex) {
Console.WriteLine("validation failed with message:");
Console.WriteLine(ex.Message);
}
}
Solution 2:
Rather than let this question hang out here unanswered forever, and going on the theory that no answer at all is actually a pretty definitive answer, I'm going to provide a response myself.
The answers:
No, by all indications, Relaxer is not alive.
There is no Relaxer for .NET
There is no Relaxer for Javascript
RelaxNG is apparently
also deadstill alive, just looking deadish as it is stable, but it is used quite a lot as alternative to XSD. A recent addition was RelaxNG validation in Saxon for XQuery and XSLT done by Charles Foster.There are a bunch of alternatives for RelaxNG validation in .NET, as mentioned in the comments and Martin's answer.
Post a Comment for "Is There A Relaxer For .net? Is Relaxer Alive? Is Relaxng Viable?"