Class REDocumentDeclaration
- java.lang.Object
-
- com.sun.msv.verifier.regexp.REDocumentDeclaration
-
- All Implemented Interfaces:
DocumentDeclaration
- Direct Known Subclasses:
XSREDocDecl
public class REDocumentDeclaration extends java.lang.Object implements DocumentDeclaration
DocumentDeclaration
implementation Grammar object can be shared among multiple threads, but this object cannot be shared.REDocumentDeclaration always returns subclasses of
ExpressionAcceptor
as the Acceptor implementation.
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description REDocumentDeclaration(Expression topLevel, ExpressionPool pool)
creates an object that validates the specified expression.REDocumentDeclaration(Grammar grammar)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Acceptor
createAcceptor()
creates a new Acceptor that will validate the document element.java.lang.String
localizeMessage(java.lang.String propName, java.lang.Object arg1)
java.lang.String
localizeMessage(java.lang.String propertyName, java.lang.Object[] args)
java.lang.String
localizeMessage(java.lang.String propName, java.lang.Object arg1, java.lang.Object arg2)
-
-
-
Field Detail
-
topLevel
protected final Expression topLevel
start validation from this expression.
-
pool
public final ExpressionPool pool
ExpressionPool object that this VGM uses.
-
resCalc
protected final ResidualCalculator resCalc
-
cccec
protected final CombinedChildContentExpCreator cccec
-
attFeeder
protected final AttributeFeeder attFeeder
-
attPruner
protected final AttributePruner attPruner
-
attPicker
protected final AttributePicker attPicker
-
attRemover
protected final AttributeRemover attRemover
-
ecc
protected final ElementsOfConcernCollector ecc
-
attToken
public final AttributeToken attToken
the AttributeToken object which is re-usedOnly one AttributeToken object is used during the
Acceptor.onAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String, com.sun.msv.grammar.IDContextProvider, com.sun.msv.util.StringRef, com.sun.msv.util.DatatypeRef)
method. So instead of creating new object every time the method is called, we can kept using one copy.Note: other parts of the code may never rely on the fact that the attribute token is cached and reused.
Note: this field should be accessed ONLY by the
ExpressionAcceptor.onAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String, com.sun.msv.grammar.IDContextProvider, com.sun.msv.util.StringRef, com.sun.msv.util.DatatypeRef)
method.
-
DIAG_ELEMENT_NOT_ALLOWED
public static final java.lang.String DIAG_ELEMENT_NOT_ALLOWED
- See Also:
- Constant Field Values
-
DIAG_CONTENT_MODEL_IS_NULLSET
public static final java.lang.String DIAG_CONTENT_MODEL_IS_NULLSET
- See Also:
- Constant Field Values
-
DIAG_BAD_TAGNAME_GENERIC
public static final java.lang.String DIAG_BAD_TAGNAME_GENERIC
- See Also:
- Constant Field Values
-
DIAG_BAD_TAGNAME_WRAPUP
public static final java.lang.String DIAG_BAD_TAGNAME_WRAPUP
- See Also:
- Constant Field Values
-
DIAG_BAD_TAGNAME_SEPARATOR
public static final java.lang.String DIAG_BAD_TAGNAME_SEPARATOR
- See Also:
- Constant Field Values
-
DIAG_BAD_TAGNAME_MORE
public static final java.lang.String DIAG_BAD_TAGNAME_MORE
- See Also:
- Constant Field Values
-
DIAG_BAD_TAGNAME_WRONG_NAMESPACE
public static final java.lang.String DIAG_BAD_TAGNAME_WRONG_NAMESPACE
- See Also:
- Constant Field Values
-
DIAG_BAD_TAGNAME_PROBABLY_WRONG_NAMESPACE
public static final java.lang.String DIAG_BAD_TAGNAME_PROBABLY_WRONG_NAMESPACE
- See Also:
- Constant Field Values
-
DIAG_UNDECLARED_ATTRIBUTE
public static final java.lang.String DIAG_UNDECLARED_ATTRIBUTE
- See Also:
- Constant Field Values
-
DIAG_BAD_ATTRIBUTE_VALUE_GENERIC
public static final java.lang.String DIAG_BAD_ATTRIBUTE_VALUE_GENERIC
- See Also:
- Constant Field Values
-
DIAG_BAD_ATTRIBUTE_VALUE_DATATYPE
public static final java.lang.String DIAG_BAD_ATTRIBUTE_VALUE_DATATYPE
- See Also:
- Constant Field Values
-
DIAG_BAD_ATTRIBUTE_VALUE_WRAPUP
public static final java.lang.String DIAG_BAD_ATTRIBUTE_VALUE_WRAPUP
- See Also:
- Constant Field Values
-
DIAG_BAD_ATTRIBUTE_VALUE_SEPARATOR
public static final java.lang.String DIAG_BAD_ATTRIBUTE_VALUE_SEPARATOR
- See Also:
- Constant Field Values
-
DIAG_BAD_ATTRIBUTE_VALUE_MORE
public static final java.lang.String DIAG_BAD_ATTRIBUTE_VALUE_MORE
- See Also:
- Constant Field Values
-
DIAG_MISSING_ATTRIBUTE_SIMPLE
public static final java.lang.String DIAG_MISSING_ATTRIBUTE_SIMPLE
- See Also:
- Constant Field Values
-
DIAG_MISSING_ATTRIBUTE_GENERIC
public static final java.lang.String DIAG_MISSING_ATTRIBUTE_GENERIC
- See Also:
- Constant Field Values
-
DIAG_MISSING_ATTRIBUTE_WRAPUP
public static final java.lang.String DIAG_MISSING_ATTRIBUTE_WRAPUP
- See Also:
- Constant Field Values
-
DIAG_MISSING_ATTRIBUTE_SEPARATOR
public static final java.lang.String DIAG_MISSING_ATTRIBUTE_SEPARATOR
- See Also:
- Constant Field Values
-
DIAG_MISSING_ATTRIBUTE_MORE
public static final java.lang.String DIAG_MISSING_ATTRIBUTE_MORE
- See Also:
- Constant Field Values
-
DIAG_UNCOMPLETED_CONTENT_WRAPUP
public static final java.lang.String DIAG_UNCOMPLETED_CONTENT_WRAPUP
- See Also:
- Constant Field Values
-
DIAG_UNCOMPLETED_CONTENT_SEPARATOR
public static final java.lang.String DIAG_UNCOMPLETED_CONTENT_SEPARATOR
- See Also:
- Constant Field Values
-
DIAG_UNCOMPLETED_CONTENT_MORE
public static final java.lang.String DIAG_UNCOMPLETED_CONTENT_MORE
- See Also:
- Constant Field Values
-
DIAG_BAD_LITERAL_WRAPUP
public static final java.lang.String DIAG_BAD_LITERAL_WRAPUP
- See Also:
- Constant Field Values
-
DIAG_BAD_LITERAL_SEPARATOR
public static final java.lang.String DIAG_BAD_LITERAL_SEPARATOR
- See Also:
- Constant Field Values
-
DIAG_BAD_LITERAL_MORE
public static final java.lang.String DIAG_BAD_LITERAL_MORE
- See Also:
- Constant Field Values
-
DIAG_BAD_LITERAL_GENERIC
public static final java.lang.String DIAG_BAD_LITERAL_GENERIC
- See Also:
- Constant Field Values
-
DIAG_BAD_LITERAL_INCORRECT_VALUE
public static final java.lang.String DIAG_BAD_LITERAL_INCORRECT_VALUE
- See Also:
- Constant Field Values
-
DIAG_SIMPLE_NAMECLASS
public static final java.lang.String DIAG_SIMPLE_NAMECLASS
- See Also:
- Constant Field Values
-
DIAG_NAMESPACE_NAMECLASS
public static final java.lang.String DIAG_NAMESPACE_NAMECLASS
- See Also:
- Constant Field Values
-
DIAG_NOT_NAMESPACE_NAMECLASS
public static final java.lang.String DIAG_NOT_NAMESPACE_NAMECLASS
- See Also:
- Constant Field Values
-
DIAG_STRING_NOT_ALLOWED
public static final java.lang.String DIAG_STRING_NOT_ALLOWED
- See Also:
- Constant Field Values
-
DIAG_BAD_KEY_VALUE
public static final java.lang.String DIAG_BAD_KEY_VALUE
- See Also:
- Constant Field Values
-
DIAG_BAD_KEY_VALUE2
public static final java.lang.String DIAG_BAD_KEY_VALUE2
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
REDocumentDeclaration
public REDocumentDeclaration(Grammar grammar)
-
REDocumentDeclaration
public REDocumentDeclaration(Expression topLevel, ExpressionPool pool)
creates an object that validates the specified expression.
-
-
Method Detail
-
createAcceptor
public Acceptor createAcceptor()
Description copied from interface:DocumentDeclaration
creates a new Acceptor that will validate the document element. In RELAX, this concept is equivalent to <topLevel> In TREX, this concept is equivalent to <start>- Specified by:
createAcceptor
in interfaceDocumentDeclaration
- Returns:
- The implementation cannot return null. Apparently, it is impossible to fail in this early stage.
-
localizeMessage
public java.lang.String localizeMessage(java.lang.String propertyName, java.lang.Object[] args)
-
localizeMessage
public final java.lang.String localizeMessage(java.lang.String propName, java.lang.Object arg1)
-
localizeMessage
public final java.lang.String localizeMessage(java.lang.String propName, java.lang.Object arg1, java.lang.Object arg2)
-
-