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

Class _FACSymbol

source code

                 object --+    
                          |    
utils.fac.SymbolMatch_mixin --+
                              |
                             _FACSymbol
Known Subclasses:

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)
x.__init__(...) initializes x; see help(type(x)) for signature
source code

Inherited from utils.fac.SymbolMatch_mixin: match

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  __xsdLocation = None
hash(x)
  _FACSymbol__xsdLocation = None
hash(x)
Properties [hide private]

Inherited from object: __class__

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 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • xsd_location - the location of the element use or wildcard declaration.
Overrides: object.__init__