Package pyxb :: Package binding :: Module datatypes :: Class base64Binary
[hide private]
[frames] | no frames]

Class base64Binary

source code

                    object --+                
                             |                
                       cscRoot --+            
                                 |            
     utils.utility.Locatable_mixin --+        
                                     |        
              basis._TypeBinding_mixin --+    
                                         |    
                            object --+   |    
                                     |   |    
utils.utility._DeconflictSymbols_mixin --+    
                                         |    
                        object --+       |    
                                 |       |    
                           cscRoot --+   |    
                                     |   |    
            basis._DynamicCreate_mixin --+    
                                         |    
                basis.simpleTypeDefinition --+
                                             |
                            object --+       |
                                     |       |
                            basestring --+   |
                                         |   |
                                       str --+
                                             |
                                            base64Binary

XMLSchema datatype base64Binary.

See also RFC2045 and RFC4648.

Nested Classes [hide private]
  _XsdBaseType
XMLSchema datatype anySimpleType.
Instance Methods [hide private]

Inherited from basis.simpleTypeDefinition: __init__, pythonLiteral, xsdConstraintsOK, xsdLiteral, xsdValueLength

Inherited from basis._TypeBinding_mixin: __setattr__, toDOM, toxml, validateBinding

Inherited from str: __add__, __contains__, __eq__, __format__, __ge__, __getattribute__, __getitem__, __getnewargs__, __getslice__, __gt__, __hash__, __le__, __len__, __lt__, __mod__, __mul__, __ne__, __repr__, __rmod__, __rmul__, __sizeof__, __str__, capitalize, center, count, decode, encode, endswith, expandtabs, find, format, index, isalnum, isalpha, isdigit, islower, isspace, istitle, isupper, join, ljust, lower, lstrip, partition, replace, rfind, rindex, rjust, rpartition, rsplit, rstrip, split, splitlines, startswith, strip, swapcase, title, translate, upper, zfill

Inherited from str (private): _formatter_field_name_split, _formatter_parser

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __subclasshook__

Class Methods [hide private]
 
XsdValidateLength(cls, length)
Control the maximum encoded size that is checked for XML literal validity.
source code
 
_ConvertArguments_vx(cls, args, kw) source code
 
XsdLiteral(cls, value)
Convert from a python value to a string usable in an XML document.
source code
 
XsdValueLength(cls, value)
Return the length of the given value.
source code

Inherited from basis.simpleTypeDefinition: PythonLiteral, SimpleTypeDefinition, XsdConstraintsOK, XsdSuperType

Inherited from basis._TypeBinding_mixin: Factory

Static Methods [hide private]

Inherited from basis.simpleTypeDefinition: __new__

Class Variables [hide private]
  _ExpandedName = <pyxb.namespace.ExpandedName object>
The expanded name of the component.
  _B04 = '[AQgw]'
  _B04S = '([AQgw] ?)'
  _B16 = '[AEIMQUYcgkosw048]'
  _B16S = '([AEIMQUYcgkosw048] ?)'
  _B64 = '[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0...
  _B64S = '([ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxy...
  __Pattern = '^((([ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqr...
  __Lexical_re = re.compile(r'^((([ABCDEFGHIJKLMNOPQRSTUVWXYZabc...
  __ValidateLength = None
hash(x)
  _CF_enumeration = <pyxb.binding.facets.CF_enumeration object>
  _CF_length = <pyxb.binding.facets.CF_length object>
  _CF_maxLength = <pyxb.binding.facets.CF_maxLength object>
  _CF_minLength = <pyxb.binding.facets.CF_minLength object>
  _CF_pattern = <pyxb.binding.facets.CF_pattern object>
  _CF_whiteSpace = <pyxb.binding.facets.CF_whiteSpace object>
  __SimpleTypeDefinition = <pyxb.xmlschema.structures.SimpleType...
  _httpwww_w3_org2001XMLSchema_base64Binary_FacetMap = {<class '...

Inherited from basis.simpleTypeDefinition (private): _ReservedSymbols

Inherited from basis._TypeBinding_mixin: _validationConfig_

Properties [hide private]

Inherited from basis._TypeBinding_mixin (private): _validationConfig

Inherited from object: __class__

Method Details [hide private]

XsdValidateLength(cls, length)
Class Method

source code 

Control the maximum encoded size that is checked for XML literal validity.

Python's base64 module allows some literals that are invalid according to XML rules. PyXB verifies the validity using a regular expression, which is costly for something that is unlikely to occur. Use this function to inhibit checks for validity based on the length of the XML literal.

Parameters:
  • length - None (default) to check all literals, otherwise the maximum length literal that will be checked. Pass -1 to disable the validity check.
Returns:
the previous validation length

_ConvertArguments_vx(cls, args, kw)
Class Method

source code 
Overrides: basis.simpleTypeDefinition._ConvertArguments_vx

XsdLiteral(cls, value)
Class Method

source code 

Convert from a python value to a string usable in an XML document.

This should be implemented in the subclass.

Overrides: basis.simpleTypeDefinition.XsdLiteral
(inherited documentation)

XsdValueLength(cls, value)
Class Method

source code 

Return the length of the given value.

The length is calculated by a subclass implementation of _XsdValueLength_vx in accordance with http://www.w3.org/TR/xmlschema-2/#rf-length.

The return value is a non-negative integer, or None if length constraints should be considered trivially satisfied (as with QName and NOTATION).

Raises:
  • pyxb.LogicError - the provided value is not an instance of cls.
  • pyxb.LogicError - an attempt is made to calculate a length for an instance of a type that does not support length calculations.
Overrides: basis.simpleTypeDefinition.XsdValueLength
(inherited documentation)

Class Variable Details [hide private]

_B64

Value:
'[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/]'

_B64S

Value:
'([ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/] ?\
)'

__Pattern

Value:
'^((([ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\
] ?){4})*((([ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234\
56789+/] ?){3}[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012\
3456789+/])|(([ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012\
3456789+/] ?){2}([AEIMQUYcgkosw048] ?)=)|(([ABCDEFGHIJKLMNOPQRSTUVWXYZ\
abcdefghijklmnopqrstuvwxyz0123456789+/] ?)([AQgw] ?)= ?=)))?$'

__Lexical_re

Value:
re.compile(r'^((([ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
0123456789\+/] ?){4})*((([ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqr\
stuvwxyz0123456789\+/] ?){3}[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmno\
pqrstuvwxyz0123456789\+/])|(([ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmn\
opqrstuvwxyz0123456789\+/] ?){2}([AEIMQUYcgkosw048] ?)=)|(([ABCDEFGHIJ\
KLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\+/] ?)([AQgw] ?)=\
 ?=)))?$')

__SimpleTypeDefinition

Value:
<pyxb.xmlschema.structures.SimpleTypeDefinition object>

_httpwww_w3_org2001XMLSchema_base64Binary_FacetMap

Value:
{<class 'pyxb.binding.facets.CF_length'>: <pyxb.binding.facets.CF_leng\
th object>,
 <class 'pyxb.binding.facets.CF_minLength'>: <pyxb.binding.facets.CF_m\
inLength object>,
 <class 'pyxb.binding.facets.CF_maxLength'>: <pyxb.binding.facets.CF_m\
axLength object>,
 <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pat\
tern object>,
...