}
try
{
final Verifier verifier = schema.newVerifier();
final VerifierHandler handler = verifier.getVerifierHandler();
verifier.setErrorHandler( new ErrorHandler()
{
public void warning( SAXParseException exception )
throws SAXException
{
if( getLogger().isWarnEnabled() )
getLogger().warn( "Valdating configuration [app: " + application
+ ", block: " + block
+ ", msg: " + exception.getMessage() + "]" );
}
public void error( SAXParseException exception )
throws SAXException
{
if( getLogger().isErrorEnabled() )
getLogger().error( "Valdating configuration [app: " + application
+ ", block: " + block
+ ", msg: " + exception.getMessage() + "]" );
}
public void fatalError( SAXParseException exception )
throws SAXException
{
if( getLogger().isFatalErrorEnabled() )
getLogger().fatalError( "Valdating configuration [app: " + application
+ ", block: " + block
+ ", msg: " + exception.getMessage() + "]" );
}
} );
this.m_serializer.serialize( handler, branched );
return handler.isValid();
}
catch( VerifierConfigurationException e )
{
final String msg = REZ.getString( "jarv.valid.schema", application, block );