org.milyn.xml
Class XsdValidator

java.lang.Object
  extended by org.milyn.xml.XsdValidator
Direct Known Subclasses:
EclipseFragmentXMLValidator, XsdDOMValidator

public class XsdValidator
extends Object

XSD Validator.

Author:
tom.fennelly@gmail.com

Field Summary
static String SCHEMA_FACTORY
           
 
Constructor Summary
XsdValidator()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCHEMA_FACTORY

public static final String SCHEMA_FACTORY
Constructor Detail

XsdValidator

public XsdValidator()
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.


Copyright © 2018. All rights reserved.