Package xmlschema_acue :: Package validators :: Module models

Module models

source code

This module contains classes and functions for processing XSD content models.

Classes
  ModelGroup
Class for XSD model group particles.
  ModelVisitor
A visitor design pattern class that can be used for validating XML data related to an XSD model group.
Functions
 
distinguishable_paths(path1, path2)
Checks if two model paths are distinguishable in a deterministic way, without looking forward or backtracking.
source code
Variables
  MAX_MODEL_DEPTH = 15
Limit depth for safe visiting of models
  XSD_GROUP_MODELS = {'sequence', 'choice', 'all'}
Function Details

distinguishable_paths(path1, path2)

source code 

Checks if two model paths are distinguishable in a deterministic way, without looking forward or backtracking. The arguments are lists containing paths from the base group of the model to a couple of leaf elements. Returns `True` if there is a deterministic separation between paths, `False` if the paths are ambiguous.

Decorators: