Matra DTD Parser 0.8b

Interface ContentModel

All Superinterfaces:

public interface ContentModel
extends ContentSpec

The ContentModel specifies a ContentSpec where the element contains only child elements. This is represented by a collection of ContentParticle(s), the type - either a choice or sequence and the cardinality of the entire group.

From XML Specifications
[Section 3.2.1 Element Content] -
[Definition: An element type has element content when elements of that type must contain only child elements (no character data), optionally separated by white space (characters matching the nonterminal S).][Definition: In this case, the constraint includes a content model, a simple grammar governing the allowed types of the child elements and the order in which they are allowed to appear.]

Conrad Roche

Method Summary
 void setElementContent(Collection CPs, short type, short cardinality)
          Sets the element content for this content model.

Method Detail


public void setElementContent(Collection CPs,
                              short type,
                              short cardinality)
Sets the element content for this content model.
CPs - The collection of ContentParticle(s) that constitute the element content. It is an error if this parameter is null.
type - The type of the mix of elements - it can have one of two values CP_TYPE_CHOICE or CP_TYPE_SEQUENCE. If there is only one ContentParticle in this content model, then the type should be CP_TYPE_SEQUENCE.
cardinality - The cardinality of this content model. The cardinality can have one of four values - CARDINALITY_OPTIONAL ('?'), CARDINALITY_MULTIPLE ('+') or CARDINALITY_OPTIONAL_MULTIPLE ('*') or CARDINALITY_ONCE.

Matra DTD Parser 0.8b