}
// get DOM implementation
DOMImplementationAS domImpl = (DOMImplementationAS)ASDOMImplementationImpl.getDOMImplementation();
// create a new parser, and set the error handler
DOMASBuilder parser = domImpl.createDOMASBuilder();
DOMConfiguration config = parser.getDomConfig();
config.setParameter("error-handler", new ASBuilder());
boolean schemaFullChecking = DEFAULT_SCHEMA_FULL_CHECKING;
String arg = null;
int i = 0;
// process -f/F
arg = argv[i];
if (arg.equals("-f")) {
schemaFullChecking = true;
arg = argv[++i];
} else if (arg.equals("-F")) {
schemaFullChecking = false;
arg = argv[++i];
}
// set the features. since we only deal with schema, some features have
// to be true
config.setParameter(NAMESPACES_FEATURE_ID, Boolean.TRUE);
config.setParameter(VALIDATION_FEATURE_ID, Boolean.TRUE);
config.setParameter(SCHEMA_VALIDATION_FEATURE_ID, Boolean.TRUE);
config.setParameter(SCHEMA_FULL_CHECKING_FEATURE_ID,
(schemaFullChecking)?Boolean.TRUE:Boolean.FALSE);
// process -a: as model files
if (!arg.equals("-a")) {
printUsage();