|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SchemaParser
The SchemaParser
interface defines the abstraction of a component able
to parse sources and produce Schema
instances suitable for validation of
XML documents.
A SchemaParser
might be able to understand more than one grammar
language at the same time. The list of all supported grammar languages must be
returned by the getSupportedGrammars()
method.
Field Summary | |
---|---|
static String |
ROLE
Avalon Role name of SchemaParser components. |
Method Summary | |
---|---|
String[] |
getSupportedGrammars()
Return an array of String s containing all the grammar languages
supported by this SchemaParser . |
Schema |
parseSchema(Source source,
String grammar)
Parse the specified Source and return a new Schema . |
Field Detail |
---|
static final String ROLE
Avalon Role name of SchemaParser
components.
Method Detail |
---|
Schema parseSchema(Source source, String grammar) throws SAXException, IOException, IllegalArgumentException
Parse the specified Source
and return a new Schema
.
The returned Schema
must be able to validate multiple documents
via multiple invocations of Schema.createValidator(ErrorHandler)
.
source
- the Source
associated with the Schema
to return.
Schema
instance.
SAXException
- if a grammar error occurred parsing the schema.
IOException
- if an I/O error occurred parsing the schema.
IllegalArgumentException
- if the specified grammar type is not one
of the grammar types returned by the
getSupportedGrammars()
method.String[] getSupportedGrammars()
Return an array of String
s containing all the grammar languages
supported by this SchemaParser
.
String
s.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |