com.sun.msv.verifier.regexp.xmlschema

Class XSAcceptor

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

static String
XMLSchemaNamespace
static String
XSINamespace

Fields inherited from class com.sun.msv.verifier.regexp.SimpleAcceptor

continuation, owner

Fields inherited from interface com.sun.msv.verifier.Acceptor

STRING_IGNORE, STRING_PROHIBITED, STRING_STRICT

Constructor Summary

XSAcceptor(XSREDocDecl docDecl, Expression combined, ElementExp owner, Expression continuation)

Method Summary

Acceptor
createChildAcceptor(StartTagInfo sti, StringRef refErr)
creates combined child acceptor and primitive child acceptors (if necessary).
Acceptor
createClone()
clones this acceptor.

Methods inherited from class com.sun.msv.verifier.regexp.SimpleAcceptor

createClone, getOwnerType

Methods inherited from class com.sun.msv.verifier.regexp.ContentModelAcceptor

getOwnerType, stepForward

Methods inherited from class com.sun.msv.verifier.regexp.ExpressionAcceptor

createChildAcceptor, getExpression, getStringCareLevel, isAcceptState, onAttribute, onAttribute2, onEndAttributes, onText, onText2, stepForwardByContinuation

Field Details

XMLSchemaNamespace

public static final String XMLSchemaNamespace

XSINamespace

public static final String XSINamespace

Constructor Details

XSAcceptor

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

Method Details

createChildAcceptor

public Acceptor createChildAcceptor(StartTagInfo sti,
                                    StringRef refErr)
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 interface Acceptor
Overrides:
createChildAcceptor in interface ExpressionAcceptor
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.

createClone

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

Specified by:
createClone in interface Acceptor
Overrides:
createClone in interface SimpleAcceptor