com.conradroche.dtd.decl.elem
Interface ContentModel
- All Superinterfaces:
- ContentSpec
- 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 multiplicity 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.]
- Author:
- Conrad Roche
Method Summary |
void |
setElementContent(java.util.Collection CPs,
short type,
short multiplicity)
Sets the element content for this content model. |
setElementContent
public void setElementContent(java.util.Collection CPs,
short type,
short multiplicity)
- Sets the element content for this content model.
- Parameters:
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.multiplicity
- The multiplicity of this content model. The multiplicity
can have one of four values -
CARDINALITY_OPTIONAL ('?'), CARDINALITY_MULTIPLE ('+') or
CARDINALITY_OPTIONAL_MULTIPLE ('*') or CARDINALITY_ONCE.