type ValidationConfig
source code
object --+
|
ValidationConfig
Class holding configuration related to validation.
pyxb.GlobalValidationConfig is available to influence
validation in all contexts. Each binding class has a reference to an
instance of this class, which can be inspected using pyxb.binding.basis._TypeBinding_mixin._GetValidationConfig
and changed using pyxb.binding.basis._TypeBinding_mixin._SetValidationConfig.
Each binding instance has a reference inherited from its class which can
be inspected using pyxb.binding.basis._TypeBinding_mixin._validationConfig
and changed using pyxb.binding.basis._TypeBinding_mixin._setValidationConfig.
This allows fine control on a per class and per-instance basis.
forBinding replaces RequireValidWhenParsing.
forDocument replaces RequireValidWhenGenerating.
contentInfluencesGeneration, orphanElementInContent, and invalidElementInContent control how pyxb.binding.basis.complexTypeDefinition.orderedContent
affects generated documents.
|
|
|
|
|
|
|
|
|
|
|
|
|
_setForBinding(self,
value)
Configure whether validation should be performed when manipulating a
binding instance. |
source code
|
|
|
_setForDocument(self,
value)
Configure whether validation should be performed when generating a
document from a binding instance. |
source code
|
|
|
|
|
|
|
|
|
ALWAYS = -1
|
|
GIVE_UP = 2
|
|
IGNORE_ONCE = 1
|
|
MIXED_ONLY = 4
|
|
NEVER = 0
|
|
RAISE_EXCEPTION = 3
|
|
__contentInfluencesGeneration = 4
|
|
__forBinding = True
|
|
__forDocument = True
|
|
__invalidElementInContent = 1
|
|
__orphanElementInContent = 1
|
Determine whether complex type content influences element order in
document generation.
The value is one of ALWAYS, NEVER, MIXED_ONLY (default).
|
How to handle unrecognized elements in content lists.
This is used when consulting a complex type instance content list to
influence the generation of documents from a binding instance.
The value is one of IGNORE_ONCE (default), GIVE_UP,
RAISE_EXCEPTION.
|
True iff validation should be performed when manipulating
a binding instance.
This includes parsing a document or DOM tree, using a binding instance
class constructor, or assigning to an element or attribute field of a
binding instance.
|
True iff validation should be performed when creating a
document from a binding instance.
This applies at invocation of toDOM(). toxml() invokes toDOM() .
|
Make a copy of this instance.
Use this to get a starting point when you need to customize validation
on a per-instance/per-class basis.
|
contentInfluencesGeneration
Determine whether complex type content influences element order in
document generation.
The value is one of ALWAYS, NEVER, MIXED_ONLY (default).
- Get Method:
- __getContentInfluencesGeneration(self)
- Determine whether complex type content influences element order in
document generation.
|
forBinding
True iff validation should be performed when manipulating
a binding instance.
This includes parsing a document or DOM tree, using a binding instance
class constructor, or assigning to an element or attribute field of a
binding instance.
- Get Method:
- _getForBinding(self)
-
True iff validation should be performed when
manipulating a binding instance.
|
forDocument
True iff validation should be performed when creating a
document from a binding instance.
This applies at invocation of toDOM(). toxml() invokes toDOM() .
- Get Method:
- _getForDocument(self)
-
True iff validation should be performed when creating a
document from a binding instance.
|
orphanElementInContent
How to handle unrecognized elements in content lists.
This is used when consulting a complex type instance content list to
influence the generation of documents from a binding instance.
The value is one of IGNORE_ONCE (default), GIVE_UP,
RAISE_EXCEPTION.
- Get Method:
- __getOrphanElementInContent(self)
- How to handle unrecognized elements in content lists.
|