|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.XMLFilterImpl
com.sun.msv.reader.GrammarReader
com.sun.msv.reader.relax.RELAXReader
com.sun.msv.reader.relax.core.RELAXCoreReader
public class RELAXCoreReader
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="..." />.
Nested Class Summary | |
---|---|
static class |
RELAXCoreReader.StateFactory
|
Nested classes/interfaces inherited from class com.sun.msv.reader.GrammarReader |
---|
GrammarReader.BackPatch, GrammarReader.BackwardReferenceMap, GrammarReader.ChainPrefixResolver, GrammarReader.PrefixResolver |
Field Summary | |
---|---|
static String |
ERR_EXPROTED_HEDGERULE_CONSTRAINT
|
static String |
ERR_ID_ABUSE
|
static String |
ERR_ID_ABUSE_1
|
static String |
ERR_INCONSISTENT_TARGET_NAMESPACE
|
static String |
ERR_LABEL_COLLISION
|
static String |
ERR_MISSING_TARGET_NAMESPACE
|
static String |
ERR_MORE_THAN_ONE_INLINE_TAG
|
static String |
ERR_MULTIPLE_ATTPOOL_DECLARATIONS
|
static String |
ERR_MULTIPLE_ATTRIBUTE_CONSTRAINT
|
static String |
ERR_MULTIPLE_TAG_DECLARATIONS
|
static String |
ERR_NAMESPACE_NOT_SUPPROTED
|
static String |
ERR_ROLE_COLLISION
|
static String |
ERR_UNDEFINED_ATTPOOL
|
static String |
ERR_UNDEFINED_ELEMENTRULE
|
static String |
ERR_UNDEFINED_HEDGERULE
|
static String |
ERR_UNDEFINED_TAG
|
static String |
WRN_ILLEGAL_RELAXCORE_VERSION
|
static String |
WRN_NO_EXPROTED_LABEL
|
Fields inherited from class com.sun.msv.reader.relax.RELAXReader |
---|
ERR_ILLEGAL_OCCURS, ERR_MISPLACED_OCCURS, RELAXCoreNamespace, sfactory |
Constructor Summary | |
---|---|
RELAXCoreReader(GrammarReaderController controller,
SAXParserFactory parserFactory,
ExpressionPool pool)
|
|
RELAXCoreReader(GrammarReaderController controller,
SAXParserFactory parserFactory,
RELAXCoreReader.StateFactory stateFactory,
ExpressionPool pool,
String expectedTargetNamespace)
full constructor. |
Method Summary | |
---|---|
void |
addUserDefinedType(XSDatatypeExp exp)
|
State |
createExpressionChildState(State parent,
StartTagInfo tag)
this method must be implemented by the derived class to create language-default expresion state. |
static Schema |
getRELAXCoreSchema4Schema()
|
RELAXModule |
getResult()
obtains parsed grammar object only if parsing was successful. |
Grammar |
getResultAsGrammar()
gets the parsed AGM. |
static RELAXModule |
parse(InputSource module,
SAXParserFactory factory,
GrammarReaderController controller,
ExpressionPool pool)
loads RELAX module |
static RELAXModule |
parse(String moduleURL,
SAXParserFactory factory,
GrammarReaderController controller,
ExpressionPool pool)
loads RELAX module |
XSDatatypeExp |
resolveXSDatatype(String typeName)
gets DataType object from type name. |
Methods inherited from class com.sun.msv.reader.relax.RELAXReader |
---|
createFacetState |
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl |
---|
characters, endDocument, endElement, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, startElement, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ERR_NAMESPACE_NOT_SUPPROTED
public static final String ERR_INCONSISTENT_TARGET_NAMESPACE
public static final String ERR_MISSING_TARGET_NAMESPACE
public static final String ERR_MULTIPLE_TAG_DECLARATIONS
public static final String ERR_MORE_THAN_ONE_INLINE_TAG
public static final String ERR_MULTIPLE_ATTPOOL_DECLARATIONS
public static final String ERR_UNDEFINED_ELEMENTRULE
public static final String ERR_UNDEFINED_HEDGERULE
public static final String ERR_UNDEFINED_TAG
public static final String ERR_UNDEFINED_ATTPOOL
public static final String ERR_LABEL_COLLISION
public static final String ERR_ROLE_COLLISION
public static final String WRN_NO_EXPROTED_LABEL
public static final String ERR_EXPROTED_HEDGERULE_CONSTRAINT
public static final String ERR_MULTIPLE_ATTRIBUTE_CONSTRAINT
public static final String ERR_ID_ABUSE
public static final String ERR_ID_ABUSE_1
public static final String WRN_ILLEGAL_RELAXCORE_VERSION
Constructor Detail |
---|
public RELAXCoreReader(GrammarReaderController controller, SAXParserFactory parserFactory, ExpressionPool pool)
public RELAXCoreReader(GrammarReaderController controller, SAXParserFactory parserFactory, RELAXCoreReader.StateFactory stateFactory, ExpressionPool pool, String expectedTargetNamespace)
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.Method Detail |
---|
public static RELAXModule parse(String moduleURL, SAXParserFactory factory, GrammarReaderController controller, ExpressionPool pool)
public static RELAXModule parse(InputSource module, SAXParserFactory factory, GrammarReaderController controller, ExpressionPool pool)
public static Schema getRELAXCoreSchema4Schema()
public final RELAXModule getResult()
public final Grammar getResultAsGrammar()
GrammarReader
getResultAsGrammar
in class GrammarReader
public final void addUserDefinedType(XSDatatypeExp exp)
public XSDatatypeExp resolveXSDatatype(String typeName)
resolveXSDatatype
in interface XSDatatypeResolver
typeName
- The type of this value varies in the schema language.
In XML Schema, for example, in which QNames are used
to designate datatypes, this parameter will be QName.
In RELAX Core, in which the same syntax is used but
NCName is used to designate datatypes. So this parameter
will be NCName.
public State createExpressionChildState(State parent, StartTagInfo tag)
GrammarReader
createExpressionChildState
in class RELAXReader
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |