com.sun.msv.verifier.regexp
Class ExpressionAcceptor
- Acceptor
public abstract class ExpressionAcceptor
Acceptor
implementation.
When you are using
REDocumentDeclaration
, then the acceptor
is always guaranteed to be a subclass of this class.
Therefore, by using this regexp implementation of VGM, you can always downcast
Acceptor
to this class and access its contents to get more information.
If you consider VGM as an automaton,
this class can be thought as a lazy automaton acceptor.
Acceptor | createChildAcceptor(StartTagInfo tag, StringRef errRef) - creates combined child acceptor and primitive child acceptors (if necessary).
|
Expression | getExpression() - gets the residual content model.
|
int | getStringCareLevel()
|
boolean | isAcceptState(StringRef errRef) - checks if this Acceptor is satisifed
|
boolean | onAttribute(String namespaceURI, String localName, String qName, String value, IDContextProvider context, StringRef refErr, DatatypeRef refType)
|
boolean | onAttribute2(String namespaceURI, String localName, String qName, String value, IDContextProvider2 context, StringRef refErr, DatatypeRef refType)
|
boolean | onEndAttributes(StartTagInfo sti, StringRef refErr)
|
boolean | onText(String literal, IDContextProvider context, StringRef refErr, DatatypeRef refType)
|
boolean | onText2(String literal, IDContextProvider2 provider, StringRef refErr, DatatypeRef refType)
|
boolean | stepForwardByContinuation(Expression continuation, StringRef errRef)
|
createChildAcceptor
public Acceptor createChildAcceptor(StartTagInfo tag,
StringRef errRef)
creates combined child acceptor and primitive child acceptors (if necessary).
be careful not to keep returned object too long because
it is reused whenever the method is called.
- createChildAcceptor in interface Acceptor
- null
if errRef is null and this expression cannot accept given start tag.
if errRef is non-null and error recovery is not possible.
getExpression
public Expression getExpression()
gets the residual content model.
This method returns the expression that represents the expected content model
it will read.
For example, if the original content model is (A,(B|C)) and this acceptor
has already read A, then this method returns (B|C).
The returned residual is useful to find out what elements can appear next.
If you consider VGM as an automaton, the residual content model
can be thought as the current state. Also,
At the same time, right language (a regular expression that represents
the language it can accept from now on).
stepForwardByContinuation
public final boolean stepForwardByContinuation(Expression continuation,
StringRef errRef)