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

Class WildcardUse

source code

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

Information about a schema wildcard element.

This is functionally parallel to ElementUse, but references a Wildcard that is unique to this instance. That Wildcard is not incorporated into this class is an artifact of the evolution of PyXB.

Instance Methods [hide private]
 
wildcardDeclaration(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 accepted by match to a to-be-supplied instance.
source code
 
match(self, symbol)
Satisfy pyxb.utils.fac.SymbolMatch_mixin.
source code
 
__init__(self, wildcard_declaration, xsd_location)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__str__(self)
str(x)
source code

Inherited from _FACSymbol: xsdLocation

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

Class Variables [hide private]
  __wildcardDeclaration = None
hash(x)

Inherited from _FACSymbol (private): _FACSymbol__xsdLocation

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.

Overrides: _FACSymbol.matchValue
(inherited documentation)

consumingClosure(self, sym)

source code 

Create a closure that will apply the value accepted by match to a to-be-supplied instance.

Returns:
A closure that takes a complexTypeDefinition instance and stores the value from invoking matchValue on sym into the appropriate slot.
Overrides: _FACSymbol.consumingClosure

match(self, symbol)

source code 

Satisfy pyxb.utils.fac.SymbolMatch_mixin.

Determine whether the proposed content encapsulated in symbol is compatible with the wildcard declaration. If so, the accepted value is cached internally and return True; otherwise return False.

Parameters:
Overrides: utils.fac.SymbolMatch_mixin.match

__init__(self, wildcard_declaration, 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__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)