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

# type 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) | source code
__str__(self) | source code
Inherited from `_FACSymbol`: `xsdLocation`

Class Variables | [hide private]
| __wildcardDeclaration = `None`
Inherited from `_FACSymbol` (private): `_FACSymbol__xsdLocation`

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: `symbol` - a pair `(value, element_decl)`. pyxb.binding.content.Wildcard.matches is used to determine whether the proposed content is compatible with this wildcard. Overrides: utils.fac.SymbolMatch_mixin.match

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

### __str__(self) (Informal representation operator) | source code
Overrides: object.__str__ (inherited documentation)