Package pyxb :: Package binding :: Module content :: Class _FACSymbol |
[hide private]
[frames] | no frames]

# type _FACSymbol

source code

                     object --+
                              |
    utils.fac.SymbolMatch_mixin --+
                                  |
                                 _FACSymbol

Known Subclasses:
  - ElementUse
  - , WildcardUse

Base class for pyxb.utils.fac.Symbol instances associated with PyXB content models.

This holds the location in the schema of the ElementUse or WildcardUse and documents the methods expected of its children.

Instance Methods | [hide private]
xsdLocation(self) | source code
matchValue(self, sym) Return the value accepted by match for this symbol. | source code
consumingClosure(self, sym) Create a closure that will apply the value from `sym` to a to-be-supplied instance. | source code
__init__(self, xsd_location) | source code
Inherited from `utils.fac.SymbolMatch_mixin`: `match`

Class Variables | [hide private]
| __xsdLocation = `None`
| _FACSymbol__xsdLocation = `None`

Method Details | [hide private]

### matchValue(self, sym) | source code
Return the value accepted by match for this symbol. A match for an element declaration might have resulted in a type change for the value (converting it to an acceptable type). There is no safe place to cache the compatible value calculated in the match while other candidates are being considered, so we need to re-calculate it if the transition is taken. If the match could not have changed the value, the value from the symbol may be returned immediately.

### consumingClosure(self, sym) | source code
Create a closure that will apply the value from `sym` to a to-be-supplied instance. This is necessary for non-deterministic automata, where we can't store the value into the instance field until we know that the transition will be taken: Returns: A closure that takes a complexTypeDefinition instance and stores the value from invoking matchValue on `sym` into the appropriate slot.

### __init__(self, xsd_location) (Constructor) | source code
Parameters: `xsd_location` - the location of the element use or wildcard declaration. Overrides: object.__init__