Package org.smooks.xml
Class XsdValidator
- java.lang.Object
-
- org.smooks.xml.XsdValidator
-
- Direct Known Subclasses:
XsdDOMValidator
public class XsdValidator extends Object
XSD Validator.- Author:
- tom.fennelly@gmail.com
-
-
Field Summary
Fields Modifier and Type Field Description static String
SCHEMA_FACTORY
-
Constructor Summary
Constructors Constructor Description XsdValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setErrorHandler(ErrorHandler errorHandler)
Set the validation error handler.void
setSchemaFactory(SchemaFactory installedSchemaFactory)
void
setSchemaSourceResolver(LSResourceResolver schemaSourceResolver)
void
setXSDSources(Collection<Source> xsdSources)
Set the XSD/Schema Sources.void
validate(Source source)
Validate the supplied source against the namespaces referenced in it.
-
-
-
Field Detail
-
SCHEMA_FACTORY
public static final String SCHEMA_FACTORY
-
-
Method Detail
-
setSchemaFactory
public void setSchemaFactory(SchemaFactory installedSchemaFactory)
-
setSchemaSourceResolver
public void setSchemaSourceResolver(LSResourceResolver schemaSourceResolver) throws SAXException
- Throws:
SAXException
-
setXSDSources
public void setXSDSources(Collection<Source> xsdSources) throws SAXException
Set the XSD/Schema Sources.- Parameters:
xsdSources
- The schema sources.- Throws:
SAXException
-
setErrorHandler
public void setErrorHandler(ErrorHandler errorHandler)
Set the validation error handler.- Parameters:
errorHandler
- The validation error handler.
-
validate
public void validate(Source source) throws SAXException, IOException
Validate the supplied source against the namespaces referenced in it.- Throws:
SAXException
- Validation error.IOException
- Error reading the XSD Sources.
-
-