Package pyxb :: Module exceptions_ :: Class AbstractElementError
[hide private]
[frames] | no frames]

Class AbstractElementError

source code

              object --+                    
                       |                    
exceptions.BaseException --+                
                           |                
        exceptions.Exception --+            
                               |            
                   PyXBException --+        
                                   |        
                     ValidationError --+    
                                       |    
                  ElementValidationError --+
                                           |
                                          AbstractElementError

Attempt to create an instance of an abstract element.

Raised when an element is created and the identified binding is abstract. Such elements cannot be created directly; instead the creation must derive from an instance of the abstract element's substitution group.

Since members of the substitution group self-identify using the substitutionGroup attribute, there is no general way to find the set of elements which would be acceptable in place of the abstract element.

Instance Methods [hide private]
 
__init__(self, element, location, value=None)
Create an exception indicating a PyXB-related problem.
source code
 
__unicode__(self) source code
 
__str__(self)
str(x)
source code

Inherited from ValidationError: details

Inherited from PyXBException (private): _str_from_unicode

Inherited from exceptions.Exception: __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Class Variables [hide private]
  element = None
The abstract pyxb.binding.basis.element in question
  value = None
The value proposed for the element.

Inherited from ValidationError: location

Inherited from PyXBException (private): _args, _kw

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

Method Details [hide private]

__init__(self, element, location, value=None)
(Constructor)

source code 

Create an exception indicating a PyXB-related problem.

If no args are present, a default argument is taken from the message keyword.

Parameters:
  • element - the value for the element attribute.
  • location - the value for the location attribute.
  • value - the value for the value attribute.
Overrides: object.__init__

__unicode__(self)

source code 
Overrides: exceptions.BaseException.__unicode__

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

Class Variable Details [hide private]

value

The value proposed for the element. This is usually going to be a xml.dom.Node used in the attempt to create the element, None if the abstract element was invoked without a node, or another type if pyxb.binding.content.ElementDeclaration.toDOM is mis-used.

Value:
None