GNU Info

Info Node: (python2.1-lib.info)Content Model Descriptions

(python2.1-lib.info)Content Model Descriptions


Next: Expat error constants Prev: Example 8 Up: xml.parsers.expat
Enter node , (file) or (file)node

Content Model Descriptions
--------------------------

This manual section was written by Fred L. Drake, Jr. <fdrake@acm.org>.
Content modules are described using nested tuples.  Each tuple contains
four values: the type, the quantifier, the name, and a tuple of
children.  Children are simply additional content module descriptions.

The values of the first two fields are constants defined in the `model'
object of the `xml.parsers.expat' module.  These constants can be
collected in two groups: the model type group and the quantifier group.

The constants in the model type group are:

`XML_CTYPE_ANY'
     The element named by the model name was declared to have a content
     model of `ANY'.

`XML_CTYPE_CHOICE'
     The named element allows a choice from a number of options; this is
     used for content models such as `(A | B | C)'.

`XML_CTYPE_EMPTY'
     Elements which are declared to be `EMPTY' have this model type.

`XML_CTYPE_MIXED'

`XML_CTYPE_NAME'

`XML_CTYPE_SEQ'
     Models which represent a series of models which follow one after
     the other are indicated with this model type.  This is used for
     models such as `(A, B, C)'.

The constants in the quantifier group are:

`XML_CQUANT_NONE'

`XML_CQUANT_OPT'
     The model is option: it can appear once or not at all, as for `A?'.

`XML_CQUANT_PLUS'
     The model must occur one or more times (`A+').

`XML_CQUANT_REP'
     The model must occur zero or more times, as for `A*'.


automatically generated by info2www version 1.2.2.9