public interface

XSCMValidator

org.apache.xerces.impl.xs.models.XSCMValidator
Known Indirect Subclasses

Class Overview

Note: State of the content model is stored in the validator

Summary

Constants
short FIRST_ERROR
short SUBSEQUENT_ERROR
Public Methods
abstract boolean checkUniqueParticleAttribution(SubstitutionGroupHandler subGroupHandler)
check whether this content violates UPA constraint.
abstract boolean endContentModel(int[] state)
The method indicates the end of list of children
abstract Object oneTransition(QName elementName, int[] state, SubstitutionGroupHandler subGroupHandler)
The method corresponds to one transaction in the content model.
abstract int[] startContentModel()
This methods to be called on entering a first element whose type has this content model.
abstract Vector whatCanGoHere(int[] state)
Check which elements are valid to appear at this point.

Constants

public static final short FIRST_ERROR

Constant Value: -1 (0xffffffff)

public static final short SUBSEQUENT_ERROR

Constant Value: -2 (0xfffffffe)

Public Methods

public abstract boolean checkUniqueParticleAttribution (SubstitutionGroupHandler subGroupHandler)

check whether this content violates UPA constraint.

Parameters
subGroupHandler the substitution group handler
Returns
  • true if this content model contains other or list wildcard

public abstract boolean endContentModel (int[] state)

The method indicates the end of list of children

Parameters
state Current state of the content model
Returns
  • true if the last state was a valid final state

public abstract Object oneTransition (QName elementName, int[] state, SubstitutionGroupHandler subGroupHandler)

The method corresponds to one transaction in the content model.

Parameters
state Current state
Returns
  • element decl or wildcard decl that corresponds to the element from the Schema grammar

public abstract int[] startContentModel ()

This methods to be called on entering a first element whose type has this content model. It will return the initial state of the content model

Returns
  • Start state of the content model

public abstract Vector whatCanGoHere (int[] state)

Check which elements are valid to appear at this point. This method also works if the state is in error, in which case it returns what should have been seen.

Parameters
state the current state
Returns
  • a Vector whose entries are instances of either XSWildcardDecl or XSElementDecl.