Hi Stefan.
My comments below.
13.05.2009, в 8:06, Stefan Bodewig написал(а):


class ValidationError {
   readonly int line; // with a negative constant for UNKNOWN
   readonly int column; // ditto

   readonly String message;
}

.NET knows warnings in addition to errors, I'm not sure how we should
handle them.

class ValidationResult {
   readonly bool valid;
   readonly Iterable/IEnumerable<ValidationError> errors;
}
I think warning is important what about use

IEnumerable<ValidationWarning> warnings

and

ValidationError : ValidationWarning

or

ValidationWarning : ValidationIncostistency , ValidationError:ValidationIncostistency?
class Validator {
String schemaURI; // should that be an URI instead? probably wouldn't
                     // work for DTDs then
   Source[] schemaSources;

   ValidationResult validateSchema();
   ValidationResult validateInstance(Source);
}

Since the Java code will be prettier if it uses different
implementations for DTDs and W3C Schema I suggest to add a factory
method

class Validator {
   static Validator forLanguage(String);
}
What about pass enum not a string than user will know what validation sets are supported and didn't try to pass something not supported.

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Xmlunit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xmlunit-general

Reply via email to