reads RELAX module (classic RELAX module; no namespace extension)
by SAX2 and constructs abstract grammar model.
This class does not recognize extensions introduced by RELAX Namespace
(like anyOtherElement, or <ref label="..." namespace="..." />.
ERR_EXPROTED_HEDGERULE_CONSTRAINT
public static final String ERR_EXPROTED_HEDGERULE_CONSTRAINT
ERR_ID_ABUSE
public static final String ERR_ID_ABUSE
ERR_ID_ABUSE_1
public static final String ERR_ID_ABUSE_1
ERR_INCONSISTENT_TARGET_NAMESPACE
public static final String ERR_INCONSISTENT_TARGET_NAMESPACE
ERR_LABEL_COLLISION
public static final String ERR_LABEL_COLLISION
ERR_MISSING_TARGET_NAMESPACE
public static final String ERR_MISSING_TARGET_NAMESPACE
ERR_MORE_THAN_ONE_INLINE_TAG
public static final String ERR_MORE_THAN_ONE_INLINE_TAG
ERR_MULTIPLE_ATTPOOL_DECLARATIONS
public static final String ERR_MULTIPLE_ATTPOOL_DECLARATIONS
ERR_MULTIPLE_ATTRIBUTE_CONSTRAINT
public static final String ERR_MULTIPLE_ATTRIBUTE_CONSTRAINT
ERR_MULTIPLE_TAG_DECLARATIONS
public static final String ERR_MULTIPLE_TAG_DECLARATIONS
ERR_NAMESPACE_NOT_SUPPROTED
public static final String ERR_NAMESPACE_NOT_SUPPROTED
ERR_ROLE_COLLISION
public static final String ERR_ROLE_COLLISION
ERR_UNDEFINED_ATTPOOL
public static final String ERR_UNDEFINED_ATTPOOL
ERR_UNDEFINED_ELEMENTRULE
public static final String ERR_UNDEFINED_ELEMENTRULE
ERR_UNDEFINED_HEDGERULE
public static final String ERR_UNDEFINED_HEDGERULE
ERR_UNDEFINED_TAG
public static final String ERR_UNDEFINED_TAG
WRN_ILLEGAL_RELAXCORE_VERSION
public static final String WRN_ILLEGAL_RELAXCORE_VERSION
WRN_NO_EXPROTED_LABEL
public static final String WRN_NO_EXPROTED_LABEL
RELAXCoreReader
public RELAXCoreReader(GrammarReaderController controller,
SAXParserFactory parserFactory,
RELAXReader.StateFactory stateFactory,
ExpressionPool pool,
String expectedTargetNamespace)
full constructor.
stateFactory
- this object creates all parsing state object.
Parsing behavior can be modified by changing this object.expectedTargetNamespace
- expected value of 'targetNamespace' attribute.
If this value is null, then the module must have 'targetNamepsace'
attribute. If this value is non-null and module doesn't have
targetNamespace attribute, then expectedTargetNamespace is used
as the module's target namespace (chameleon effect).
If expectedNamespace differs from the module's targetNamespace attribute,
then an error will be issued.
addUserDefinedType
public final void addUserDefinedType(XSDatatypeExp exp)
getRELAXCoreSchema4Schema
public static Schema getRELAXCoreSchema4Schema()
getResult
public final RELAXModule getResult()
obtains parsed grammar object only if parsing was successful.
getResultAsGrammar
public final Grammar getResultAsGrammar()
gets the parsed AGM.
Should any error happens, this method should returns null.
derived classes should implement type-safe getGrammar method,
along with this method.
- getResultAsGrammar in interface GrammarReader
resolveXSDatatype
public XSDatatypeExp resolveXSDatatype(String typeName)
gets DataType object from type name.
If undefined type name is specified, this method is responsible
to report an error, and recovers.
- resolveXSDatatype in interface XSDatatypeResolver