public class XSAcceptor extends SimpleAcceptor
This class should be considered as a "quick-hack" to better accomodate W3C XML Schema.
Modifier and Type | Field and Description |
---|---|
static String |
XMLSchemaNamespace |
static String |
XSINamespace |
continuation, owner
docDecl, ignoreUndeclaredAttributes
STRING_IGNORE, STRING_PROHIBITED, STRING_STRICT
Constructor and Description |
---|
XSAcceptor(XSREDocDecl docDecl,
Expression combined,
ElementExp owner,
Expression continuation) |
Modifier and Type | Method and Description |
---|---|
protected Acceptor |
createAcceptor(Expression combined,
Expression continuation,
ElementExp[] primitives,
int numPrimitives)
creates an XSAcceptor instead of default acceptor implementations.
|
Acceptor |
createChildAcceptor(StartTagInfo sti,
StringRef refErr)
creates combined child acceptor and primitive child acceptors (if necessary).
|
Acceptor |
createClone()
clones this acceptor.
|
protected boolean |
onAttribute(AttributeToken token,
StringRef refErr) |
getOwnerType
stepForward
diagnoseUncompletedContent, getExpression, getStringCareLevel, isAcceptState, onAttribute, onAttribute2, onEndAttributes, onText, onText2, stepForward, stepForwardByContinuation
public static final String XSINamespace
public static final String XMLSchemaNamespace
public XSAcceptor(XSREDocDecl docDecl, Expression combined, ElementExp owner, Expression continuation)
public Acceptor createClone()
Acceptor
You can keep a "bookmark" of the acceptor by cloning it. This is useful when you are trying to perform "partial validation".
Cloned acceptor will behave in exactly the same way as the original one.
createClone
in interface Acceptor
createClone
in class SimpleAcceptor
protected Acceptor createAcceptor(Expression combined, Expression continuation, ElementExp[] primitives, int numPrimitives)
createAcceptor
in class ContentModelAcceptor
protected boolean onAttribute(AttributeToken token, StringRef refErr)
onAttribute
in class ExpressionAcceptor
public Acceptor createChildAcceptor(StartTagInfo sti, StringRef refErr)
ExpressionAcceptor
createChildAcceptor
in interface Acceptor
createChildAcceptor
in class ExpressionAcceptor
sti
- this parameter provides the information about the start tag to the
acceptor object. Usually attribute information is ignored, but
sometimes they are used as hints.refErr
- if this parameter is non-null, the implementation should
try to detect the reason of error and recover from it.
and this object should have the error message as its str field.Copyright © 2016 Oracle Corporation. All rights reserved.