Class XSAcceptor
- java.lang.Object
-
- com.sun.msv.verifier.regexp.ExpressionAcceptor
-
- com.sun.msv.verifier.regexp.ContentModelAcceptor
-
- com.sun.msv.verifier.regexp.SimpleAcceptor
-
- com.sun.msv.verifier.regexp.xmlschema.XSAcceptor
-
- All Implemented Interfaces:
Acceptor
public class XSAcceptor extends SimpleAcceptor
Acceptor implementation for XSREDocDecl.This class should be considered as a "quick-hack" to better accomodate W3C XML Schema.
-
-
Field Summary
Fields Modifier and Type Field Description private XSREDocDecl
_docDecl
holds the same value as the docDecl field, but this one has already down casted to XSREDocDecl.static java.lang.String
XMLSchemaNamespace
static java.lang.String
XSINamespace
-
Fields inherited from class com.sun.msv.verifier.regexp.SimpleAcceptor
continuation, owner
-
Fields inherited from class com.sun.msv.verifier.regexp.ExpressionAcceptor
docDecl, ignoreUndeclaredAttributes
-
Fields inherited from interface com.sun.msv.verifier.Acceptor
STRING_IGNORE, STRING_PROHIBITED, STRING_STRICT
-
-
Constructor Summary
Constructors Constructor Description XSAcceptor(XSREDocDecl docDecl, Expression combined, ElementExp owner, Expression continuation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
private Acceptor
onNotSubstitutableType(StartTagInfo sti, java.lang.String type, StringRef refErr)
private Acceptor
onTypeResolutionFailure(StartTagInfo sti, java.lang.String type, StringRef refErr)
-
Methods inherited from class com.sun.msv.verifier.regexp.SimpleAcceptor
getOwnerType
-
Methods inherited from class com.sun.msv.verifier.regexp.ContentModelAcceptor
stepForward
-
Methods inherited from class com.sun.msv.verifier.regexp.ExpressionAcceptor
diagnoseUncompletedContent, getExpression, getStringCareLevel, isAcceptState, onAttribute, onAttribute2, onEndAttributes, onText, onText2, stepForward, stepForwardByContinuation
-
-
-
-
Field Detail
-
XSINamespace
public static final java.lang.String XSINamespace
- See Also:
- Constant Field Values
-
XMLSchemaNamespace
public static final java.lang.String XMLSchemaNamespace
- See Also:
- Constant Field Values
-
_docDecl
private final XSREDocDecl _docDecl
holds the same value as the docDecl field, but this one has already down casted to XSREDocDecl.
-
-
Constructor Detail
-
XSAcceptor
public XSAcceptor(XSREDocDecl docDecl, Expression combined, ElementExp owner, Expression continuation)
-
-
Method Detail
-
createClone
public Acceptor createClone()
Description copied from interface:Acceptor
clones this 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.
- Specified by:
createClone
in interfaceAcceptor
- Overrides:
createClone
in classSimpleAcceptor
-
createAcceptor
protected Acceptor createAcceptor(Expression combined, Expression continuation, ElementExp[] primitives, int numPrimitives)
creates an XSAcceptor instead of default acceptor implementations.- Overrides:
createAcceptor
in classContentModelAcceptor
-
onAttribute
protected boolean onAttribute(AttributeToken token, StringRef refErr)
- Overrides:
onAttribute
in classExpressionAcceptor
-
createChildAcceptor
public Acceptor createChildAcceptor(StartTagInfo sti, StringRef refErr)
Description copied from class:ExpressionAcceptor
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.- Specified by:
createChildAcceptor
in interfaceAcceptor
- Overrides:
createChildAcceptor
in classExpressionAcceptor
- Parameters:
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.- Returns:
- null if errRef is null and this expression cannot accept given start tag. if errRef is non-null and error recovery is not possible.
-
onNotSubstitutableType
private Acceptor onNotSubstitutableType(StartTagInfo sti, java.lang.String type, StringRef refErr)
-
onTypeResolutionFailure
private Acceptor onTypeResolutionFailure(StartTagInfo sti, java.lang.String type, StringRef refErr)
-
-