com.ibm.xml.framework
Interface ContentModel
- public abstract interface ContentModel
ContentModel is an interface that can be used by your own custom validators
to plug in various types of content models. It is used internally as well
for the same purposes.
Since there are a number of optimizations that can be used for simple or
special content models, this class provides the interface via which all of
the various content model types are managed. So the validation handler
class has a list of things derived from this class. It finds the one for
the desired element, then asks it to validate the element contents.
The validation interface from the scanner to the validation handle provides
a child count and an array of element name indices into the string pool.
So it is assumed that those same parameters will be passed to the content
model to be validated. Therefore the validateContent() method accepts
this standard view of the elements to be validated.
- Version:
- Revision: 61 1.8 src/com/ibm/xml/framework/ContentModel.java, parser, xml4j2, xml4j2_0_0
- See Also:
XMLValidationHandler
validateContent
public int validateContent(int childCount,
int[] children)
throws java.lang.Exception
- These are the methods which all content model's must implement. They
allow the validators which use them to get information that only the
content model objects know.
whatCanGoHere
public int whatCanGoHere(boolean fullyValid,
InsertableElementsInfo info)
throws java.lang.Exception