Top Description Fields Constructors Methods
com.sun.msv.verifier.regexp.xmlschema

public Class XSAcceptor

extends SimpleAcceptor
Class Inheritance
Imports
org.relaxng.datatype.DatatypeException, com.sun.msv.datatype.xsd.DatatypeFactory, .QnameType, com.sun.msv.grammar.ElementExp, .Expression, com.sun.msv.grammar.xmlschema.ComplexTypeExp, .ElementDeclExp, .SimpleTypeExp, .XMLSchemaSchema, .XMLSchemaTypeExp, com.sun.msv.reader.xmlschema.XMLSchemaReader, com.sun.msv.util.StartTagInfo, .StringRef, com.sun.msv.verifier.Acceptor, com.sun.msv.verifier.regexp.AttributeToken, .SimpleAcceptor

Acceptor implementation for XSREDocDecl.

This class should be considered as a "quick-hack" to better accomodate W3C XML Schema.

Field Summary

Modifier and TypeField and Description
private final XSREDocDecl
_docDecl

holds the same value as the docDecl field, but this one has already down casted to XSREDocDecl.

public static final String
public static final String
Inherited from com.sun.msv.verifier.regexp.SimpleAcceptor:
continuationowner

Constructor Summary

AccessConstructor and Description
public
XSAcceptor(XSREDocDecl docDecl, Expression combined, ElementExp owner, Expression continuation)

Method Summary

Modifier and TypeMethod and Description
protected Acceptor
createAcceptor(Expression combined, Expression continuation, ElementExp[] primitives, int numPrimitives)

Overrides com.sun.msv.verifier.regexp.ContentModelAcceptor.createAcceptor.

creates an XSAcceptor instead of default acceptor implementations.
public Acceptor
createChildAcceptor(StartTagInfo
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.
sti
,
StringRef
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.
refErr
)

Overrides com.sun.msv.verifier.regexp.ExpressionAcceptor.createChildAcceptor.

Implements com.sun.msv.verifier.Acceptor.createChildAcceptor.

creates combined child acceptor and primitive child acceptors (if necessary).
public Acceptor
protected boolean
private Acceptor
private Acceptor
Inherited from com.sun.msv.verifier.regexp.SimpleAcceptor:
getOwnerType

Field Detail

_docDeclback to summary
private final XSREDocDecl _docDecl

holds the same value as the docDecl field, but this one has already down casted to XSREDocDecl.

XMLSchemaNamespaceback to summary
public static final String XMLSchemaNamespace
XSINamespaceback to summary
public static final String XSINamespace

Constructor Detail

XSAcceptorback to summary
public XSAcceptor(XSREDocDecl docDecl, Expression combined, ElementExp owner, Expression continuation)

Method Detail

createAcceptorback to summary
protected Acceptor createAcceptor(Expression combined, Expression continuation, ElementExp[] primitives, int numPrimitives)

Overrides com.sun.msv.verifier.regexp.ContentModelAcceptor.createAcceptor.

creates an XSAcceptor instead of default acceptor implementations.

createChildAcceptorback to summary
public Acceptor createChildAcceptor(StartTagInfo sti, StringRef refErr)

Overrides com.sun.msv.verifier.regexp.ExpressionAcceptor.createChildAcceptor.

Implements com.sun.msv.verifier.Acceptor.createChildAcceptor.

Doc from com.sun.msv.verifier.regexp.ExpressionAcceptor.createChildAcceptor.

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.

Parameters
sti:StartTagInfo

Doc from com.sun.msv.verifier.Acceptor.createChildAcceptor.

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:StringRef

Doc from com.sun.msv.verifier.Acceptor.createChildAcceptor.

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: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.

createCloneback to summary
public Acceptor createClone()

Overrides com.sun.msv.verifier.regexp.SimpleAcceptor.createClone.

Implements com.sun.msv.verifier.Acceptor.createClone.

Doc from com.sun.msv.verifier.Acceptor.createClone.

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.

onAttributeback to summary
protected boolean onAttribute(AttributeToken token, StringRef refErr)

Overrides com.sun.msv.verifier.regexp.ExpressionAcceptor.onAttribute.

onNotSubstitutableTypeback to summary
private Acceptor onNotSubstitutableType(StartTagInfo sti, String type, StringRef refErr)
onTypeResolutionFailureback to summary
private Acceptor onTypeResolutionFailure(StartTagInfo sti, String type, StringRef refErr)