It appears that Jing never calls the checkValid method of
org.relaxng.datatype.Datatype. So as far as Jing goes, implementing
informative diagnostics looks like a waste of time. Still, MSV
appears to call checkValid.
Is there a best practice about how one should implement isValid and
checkValid? How bad are exceptions for performance anyway? Is it a
bad idea to do this:
public boolean isValid(String literal, ValidationContext context) {
try {
checkValid(literal, context);
} catch (DatatypeException e) {
return false;
}
return true;
}
?
Should one really provide exceptionless duplicate code for isValid?
Has anyone patched Jing to emit datatype diagnostics using checkValid?
--
Henri Sivonen
[EMAIL PROTECTED]
http://hsivonen.iki.fi/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/rng-users/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/