xsd.ContentType
¶
The xsd.ContentType
property record determines the validation of children of xml.ElementInformationItem
objects.
A
xsd.ContentType
with varietyxsd.ContentTypeVariety.EMPTY
validates elements with noxml.CharDataInformationItem
or
xml.ElementInformationItem
children.
A
xsd.ContentType
with varietyxsd.ContentTypeVariety.SIMPLE
validates elements with character-only children using
A
xsd.ContentType
with varietyxsd.ContentTypeVariety.ELEMENT_ONLY
validates elements with children that conform to
the content model supplied by its xsd.Particle
.
A
xsd.ContentType
with varietyxsd.ContentTypeVariety.MIXED
validates elements whosexml.ElementInformationItem
children
(i.e. specifically ignoring other children such as xml.CharDataInformationItem
objects) conform to the content model
supplied by its xsd.Particle
.
A
xsd.ContentType
with non-absentxsd.OpenContent
validates elements with some children conforming to the content model
and others conforming to the xsd.OpenContent
.
-
class
xsd.
ContentType
¶ Proper instances of this class will be created within RaptorXML only, instantiation from script code will throw a
NotImplementedError
exception.
Attributes¶
-
xsd.ContentType.
open_content
¶ Returns an optional
xsd.OpenContent
schema component.
-
xsd.ContentType.
particle
¶ Returns a
xsd.Particle
schema component, or None if variety isxsd.ContentTypeVariety.EMPTY
orxsd.ContentTypeVariety.SIMPLE
.
-
xsd.ContentType.
simple_type_definition
¶ Returns a
xsd.SimpleTypeDefinition
schema component if variety isxsd.ContentTypeVariety.SIMPLE
, or None otherwise
-
xsd.ContentType.
variety
¶ Returns one of {
xsd.ContentTypeVariety.EMPTY
,xsd.ContentTypeVariety.SIMPLE
,xsd.ContentTypeVariety.ELEMENT_ONLY
,xsd.ContentTypeVariety.MIXED
}.
Special methods¶
__bool__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__