r because the acceptor is unsatisfied. Acceptor child = a; a = stack.pop(); a.stepForward(child,null);
Then, call the stepForward method of the parent acceptor and pass the child acceptor to it.
Finally, whenever you see a text, call the onText method. If the text was unexpected or not allowed, then this method returns null. See the documentation for details.
a.onText("text",context,null,null);
In this way, you can better control the validation process.
If you need even finer control of the validation process (e.g., you need to know the list of allowed elements/attributes), you may want to rely on the regexp
implementation of VGM. see {@link com.sun.msv.verifier.regexp.REDocumentDeclaration} for detail.
Downcasting
It is often useful to downcast the Acceptor interface to appropriate derived class. For example, if you are using {@link com.sun.msv.verifier.regexp.REDocumentDeclaration}, then you can always downcast an Acceptor to {@link com.sun.msv.verifier.regexp.ExpressionAcceptor}, which provides more predictable behaviors and some useful methods.
@see DocumentDeclaration
@author Kohsuke KAWAGUCHI