public class CheckingSchemaBuilder extends SchemaBuilderHost
SchemaBuilder
and does all the semantic checks
required by the RELAX NG spec.
Whereas you normally write it as follows:
YourParsedPattern r = (YourParsedPattern)parseable.parse(sb);write this as follows:
YourParsedPattern r = (YourParsedPattern)parseable.parse(new CheckingSchemaBuilder(sb,eh));
The checking is done by using the rngom.binary
package, so if you are using
that package for parsing schemas, then there's no need to use this.
Constructor and Description |
---|
CheckingSchemaBuilder(SchemaBuilder sb,
ErrorHandler eh) |
CheckingSchemaBuilder(SchemaBuilder sb,
ErrorHandler eh,
com.sun.tools.rngdatatype.DatatypeLibraryFactory dlf) |
Modifier and Type | Method and Description |
---|---|
ParsedPattern |
expandPattern(ParsedPattern p)
Called after all the parsing is done.
|
annotate, annotateAfter, commentAfter, getNameClassBuilder, makeAnnotations, makeAttribute, makeChoice, makeCommentList, makeDataPatternBuilder, makeElement, makeElementAnnotationBuilder, makeEmpty, makeErrorPattern, makeExternalRef, makeGrammar, makeGroup, makeInterleave, makeList, makeLocation, makeMixed, makeNotAllowed, makeOneOrMore, makeOptional, makeText, makeValue, makeZeroOrMore, usesComments
public CheckingSchemaBuilder(SchemaBuilder sb, ErrorHandler eh)
sb
- Your SchemaBuilder
that parses RELAX NG schemas.eh
- All the errors found will be sent to this handler.public CheckingSchemaBuilder(SchemaBuilder sb, ErrorHandler eh, com.sun.tools.rngdatatype.DatatypeLibraryFactory dlf)
public ParsedPattern expandPattern(ParsedPattern p) throws BuildException, IllegalSchemaException
SchemaBuilder
This hook typically allows as SchemaBuilder
to expand
notAllowed (if it's following the simplification as in the spec.)
expandPattern
in interface SchemaBuilder
expandPattern
in class SchemaBuilderHost
BuildException
IllegalSchemaException
Copyright © 2019 JBoss by Red Hat. All rights reserved.