xsd.Particle
¶
The xsd.Particle
class represents a part of a content model.
When an element is validated against a xsd.ComplexTypeDefinition
, its sequence of child elements is checked
against the content model of the xsd.ComplexTypeDefinition
and the children are attributed to xsd.Particle
objects of the
content model. A xsd.Particle
specifies a term - i.e. an xsd.ElementDeclaration
, a xsd.ModelGroup
or a Wildcard (xsd.Any
)
schema component - and its occurrence constraints.
Base class: xsd.Component
-
class
xsd.
Particle
¶ Proper instances of this class will be created within RaptorXML only, instantiation from script code will throw a
NotImplementedError
exception.
Attributes¶
-
xsd.Particle.
annotations
¶ Returns an iterator of
xsd.Annotation
components.
-
xsd.Component.
element
Returns the
xml.ElementInformationItem
representing this schema component.
-
xsd.Component.
id
Returns the value of the ‘id’ attribute as a string, or None if the schema component’s XML element doesn’t have an ‘id’ attribute.
-
xsd.Particle.
max_occurs
¶ Returns the upper bound of occurrence for the term of this
xsd.Particle
. This is either an integer value greater than 0 or the special Value “unbounded”. When the term is anxsd.ElementDeclaration
or Wildcard (xsd.Any
), the number of such element children must be less than or equal to any numeric specification of max_occurs; if max_occurs is “unbounded”, then there is no upper bound on the number of such children.
-
xsd.Particle.
min_occurs
¶ Returns the lower bound of occurrence for the term of this
xsd.Particle
. This is an integer value greater than or equal to 0. When the term is anxsd.ElementDeclaration
or Wildcard (xsd.Any
), min_occurs determines the minimum number of such element children that can occur. The number of such children must be greater than or equal to min_occurs. If min_occurs is 0, then occurrence of such children is optional.
-
xsd.Particle.
term
¶ Returns the term of the
xsd.Particle
, this is either anxsd.ElementDeclaration
,xsd.ModelGroup
or Wildcard (xsd.Any
) schema component.
Special methods¶
__bool__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__