public class RNGLoaderImpl extends Object implements RNGLoader, ErrorHandler, com.thaiopensource.xml.sax.XMLReaderCreator
Constructor and Description |
---|
RNGLoaderImpl() |
Modifier and Type | Method and Description |
---|---|
protected SubDocumentTypeImpl |
createSubDocumentType(com.thaiopensource.validate.Schema schema,
URL schemaURL) |
XMLReader |
createXMLReader() |
void |
error(SAXParseException e) |
void |
fatalError(SAXParseException e) |
LoadError[] |
getLoadErrors()
Returns the errors found in last loaded document type.
|
LoadError[] |
getLoadWarnings()
Returns the warnings found in last loaded document type.
|
SubDocumentType |
loadSubDocumentType(Document document)
Load the schema contained in specified document.
|
SubDocumentType |
loadSubDocumentType(URL sourceFile)
Loads document type contained in specified file.
|
SubDocumentType |
loadSubDocumentType(URL sourceFile,
boolean isCompactSyntax,
String compactSyntaxEncoding)
Load the possibly composite schema found in specified target
namespace/URL pairs.
|
void |
warning(SAXParseException e) |
public SubDocumentType loadSubDocumentType(URL sourceFile) throws IOException
SubDocumentTypeLoader
loadSubDocumentType
in interface SubDocumentTypeLoader
sourceFile
- file containing the document type to be loadednull
if
sourceFile contains an erroneous document type.IOException
- if an IO problem occurs when loading the
document typepublic SubDocumentType loadSubDocumentType(URL sourceFile, boolean isCompactSyntax, String compactSyntaxEncoding) throws IOException
RNGLoader
loadSubDocumentType
in interface RNGLoader
sourceFile
- The URL of the file containing the schema.isCompactSyntax
- true
if sourceFile
contains a schema using the compact syntax; false
if it
contains a schema using the XML syntaxcompactSyntaxEncoding
- The encoding used for sourceFile,
when this file uses the compact syntax.null
if the loaded schema is
invalid or if sourceFile does not specify a RELAX NG schema.IOException
- if an IO problem occurs when loading the schema.protected SubDocumentTypeImpl createSubDocumentType(com.thaiopensource.validate.Schema schema, URL schemaURL) throws com.xmlmind.xml.rng.validate.TranslatorException
com.xmlmind.xml.rng.validate.TranslatorException
public LoadError[] getLoadErrors()
SubDocumentTypeLoader
getLoadErrors
in interface SubDocumentTypeLoader
public LoadError[] getLoadWarnings()
SubDocumentTypeLoader
getLoadWarnings
in interface SubDocumentTypeLoader
public SubDocumentType loadSubDocumentType(Document document)
RNGLoader
loadSubDocumentType
in interface RNGLoader
document
- Document containing the schema (that is, its root
element is grammar).null
if the loaded schema is
invalid or if document does not specify a RELAX NG schema.public XMLReader createXMLReader() throws SAXException
createXMLReader
in interface com.thaiopensource.xml.sax.XMLReaderCreator
SAXException
public void warning(SAXParseException e) throws SAXException
warning
in interface ErrorHandler
SAXException
public void error(SAXParseException e) throws SAXException
error
in interface ErrorHandler
SAXException
public void fatalError(SAXParseException e) throws SAXException
fatalError
in interface ErrorHandler
SAXException