pub enum Content {
Simple(Box<SimpleType>),
Sequence(Vec<Particle>),
All(Vec<Particle>),
Choice(Vec<Particle>),
Any,
Empty,
}Expand description
What may appear inside an element.
Variants§
Simple(Box<SimpleType>)
No child elements; the text must satisfy the simple type.
Boxed because a SimpleType carries a Variety, which may
hold a whole list item type or a vector of union members; left
inline it makes every Content – including the empty ones –
as large as the largest simple type in the schema.
Sequence(Vec<Particle>)
Children must appear in this order.
All(Vec<Particle>)
Children may appear in any order, each at most once.
xs:all is not a Sequence with relaxed ordering: its
particles are limited to maxOccurs="1", and validating it as
a sequence rejects a document whose children are simply in a
different order.
Choice(Vec<Particle>)
Exactly one branch must match.
Any
Any content is accepted. Used for xs:any and for element
declarations with no type, which XSD treats as unconstrained.
Empty
No children and no text.