Package xmlschema_acue ::
Package validators ::
Module models ::
Class ModelVisitor
Class ModelVisitor
source code
A visitor design pattern class that can be used for validating XML
data related to an XSD model group. The visit of the model is done using
an external match information, counting the occurrences and yielding
tuples in case of model's item occurrence errors. Ends setting the
current element to `None`.
:param root: the root ModelGroup instance of the model. :ivar occurs:
the Counter instance for keeping track of occurrences of XSD elements and
groups. :ivar element: the current XSD element, initialized to the first
element of the model. :ivar broken: a boolean value that records if the
model is still usable. :ivar group: the current XSD model group,
initialized to *root* argument. :ivar iterator: the current XSD group
iterator. :ivar items: the current XSD group unmatched items. :ivar
match: if the XSD group has an effective item match.
Returns the expected elements of the current and descendant
groups.
- Decorators:
|
Generator function for advance to the next element. Yields tuples with
particles information when occurrence violation is found.
:param match: provides current element match.
- Decorators:
|