pyxb.binding package¶
Submodules¶
pyxb.binding.basis module¶
This module contains support classes from which schema-specific bindings inherit, and that describe the content models of those schema.
-
class
pyxb.binding.basis.
ElementContent
(value, element_declaration=None, instance=None, tag=None)¶ Bases:
pyxb.binding.basis._Content
Marking wrapper for element content.
The value should be translated into XML and made a child of its parent.
-
_ElementContent__elementDeclaration
= None¶
-
_ElementContent__getElementDeclaration
()¶ The L{pyxb.binding.content.ElementDeclaration} associated with the element content. This may be C{None} if the value is a wildcard.
-
elementDeclaration
¶ The L{pyxb.binding.content.ElementDeclaration} associated with the element content. This may be C{None} if the value is a wildcard.
-
-
class
pyxb.binding.basis.
NonElementContent
(value)¶ Bases:
pyxb.binding.basis._Content
Marking wrapper for non-element content.
The value will be unicode text, and should be appended as character data.
-
class
pyxb.binding.basis.
STD_list
(*args, **kw)¶ Bases:
pyxb.binding.basis.simpleTypeDefinition
,list
Base class for collection datatypes.
This class descends from the Python list type, and incorporates simpleTypeDefinition. Subclasses must define a class variable _ItemType which is a reference to the class of which members must be instances.
-
classmethod
XsdLiteral
(value)¶ Convert from a binding value to a string usable in an XML document.
-
classmethod
_ConvertArguments_vx
(args, kw)¶
-
_ItemType
= None¶ A reference to the binding class for items within this list.
-
classmethod
_STD_list__ConvertOne
(v)¶
-
_STD_list__FacetMap
= {}¶
-
_STD_list__convertMany
(values)¶
-
classmethod
_ValidatedItem
(value, kw=None)¶ Verify that the given value is permitted as an item of this list.
This may convert the value to the proper type, if it is compatible but not an instance of the item type. Returns the value that should be used as the item, or raises an exception if the value cannot be converted.
@param kw: optional dictionary of standard constructor keywords used when exceptions must be built. In particular, C{_location} may be useful.
-
classmethod
_XsdValueLength_vx
(value)¶
-
classmethod
_description
(name_only=False, user_documentation=True)¶
-
append
(x)¶
-
count
(x)¶
-
extend
(x, _from_xml=False)¶
-
index
(x, *args)¶
-
insert
(i, x)¶
-
remove
(x)¶
-
classmethod
-
class
pyxb.binding.basis.
STD_union
(*args, **kw)¶ Bases:
pyxb.binding.basis.simpleTypeDefinition
Base class for union datatypes.
This class descends only from simpleTypeDefinition. A pyxb.LogicError is raised if an attempt is made to construct an instance of a subclass of STD_union. Values consistent with the member types are constructed using the Factory class method. Values are validated using the _ValidatedMember class method.
Subclasses must provide a class variable _MemberTypes which is a tuple of legal members of the union.
-
classmethod
Factory
(*args, **kw)¶ Given a value, attempt to create an instance of some member of this union. The first instance which can be legally created is returned.
@keyword _validate_constraints: If C{True} (default if validation is enabled), any constructed value is checked against constraints applied to the union as well as the member type.
@raise pyxb.SimpleTypeValueError: no member type will permit creation of an instance from the parameters in C{args} and C{kw}.
-
classmethod
XsdLiteral
(value)¶ Convert from a binding value to a string usable in an XML document.
-
_MemberTypes
= None¶ A list of classes which are permitted as values of the union.
-
_STD_union__FacetMap
= {}¶
-
classmethod
_ValidatedMember
(value)¶ Validate the given value as a potential union member.
@raise pyxb.SimpleTypeValueError: the value is not an instance of a member type.
-
classmethod
_description
(name_only=False, user_documentation=True)¶
-
classmethod
-
class
pyxb.binding.basis.
_Content
(value)¶ Bases:
object
Base for any wrapper added to L{complexTypeDefinition.orderedContent}.
-
classmethod
ContentIterator
(input)¶ Return an iterator that filters and maps a sequence of L{_Content} instances.
The returned iterator will filter out sequence members that are not instances of the class from which the iterator was created. Further, only the L{value} field of the sequence member is returned.
Thus the catenated text of the non-element content of an instance can be obtained with:
text = six.u('').join(NonElementContent.ContentIterator(instance.orderedContent()))
See also L{pyxb.NonElementContent}
-
_Content__getValue
()¶ The value of the content.
This is a unicode string for L{NonElementContent}, and (ideally) an instance of L{_TypeBinding_mixin} for L{ElementContent}.
-
_Content__value
= None¶
-
value
¶ The value of the content.
This is a unicode string for L{NonElementContent}, and (ideally) an instance of L{_TypeBinding_mixin} for L{ElementContent}.
-
classmethod
-
class
pyxb.binding.basis.
_DynamicCreate_mixin
(*args, **kw)¶ Bases:
pyxb.cscRoot
Helper to allow overriding the implementation class.
Generally we’ll want to augment the generated bindings by subclassing them, and adding functionality to the subclass. This mix-in provides a way to communicate the existence of the superseding subclass back to the binding infrastructure, so that when it creates an instance it uses the subclass rather than the unaugmented binding class.
When a raw generated binding is subclassed, L{_SetSupersedingClass} should be invoked on the raw class passing in the superseding subclass. E.g.:
class mywsdl (raw.wsdl): pass raw.wsdl._SetSupersedingClass(mywsdl)
-
classmethod
_AlternativeConstructor
()¶ Return the class stored in the class reference attribute.
-
classmethod
_DynamicCreate
(*args, **kw)¶ Invoke the constructor for this class or the one that supersedes it.
-
classmethod
_DynamicCreate_mixin__AlternativeConstructorAttribute
()¶
-
classmethod
_DynamicCreate_mixin__SupersedingClassAttribute
()¶
-
classmethod
_SetAlternativeConstructor
(alternative_constructor)¶
-
classmethod
_SetSupersedingClass
(superseding)¶ Set the class reference attribute.
@param superseding: A Python class that is a subclass of this class.
-
classmethod
_SupersedingClass
()¶ Return the class stored in the class reference attribute.
-
classmethod
-
class
pyxb.binding.basis.
_NoNullaryNonNillableNew_mixin
(*args, **kw)¶ Bases:
pyxb.cscRoot
Marker class indicating that a simple data type cannot construct a value from XML through an empty string.
This class should appear immediately L{simpleTypeDefinition} (or whatever inherits from L{simpleTypeDefinition} in cases where it applies.
-
class
pyxb.binding.basis.
_RepresentAsXsdLiteral_mixin
(*args, **kw)¶ Bases:
pyxb.cscRoot
Marker class for data types using XSD literal string as pythonLiteral.
This is necessary for any simple data type where Python repr() produces a constructor call involving a class that may not be available by that name; e.g. duration, decimal, and any of the date/time types.
-
class
pyxb.binding.basis.
_TypeBinding_mixin
(*args, **kw)¶ Bases:
pyxb.utils.utility.Locatable_mixin
-
classmethod
Factory
(*args, **kw)¶ Provide a common mechanism to create new instances of this type.
The class constructor won’t do, because you can’t create instances of union types.
This method may be overridden in subclasses (like STD_union). Pre- and post-creation actions can be customized on a per-class instance by overriding the L{_PreFactory_vx} and L{_postFactory_vx} methods.
@keyword _dom_node: If provided, the value must be a DOM node, the content of which will be used to set the value of the instance.
@keyword _location: An optional instance of L{pyxb.utils.utility.Location} showing the origin the binding. If C{None}, a value from C{_dom_node} is used if available.
@keyword _from_xml: If C{True}, the input must be either a DOM node or a unicode string comprising a lexical representation of a value. This is a further control on C{_apply_whitespace_facet} and arises from cases where the lexical and value representations cannot be distinguished by type. The default value is C{True} iff C{_dom_node} is not C{None}.
@keyword _apply_whitespace_facet: If C{True} and this is a simpleTypeDefinition with a whiteSpace facet, the first argument will be normalized in accordance with that facet prior to invoking the parent constructor. The value is always C{True} if text content is extracted from a C{_dom_node}, and otherwise defaults to the defaulted value of C{_from_xml}.
@keyword _validate_constraints: If C{True}, any constructed value is checked against constraints applied to the union as well as the member type.
@keyword _require_value: If C{False} (default), it is permitted to create a value without an initial value. If C{True} and no initial value was provided, causes L{pyxb.SimpleContentAbsentError} to be raised. Only applies to simpleTypeDefinition instances; this is used when creating values from DOM nodes.
-
_Abstract
= False¶
-
_AttributeMap
= {}¶ Map from expanded names to AttributeUse instances. Non-empty only in L{complexTypeDefinition} subclasses.
-
_AttributeWildcard
= None¶
-
classmethod
_CompatibleValue
(value, **kw)¶ Return a variant of the value that is compatible with this type.
Compatibility is defined relative to the type definition associated with the element. The value C{None} is always compatible. If C{value} has a Python type (e.g., C{int}) that is a superclass of the required L{_TypeBinding_mixin} class (e.g., C{xs:byte}), C{value} is used as a constructor parameter to return a new instance of the required type. Note that constraining facets are applied here if necessary (e.g., although a Python C{int} with value C{500} is type-compatible with C{xs:byte}, it is outside the value space, and compatibility will fail).
@keyword _convert_string_values: If C{True} (default) and the incoming value is a string, an attempt will be made to form a compatible value by using the string as a constructor argument to the this class. This flag is set to C{False} when testing automaton transitions.
@raise pyxb.SimpleTypeValueError: if the value is not both type-consistent and value-consistent with the element’s type.
-
_ExpandedName
= None¶ The expanded name of the component.
-
classmethod
_GetValidationConfig
()¶ The L{pyxb.ValidationConfig} instance that applies to this class.
By default this will reference L{pyxb.GlobalValidationConfig}.
-
classmethod
_IsSimpleTypeContent
()¶ Return True iff the content of this binding object is a simple type.
This is true only for descendents of simpleTypeDefinition and instances of complexTypeDefinition that have simple type content.
-
classmethod
_IsUrType
()¶ Return C{True} iff this is the ur-type.
The only ur-type is {http://www.w3.org/2001/XMLSchema}anyType. The implementation of this method is overridden for L{pyxb.binding.datatypes.anyType}.
-
classmethod
_Name
()¶ Return the best descriptive name for the type of the instance.
This is intended to be a human-readable value used in diagnostics, and is the expanded name if the type has one, or the Python type name if it does not.
-
classmethod
_PerformValidation
()¶ Determine whether the content model should be validated for this class.
In the absence of context, this returns C{True} iff both binding and document validation are in force.
@deprecated: use L{_GetValidationConfig} and check specific requirements.
-
classmethod
_PreFactory_vx
(args, kw)¶ Method invoked upon entry to the Factory method.
This method is entitled to modify the keywords array. It can also return a state value which is passed to _postFactory_vx.
-
_PyXBFactoryKeywords
= ('_dom_node', '_fallback_namespace', '_from_xml', '_apply_whitespace_facet', '_validate_constraints', '_require_value', '_nil', '_element', '_apply_attributes', '_convert_string_values', '_location')¶ Keywords that are interpreted by __new__ or __init__ in one or more classes in the PyXB type hierarchy. All these keywords must be removed before invoking base Python __init__ or __new__.
-
classmethod
_RequireXSIType
(value_type)¶
-
_ReservedSymbols
= {'property', 'Factory', 'toDOM', 'toxml', 'validateBinding'}¶
-
classmethod
_SetValidationConfig
(validation_config)¶ Set the validation configuration for this class.
-
classmethod
_TypeBinding_mixin__AttributesFromDOM
(node)¶
-
_TypeBinding_mixin__WarnedUnassociatedElement
= False¶
-
_TypeBinding_mixin__checkNilCtor
(args)¶
-
_TypeBinding_mixin__constructedWithValue
= False¶
-
_TypeBinding_mixin__element
= None¶
-
_TypeBinding_mixin__getValidationConfig
()¶ The L{pyxb.ValidationConfig} instance that applies to this instance.
By default this will reference the class value from L{_GetValidationConfig}, which defaults to L{pyxb.GlobalValidationConfig}.
-
_TypeBinding_mixin__namespaceContext
= None¶
-
_TypeBinding_mixin__xsiNil
= None¶
-
_XSDLocation
= None¶ Where the definition can be found in the originating schema.
-
_constructedWithValue
()¶
-
_diagnosticName
()¶ The best name available for this instance in diagnostics.
If the instance is associated with an element, it is the element name; otherwise it is the best name for the type of the instance per L{_Name}.
-
_element
()¶ Return a L{pyxb.binding.basis.element} associated with the binding instance.
This will return C{None} unless an element has been associated. Constructing a binding instance using the element instance will add this association.
-
_finalizeContentModel
()¶ Inform content model that all additions have been provided.
This is used to resolve any pending non-determinism when the content of an element is provided through a DOM assignment or through positional arguments in a constructor.
-
_isNil
()¶ Indicate whether this instance is U{nil <http://www.w3.org/TR/xmlschema-1/#xsi_nil>}.
The value is set by the DOM and SAX parsers when building an instance from a DOM element with U{xsi:nil <http://www.w3.org/TR/xmlschema-1/#xsi_nil>} set to C{true}.
@return: C{None} if the element used to create the instance is not U{nillable<http://www.w3.org/TR/xmlschema-1/#nillable>}. If it is nillable, returns C{True} or C{False} depending on whether the instance itself is U{nil<http://www.w3.org/TR/xmlschema-1/#xsi_nil>}.
-
_namespaceContext
()¶ Return a L{namespace context <pyxb.binding.NamespaceContext>} associated with the binding instance.
This will return C{None} unless something has provided a context to the instance. Context is provided when instances are generated by the DOM and SAX-based translators.
-
_performValidation
()¶ Determine whether the content model should be validated for this instance.
In the absence of context, this returns C{True} iff both binding and document validation are in force.
@deprecated: use L{_validationConfig} and check specific requirements.
-
_postDOMValidate
()¶
-
_postFactory_vx
(state)¶ Method invoked prior to leaving the Factory method.
This is an instance method, and is given the state that was returned by _PreFactory_vx.
-
_resetContent
(reset_elements=False)¶ Reset the content of an element value.
This is not a public method.
For simple types, this does nothing. For complex types, this clears the L{content<complexTypeDefinition.content>} array, removing all non-element content from the instance. It optionally also removes all element content.
@param reset_elements: If C{False} (default) only the content array is cleared, which has the effect of removing any preference for element order when generating a document. If C{True}, the element content stored within the binding is also cleared, leaving it with no content at all.
@note: This is not the same thing as L{complexTypeDefinition.reset}, which unconditionally resets attributes and element and non-element content.
-
_setAttributesFromKeywordsAndDOM
(kw, dom_node)¶ Invoke self._setAttribute based on node attributes and keywords.
Though attributes can only legally appear in complexTypeDefinition instances, delayed conditional validation requires caching them in simpleTypeDefinition.
@param kw: keywords passed to the constructor. This map is mutated by the call: keywords corresponding to recognized attributes are removed.
@param dom_node: an xml.dom Node instance, possibly C{None}
-
_setElement
(elt)¶ Associate an element binding with the instance.
Since the value of a binding instance reflects only its content, an associated element is necessary to generate an XML document or DOM tree.
@param elt: the L{pyxb.binding.basis.element} instance associated with the value. This may be C{None} when disassociating a value from a specific element.
-
_setIsNil
(nil=True)¶ Set the xsi:nil property of the instance.
@param nil: C{True} if the value of xsi:nil should be C{true}, C{False} if the value of xsi:nil should be C{false}.
@raise pyxb.NoNillableSupportError: the instance is not associated with an element that is L{nillable <pyxb.binding.basis.element.nillable>}.
-
_setNamespaceContext
(namespace_context)¶ Associate a L{namespace context <pyxb.binding.NamespaceContext>} with the binding instance.
-
_setValidationConfig
(validation_config)¶ Set the validation configuration for this instance.
-
_substitutesFor
(element)¶
-
_toDOM_csc
(dom_support, parent)¶
-
_validateBinding_vx
()¶ Override in subclasses for type-specific validation of instance content.
@return: C{True} if the instance validates @raise pyxb.BatchContentValidationError: complex content does not match model @raise pyxb.SimpleTypeValueError: simple content fails to satisfy constraints
-
_validationConfig
¶ The L{pyxb.ValidationConfig} instance that applies to this instance.
By default this will reference the class value from L{_GetValidationConfig}, which defaults to L{pyxb.GlobalValidationConfig}.
-
_validationConfig_
= <pyxb.ValidationConfig object>¶
-
toDOM
(bds=None, parent=None, element_name=None)¶ Convert this instance to a DOM node.
The name of the top-level element is either the name of the L{element} instance associated with this instance, or the XML name of the type of this instance.
@param bds: Support for customizing the generated document @type bds: L{pyxb.utils.domutils.BindingDOMSupport} @param parent: If C{None}, a standalone document is created; otherwise, the created element is a child of the given element. @type parent: C{xml.dom.Element} or C{None} @rtype: C{xml.dom.Document}
-
toxml
(encoding=None, bds=None, root_only=False, element_name=None)¶ Shorthand to get the object as an XML document.
If you want to set the default namespace, pass in a pre-configured C{bds}.
@param encoding: The encoding to be used. See @C{xml.dom.Node.toxml()} for a description of why you should always pass @C{‘utf-8’} here. Because this method follows the contract of the corresponding C{xml.dom.Node} method, it does not automatically get the default PyXB output encoding.
@param bds: Optional L{pyxb.utils.domutils.BindingDOMSupport} instance to use for creation. If not provided (default), a new generic one is created.
@param root_only: Set to C{True} to automatically deference the C{documentElement} of the resulting DOM node. This eliminates the XML declaration that would otherwise be generated.
@param element_name: This value is passed through to L{toDOM}, and is useful when the value has no bound element but you want to convert it to XML anyway.
-
validateBinding
()¶ Check whether the binding content matches its content model.
@return: C{True} if validation succeeds. @raise pyxb.BatchContentValidationError: complex content does not match model @raise pyxb.SimpleTypeValueError: attribute or simple content fails to satisfy constraints
-
classmethod
-
class
pyxb.binding.basis.
complexTypeDefinition
(*args, **kw)¶ Bases:
pyxb.binding.basis._TypeBinding_mixin
,pyxb.utils.utility._DeconflictSymbols_mixin
,pyxb.binding.basis._DynamicCreate_mixin
Base for any Python class that serves as the binding for an XMLSchema complexType.
Subclasses should define a class-level _AttributeMap variable which maps from the unicode tag of an attribute to the AttributeUse instance that defines it. Similarly, subclasses should define an _ElementMap variable.
-
classmethod
_AddElement
(element)¶ Method used by generated code to associate the element binding with a use in this type.
This is necessary because all complex type classes appear in the module prior to any of the element instances (which reference type classes), so the association must be formed after the element instances are available.
-
_Automaton
= None¶
-
_CT_ELEMENT_ONLY
= 'ELEMENT_ONLY'¶
-
_CT_EMPTY
= 'EMPTY'¶
-
_CT_MIXED
= 'MIXED'¶
-
_CT_SIMPLE
= 'SIMPLE'¶
-
_ContentTypeTag
= None¶
-
classmethod
_ElementBindingDeclForName
(element_name)¶ Determine what the given name means as an element in this type.
Normally, C{element_name} identifies an element definition within this type. If so, the returned C{element_decl} identifies that definition, and the C{element_binding} is extracted from that use.
It may also be that the C{element_name} does not appear as an element definition, but that it identifies a global element. In that case, the returned C{element_binding} identifies the global element. If, further, that element is a member of a substitution group which does have an element definition in this class, then the returned C{element_decl} identifies that definition.
If a non-C{None} C{element_decl} is returned, there will be an associated C{element_binding}. However, it is possible to return a non-C{None} C{element_binding}, but C{None} as the C{element_decl}. In that case, the C{element_binding} can be used to create a binding instance, but the content model will have to treat it as a wildcard.
@param element_name: The name of the element in this type, either an expanded name or a local name if the element has an absent namespace.
@return: C{( element_binding, element_decl )}
-
_ElementMap
= {}¶ Map from expanded names to ElementDeclaration instances.
-
_HasWildcardElement
= False¶
-
classmethod
_IsMixed
()¶
-
classmethod
_IsSimpleTypeContent
()¶ CTDs with simple content are simple; other CTDs are not.
-
_ReservedSymbols
= {'content', 'wildcardAttributeMap', 'property', 'wildcardElements', 'Factory', 'extend', 'toDOM', 'append', 'xsdConstraintsOK', 'toxml', 'value', 'orderedContent', 'validateBinding', 'reset'}¶
-
_TypeDefinition
= None¶ Subclass of simpleTypeDefinition that corresponds to the type content. Only valid if _ContentTypeTag is _CT_SIMPLE
-
classmethod
_UseForTag
(tag, raise_if_fail=True)¶ Return the ElementDeclaration object corresponding to the element name.
@param tag: The L{ExpandedName} of an element in the class.
-
_addContent
(wrapped_value)¶
-
_appendWildcardElement
(value)¶
-
_automatonConfiguration
()¶ For whitebox testing use only
-
_complexTypeDefinition__NeedWarnOnContent
= True¶
-
classmethod
_complexTypeDefinition__WarnOnContent
()¶
-
_complexTypeDefinition__automatonConfiguration
= None¶
-
_complexTypeDefinition__childrenForDOM
()¶ Generate a list of children in the order in which they should be added to the parent when creating a DOM representation of this object.
@note: This is only used when L{pyxb.RequireValidWhenGenerating} has disabled validation. Consequently, it may not generate valid XML.
-
_complexTypeDefinition__content
= None¶
-
_complexTypeDefinition__setContent
(value)¶
-
_complexTypeDefinition__wildcardAttributeMap
= None¶
-
_complexTypeDefinition__wildcardElements
= None¶
-
classmethod
_description
(name_only=False, user_documentation=True)¶
-
_finalizeContentModel
()¶
-
_postDOMValidate
()¶
-
_resetAutomaton
()¶
-
_resetContent
(reset_elements=False)¶
-
_setAttribute
(attr_en, value_lex)¶
-
_setDOMFromAttributes
(dom_support, element)¶ Add any appropriate attributes from this instance into the DOM element.
-
_setValue
(value)¶ Change the simple content value without affecting attributes.
-
_symbolSet
()¶ Return a map from L{content.ElementDeclaration} instances to a list of values associated with that use.
This is used as the set of symbols available for transitions when validating content against a model. Note that the original L{content.ElementUse} that may have validated the assignment of the symbol to the content is no longer available, which may result in a different order being generated by the content model. Preservation of the original order mitigates this risk.
The value C{None} is used to provide the wildcard members, if any.
If an element use has no associated values, it must not appear in the returned map.
@raise pyxb.SimpleTypeValueError: when unable to convert element content to the binding declaration type.
-
_toDOM_csc
(dom_support, parent)¶ Create a DOM element with the given tag holding the content of this instance.
-
_validateAttributes
()¶
-
_validateBinding_vx
()¶
-
_validatedChildren
()¶ Provide the child elements and non-element content in an order consistent with the content model.
Returns a sequence of tuples representing a valid path through the content model where each transition corresponds to one of the member element instances within this instance. The tuple is a pair comprising the L{content.ElementDeclaration} instance and the value for the transition.
If the content of the instance does not validate against the content model, an exception is raised.
@return: C{None} or a list as described above.
-
append
(value, **kw)¶ Add the value to the instance.
The value should be a DOM node or other value that is or can be converted to a binding instance, or a string if the instance allows mixed content. The value must be permitted by the content model.
@raise pyxb.ContentValidationError: the value is not permitted at the current state of the content model.
-
content
()¶ Legacy interface for ordered content.
This version does not accurately distinguish non-element content from element content that happens to have unicode type.
@deprecated: use L{orderedContent}.
-
extend
(value_list, _fallback_namespace=None, _from_xml=False, _location=None)¶ Invoke L{append} for each value in the list, in turn.
-
orderedContent
()¶ Return the element and non-element content of the instance in order.
This must be a complex type with complex content. The return value is a list of the element and non-element content in a preferred order.
The returned list contains L{element<ElementContent>} and L{non-element<NonElementContent>} content in the order which it was added to the instance. This may have been through parsing a document, constructing an instance using positional arguments, invoking the L{append} or L{extend} methods, or assigning directly to an instance attribute associated with an element binding.
@note: Be aware that assigning directly to an element attribute does not remove any previous value for the element from the content list.
@note: Be aware that element values directly appended to an instance attribute with list type (viz., that corresponds to an element that allows more than one occurrence) will not appear in the ordered content list.
The order in the list may influence the generation of documents depending on L{pyxb.ValidationConfig} values that apply to an instance. Non-element content is emitted immediately prior to the following element in this list. Any trailing non-element content is emitted after the last element in the content. The list should include all element content. Element content in this list that is not present within an element member of the binding instance may result in an error, or may be ignored.
@note: The returned value is mutable, allowing the caller to change the order to be used.
@raise pyxb.NotComplexContentError: this is not a complex type with mixed or element-only content
-
reset
()¶ Reset the instance.
This resets all element and attribute fields, and discards any recorded content. It resets the content model automaton to its initial state.
@see: Manipulate the return value of L{orderedContent} if your intent is to influence the generation of documents from the binding instance without changing its (element) content.
-
value
()¶ Return the value of the element.
This must be a complex type with simple content. The returned value is expected to be an instance of some L{simpleTypeDefinition} class.
@raise pyxb.NotSimpleContentError: this is not a complex type with simple content
-
wildcardAttributeMap
()¶ Obtain access to wildcard attributes.
The return value is C{None} if this type does not support wildcard attributes. If wildcard attributes are allowed, the return value is a map from QNames to the unicode string value of the corresponding attribute.
@todo: The map keys should be namespace extended names rather than QNames, as the in-scope namespace may not be readily available to the user.
-
wildcardElements
()¶ Obtain access to wildcard elements.
The return value is C{None} if the content model for this type does not support wildcard elements. If wildcard elements are allowed, the return value is a list of values corresponding to conformant unrecognized elements, in the order in which they were encountered. If the containing binding was created from an XML document and enough information was present to determine the binding of the member element, the value is a binding instance. Otherwise, the value is the original DOM Element node.
-
xsdConstraintsOK
(location=None)¶ Validate the content against the simple type.
@return: C{True} if the content validates against its type. @raise pyxb.NotSimpleContentError: this type does not have simple content. @raise pyxb.SimpleContentAbsentError: the content of this type has not been set
-
classmethod
-
class
pyxb.binding.basis.
element
(name, type_definition, scope=None, nillable=False, abstract=False, unicode_default=None, fixed=False, substitution_group=None, documentation=None, location=None)¶ Bases:
pyxb.utils.utility._DeconflictSymbols_mixin
,pyxb.binding.basis._DynamicCreate_mixin
Class that represents a schema element within a binding.
This gets a little confusing. Within a schema, the L{pyxb.xmlschema.structures.ElementDeclaration} type represents an U{element declaration<http://www.w3.org/TR/xmlschema-1/#cElement_Declarations>}. Those declarations may be global (have a name that is visible in the namespace), or local (have a name that is visible only within a complex type definition). Further, local (but not global) declarations may have a reference to a global declaration (which might be in a different namespace).
Within a PyXB binding, the element declarations from the original complex type definition that have the same U{QName<http://www.w3.org/TR/1999/REC-xml-names-19990114/#dt-qname>} (after deconflicting the U{LocalPart<http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-LocalPart>}) are associated with an attribute in the class for the complex type. Each of these attributes is defined via a L{pyxb.binding.content.ElementDeclaration} which provides the mechanism by which the binding holds values associated with that element.
Furthermore, in the FAC-based content model each schema element declaration is associated with an L{ElementUse<pyxb.binding.content.ElementUse>} instance to locate the point in the schema where content came from. Instances that refer to the same schema element declaration share the same underlying L{pyxb.binding.content.ElementDeclaration}.
This element isn’t any of those elements. This element is the type used for an attribute which associates the name of a element with data required to represent it, all within a particular scope (a module for global scope, the binding class for a complex type definition for local scope). From the perspective of a PyXB user they look almost like a class, in that you can call them to create instances of the underlying complex type.
Global and local elements are represented by instances of this class.
-
classmethod
AnyCreateFromDOM
(node, fallback_namespace)¶ Create an instance of an element from a DOM node.
This method does minimal processing of C{node} and delegates to L{CreateDOMBinding}.
@param node: An C{xml.dom.Node} representing a root element. If the node is a document, that document’s root node will be substituted. The name of the node is extracted as the name of the element to be created, and the node and the name are passed to L{CreateDOMBinding}.
@param fallback_namespace: The value to pass as C{_fallback_namespace} to L{CreateDOMBinding}
@return: As with L{CreateDOMBinding}
-
classmethod
CreateDOMBinding
(node, element_binding, **kw)¶ Create a binding from a DOM node.
@param node: The DOM node
@param element_binding: An instance of L{element} that would normally be used to determine the type of the binding. The actual type of object returned is determined by the type definition associated with the C{element_binding} and the value of any U{xsi:type <http://www.w3.org/TR/xmlschema-1/#xsi_type>} attribute found in C{node}, modulated by L{XSI._InterpretTypeAttribute<pyxb.namespace.builtin._XMLSchema_instance._InterpretTypeAttribute>}.
@keyword _fallback_namespace: The namespace to use as the namespace for the node, if the node name is unqualified. This should be an absent namespace.
@return: A binding for the DOM node.
@raises pyxb.UnrecognizedDOMRootNodeError: if no underlying element or type for the node can be identified.
-
_createFromDOM
(node, expanded_name, **kw)¶ Create an instance from a DOM node given the name of an element.
This method does minimal processing of C{node} and C{expanded_name} and delegates to L{CreateDOMBinding}.
@param node: An C{xml.dom.Node} representing a root element. If the node is a document, that document’s root node will be substituted. The value is passed to L{CreateDOMBinding}.
@param expanded_name: The expanded name of the element to be used for content. This is passed to L{elementForName} to obtain the binding that is passed to L{CreateDOMBinding}, superseding any identification that might be inferred from C{node}. If no name is available, use L{createFromDOM}.
@note: Keyword parameters are passed to L{CreateDOMBinding}.
@return: As with L{CreateDOMBinding}.
-
_description
(name_only=False, user_documentation=True)¶
-
_element__abstract
= False¶
-
_element__defaultValue
= None¶
-
_element__documentation
= None¶
-
_element__fixed
= False¶
-
_element__name
= None¶
-
_element__nillable
= False¶
-
_element__scope
= None¶
-
_element__substitutionGroup
= None¶
-
_element__typeDefinition
= None¶
-
_element__xsdLocation
= None¶
-
_real_substitutesFor
(other)¶ Determine whether an instance of this element can substitute for the other element.
See U{Substitution Group OK<http://www.w3.org/TR/xmlschema-1/#cos-equiv-derived-ok-rec>}.
@todo: Do something about blocking constraints. This ignores them, as does everything leading to this point.
-
_setSubstitutionGroup
(substitution_group)¶
-
abstract
()¶ Indicate whether this element is abstract (must use substitution group members for matches).
-
compatibleValue
(value, **kw)¶ Return a variant of the value that is compatible with this element.
This mostly defers to L{_TypeBinding_mixin._CompatibleValue}.
@raise pyxb.SimpleTypeValueError: if the value is not both type-consistent and value-consistent with the element’s type.
-
createFromDOM
(node, fallback_namespace=None, **kw)¶ Create an instance of this element using a DOM node as the source of its content.
This method does minimal processing of C{node} and delegates to L{_createFromDOM}.
@param node: An C{xml.dom.Node} representing a root element. If the node is a document, that document’s root node will be substituted. The name of the node is extracted as the name of the element to be created, and the node and the name are passed to L{_createFromDOM}
@keyword fallback_namespace: Used as default for C{_fallback_namespace} in call to L{_createFromDOM}
@note: Keyword parameters are passed to L{CreateDOMBinding}.
@return: As with L{_createFromDOM}
-
defaultValue
()¶ The default value of the element.
C{None} if the element has no default value.
@note: A non-C{None} value is always an instance of a simple type, even if the element has complex content.
-
documentation
()¶ Contents of any documentation annotation in the definition.
-
elementForName
(name)¶ Return the element that should be used if this element binding is permitted and an element with the given name is encountered.
Normally, the incoming name matches the name of this binding, and C{self} is returned. If the incoming name is different, it is expected to be the name of a global element which is within this element’s substitution group. In that case, the binding corresponding to the named element is return.
@return: An instance of L{element}, or C{None} if no element with the given name can be found.
-
findSubstituendDecl
(ctd_class)¶
-
fixed
()¶ C{True} if the element content cannot be changed
-
memberElement
(name)¶ Return a reference to the element instance used for the given name within this element.
The type for this element must be a complex type definition.
-
name
()¶ The expanded name of the element within its scope.
-
nillable
()¶ Indicate whether values matching this element can have U{nil <http://www.w3.org/TR/xmlschema-1/#xsi_nil>} set.
-
scope
()¶ The scope of the element. This is either C{None}, representing a top-level element, or an instance of C{complexTypeDefinition} for local elements.
-
substitutesFor
(other)¶ Stub replaced by _real_substitutesFor when element supports substitution groups.
-
substitutionGroup
()¶ The L{element} instance to whose substitution group this element belongs. C{None} if this element is not part of a substitution group.
-
typeDefinition
()¶ The L{_TypeBinding_mixin} subclass for values of this element.
-
xsdLocation
()¶ The L{pyxb.utils.utility.Location} where the element appears in the schema.
-
classmethod
-
class
pyxb.binding.basis.
enumeration_mixin
(*args, **kw)¶ Bases:
pyxb.cscRoot
Marker in case we need to know that a PST has an enumeration constraint facet.
-
_ReservedSymbols
= {'items', 'iteritems', 'itervalues', 'values'}¶
-
classmethod
_elementForValue
(value)¶ Return the L{_EnumerationElement} instance that has the given value.
@raise KeyError: the value is not valid for the enumeration.
-
classmethod
_valueForUnicode
(ustr)¶ Return the enumeration value corresponding to the given unicode string.
If ustr is not a valid option for this enumeration, return None.
-
classmethod
items
()¶ Return the associated L{pyxb.binding.facet._EnumerationElement} instances.
-
classmethod
iteritems
()¶ Generate the associated L{pyxb.binding.facet._EnumerationElement} instances.
-
classmethod
itervalues
()¶ Return a generator for the values that the enumeration can take.
-
classmethod
values
()¶ Return a list of values that the enumeration can take.
-
-
class
pyxb.binding.basis.
simpleTypeDefinition
(*args, **kw)¶ Bases:
pyxb.binding.basis._TypeBinding_mixin
,pyxb.utils.utility._DeconflictSymbols_mixin
,pyxb.binding.basis._DynamicCreate_mixin
L{simpleTypeDefinition} is a base class that is part of the hierarchy of any class that represents the Python datatype for a L{SimpleTypeDefinition<pyxb.xmlschema.structures.SimpleTypeDefinition>}.
@note: This class, or a descendent of it, must be the first class in the method resolution order when a subclass has multiple parents. Otherwise, constructor keyword arguments may not be removed before passing them on to Python classes that do not accept them.
-
classmethod
PythonLiteral
(value)¶ Return a string which can be embedded into Python source to represent the given value as an instance of this class.
-
classmethod
SimpleTypeDefinition
()¶ Return the SimpleTypeDefinition instance for the given class.
This should only be invoked when generating bindings. An STD must have been associated with the class using L{_SimpleTypeDefinition}.
-
classmethod
XsdConstraintsOK
(value, location=None)¶ Validate the given value against the constraints on this class.
@raise pyxb.SimpleTypeValueError: if any constraint is violated.
-
classmethod
XsdLiteral
(value)¶ Convert from a python value to a string usable in an XML document.
This should be implemented in the subclass.
-
classmethod
XsdSuperType
()¶ Find the nearest parent class in the PST hierarchy.
The value for anySimpleType is None; for all others, it’s a primitive or derived PST descendent (including anySimpleType).
-
classmethod
XsdValueLength
(value)¶ 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 C{None} if length constraints should be considered trivially satisfied (as with QName and NOTATION).
@raise pyxb.LogicError: the provided value is not an instance of cls. @raise pyxb.LogicError: an attempt is made to calculate a length for an instance of a type that does not support length calculations.
-
classmethod
_CheckValidValue
(value)¶ NB: Invoking this on a value that is a list will, if necessary, replace the members of the list with new values that are of the correct item type. This is permitted because only with lists is it possible to bypass the normal content validation (by invoking append/extend on the list instance).
-
classmethod
_ConvertArguments
(args, kw)¶ Pre-process the arguments.
This is used before invoking the parent constructor. One application is to apply the whitespace facet processing; if such a request is in the keywords, it is removed so it does not propagate to the superclass. Another application is to convert the arguments from a string to a list. Binding-specific applications are performed in the overloaded L{_ConvertArguments_vx} method.
-
classmethod
_ConvertArguments_vx
(args, kw)¶
-
classmethod
_FacetMap
()¶ Return a reference to the facet map for this datatype.
The facet map is a map from leaf facet classes to instances of those classes that constrain or otherwise apply to the lexical or value space of the datatype. Classes may inherit their facet map from their superclass, or may create a new class instance if the class adds a new constraint type.
@raise AttributeError: if the facet map has not been defined
-
classmethod
_InitializeFacetMap
(*args)¶ Initialize the facet map for this datatype.
This must be called exactly once, after all facets belonging to the datatype have been created.
@raise pyxb.LogicError: if called multiple times (on the same class) @raise pyxb.LogicError: if called when a parent class facet map has not been initialized :return: the facet map
-
classmethod
_IsSimpleTypeContent
()¶ STDs have simple type content.
-
classmethod
_IsValidValue
(value)¶
-
_ReservedSymbols
= {'XsdSuperType', 'SimpleTypeDefinition', 'xsdLiteral', 'property', 'XsdLiteral', 'XsdConstraintsOK', 'toDOM', 'validateBinding', 'pythonLiteral', 'XsdPythonType', 'xsdValueLength', 'Factory', 'xsdConstraintsOK', 'XsdValueLength', 'toxml', 'PythonLiteral'}¶ Symbols that remain the responsibility of this class. Any public symbols in generated binding subclasses are deconflicted by providing an alternative name in the subclass. (There currently are no public symbols in generated SimpleTypeDefinion bindings.
-
classmethod
_SimpleTypeDefinition
(std)¶ Set the L{pyxb.xmlschema.structures.SimpleTypeDefinition} instance associated with this binding.
-
classmethod
_XsdConstraintsPreCheck_vb
(value)¶ Pre-extended class method to verify other things before checking constraints.
This is used for list types, to verify that the values in the list are acceptable, and for token descendents, to check the lexical/value space conformance of the input.
-
_checkValidValue
()¶
-
classmethod
_description
(name_only=False, user_documentation=True)¶
-
_isValidValue
()¶
-
_setAttribute
(attr_en, value_lex)¶
-
_simpleTypeDefinition__ClassFacetSequence
= {}¶
-
_simpleTypeDefinition__FacetMap
= {}¶
-
classmethod
_simpleTypeDefinition__FacetMapAttributeName
()¶
-
_simpleTypeDefinition__FacetMapAttributeNameMap
= {<class 'pyxb.binding.facets._WhiteSpace_enum'>: '_httpwww_w3_org2001XMLSchema__WhiteSpace_enum_FacetMap', <class 'pyxb.binding.datatypes.NMTOKEN'>: '_httpwww_w3_org2001XMLSchema_NMTOKEN_FacetMap', <class 'pyxb.binding.datatypes.token'>: '_httpwww_w3_org2001XMLSchema_token_FacetMap', <class 'pyxb.binding.datatypes.normalizedString'>: '_httpwww_w3_org2001XMLSchema_normalizedString_FacetMap', <class 'pyxb.binding.datatypes.string'>: '_httpwww_w3_org2001XMLSchema_string_FacetMap', <class 'pyxb.binding.datatypes.anySimpleType'>: '_httpwww_w3_org2001XMLSchema_anySimpleType_FacetMap', <class 'pyxb.binding.basis.simpleTypeDefinition'>: '_simpleTypeDefinition__FacetMap', <class 'pyxb.binding.datatypes.integer'>: '_httpwww_w3_org2001XMLSchema_integer_FacetMap', <class 'pyxb.binding.datatypes.nonNegativeInteger'>: '_httpwww_w3_org2001XMLSchema_nonNegativeInteger_FacetMap', <class 'pyxb.binding.datatypes.ENTITIES'>: '_httpwww_w3_org2001XMLSchema_ENTITIES_FacetMap', <class 'pyxb.binding.basis.STD_list'>: '_STD_list_FacetMap', <class 'pyxb.binding.datatypes.ENTITY'>: '_httpwww_w3_org2001XMLSchema_ENTITY_FacetMap', <class 'pyxb.binding.datatypes.NCName'>: '_httpwww_w3_org2001XMLSchema_NCName_FacetMap', <class 'pyxb.binding.datatypes.Name'>: '_httpwww_w3_org2001XMLSchema_Name_FacetMap', <class 'pyxb.binding.datatypes.ID'>: '_httpwww_w3_org2001XMLSchema_ID_FacetMap', <class 'pyxb.binding.datatypes.IDREF'>: '_httpwww_w3_org2001XMLSchema_IDREF_FacetMap', <class 'pyxb.binding.datatypes.IDREFS'>: '_httpwww_w3_org2001XMLSchema_IDREFS_FacetMap', <class 'pyxb.binding.datatypes.NMTOKENS'>: '_NMTOKENS_FacetMap', <class 'pyxb.binding.datatypes.NOTATION'>: '_httpwww_w3_org2001XMLSchema_NOTATION_FacetMap', <class 'pyxb.binding.datatypes.QName'>: '_httpwww_w3_org2001XMLSchema_QName_FacetMap', <class 'pyxb.binding.datatypes.anyURI'>: '_httpwww_w3_org2001XMLSchema_anyURI_FacetMap', <class 'pyxb.binding.datatypes.base64Binary'>: '_httpwww_w3_org2001XMLSchema_base64Binary_FacetMap', <class 'pyxb.binding.datatypes.boolean'>: '_httpwww_w3_org2001XMLSchema_boolean_FacetMap', <class 'pyxb.binding.datatypes.int'>: '_httpwww_w3_org2001XMLSchema_int_FacetMap', <class 'pyxb.binding.datatypes.short'>: '_httpwww_w3_org2001XMLSchema_short_FacetMap', <class 'pyxb.binding.datatypes.byte'>: '_httpwww_w3_org2001XMLSchema_byte_FacetMap', <class 'pyxb.binding.datatypes.long'>: '_httpwww_w3_org2001XMLSchema_long_FacetMap', <class 'pyxb.binding.datatypes.decimal'>: '_httpwww_w3_org2001XMLSchema_decimal_FacetMap', <class 'pyxb.binding.datatypes.date'>: '_httpwww_w3_org2001XMLSchema_date_FacetMap', <class 'pyxb.binding.datatypes._PyXBDateOnly_base'>: '_PyXBDateOnly_base_FacetMap', <class 'pyxb.binding.datatypes._PyXBDateTime_base'>: '_PyXBDateTime_base_FacetMap', <class 'pyxb.binding.datatypes.dateTime'>: '_httpwww_w3_org2001XMLSchema_dateTime_FacetMap', <class 'pyxb.binding.datatypes.double'>: '_httpwww_w3_org2001XMLSchema_double_FacetMap', <class 'pyxb.binding.datatypes._fp'>: '_fp_FacetMap', <class 'pyxb.binding.datatypes.duration'>: '_httpwww_w3_org2001XMLSchema_duration_FacetMap', <class 'pyxb.binding.datatypes.float'>: '_httpwww_w3_org2001XMLSchema_float_FacetMap', <class 'pyxb.binding.datatypes.gDay'>: '_httpwww_w3_org2001XMLSchema_gDay_FacetMap', <class 'pyxb.binding.datatypes.gMonth'>: '_httpwww_w3_org2001XMLSchema_gMonth_FacetMap', <class 'pyxb.binding.datatypes.gMonthDay'>: '_httpwww_w3_org2001XMLSchema_gMonthDay_FacetMap', <class 'pyxb.binding.datatypes.gYear'>: '_httpwww_w3_org2001XMLSchema_gYear_FacetMap', <class 'pyxb.binding.datatypes.gYearMonth'>: '_httpwww_w3_org2001XMLSchema_gYearMonth_FacetMap', <class 'pyxb.binding.datatypes.hexBinary'>: '_httpwww_w3_org2001XMLSchema_hexBinary_FacetMap', <class 'pyxb.binding.datatypes.language'>: '_httpwww_w3_org2001XMLSchema_language_FacetMap', <class 'pyxb.binding.datatypes.nonPositiveInteger'>: '_httpwww_w3_org2001XMLSchema_nonPositiveInteger_FacetMap', <class 'pyxb.binding.datatypes.negativeInteger'>: '_httpwww_w3_org2001XMLSchema_negativeInteger_FacetMap', <class 'pyxb.binding.datatypes.positiveInteger'>: '_httpwww_w3_org2001XMLSchema_positiveInteger_FacetMap', <class 'pyxb.binding.datatypes.time'>: '_httpwww_w3_org2001XMLSchema_time_FacetMap', <class 'pyxb.binding.datatypes.unsignedLong'>: '_httpwww_w3_org2001XMLSchema_unsignedLong_FacetMap', <class 'pyxb.binding.datatypes.unsignedInt'>: '_httpwww_w3_org2001XMLSchema_unsignedInt_FacetMap', <class 'pyxb.binding.datatypes.unsignedShort'>: '_httpwww_w3_org2001XMLSchema_unsignedShort_FacetMap', <class 'pyxb.binding.datatypes.unsignedByte'>: '_httpwww_w3_org2001XMLSchema_unsignedByte_FacetMap'}¶
-
classmethod
_simpleTypeDefinition__STDAttrName
()¶
-
_toDOM_csc
(dom_support, parent)¶
-
_validateBinding_vx
()¶
-
pythonLiteral
()¶ Return a string which can be embedded into Python source to represent the value of this instance.
-
xsdConstraintsOK
(location=None)¶ Validate the value of this instance against its constraints.
-
xsdLiteral
()¶ Return text suitable for representing the value of this instance in an XML document.
The base class implementation delegates to the object class’s XsdLiteral method.
-
xsdValueLength
()¶ Return the length of this instance within its value space.
See XsdValueLength.
-
classmethod
pyxb.binding.content module¶
Helper classes that maintain the content model of XMLSchema in the binding classes.
L{AttributeUse} and L{ElementDeclaration} record information associated with a binding class, for example the types of values, the original XML QName or NCName, and the Python field in which the values are stored. They also provide the low-level interface to set and get the corresponding values in a binding instance.
L{Wildcard} holds content-related information used in the content model.
-
class
pyxb.binding.content.
AttributeUse
(name, id, key, data_type, unicode_default=None, fixed=False, required=False, prohibited=False)¶ Bases:
pyxb.cscRoot
A helper class that encapsulates everything we need to know about the way an attribute is used within a binding class.
Attributes are stored internally as pairs C{(provided, value)}, where C{provided} is a boolean indicating whether a value for the attribute was provided externally, and C{value} is an instance of the attribute datatype. The C{provided} flag is used to determine whether an XML attribute should be added to a created DOM node when generating the XML corresponding to a binding instance.
-
_AttributeUse__dataType
= None¶
-
_AttributeUse__defaultValue
= None¶
-
_AttributeUse__fixed
= False¶
-
_AttributeUse__getProvided
(ctd_instance)¶
-
_AttributeUse__getValue
(ctd_instance)¶ Retrieve the value information for this attribute in a binding instance.
@param ctd_instance: The instance object from which the attribute is to be retrieved. @type ctd_instance: subclass of L{pyxb.binding.basis.complexTypeDefinition} @return: C{(provided, value)} where C{provided} is a C{bool} and C{value} is C{None} or an instance of the attribute’s datatype.
-
_AttributeUse__id
= None¶
-
_AttributeUse__key
= None¶
-
_AttributeUse__name
= None¶
-
_AttributeUse__prohibited
= False¶
-
_AttributeUse__required
= False¶
-
_AttributeUse__setValue
(ctd_instance, new_value, provided)¶
-
_AttributeUse__unicodeDefault
= None¶
-
__dataType
= None¶ The L{pyxb.binding.basis.simpleTypeDefinition} for values of the attribute
-
__defaultValue
= None¶ The default value as an instance of L{__dataType}, or C{None}
-
__fixed
= None¶ C{True} if the attribute value cannot be changed
-
__id
= None¶ Identifier used for this attribute within the owning class
-
__key
= None¶ Private Python attribute used in instances to hold the attribute value
-
__name
= None¶ ExpandedName of the attribute
-
__prohibited
= None¶ C{True} if the attribute must not appear in any instance of the type
-
__required
= None¶ C{True} if the attribute must appear in every instance of the type
-
__unicodeDefault
= None¶ The default attribute value as a unicode string, or C{None}
-
_description
(name_only=False, user_documentation=True)¶
-
addDOMAttribute
(dom_support, ctd_instance, element)¶ If this attribute as been set, add the corresponding attribute to the DOM element.
-
dataType
()¶ The subclass of L{pyxb.binding.basis.simpleTypeDefinition} of which any attribute value must be an instance.
-
defaultValue
()¶ The default value of the attribute.
-
fixed
()¶ C{True} iff the value of the attribute cannot be changed.
-
id
()¶ Tag used within Python code for the attribute.
This is not used directly in the default code generation template.
-
key
()¶ String used as key within object dictionary when storing attribute value.
-
name
()¶ The expanded name of the element.
@rtype: L{pyxb.namespace.ExpandedName}
-
prohibited
()¶ C{True} iff the attribute must not be assigned a value.
-
provided
(ctd_instance)¶ C{True} iff the given instance has been explicitly given a value for the attribute.
This is used for things like only generating an XML attribute assignment when a value was originally given (even if that value happens to be the default).
-
required
()¶ C{True} iff the attribute must be assigned a value.
-
reset
(ctd_instance)¶ Set the value of the attribute in the given instance to be its default value, and mark that it has not been provided.
-
set
(ctd_instance, new_value, from_xml=False)¶ Set the value of the attribute.
This validates the value against the data type, creating a new instance if necessary.
@param ctd_instance: The binding instance for which the attribute value is to be set @type ctd_instance: subclass of L{pyxb.binding.basis.complexTypeDefinition} @param new_value: The value for the attribute @type new_value: Any value that is permitted as the input parameter to the C{Factory} method of the attribute’s datatype. @param from_xml: Value C{True} iff the new_value is known to be in lexical space and must by converted by the type factory. If C{False} (default) the value is only converted if it is not already an instance of the attribute’s underlying type.
-
validate
(ctd_instance)¶ Validate the instance against the requirements imposed by this attribute use.
There is no return value; calls raise an exception if the content does not validate.
@param ctd_instance : An instance of a complex type definition.
@raise pyxb.ProhibitedAttributeError: when instance has attribute but must not @raise pyxb.MissingAttributeError: when instance lacks attribute but must have it (including when a required fixed-value attribute is missing). @raise pyxb.BatchContentValidationError: when instance has attribute but its value is not acceptable
-
value
(ctd_instance)¶ Get the value of the attribute from the instance.
-
-
class
pyxb.binding.content.
AutomatonConfiguration
(instance)¶ Bases:
object
State for a L{pyxb.utils.fac.Automaton} monitoring content for an incrementally constructed complex type binding instance.
@warning: This is not an implementation of L{pyxb.utils.fac.Configuration_ABC} because we need the L{step} function to return a different type of value.
-
PermittedNondeterminism
= 20¶ The maximum amount of unresolved non-determinism that is acceptable. If the value is exceeded, a L{pyxb.ContentNondeterminismExceededError} exception will be raised.
-
_AutomatonConfiguration__cfg
= None¶
-
_AutomatonConfiguration__discardPreferredSequence
(preferred_sequence, pi=None)¶ Extract non-element content from the sequence and return C{None}.
-
_AutomatonConfiguration__instance
= None¶
-
_AutomatonConfiguration__multi
= None¶
-
_AutomatonConfiguration__pendingNonElementContent
= None¶
-
_AutomatonConfiguration__preferredPendingSymbol
= None¶
-
_AutomatonConfiguration__preferredSequenceIndex
= 0¶
-
_AutomatonConfiguration__processPreferredSequence
(preferred_sequence, symbol_set, vc)¶
-
_AutomatonConfiguration__resetPreferredSequence
(instance)¶
-
_diagnoseIncompleteContent
(symbols, symbol_set)¶ Check for incomplete content.
@raises pyxb.IncompleteElementContentError: if a non-accepting state is found @return: the topmost configuration (if accepting)
-
acceptableContent
()¶ Return the sequence of acceptable symbols at this state.
The list comprises the L{pyxb.binding.content.ElementUse} and L{pyxb.binding.content.WildcardUse} instances that are used to validate proposed symbols, in preferred order.
-
diagnoseIncompleteContent
()¶ Generate the exception explaining why the content is incomplete.
-
isAccepting
(raise_if_rejecting=False)¶ Return C{True} iff the automaton is in an accepting state.
If the automaton has unresolved nondeterminism, it is resolved first, preferring accepting states.
-
nondeterminismCount
()¶ Return the number of pending configurations.
The automaton is deterministic if exactly one configuration is available.
-
reset
()¶ Reset the automaton to its initial state.
Subsequent transitions are expected based on candidate content to be supplied through the L{step} method.
-
resolveNondeterminism
(prefer_accepting=True)¶ Resolve any non-determinism in the automaton state.
If the automaton has reached a single configuration (was deterministic), this does nothing.
If multiple candidate configurations are available, the best one is selected and applied, updating the binding instance with the pending content.
“Best” in this case is determined by optionally eliminating configurations that are not accepting, then selecting the path where the initial transition sorts highest using the binding sort key (based on position in the original schema).
@keyword prefer_accepting: eliminate non-accepting paths if any accepting path is present.
-
sequencedChildren
()¶ Implement L{pyxb.binding.basis.complexTypeDefinition._validatedChildren}.
Go there for the interface.
-
step
(value, element_decl)¶ Attempt a transition from the current state.
@param value: the content to be supplied. For success the value must be consistent with the recorded symbol (element or wildcard declaration) for a transition from the current automaton state.
@param element_decl: optional L{pyxb.binding.content.ElementDeclaration} that is the preferred symbol for the transition.
@return: the cardinal number of successful transitions from the current configuration based on the parameters.
-
-
class
pyxb.binding.content.
ElementDeclaration
(name, id, key, is_plural, location, element_binding=None)¶ Bases:
object
Aggregate the information relevant to an element of a complex type.
This includes the L{original tag name<name>}, the spelling of L{the corresponding object in Python <id>}, an L{indicator<isPlural>} of whether multiple instances might be associated with the field, and other relevant information.
-
_ElementDeclaration__elementBinding
= None¶
-
_ElementDeclaration__id
= None¶
-
_ElementDeclaration__isPlural
= False¶
-
_ElementDeclaration__key
= None¶
-
_ElementDeclaration__name
= None¶
-
_ElementDeclaration__xsdLocation
= None¶
-
_description
(name_only=False, user_documentation=True)¶
-
_matches
(value, element_decl)¶
-
_setElementBinding
(element_binding)¶
-
append
(ctd_instance, value)¶ Add the given value as another instance of this element within the binding instance. @raise pyxb.StructuralBadDocumentError: invoked on an element use that is not plural
-
defaultValue
()¶ Return the default value for this element.
For plural values, this is an empty collection. For non-plural values, it is C{None} unless the element has a default value, in which case it is that value.
@todo: This should recursively support filling in default content, as when the plural list requires a non-zero minimum number of entries.
-
elementBinding
()¶ The L{basis.element} instance identifying the information associated with the element declaration.
-
id
()¶ The string name of the binding class field used to hold the element values.
This is the user-visible name, and excepting disambiguation will be equal to the local name of the element.
-
isPlural
()¶ True iff the content model indicates that more than one element can legitimately belong to this use.
This includes elements in particles with maxOccurs greater than one, and when multiple elements with the same NCName are declared in the same type.
-
name
()¶ The expanded name of the element.
@rtype: L{pyxb.namespace.ExpandedName}
-
reset
(ctd_instance)¶ Set the value for this use in the given element to its default.
-
resetValue
()¶ Return the reset value for this element.
For plural values, this is an empty collection. For non-plural values, it is C{None}, corresponding to absence of an assigned element.
-
set
(ctd_instance, value)¶ Set the value of this element in the given instance.
-
setOrAppend
(ctd_instance, value)¶ Invoke either L{set} or L{append}, depending on whether the element use is plural.
-
toDOM
(dom_support, parent, value)¶ Convert the given value to DOM as an instance of this element.
@param dom_support: Helper for managing DOM properties @type dom_support: L{pyxb.utils.domutils.BindingDOMSupport} @param parent: The DOM node within which this element should be generated. @type parent: C{xml.dom.Element} @param value: The content for this element. May be text (if the element allows mixed content), or an instance of L{basis._TypeBinding_mixin}.
@raise pyxb.AbstractElementError: the binding to be used is abstract
-
value
(ctd_instance)¶ Return the value for this use within the given instance.
Note that this is the L{resetValue()}, not the L{defaultValue()}, if the element has not yet been assigned a value.
-
xsdLocation
()¶ The L{location<pyxb.utils.utility.Location>} in the schema where the element was declared.
Note that this is not necessarily the same location as its use.
-
-
class
pyxb.binding.content.
ElementUse
(element_declaration, xsd_location)¶ Bases:
pyxb.binding.content._FACSymbol
Information about a schema element declaration reference.
This is used by the FAC content model to identify the location within a schema at which an element use appears. The L{ElementDeclaration} is not sufficient since multiple uses in various schema, possibly in different namespaces, may refer to the same declaration but be independent uses.
-
_ElementUse__elementDeclaration
= None¶
-
consumingClosure
(sym)¶
-
elementBinding
()¶ Return the L{element binding<pyxb.binding.content.ElementDeclaration.elementBinding>} associated with the use.
Equivalent to L{elementDeclaration}().L{elementBinding()<pyxb.binding.content.ElementDeclaration.elementBinding>}.
-
elementDeclaration
()¶ Return the L{element declaration<pyxb.binding.content.ElementDeclaration>} associated with the use.
-
match
(symbol)¶ Satisfy L{pyxb.utils.fac.SymbolMatch_mixin}.
Determine whether the proposed content encapsulated in C{symbol} is compatible with the element declaration. If so, the accepted value is cached internally and return C{True}; otherwise return C{False}.
@param symbol: a pair C{(value, element_decl)}. L{pyxb.binding.content.ElementDeclaration._matches} is used to determine whether the proposed content is compatible with this element declaration.
-
matchValue
(sym)¶
-
typeDefinition
()¶ Return the element type.
Equivalent to L{elementDeclaration}().L{elementBinding()<pyxb.binding.content.ElementDeclaration.elementBinding>}.L{typeDefinition()<pyxb.binding.basis.element.typeDefinition>}.
-
-
class
pyxb.binding.content.
Wildcard
(*args, **kw)¶ Bases:
object
Placeholder for wildcard objects.
-
NC_any
= '##any'¶
-
NC_local
= '##local'¶
-
NC_not
= '##other'¶
-
NC_targetNamespace
= '##targetNamespace'¶
-
PC_lax
= 'lax'¶ Validate against available uniquely determined declaration.
-
PC_skip
= 'skip'¶ No namespace constraint is applied to the wildcard.
-
PC_strict
= 'strict'¶ Validate against declaration or xsi:type, which must be available.
-
_Wildcard__namespaceConstraint
= None¶
-
_Wildcard__normalizeNamespace
(nsv)¶
-
_Wildcard__processContents
= None¶
-
__processContents
= None¶ One of L{PC_skip}, L{PC_lax}, L{PC_strict}.
-
matches
(instance, value)¶ Return True iff the value is a valid match against this wildcard.
Validation per U{Wildcard allows Namespace Name<http://www.w3.org/TR/xmlschema-1/#cvc-wildcard-namespace>}.
-
namespaceConstraint
()¶ A constraint on the namespace for the wildcard.
Valid values are:
- L{Wildcard.NC_any}
- A tuple ( L{Wildcard.NC_not}, a L{namespace<pyxb.namespace.Namespace>} instance )
- set(of L{namespace<pyxb.namespace.Namespace>} instances)
Namespaces are represented by their URIs. Absence is represented by C{None}, both in the “not” pair and in the set.
-
processContents
()¶ Indicate how this wildcard’s contents should be processed.
-
-
class
pyxb.binding.content.
WildcardUse
(wildcard_declaration, xsd_location)¶ Bases:
pyxb.binding.content._FACSymbol
Information about a schema wildcard element.
This is functionally parallel to L{ElementUse}, but references a L{Wildcard} that is unique to this instance. That L{Wildcard} is not incorporated into this class is an artifact of the evolution of PyXB.
-
_WildcardUse__wildcardDeclaration
= None¶
-
consumingClosure
(sym)¶ Create a closure that will apply the value accepted by L{match} to a to-be-supplied instance.
-
match
(symbol)¶ Satisfy L{pyxb.utils.fac.SymbolMatch_mixin}.
Determine whether the proposed content encapsulated in C{symbol} is compatible with the wildcard declaration. If so, the accepted value is cached internally and return C{True}; otherwise return C{False}.
@param symbol: a pair C{(value, element_decl)}. L{pyxb.binding.content.Wildcard.matches} is used to determine whether the proposed content is compatible with this wildcard.
-
matchValue
(sym)¶
-
wildcardDeclaration
()¶
-
-
class
pyxb.binding.content.
_FACSymbol
(xsd_location)¶ Bases:
pyxb.utils.fac.SymbolMatch_mixin
Base class for L{pyxb.utils.fac.Symbol} instances associated with PyXB content models.
This holds the location in the schema of the L{ElementUse} or L{WildcardUse} and documents the methods expected of its children.
-
_FACSymbol__xsdLocation
= None¶
-
consumingClosure
(sym)¶ Create a closure that will apply the value from C{sym} to a to-be-supplied instance.
This is necessary for non-deterministic automata, where we can’t store the value into the instance field until we know that the transition will be taken:
@return: A closure that takes a L{complexTypeDefinition} instance and stores the value from invoking L{matchValue} on C{sym} into the appropriate slot.
-
matchValue
(sym)¶ Return the value accepted by L{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.
-
xsdLocation
()¶
-
-
class
pyxb.binding.content.
_PluralBinding
(*args, **kw)¶ Bases:
collections.abc.MutableSequence
Helper for element content that supports multiple occurences.
This is an adapter for Python list. Any operation that can mutate an item in the list ensures the stored value is compatible with the element for which the list holds values.
-
_PluralBinding__convert
(v)¶
-
_PluralBinding__elementBinding
= None¶
-
_PluralBinding__list
= None¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 42¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
append
(x)¶
-
count
(x)¶
-
extend
(x)¶
-
index
(x, i=0, j=-1)¶
-
insert
(i, x)¶
-
pop
(i=-1)¶
-
remove
(x)¶
-
reverse
()¶
-
sort
(key=None, reverse=False)¶
-
pyxb.binding.datatypes module¶
Classes supporting U{XMLSchema Part 2: Datatypes<http://www.w3.org/TR/xmlschema-2/>}.
Each L{simple type definition<pyxb.xmlschema.structures.SimpleTypeDefinition>} component instance is paired with at most one L{basis.simpleTypeDefinition} class, which is a subclass of a Python type augmented with facets and other constraining information. This file contains the definitions of these types.
We want the simple datatypes to be efficient Python values, but to also hold specific constraints that don’t apply to the Python types. To do this, we subclass each PST. Primitive PSTs inherit from the Python type that represents them, and from a pyxb.binding.basis.simpleTypeDefinition class which adds in the constraint infrastructure. Derived PSTs inherit from the parent PST.
There is an exception to this when the Python type best suited for a derived SimpleTypeDefinition differs from the type associated with its parent STD: for example, L{xsd:integer<integer>} has a value range that requires it be represented by a Python C{long}, but L{xsd:int<int>} allows representation by a Python C{int}. In this case, the derived PST class is structured like a primitive type, but the PST associated with the STD superclass is recorded in a class variable C{_XsdBaseType}.
Note the strict terminology: “datatype” refers to a class which is a subclass of a Python type, while “type definition” refers to an instance of either SimpleTypeDefinition or ComplexTypeDefinition.
-
class
pyxb.binding.datatypes.
ENTITIES
(*args, **kw)¶ Bases:
pyxb.binding.basis.STD_list
XMLSchema datatype U{ENTITIES<http:///www.w3.org/TR/xmlschema-2/#ENTITIES>}.
-
_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>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_httpwww_w3_org2001XMLSchema_ENTITIES_FacetMap
= {<class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_maxLength'>: <pyxb.binding.facets.CF_maxLength object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_minLength'>: <pyxb.binding.facets.CF_minLength object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_length'>: <pyxb.binding.facets.CF_length object>}¶
-
-
class
pyxb.binding.datatypes.
ENTITY
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.NCName
XMLSchema datatype U{ENTITY<http:///www.w3.org/TR/xmlschema-2/#ENTITY>}.
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_httpwww_w3_org2001XMLSchema_ENTITY_FacetMap
= {}¶
-
-
class
pyxb.binding.datatypes.
ID
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.NCName
XMLSchema datatype U{ID<http:///www.w3.org/TR/xmlschema-2/#ID>}.
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_httpwww_w3_org2001XMLSchema_ID_FacetMap
= {}¶
-
-
class
pyxb.binding.datatypes.
IDREF
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.NCName
XMLSchema datatype U{IDREF<http:///www.w3.org/TR/xmlschema-2/#IDREF>}.
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_httpwww_w3_org2001XMLSchema_IDREF_FacetMap
= {}¶
-
-
class
pyxb.binding.datatypes.
IDREFS
(*args, **kw)¶ Bases:
pyxb.binding.basis.STD_list
XMLSchema datatype U{IDREFS<http:///www.w3.org/TR/xmlschema-2/#IDREFS>}.
-
_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>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_httpwww_w3_org2001XMLSchema_IDREFS_FacetMap
= {<class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_maxLength'>: <pyxb.binding.facets.CF_maxLength object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_minLength'>: <pyxb.binding.facets.CF_minLength object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_length'>: <pyxb.binding.facets.CF_length object>}¶
-
-
class
pyxb.binding.datatypes.
NCName
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.Name
XMLSchema datatype U{NCName<http:///www.w3.org/TR/xmlschema-2/#NCName>}.
See U{http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName}.
-
_CF_pattern
= <pyxb.binding.facets.CF_pattern object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_ValidRE
= re.compile('^[A-Z_a-zÀ-ÖØ-öø-ıĴ-ľŁ-ňŊ-žƀ-ǃǍ-ǰǴ-ǵǺ-ȗɐ-ʨʻ-ˁΆΈ-ΊΌΎ-ΡΣ-ώϐ-ϖϚϜϞϠϢ-ϳЁ-ЌЎ-яё-ќў-ҁҐ-ӄӇ-ӈӋ-ӌӐ-ӫӮ-ӵӸ-ӹԱ-Ֆՙա-ֆא-תװ-ײء-غف-يٱ-ڷں-ھۀ-ێې-ۓەۥ-ۦअ-हऽक़-ॡঅ-ঌএ-ঐও-নপ-রলশ-হড়-ঢ়য়-ৡৰ-ৱਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઋઍએ-ઑઓ)¶
-
_httpwww_w3_org2001XMLSchema_NCName_FacetMap
= {<class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object at 0x7f04305a50b8>}¶
-
-
class
pyxb.binding.datatypes.
NMTOKEN
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.token
XMLSchema datatype U{NMTOKEN<http:///www.w3.org/TR/xmlschema-2/#NMTOKEN>}.
See U{http://www.w3.org/TR/2000/WD-xml-2e-20000814.html#NT-Nmtoken}.
NMTOKEN is an identifier that can start with any character that is legal in it.
-
_CF_pattern
= <pyxb.binding.facets.CF_pattern object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_ValidRE
= re.compile('^[\\--.0-:A-Z_a-z·À-ÖØ-öø-ıĴ-ľŁ-ňŊ-žƀ-ǃǍ-ǰǴ-ǵǺ-ȗɐ-ʨʻ-ˁː-ˑ̀-͠ͅ-͡Ά-ΊΌΎ-ΡΣ-ώϐ-ϖϚϜϞϠϢ-ϳЁ-ЌЎ-яё-ќў-ҁ҃-҆Ґ-ӄӇ-ӈӋ-ӌӐ-ӫӮ-ӵӸ-ӹԱ-Ֆՙա-ֆ֑-֣֡-ֹֻ-ֽֿׁ-ׂׄא-תװ-ײء-غـ-ْ٠-٩ٰ-ڷں-ھۀ-ێې-ۓە-۪ۨ-ۭ۰-۹ँ-ःअ-ह़-्॑-॔क़-ॣ०-९ঁ-ঃঅ-ঌএ-)¶
-
_httpwww_w3_org2001XMLSchema_NMTOKEN_FacetMap
= {<class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object at 0x7f04305a51d0>}¶
-
-
class
pyxb.binding.datatypes.
NMTOKENS
(*args, **kw)¶ Bases:
pyxb.binding.basis.STD_list
-
_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>¶
-
_NMTOKENS_FacetMap
= {<class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_maxLength'>: <pyxb.binding.facets.CF_maxLength object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_minLength'>: <pyxb.binding.facets.CF_minLength object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_length'>: <pyxb.binding.facets.CF_length object>}¶
-
-
class
pyxb.binding.datatypes.
NOTATION
(*args, **kw)¶ Bases:
pyxb.binding.basis.simpleTypeDefinition
XMLSchema datatype U{NOTATION<http://www.w3.org/TR/xmlschema-2/#NOTATION>}.
-
classmethod
XsdValueLength
(value)¶ Section 4.3.1.3: Legacy length return None to indicate no check
-
_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>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_XsdBaseType
¶ alias of
anySimpleType
-
_httpwww_w3_org2001XMLSchema_NOTATION_FacetMap
= {<class 'pyxb.binding.facets.CF_minLength'>: <pyxb.binding.facets.CF_minLength object>, <class 'pyxb.binding.facets.CF_maxLength'>: <pyxb.binding.facets.CF_maxLength object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_length'>: <pyxb.binding.facets.CF_length object>}¶
-
classmethod
-
class
pyxb.binding.datatypes.
Name
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.token
XMLSchema datatype U{Name<http:///www.w3.org/TR/xmlschema-2/#Name>}.
See U{http://www.w3.org/TR/2000/WD-xml-2e-20000814.html#NT-Name}.
-
_CF_pattern
= <pyxb.binding.facets.CF_pattern object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_ValidRE
= re.compile('^[:A-Z_a-zÀ-ÖØ-öø-ıĴ-ľŁ-ňŊ-žƀ-ǃǍ-ǰǴ-ǵǺ-ȗɐ-ʨʻ-ˁΆΈ-ΊΌΎ-ΡΣ-ώϐ-ϖϚϜϞϠϢ-ϳЁ-ЌЎ-яё-ќў-ҁҐ-ӄӇ-ӈӋ-ӌӐ-ӫӮ-ӵӸ-ӹԱ-Ֆՙա-ֆא-תװ-ײء-غف-يٱ-ڷں-ھۀ-ێې-ۓەۥ-ۦअ-हऽक़-ॡঅ-ঌএ-ঐও-নপ-রলশ-হড়-ঢ়য়-ৡৰ-ৱਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઋઍએ-ઑ)¶
-
_httpwww_w3_org2001XMLSchema_Name_FacetMap
= {<class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object at 0x7f04305a5518>}¶
-
-
class
pyxb.binding.datatypes.
QName
(*args, **kw)¶ Bases:
pyxb.binding.basis.simpleTypeDefinition
,pyxb.namespace.ExpandedName
XMLSchema datatype U{QName<http://www.w3.org/TR/xmlschema-2/#QName>}.
-
classmethod
XsdLiteral
(value)¶
-
classmethod
XsdValueLength
(value)¶ Section 4.3.1.3: Legacy length return None to indicate no check
-
_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>¶
-
classmethod
_ConvertArguments_vx
(args, kw)¶
-
classmethod
_ConvertIf
(value, xmlns_context)¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_XsdBaseType
¶ alias of
anySimpleType
-
classmethod
_XsdConstraintsPreCheck_vb
(value)¶
-
_httpwww_w3_org2001XMLSchema_QName_FacetMap
= {<class 'pyxb.binding.facets.CF_minLength'>: <pyxb.binding.facets.CF_minLength object>, <class 'pyxb.binding.facets.CF_maxLength'>: <pyxb.binding.facets.CF_maxLength object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_length'>: <pyxb.binding.facets.CF_length object>}¶
-
classmethod
-
class
pyxb.binding.datatypes.
_PyXBDateOnly_base
(*args, **kw)¶ Bases:
pyxb.binding.datatypes._PyXBDateTime_base
,datetime.datetime
-
classmethod
XsdLiteral
(value)¶
-
_ValidFields
= ('year', 'month', 'day')¶
-
_XsdBaseType
¶ alias of
anySimpleType
-
classmethod
-
class
pyxb.binding.datatypes.
_PyXBDateTime_base
(*args, **kw)¶ Bases:
pyxb.binding.basis.simpleTypeDefinition
,pyxb.binding.basis._RepresentAsXsdLiteral_mixin
-
classmethod
XsdLiteral
(value)¶
-
classmethod
_AdjustForTimezone
(kw)¶ Update datetime keywords to account for timezone effects.
All XML schema timezoned times are in UTC, with the time “in its timezone”. If the keywords indicate a non-UTC timezone is in force, and L{pyxb.PreserveInputTimeZone()} has not been set, adjust the values to account for the zone by subtracting the corresponding UTC offset and mark explicitly that the time is in UTC by leaving a C{tzinfo} attribute identifying the UTC time zone.
@param kw: A dictionary of keywords relevant for a date or time instance. The dictionary is updated by this call.
-
_DefaultDay
= 1¶
-
_DefaultMonth
= 1¶
-
_DefaultYear
= 1900¶
-
classmethod
_LexicalToKeywords
(text)¶
-
_Lexical_fmt
= None¶ Format for the lexical representation of a date-related instance, excluding timezone.
Subclasses must define this.
-
_LocalTimeZone
= <pyxb.utils.utility.LocalTimeZone object>¶ A L{datetime.tzinfo} instance representing the local time zone.
-
_PyXBDateTime_base__LexicalIntegerFields
= ('year', 'month', 'day', 'hour', 'minute', 'second')¶
-
_PyXBDateTime_base__LexicalREMap
= {}¶
-
_PyXBDateTime_base__PatternMap
= {'%H': '(?P<hour>\\d{2})', '%M': '(?P<minute>\\d{2})', '%S': '(?P<second>\\d{2})(?P<fracsec>\\.\\d+)?', '%Y': '(?P<negYear>-?)(?P<year>\\d{4,})', '%Z': '(?P<tzinfo>Z|[-+]\\d\\d:\\d\\d)', '%d': '(?P<day>\\d{2})', '%m': '(?P<month>\\d{2})'}¶
-
classmethod
_SetKeysFromPython
(python_value, kw, fields)¶
-
classmethod
_SetKeysFromPython_csc
(python_value, kw, fields)¶
-
_UTCTimeZone
= <pyxb.utils.utility.UTCOffsetTimeZone object>¶ A L{datetime.tzinfo} instance representing UTC.
-
classmethod
-
class
pyxb.binding.datatypes.
_fp
(*args, **kw)¶ Bases:
pyxb.binding.basis.simpleTypeDefinition
,float
,pyxb.binding.basis._NoNullaryNonNillableNew_mixin
-
classmethod
XsdLiteral
(value)¶
-
_XsdBaseType
¶ alias of
anySimpleType
-
classmethod
-
class
pyxb.binding.datatypes.
anySimpleType
(*args, **kw)¶ Bases:
pyxb.binding.basis.simpleTypeDefinition
,str
XMLSchema datatype U{anySimpleType<http://www.w3.org/TR/xmlschema-2/#dt-anySimpleType>}.
-
classmethod
XsdLiteral
(value)¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_XsdBaseType
= None¶
-
classmethod
-
class
pyxb.binding.datatypes.
anyType
(*args, **kw)¶ Bases:
pyxb.binding.basis.complexTypeDefinition
XMLSchema datatype U{anyType<http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-urType>}.
-
_Abstract
= False¶
-
_AttributeWildcard
= <pyxb.binding.content.Wildcard object>¶
-
_Automaton
= <pyxb.utils.fac.Automaton object>¶
-
_ContentTypeTag
= 'MIXED'¶
-
_DefinitionLocation
= pyxb.utils.utility.Location('http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-urType', 1, 1)¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_HasWildcardElement
= True¶
-
classmethod
_IsUrType
()¶
-
-
class
pyxb.binding.datatypes.
anyURI
(*args, **kw)¶ Bases:
pyxb.binding.basis.simpleTypeDefinition
,str
XMLSchema datatype U{anyURI<http://www.w3.org/TR/xmlschema-2/#anyURI>}.
-
classmethod
XsdLiteral
(value)¶
-
classmethod
XsdValueLength
(value)¶
-
_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>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_XsdBaseType
¶ alias of
anySimpleType
-
_httpwww_w3_org2001XMLSchema_anyURI_FacetMap
= {<class 'pyxb.binding.facets.CF_minLength'>: <pyxb.binding.facets.CF_minLength object>, <class 'pyxb.binding.facets.CF_maxLength'>: <pyxb.binding.facets.CF_maxLength object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_length'>: <pyxb.binding.facets.CF_length object>}¶
-
classmethod
-
class
pyxb.binding.datatypes.
base64Binary
(*args, **kw)¶ Bases:
pyxb.binding.basis.simpleTypeDefinition
,bytes
XMLSchema datatype U{base64Binary<http://www.w3.org/TR/xmlschema-2/#base64Binary>}.
See also U{RFC2045<http://tools.ietf.org/html/rfc2045>} and U{RFC4648<http://tools.ietf.org/html/rfc4648>}.
-
classmethod
XsdLiteral
(value)¶
-
classmethod
XsdValidateLength
(length)¶ 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.
@param length: C{None} (default) to check all literals, otherwise the maximum length literal that will be checked. Pass C{-1} to disable the validity check.
@return: the previous validation length
-
classmethod
XsdValueLength
(value)¶
-
_B04
= '[AQgw]'¶
-
_B04S
= '([AQgw] ?)'¶
-
_B16
= '[AEIMQUYcgkosw048]'¶
-
_B16S
= '([AEIMQUYcgkosw048] ?)'¶
-
_B64
= '[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/]'¶
-
_B64S
= '([ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/] ?)'¶
-
_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>¶
-
classmethod
_ConvertArguments_vx
(args, kw)¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_XsdBaseType
¶ alias of
anySimpleType
-
_base64Binary__Lexical_re
= re.compile('^((([ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/] ?){4})*((([ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/] ?){3}[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs)¶
-
_base64Binary__Pattern
= '^((([ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/] ?){4})*((([ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/] ?){3}[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/])|(([ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/] ?){2}([AEIMQUYcgkosw048] ?)=)|(([ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/] ?)([AQgw] ?)= ?=)))?$'¶
-
_base64Binary__ValidateLength
= None¶
-
_httpwww_w3_org2001XMLSchema_base64Binary_FacetMap
= {<class 'pyxb.binding.facets.CF_minLength'>: <pyxb.binding.facets.CF_minLength object>, <class 'pyxb.binding.facets.CF_maxLength'>: <pyxb.binding.facets.CF_maxLength object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_length'>: <pyxb.binding.facets.CF_length object>}¶
-
classmethod
-
class
pyxb.binding.datatypes.
boolean
(*args, **kw)¶ Bases:
pyxb.binding.basis.simpleTypeDefinition
,int
,pyxb.binding.basis._NoNullaryNonNillableNew_mixin
XMLSchema datatype U{boolean<http://www.w3.org/TR/xmlschema-2/#boolean>}.
-
classmethod
XsdLiteral
(value)¶
-
_CF_pattern
= <pyxb.binding.facets.CF_pattern object>¶
-
_CF_whiteSpace
= <pyxb.binding.facets.CF_whiteSpace object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_XsdBaseType
¶ alias of
anySimpleType
-
_httpwww_w3_org2001XMLSchema_boolean_FacetMap
= {<class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>}¶
-
classmethod
-
class
pyxb.binding.datatypes.
byte
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.short
XMLSchema datatype U{byte<http://www.w3.org/TR/xmlschema-2/#byte>}.
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_CF_minInclusive
= <pyxb.binding.facets.CF_minInclusive object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_httpwww_w3_org2001XMLSchema_byte_FacetMap
= {<class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
-
class
pyxb.binding.datatypes.
date
(*args, **kw)¶ Bases:
pyxb.binding.datatypes._PyXBDateOnly_base
XMLSchema datatype U{date<http://www.w3.org/TR/xmlschema-2/#date>}.
This class uses the Python C{datetime.datetime} class as its underlying representation; fields not relevant to this type are derived from 1900-01-01T00:00:00.
@note: Unlike L{dateTime}, timezoned date values are not converted to UTC. The provided timezone information is retained along with the instance; however, the lexical representation generated for output is canonicalized (timezones no more than 12 hours off UTC).
-
classmethod
XsdLiteral
(value)¶
-
_CF_enumeration
= <pyxb.binding.facets.CF_enumeration object>¶
-
_CF_maxExclusive
= <pyxb.binding.facets.CF_maxExclusive object>¶
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_CF_minExclusive
= <pyxb.binding.facets.CF_minExclusive object>¶
-
_CF_minInclusive
= <pyxb.binding.facets.CF_minInclusive object>¶
-
_CF_pattern
= <pyxb.binding.facets.CF_pattern object>¶
-
_CF_whiteSpace
= <pyxb.binding.facets.CF_whiteSpace object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_Fields
= ('year', 'month', 'day')¶
-
_Lexical_fmt
= '%Y-%m-%d'¶
-
_date__MinutesPerDay
= 1440¶
-
_date__MinutesPerHalfDay
= 720¶
-
_date__SecondsPerMinute
= 60¶
-
_httpwww_w3_org2001XMLSchema_date_FacetMap
= {<class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
xsdRecoverableTzinfo
()¶ Return the recoverable tzinfo for the date.
Return a L{pyxb.utils.utility.UTCOffsetTimeZone} instance reflecting the timezone associated with the date, or C{None} if the date is not timezoned.
@note: This is not the recoverable timezone, because timezones are represented as timedeltas which get normalized in ways that don’t match what we expect for a tzinfo.
-
classmethod
-
class
pyxb.binding.datatypes.
dateTime
(*args, **kw)¶ Bases:
pyxb.binding.datatypes._PyXBDateTime_base
,datetime.datetime
XMLSchema datatype U{dateTime<http://www.w3.org/TR/xmlschema-2/#dateTime>}.
This class uses the Python C{datetime.datetime} class as its underlying representation. Unless L{pyxb.PreserveInputTimeZone()} is used, all timezoned dateTime objects are in UTC. Presence of time zone information in the lexical space is preserved by a non-empty tzinfo field, which should always be zero minutes offset from UTC unless the input time zone was preserved.
@warning: The value space of Python’s C{datetime.datetime} class is more restricted than that of C{xs:datetime}. As a specific example, Python does not support negative years or years with more than four digits. For now, the convenience of having an object that is compatible with Python is more important than supporting the full value space. In the future, the choice may be left up to the developer.
-
_CF_enumeration
= <pyxb.binding.facets.CF_enumeration object>¶
-
_CF_maxExclusive
= <pyxb.binding.facets.CF_maxExclusive object>¶
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_CF_minExclusive
= <pyxb.binding.facets.CF_minExclusive object>¶
-
_CF_minInclusive
= <pyxb.binding.facets.CF_minInclusive object>¶
-
_CF_pattern
= <pyxb.binding.facets.CF_pattern object>¶
-
_CF_whiteSpace
= <pyxb.binding.facets.CF_whiteSpace object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_Lexical_fmt
= '%Y-%m-%dT%H:%M:%S'¶
-
_XsdBaseType
¶ alias of
anySimpleType
-
_dateTime__CtorFields
= ('year', 'month', 'day', 'hour', 'minute', 'second', 'microsecond', 'tzinfo')¶
-
_httpwww_w3_org2001XMLSchema_dateTime_FacetMap
= {<class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
aslocal
()¶ Returns a C{datetime.datetime} instance denoting the same time as this instance but adjusted to be in the local time zone.
@rtype: C{datetime.datetime} (B{NOT} C{xsd.dateTime})
-
classmethod
today
()¶ Return today.
Just like datetime.datetime.today(), except this one sets a tzinfo field so it’s clear the value is UTC.
-
-
class
pyxb.binding.datatypes.
decimal
(*args, **kw)¶ Bases:
pyxb.binding.basis.simpleTypeDefinition
,decimal.Decimal
,pyxb.binding.basis._RepresentAsXsdLiteral_mixin
,pyxb.binding.basis._NoNullaryNonNillableNew_mixin
XMLSchema datatype U{decimal<http://www.w3.org/TR/xmlschema-2/#decimal>}.
This class uses Python’s L{decimal.Decimal} class to support (by default) 28 significant digits. Only normal and zero values are valid; this means C{NaN} and C{Infinity} may be created during calculations, but cannot be expressed in XML documents.
-
classmethod
XsdLiteral
(value)¶
-
_CF_enumeration
= <pyxb.binding.facets.CF_enumeration object>¶
-
_CF_fractionDigits
= <pyxb.binding.facets.CF_fractionDigits object>¶
-
_CF_maxExclusive
= <pyxb.binding.facets.CF_maxExclusive object>¶
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_CF_minExclusive
= <pyxb.binding.facets.CF_minExclusive object>¶
-
_CF_minInclusive
= <pyxb.binding.facets.CF_minInclusive object>¶
-
_CF_pattern
= <pyxb.binding.facets.CF_pattern object>¶
-
_CF_totalDigits
= <pyxb.binding.facets.CF_totalDigits object>¶
-
_CF_whiteSpace
= <pyxb.binding.facets.CF_whiteSpace object>¶
-
classmethod
_CheckValidValue
(value)¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_XsdBaseType
¶ alias of
anySimpleType
-
_httpwww_w3_org2001XMLSchema_decimal_FacetMap
= {<class 'pyxb.binding.facets.CF_totalDigits'>: <pyxb.binding.facets.CF_totalDigits object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_fractionDigits'>: <pyxb.binding.facets.CF_fractionDigits object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
classmethod
-
class
pyxb.binding.datatypes.
double
(*args, **kw)¶ Bases:
pyxb.binding.datatypes._fp
XMLSchema datatype U{double<http://www.w3.org/TR/xmlschema-2/#double>}.
-
_CF_enumeration
= <pyxb.binding.facets.CF_enumeration object>¶
-
_CF_maxExclusive
= <pyxb.binding.facets.CF_maxExclusive object>¶
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_CF_minExclusive
= <pyxb.binding.facets.CF_minExclusive object>¶
-
_CF_minInclusive
= <pyxb.binding.facets.CF_minInclusive object>¶
-
_CF_pattern
= <pyxb.binding.facets.CF_pattern object>¶
-
_CF_whiteSpace
= <pyxb.binding.facets.CF_whiteSpace object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_httpwww_w3_org2001XMLSchema_double_FacetMap
= {<class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
-
class
pyxb.binding.datatypes.
duration
(*args, **kw)¶ Bases:
pyxb.binding.basis.simpleTypeDefinition
,datetime.timedelta
,pyxb.binding.basis._RepresentAsXsdLiteral_mixin
XMLSchema datatype U{duration<http://www.w3.org/TR/xmlschema-2/#duration>}.
This class uses the Python C{datetime.timedelta} class as its underlying representation. This works fine as long as no months or years are involved, and no negative durations are involved. Because the XML Schema value space is so much larger, it is kept distinct from the Python value space, which reduces to integral days, seconds, and microseconds.
In other words, the implementation of this type is a little shakey.
-
classmethod
XsdLiteral
(value)¶
-
_CF_enumeration
= <pyxb.binding.facets.CF_enumeration object>¶
-
_CF_maxExclusive
= <pyxb.binding.facets.CF_maxExclusive object>¶
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_CF_minExclusive
= <pyxb.binding.facets.CF_minExclusive object>¶
-
_CF_minInclusive
= <pyxb.binding.facets.CF_minInclusive object>¶
-
_CF_pattern
= <pyxb.binding.facets.CF_pattern object>¶
-
_CF_whiteSpace
= <pyxb.binding.facets.CF_whiteSpace object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_XsdBaseType
¶ alias of
anySimpleType
-
_duration__Lexical_re
= re.compile('^(?P<neg>-?)P((?P<years>\\d+)Y)?((?P<months>\\d+)M)?((?P<days>\\d+)D)?(?P<Time>T((?P<hours>\\d+)H)?((?P<minutes>\\d+)M)?(((?P<seconds>\\d+)(?P<fracsec>\\.\\d+)?)S)?)?$')¶
-
_duration__PythonFields
= ('days', 'seconds', 'microseconds', 'minutes', 'hours')¶
-
_duration__XSDFields
= ('years', 'months', 'days', 'hours', 'minutes', 'seconds')¶
-
_duration__durationData
= None¶
-
_duration__negativeDuration
= None¶
-
_httpwww_w3_org2001XMLSchema_duration_FacetMap
= {<class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
durationData
()¶
-
negativeDuration
()¶
-
classmethod
-
class
pyxb.binding.datatypes.
float
(*args, **kw)¶ Bases:
pyxb.binding.datatypes._fp
XMLSchema datatype U{float<http://www.w3.org/TR/xmlschema-2/#float>}.
-
_CF_enumeration
= <pyxb.binding.facets.CF_enumeration object>¶
-
_CF_maxExclusive
= <pyxb.binding.facets.CF_maxExclusive object>¶
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_CF_minExclusive
= <pyxb.binding.facets.CF_minExclusive object>¶
-
_CF_minInclusive
= <pyxb.binding.facets.CF_minInclusive object>¶
-
_CF_pattern
= <pyxb.binding.facets.CF_pattern object>¶
-
_CF_whiteSpace
= <pyxb.binding.facets.CF_whiteSpace object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_httpwww_w3_org2001XMLSchema_float_FacetMap
= {<class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
-
class
pyxb.binding.datatypes.
gDay
(*args, **kw)¶ Bases:
pyxb.binding.datatypes._PyXBDateOnly_base
XMLSchema datatype U{gDay<http://www.w3.org/TR/xmlschema-2/#gDay>}.
This class uses the Python C{datetime.datetime} class as its underlying representation; fields not relevant to this type are derived from 1900-01-01T00:00:00.
-
_CF_enumeration
= <pyxb.binding.facets.CF_enumeration object>¶
-
_CF_maxExclusive
= <pyxb.binding.facets.CF_maxExclusive object>¶
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_CF_minExclusive
= <pyxb.binding.facets.CF_minExclusive object>¶
-
_CF_minInclusive
= <pyxb.binding.facets.CF_minInclusive object>¶
-
_CF_pattern
= <pyxb.binding.facets.CF_pattern object>¶
-
_CF_whiteSpace
= <pyxb.binding.facets.CF_whiteSpace object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_Lexical_fmt
= '---%d'¶
-
_ValidFields
= ('day',)¶
-
_httpwww_w3_org2001XMLSchema_gDay_FacetMap
= {<class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
-
class
pyxb.binding.datatypes.
gMonth
(*args, **kw)¶ Bases:
pyxb.binding.datatypes._PyXBDateOnly_base
XMLSchema datatype U{gMonth<http://www.w3.org/TR/xmlschema-2/#gMonth>}.
This class uses the Python C{datetime.datetime} class as its underlying representation; fields not relevant to this type are derived from 1900-01-01T00:00:00.
-
_CF_enumeration
= <pyxb.binding.facets.CF_enumeration object>¶
-
_CF_maxExclusive
= <pyxb.binding.facets.CF_maxExclusive object>¶
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_CF_minExclusive
= <pyxb.binding.facets.CF_minExclusive object>¶
-
_CF_minInclusive
= <pyxb.binding.facets.CF_minInclusive object>¶
-
_CF_pattern
= <pyxb.binding.facets.CF_pattern object>¶
-
_CF_whiteSpace
= <pyxb.binding.facets.CF_whiteSpace object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_Lexical_fmt
= '--%m'¶
-
_ValidFields
= ('month',)¶
-
_httpwww_w3_org2001XMLSchema_gMonth_FacetMap
= {<class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
-
class
pyxb.binding.datatypes.
gMonthDay
(*args, **kw)¶ Bases:
pyxb.binding.datatypes._PyXBDateOnly_base
XMLSchema datatype U{gMonthDay<http://www.w3.org/TR/xmlschema-2/#gMonthDay>}.
This class uses the Python C{datetime.datetime} class as its underlying representation; fields not relevant to this type are derived from 1900-01-01T00:00:00.
-
_CF_enumeration
= <pyxb.binding.facets.CF_enumeration object>¶
-
_CF_maxExclusive
= <pyxb.binding.facets.CF_maxExclusive object>¶
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_CF_minExclusive
= <pyxb.binding.facets.CF_minExclusive object>¶
-
_CF_minInclusive
= <pyxb.binding.facets.CF_minInclusive object>¶
-
_CF_pattern
= <pyxb.binding.facets.CF_pattern object>¶
-
_CF_whiteSpace
= <pyxb.binding.facets.CF_whiteSpace object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_Lexical_fmt
= '--%m-%d'¶
-
_ValidFields
= ('month', 'day')¶
-
_httpwww_w3_org2001XMLSchema_gMonthDay_FacetMap
= {<class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
-
class
pyxb.binding.datatypes.
gYear
(*args, **kw)¶ Bases:
pyxb.binding.datatypes._PyXBDateOnly_base
XMLSchema datatype U{gYear<http://www.w3.org/TR/xmlschema-2/#gYear>}.
This class uses the Python C{datetime.datetime} class as its underlying representation; fields not relevant to this type are derived from 1900-01-01T00:00:00.
-
_CF_enumeration
= <pyxb.binding.facets.CF_enumeration object>¶
-
_CF_maxExclusive
= <pyxb.binding.facets.CF_maxExclusive object>¶
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_CF_minExclusive
= <pyxb.binding.facets.CF_minExclusive object>¶
-
_CF_minInclusive
= <pyxb.binding.facets.CF_minInclusive object>¶
-
_CF_pattern
= <pyxb.binding.facets.CF_pattern object>¶
-
_CF_whiteSpace
= <pyxb.binding.facets.CF_whiteSpace object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_Lexical_fmt
= '%Y'¶
-
_ValidFields
= ('year',)¶
-
_httpwww_w3_org2001XMLSchema_gYear_FacetMap
= {<class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
-
class
pyxb.binding.datatypes.
gYearMonth
(*args, **kw)¶ Bases:
pyxb.binding.datatypes._PyXBDateOnly_base
XMLSchema datatype U{gYearMonth<http://www.w3.org/TR/xmlschema-2/#gYearMonth>}.
This class uses the Python C{datetime.datetime} class as its underlying representation; fields not relevant to this type are derived from 1900-01-01T00:00:00.
-
_CF_enumeration
= <pyxb.binding.facets.CF_enumeration object>¶
-
_CF_maxExclusive
= <pyxb.binding.facets.CF_maxExclusive object>¶
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_CF_minExclusive
= <pyxb.binding.facets.CF_minExclusive object>¶
-
_CF_minInclusive
= <pyxb.binding.facets.CF_minInclusive object>¶
-
_CF_pattern
= <pyxb.binding.facets.CF_pattern object>¶
-
_CF_whiteSpace
= <pyxb.binding.facets.CF_whiteSpace object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_Lexical_fmt
= '%Y-%m'¶
-
_ValidFields
= ('year', 'month')¶
-
_httpwww_w3_org2001XMLSchema_gYearMonth_FacetMap
= {<class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
-
class
pyxb.binding.datatypes.
hexBinary
(*args, **kw)¶ Bases:
pyxb.binding.basis.simpleTypeDefinition
,bytes
XMLSchema datatype U{hexBinary<http://www.w3.org/TR/xmlschema-2/#hexBinary>}.
-
classmethod
XsdLiteral
(value)¶
-
classmethod
XsdValueLength
(value)¶
-
_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>¶
-
classmethod
_ConvertArguments_vx
(args, kw)¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_XsdBaseType
¶ alias of
anySimpleType
-
_httpwww_w3_org2001XMLSchema_hexBinary_FacetMap
= {<class 'pyxb.binding.facets.CF_minLength'>: <pyxb.binding.facets.CF_minLength object>, <class 'pyxb.binding.facets.CF_maxLength'>: <pyxb.binding.facets.CF_maxLength object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_length'>: <pyxb.binding.facets.CF_length object>}¶
-
classmethod
-
class
pyxb.binding.datatypes.
int
(*args, **kw)¶ Bases:
pyxb.binding.basis.simpleTypeDefinition
,int
,pyxb.binding.basis._NoNullaryNonNillableNew_mixin
XMLSchema datatype U{int<http://www.w3.org/TR/xmlschema-2/#int>}.
-
classmethod
XsdLiteral
(value)¶
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_CF_minInclusive
= <pyxb.binding.facets.CF_minInclusive object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_httpwww_w3_org2001XMLSchema_int_FacetMap
= {<class 'pyxb.binding.facets.CF_totalDigits'>: <pyxb.binding.facets.CF_totalDigits object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_fractionDigits'>: <pyxb.binding.facets.CF_fractionDigits object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
classmethod
-
class
pyxb.binding.datatypes.
integer
(*args, **kw)¶ Bases:
pyxb.binding.basis.simpleTypeDefinition
,int
,pyxb.binding.basis._NoNullaryNonNillableNew_mixin
XMLSchema datatype U{integer<http://www.w3.org/TR/xmlschema-2/#integer>}.
-
classmethod
XsdLiteral
(value)¶
-
_CF_fractionDigits
= <pyxb.binding.facets.CF_fractionDigits object>¶
-
_CF_pattern
= <pyxb.binding.facets.CF_pattern object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_httpwww_w3_org2001XMLSchema_integer_FacetMap
= {<class 'pyxb.binding.facets.CF_totalDigits'>: <pyxb.binding.facets.CF_totalDigits object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_fractionDigits'>: <pyxb.binding.facets.CF_fractionDigits object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
classmethod
-
class
pyxb.binding.datatypes.
language
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.token
XMLSchema datatype U{language<http:///www.w3.org/TR/xmlschema-2/#language>}
-
_CF_pattern
= <pyxb.binding.facets.CF_pattern object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_ValidRE
= re.compile('^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$')¶
-
_httpwww_w3_org2001XMLSchema_language_FacetMap
= {<class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object at 0x7f04305a6e80>}¶
-
-
class
pyxb.binding.datatypes.
long
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.integer
XMLSchema datatype U{long<http://www.w3.org/TR/xmlschema-2/#long>}.
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_CF_minInclusive
= <pyxb.binding.facets.CF_minInclusive object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_httpwww_w3_org2001XMLSchema_long_FacetMap
= {<class 'pyxb.binding.facets.CF_totalDigits'>: <pyxb.binding.facets.CF_totalDigits object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_fractionDigits'>: <pyxb.binding.facets.CF_fractionDigits object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
-
class
pyxb.binding.datatypes.
negativeInteger
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.nonPositiveInteger
XMLSchema datatype U{negativeInteger<http://www.w3.org/TR/xmlschema-2/#negativeInteger>}.
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_httpwww_w3_org2001XMLSchema_negativeInteger_FacetMap
= {<class 'pyxb.binding.facets.CF_totalDigits'>: <pyxb.binding.facets.CF_totalDigits object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_fractionDigits'>: <pyxb.binding.facets.CF_fractionDigits object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
-
class
pyxb.binding.datatypes.
nonNegativeInteger
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.integer
XMLSchema datatype U{nonNegativeInteger<http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger>}.
-
_CF_minInclusive
= <pyxb.binding.facets.CF_minInclusive object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_httpwww_w3_org2001XMLSchema_nonNegativeInteger_FacetMap
= {<class 'pyxb.binding.facets.CF_totalDigits'>: <pyxb.binding.facets.CF_totalDigits object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_fractionDigits'>: <pyxb.binding.facets.CF_fractionDigits object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
-
class
pyxb.binding.datatypes.
nonPositiveInteger
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.integer
XMLSchema datatype U{nonPositiveInteger<http://www.w3.org/TR/xmlschema-2/#nonPositiveInteger>}.
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_httpwww_w3_org2001XMLSchema_nonPositiveInteger_FacetMap
= {<class 'pyxb.binding.facets.CF_totalDigits'>: <pyxb.binding.facets.CF_totalDigits object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_fractionDigits'>: <pyxb.binding.facets.CF_fractionDigits object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
-
class
pyxb.binding.datatypes.
normalizedString
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.string
XMLSchema datatype U{normalizedString<http:///www.w3.org/TR/xmlschema-2/#normalizedString>}.
Normalized strings can’t have carriage returns, linefeeds, or tabs in them.
-
_CF_whiteSpace
= <pyxb.binding.facets.CF_whiteSpace object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_InvalidRE
= None¶
-
_ValidRE
= None¶
-
classmethod
_ValidateString_va
(value)¶ Post-extended method to validate that a string matches a given pattern.
If you can express the valid strings as a compiled regular expression in the class variable _ValidRE, or the invalid strings as a compiled regular expression in the class variable _InvalidRE, you can just use those. If the acceptable matches are any trickier, you should invoke the superclass implementation, and if it returns True then perform additional tests.
-
classmethod
_XsdConstraintsPreCheck_vb
(value)¶
-
_httpwww_w3_org2001XMLSchema_normalizedString_FacetMap
= {<class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object at 0x7f04305a6f98>}¶
-
_normalizedString__BadChars
= re.compile('[\r\n\t]')¶
-
classmethod
_normalizedString__ValidateString
(value)¶
-
-
class
pyxb.binding.datatypes.
positiveInteger
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.nonNegativeInteger
XMLSchema datatype U{positiveInteger<http://www.w3.org/TR/xmlschema-2/#positiveInteger>}.
-
_CF_minInclusive
= <pyxb.binding.facets.CF_minInclusive object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_httpwww_w3_org2001XMLSchema_positiveInteger_FacetMap
= {<class 'pyxb.binding.facets.CF_totalDigits'>: <pyxb.binding.facets.CF_totalDigits object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_fractionDigits'>: <pyxb.binding.facets.CF_fractionDigits object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
-
class
pyxb.binding.datatypes.
short
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.int
XMLSchema datatype U{short<http://www.w3.org/TR/xmlschema-2/#short>}.
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_CF_minInclusive
= <pyxb.binding.facets.CF_minInclusive object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_httpwww_w3_org2001XMLSchema_short_FacetMap
= {<class 'pyxb.binding.facets.CF_totalDigits'>: <pyxb.binding.facets.CF_totalDigits object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_fractionDigits'>: <pyxb.binding.facets.CF_fractionDigits object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
-
class
pyxb.binding.datatypes.
string
(*args, **kw)¶ Bases:
pyxb.binding.basis.simpleTypeDefinition
,str
XMLSchema datatype U{string<http://www.w3.org/TR/xmlschema-2/#string>}.
-
classmethod
XsdLiteral
(value)¶
-
classmethod
XsdValueLength
(value)¶
-
_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>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_XsdBaseType
¶ alias of
anySimpleType
-
_httpwww_w3_org2001XMLSchema_string_FacetMap
= {<class 'pyxb.binding.facets.CF_minLength'>: <pyxb.binding.facets.CF_minLength object>, <class 'pyxb.binding.facets.CF_maxLength'>: <pyxb.binding.facets.CF_maxLength object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_length'>: <pyxb.binding.facets.CF_length object>}¶
-
classmethod
-
class
pyxb.binding.datatypes.
time
(*args, **kw)¶ Bases:
pyxb.binding.datatypes._PyXBDateTime_base
,datetime.time
XMLSchema datatype U{time<http://www.w3.org/TR/xmlschema-2/#time>}.
This class uses the Python C{datetime.time} class as its underlying representation. Note that per the XMLSchema spec, all dateTime objects are in UTC, and that timezone information in the string representation in XML is an indication of the local time zone’s offset from UTC. Presence of time zone information in the lexical space is indicated by the tzinfo field.
@note: C{pyxb.PreserveInputTimeZone()} can be used to bypass the normalization to UTC.
-
_CF_enumeration
= <pyxb.binding.facets.CF_enumeration object>¶
-
_CF_maxExclusive
= <pyxb.binding.facets.CF_maxExclusive object>¶
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_CF_minExclusive
= <pyxb.binding.facets.CF_minExclusive object>¶
-
_CF_minInclusive
= <pyxb.binding.facets.CF_minInclusive object>¶
-
_CF_pattern
= <pyxb.binding.facets.CF_pattern object>¶
-
_CF_whiteSpace
= <pyxb.binding.facets.CF_whiteSpace object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_Lexical_fmt
= '%H:%M:%S'¶
-
_XsdBaseType
¶ alias of
anySimpleType
-
_httpwww_w3_org2001XMLSchema_time_FacetMap
= {<class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
_time__CtorFields
= ('hour', 'minute', 'second', 'microsecond', 'tzinfo')¶
-
-
class
pyxb.binding.datatypes.
token
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.normalizedString
XMLSchema datatype U{token<http:///www.w3.org/TR/xmlschema-2/#token>}.
Tokens cannot leading or trailing space characters; any carriage return, line feed, or tab characters; nor any occurrence of two or more consecutive space characters.
-
_CF_whiteSpace
= <pyxb.binding.facets.CF_whiteSpace object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
classmethod
_ValidateString_va
(value)¶
-
_httpwww_w3_org2001XMLSchema_token_FacetMap
= {<class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object at 0x7f0430595390>}¶
-
-
class
pyxb.binding.datatypes.
unsignedByte
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.unsignedShort
XMLSchema datatype U{unsignedByte<http://www.w3.org/TR/xmlschema-2/#unsignedByte>}.
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_httpwww_w3_org2001XMLSchema_unsignedByte_FacetMap
= {<class 'pyxb.binding.facets.CF_totalDigits'>: <pyxb.binding.facets.CF_totalDigits object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_fractionDigits'>: <pyxb.binding.facets.CF_fractionDigits object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
-
class
pyxb.binding.datatypes.
unsignedInt
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.unsignedLong
XMLSchema datatype U{unsignedInt<http://www.w3.org/TR/xmlschema-2/#unsignedInt>}.
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_httpwww_w3_org2001XMLSchema_unsignedInt_FacetMap
= {<class 'pyxb.binding.facets.CF_totalDigits'>: <pyxb.binding.facets.CF_totalDigits object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_fractionDigits'>: <pyxb.binding.facets.CF_fractionDigits object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
-
class
pyxb.binding.datatypes.
unsignedLong
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.nonNegativeInteger
XMLSchema datatype U{unsignedLong<http://www.w3.org/TR/xmlschema-2/#unsignedLong>}.
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_httpwww_w3_org2001XMLSchema_unsignedLong_FacetMap
= {<class 'pyxb.binding.facets.CF_totalDigits'>: <pyxb.binding.facets.CF_totalDigits object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_fractionDigits'>: <pyxb.binding.facets.CF_fractionDigits object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
-
class
pyxb.binding.datatypes.
unsignedShort
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.unsignedInt
XMLSchema datatype U{unsignedShort<http://www.w3.org/TR/xmlschema-2/#unsignedShort>}.
-
_CF_maxInclusive
= <pyxb.binding.facets.CF_maxInclusive object>¶
-
_ExpandedName
= <pyxb.namespace.ExpandedName object>¶
-
_httpwww_w3_org2001XMLSchema_unsignedShort_FacetMap
= {<class 'pyxb.binding.facets.CF_totalDigits'>: <pyxb.binding.facets.CF_totalDigits object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.CF_minInclusive object>, <class 'pyxb.binding.facets.CF_maxExclusive'>: <pyxb.binding.facets.CF_maxExclusive object>, <class 'pyxb.binding.facets.CF_minExclusive'>: <pyxb.binding.facets.CF_minExclusive object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_fractionDigits'>: <pyxb.binding.facets.CF_fractionDigits object>, <class 'pyxb.binding.facets.CF_maxInclusive'>: <pyxb.binding.facets.CF_maxInclusive object>}¶
-
pyxb.binding.facets module¶
Classes related to XMLSchema facets.
The definitions herein are from sections U{4.2<http://www.w3.org/TR/xmlschema-2/index.html#rf-facets>} and U{4.3<http://www.w3.org/TR/xmlschema-2/index.html#rf-facets>} of U{XML Schema Part 2: Datatypes<http://www.w3.org/TR/xmlschema-2/>}. Facets are attributes of a datatype that constrain its lexical and value spaces.
-
class
pyxb.binding.facets.
CF_enumeration
(**kw)¶ Bases:
pyxb.binding.facets.ConstrainingFacet
,pyxb.binding.facets._CollectionFacet_mixin
,pyxb.binding.facets._LateDatatype_mixin
Capture a constraint that restricts valid values to a fixed set.
A STD that has an enumeration restriction should mix-in L{pyxb.binding.basis.enumeration_mixin}, and should have a class variable titled C{_CF_enumeration} that is an instance of this class.
“unicode” refers to the Unicode string by which the value is represented in XML.
“tag” refers to the Python member reference associated with the enumeration. The value is derived from the unicode value of the enumeration element and an optional prefix that identifies the owning simple type when the tag is promoted to module-level visibility.
“value” refers to the Python value held in the tag
See U{http://www.w3.org/TR/xmlschema-2/#rf-enumeration}
-
_CF_enumeration__enumPrefix
= None¶
-
_CF_enumeration__tagToElement
= None¶
-
_CF_enumeration__unicodeToElement
= None¶
-
_CF_enumeration__valueToElement
= None¶
-
_CollectionFacet_itemType
¶ alias of
_EnumerationElement
-
_LateDatatypeBindsSuperclass
= False¶
-
_Name
= 'enumeration'¶
-
_validateConstraint_vx
(value)¶
-
addEnumeration
(**kw)¶
-
elementForValue
(value)¶ Return the L{_EnumerationElement} instance that has the given value.
@raise KeyError: the value is not valid for the enumeration.
-
elements
()¶ @deprecated: Use L{items} or L{iteritems} instead.
-
enumPrefix
()¶
-
itervalues
()¶ Generate the enumeration values.
-
valueForUnicode
(ustr)¶ Return the enumeration value corresponding to the given unicode string.
If ustr is not a valid option for this enumeration, return None.
-
values
()¶ Return a list of enumeration values.
-
-
class
pyxb.binding.facets.
CF_fractionDigits
(**kw)¶ Bases:
pyxb.binding.facets.ConstrainingFacet
,pyxb.binding.facets._Fixed_mixin
Specify the number of sub-unit digits in the value space of the type.
See U{http://www.w3.org/TR/xmlschema-2/#rf-fractionDigits}
-
_Name
= 'fractionDigits'¶
-
_ValueDatatype
¶ alias of
nonNegativeInteger
-
_validateConstraint_vx
(value)¶
-
-
class
pyxb.binding.facets.
CF_length
(**kw)¶ Bases:
pyxb.binding.facets.ConstrainingFacet
,pyxb.binding.facets._Fixed_mixin
A facet that specifies the length of the lexical representation of a value.
See U{http://www.w3.org/TR/xmlschema-2/#rf-length}
-
_Name
= 'length'¶
-
_ValueDatatype
¶ alias of
nonNegativeInteger
-
_validateConstraint_vx
(value)¶
-
-
class
pyxb.binding.facets.
CF_maxExclusive
(**kw)¶ Bases:
pyxb.binding.facets.ConstrainingFacet
,pyxb.binding.facets._Fixed_mixin
,pyxb.binding.facets._LateDatatype_mixin
Specify the exclusive upper bound of legal values for the constrained type.
See U{http://www.w3.org/TR/xmlschema-2/#rf-maxExclusive}
-
_LateDatatypeBindsSuperclass
= True¶
-
_Name
= 'maxExclusive'¶
-
_validateConstraint_vx
(value)¶
-
-
class
pyxb.binding.facets.
CF_maxInclusive
(**kw)¶ Bases:
pyxb.binding.facets.ConstrainingFacet
,pyxb.binding.facets._Fixed_mixin
,pyxb.binding.facets._LateDatatype_mixin
Specify the maximum legal value for the constrained type.
See U{http://www.w3.org/TR/xmlschema-2/#rf-maxInclusive}
-
_LateDatatypeBindsSuperclass
= False¶
-
_Name
= 'maxInclusive'¶
-
_validateConstraint_vx
(value)¶
-
-
class
pyxb.binding.facets.
CF_maxLength
(**kw)¶ Bases:
pyxb.binding.facets.ConstrainingFacet
,pyxb.binding.facets._Fixed_mixin
A facet that constrains the length of the lexical representation of a value.
See U{http://www.w3.org/TR/xmlschema-2/#rf-minLength}
-
_Name
= 'maxLength'¶
-
_ValueDatatype
¶ alias of
nonNegativeInteger
-
_validateConstraint_vx
(value)¶
-
-
class
pyxb.binding.facets.
CF_minExclusive
(**kw)¶ Bases:
pyxb.binding.facets.ConstrainingFacet
,pyxb.binding.facets._Fixed_mixin
,pyxb.binding.facets._LateDatatype_mixin
Specify the exclusive lower bound of legal values for the constrained type.
See U{http://www.w3.org/TR/xmlschema-2/#rf-minExclusive}
-
_LateDatatypeBindsSuperclass
= True¶
-
_Name
= 'minExclusive'¶
-
_validateConstraint_vx
(value)¶
-
-
class
pyxb.binding.facets.
CF_minInclusive
(**kw)¶ Bases:
pyxb.binding.facets.ConstrainingFacet
,pyxb.binding.facets._Fixed_mixin
,pyxb.binding.facets._LateDatatype_mixin
Specify the minimum legal value for the constrained type.
See U{http://www.w3.org/TR/xmlschema-2/#rf-minInclusive}
-
_LateDatatypeBindsSuperclass
= False¶
-
_Name
= 'minInclusive'¶
-
_validateConstraint_vx
(value)¶
-
-
class
pyxb.binding.facets.
CF_minLength
(**kw)¶ Bases:
pyxb.binding.facets.ConstrainingFacet
,pyxb.binding.facets._Fixed_mixin
A facet that constrains the length of the lexical representation of a value.
See U{http://www.w3.org/TR/xmlschema-2/#rf-minLength}
-
_Name
= 'minLength'¶
-
_ValueDatatype
¶ alias of
nonNegativeInteger
-
_validateConstraint_vx
(value)¶
-
-
class
pyxb.binding.facets.
CF_pattern
(**kw)¶ Bases:
pyxb.binding.facets.ConstrainingFacet
,pyxb.binding.facets._CollectionFacet_mixin
A facet that constrains the lexical representation of a value to match one of a set of patterns.
See U{http://www.w3.org/TR/xmlschema-2/#rf-pattern}
@note: In PyXB, pattern constraints are ignored for any type with a Python representation that does not derive from a string type. This is due to the difficulty in reconstructing the lexical representation of a non-string type after it has been converted to its value space.
@todo: On creating new instances of non-string simple types from string representations, we could apply pattern constraints. That would mean checking them prior to invoking the Factory method.
-
_CF_pattern__patternElements
= None¶
-
_CollectionFacet_itemType
¶ alias of
_PatternElement
-
_Name
= 'pattern'¶
-
_ValueDatatype
¶ alias of
string
-
_validateConstraint_vx
(value)¶
-
addPattern
(**kw)¶
-
patternElements
()¶
-
-
class
pyxb.binding.facets.
CF_totalDigits
(**kw)¶ Bases:
pyxb.binding.facets.ConstrainingFacet
,pyxb.binding.facets._Fixed_mixin
Specify the number of digits in the value space of the type.
See U{http://www.w3.org/TR/xmlschema-2/#rf-totalDigits}
-
_Name
= 'totalDigits'¶
-
_ValueDatatype
¶ alias of
positiveInteger
-
_validateConstraint_vx
(value)¶
-
-
class
pyxb.binding.facets.
CF_whiteSpace
(**kw)¶ Bases:
pyxb.binding.facets.ConstrainingFacet
,pyxb.binding.facets._Fixed_mixin
Specify the value-space interpretation of whitespace.
See U{http://www.w3.org/TR/xmlschema-2/#rf-whiteSpace}
-
_CF_whiteSpace__MultiSpace_re
= re.compile(' +')¶
-
_CF_whiteSpace__TabCRLF_re
= re.compile('[\t\n\r]')¶
-
_Name
= 'whiteSpace'¶
-
_ValueDatatype
¶ alias of
_WhiteSpace_enum
-
_validateConstraint_vx
(value)¶ No validation rules for whitespace facet.
-
normalizeString
(value)¶ Normalize the given string in accordance with the configured whitespace interpretation.
-
-
class
pyxb.binding.facets.
ConstrainingFacet
(**kw)¶ Bases:
pyxb.binding.facets.Facet
One of the facets defined in section 4.3, which provide constraints on the lexical space of a type definition.
-
Facets
= [<class 'pyxb.binding.facets.CF_length'>, <class 'pyxb.binding.facets.CF_minLength'>, <class 'pyxb.binding.facets.CF_maxLength'>, <class 'pyxb.binding.facets.CF_pattern'>, <class 'pyxb.binding.facets.CF_enumeration'>, <class 'pyxb.binding.facets.CF_whiteSpace'>, <class 'pyxb.binding.facets.CF_minInclusive'>, <class 'pyxb.binding.facets.CF_maxInclusive'>, <class 'pyxb.binding.facets.CF_minExclusive'>, <class 'pyxb.binding.facets.CF_maxExclusive'>, <class 'pyxb.binding.facets.CF_totalDigits'>, <class 'pyxb.binding.facets.CF_fractionDigits'>]¶
-
_ConstrainingFacet__setFromKeywords
(**kw)¶
-
_FacetPrefix
= 'CF'¶
-
_setFromKeywords_vb
(**kw)¶ Extend base class.
Additional keywords: * value
-
_validateConstraint_vx
(value)¶
-
validateConstraint
(value)¶ Return True iff the given value satisfies the constraint represented by this facet instance.
The actual test is delegated to the subclasses.
-
-
class
pyxb.binding.facets.
FF_bounded
(**kw)¶ Bases:
pyxb.binding.facets.FundamentalFacet
Specifies that the associated type supports a notion of bounds.
See U{http://www.w3.org/TR/xmlschema-2/#rf-bounded}
-
_Name
= 'bounded'¶
-
_ValueDatatype
¶ alias of
boolean
-
-
class
pyxb.binding.facets.
FF_cardinality
(**kw)¶ Bases:
pyxb.binding.facets.FundamentalFacet
Specifies that the associated type supports a notion of length.
See U{http://www.w3.org/TR/xmlschema-2/#rf-cardinality}
-
_LegalValues
= ('finite', 'countably infinite')¶
-
_Name
= 'cardinality'¶
-
_ValueDatatype
¶ alias of
string
-
-
class
pyxb.binding.facets.
FF_equal
(**kw)¶ Bases:
pyxb.binding.facets.FundamentalFacet
Specifies that the associated type supports a notion of equality.
See U{http://www.w3.org/TR/xmlschema-2/#equal}
-
_Name
= 'equal'¶
-
-
class
pyxb.binding.facets.
FF_numeric
(**kw)¶ Bases:
pyxb.binding.facets.FundamentalFacet
Specifies that the associated type represents a number.
See U{http://www.w3.org/TR/xmlschema-2/#rf-numeric}
-
_Name
= 'numeric'¶
-
_ValueDatatype
¶ alias of
boolean
-
-
class
pyxb.binding.facets.
FF_ordered
(**kw)¶ Bases:
pyxb.binding.facets.FundamentalFacet
Specifies that the associated type supports a notion of order.
See U{http://www.w3.org/TR/xmlschema-2/#rf-ordered}
-
_LegalValues
= ('false', 'partial', 'total')¶
-
_Name
= 'ordered'¶
-
_ValueDatatype
¶ alias of
string
-
-
class
pyxb.binding.facets.
Facet
(**kw)¶ Bases:
pyxb.cscRoot
The base class for facets.
This provides association with STDs, a name, and a value for the facet.
-
classmethod
ClassForFacet
(name)¶ Given the name of a facet, return the Facet subclass that represents it.
-
Facets
= [<class 'pyxb.binding.facets.CF_length'>, <class 'pyxb.binding.facets.CF_minLength'>, <class 'pyxb.binding.facets.CF_maxLength'>, <class 'pyxb.binding.facets.CF_pattern'>, <class 'pyxb.binding.facets.CF_enumeration'>, <class 'pyxb.binding.facets.CF_whiteSpace'>, <class 'pyxb.binding.facets.CF_minInclusive'>, <class 'pyxb.binding.facets.CF_maxInclusive'>, <class 'pyxb.binding.facets.CF_minExclusive'>, <class 'pyxb.binding.facets.CF_maxExclusive'>, <class 'pyxb.binding.facets.CF_totalDigits'>, <class 'pyxb.binding.facets.CF_fractionDigits'>, <class 'pyxb.binding.facets.FF_equal'>, <class 'pyxb.binding.facets.FF_ordered'>, <class 'pyxb.binding.facets.FF_bounded'>, <class 'pyxb.binding.facets.FF_cardinality'>, <class 'pyxb.binding.facets.FF_numeric'>]¶
-
classmethod
Name
()¶ The name of a facet is a class constant.
-
_Facet__annotation
= None¶
-
_Facet__baseTypeDefinition
= None¶
-
_Facet__ownerTypeDefinition
= None¶
-
_Facet__value
= None¶
-
_Facet__valueDatatype
= None¶
-
_Name
= None¶
-
_ValueDatatype
= None¶
-
_setFromKeywords_vb
(**kw)¶ Configure values of the facet from a set of keywords.
This method is pre-extended; subclasses should invoke the parent method after setting their local configuration.
- @keyword _reset: If C{False} or missing, existing values will
- be retained if they do not appear in the keywords. If C{True}, members not defined in the keywords are set to a default.
@keyword base_type_definition: @keyword owner_type_definition: @keyword value_datatype:
-
_value
(v)¶
-
_valueString
()¶
-
annotation
()¶
-
baseTypeDefinition
()¶ The SimpleTypeDefinition component restricted by this facet.
Note: this is NOT the STD to which the facet belongs, but is usually that STD’s base type. I.e., this jumps us through all the containing restrictions and extensions to get to the core type definition.
-
ownerTypeDefinition
()¶ The SimpleTypeDefinition component to which this facet belongs.
I.e., the one in which the hasFacet specification was found. This value is None if the facet is not associated with an STD.
-
setFromKeywords
(**kw)¶ Public entrypoint to the _setFromKeywords_vb call hierarchy.
-
value
()¶
-
valueDatatype
()¶ Get the datatype used to represent values of the facet.
This usually has nothing to do with the owner datatype; for example, the length facet may apply to any STD but the value of the facet is an integer. In generated bindings this is usually set explicitly in the facet constructor; when processing a schema, it is derived from the value’s type definition.
-
classmethod
-
class
pyxb.binding.facets.
FundamentalFacet
(**kw)¶ Bases:
pyxb.binding.facets.Facet
A fundamental facet provides information on the value space of the associated type.
-
classmethod
CreateFromDOM
(node, owner_type_definition, base_type_definition=None)¶
-
Facets
= [<class 'pyxb.binding.facets.FF_equal'>, <class 'pyxb.binding.facets.FF_ordered'>, <class 'pyxb.binding.facets.FF_bounded'>, <class 'pyxb.binding.facets.FF_cardinality'>, <class 'pyxb.binding.facets.FF_numeric'>]¶
-
_FacetPrefix
= 'FF'¶
-
_updateFromDOM
(node)¶
-
updateFromDOM
(node)¶
-
classmethod
-
class
pyxb.binding.facets.
_CollectionFacet_mixin
(*args, **kw)¶ Bases:
pyxb.cscRoot
Mix-in to handle facets whose values are collections, not scalars.
For example, the enumeration and pattern facets maintain a list of enumeration values and patterns, respectively, as their value space.
Subclasses must define a class variable _CollectionFacet_itemType which is a reference to a class that is used to construct members of the collection.
-
_CollectionFacet_mixin__items
= None¶
-
_items
()¶ The members of the collection, as a reference.
-
_setFromKeywords_vb
(**kw)¶ Extend base class.
- @keyword _constructor: If C{False} or absent, the object being
- set is a member of the collection. If C{True}, the object being set is the collection itself.
-
items
()¶ The members of the collection, as a copy.
-
iteritems
()¶ The members of the collection as an iterator
-
-
class
pyxb.binding.facets.
_EnumerationElement
(enumeration=None, unicode_value=None, description=None, annotation=None, tag=None, **kw)¶ Bases:
object
This class represents individual values that appear within a L{CF_enumeration} collection.
-
_EnumerationElement__enumeration
= None¶
-
_EnumerationElement__tag
= None¶
-
_EnumerationElement__unicodeValue
= None¶
-
_EnumerationElement__value
= None¶
-
_setTag
(tag)¶ Set the tag to be used for this enumeration.
-
enumeration
()¶ A reference to the L{CF_enumeration} instance that owns this element.
-
tag
()¶ The Python identifier used for the named constant representing the enumeration value.
This should include any desired prefix, since it must be unique within its binding class. If C{None}, no enumeration constant will be generated.
-
unicodeValue
()¶ The unicode string that defines the enumeration value.
-
value
()¶ The Python value that is used for equality testing against this enumeration.
This is an instance of L{enumeration.valueDatatype()<CF_enumeration.valueDatatype>}, initialized from the unicodeValue.
-
-
class
pyxb.binding.facets.
_Enumeration_mixin
(*args, **kw)¶ Bases:
pyxb.cscRoot
Marker class to indicate that the generated binding has enumeration members.
-
classmethod
valueForUnicode
(ustr)¶
-
classmethod
-
class
pyxb.binding.facets.
_Fixed_mixin
(*args, **kw)¶ Bases:
pyxb.cscRoot
Mix-in to a constraining facet that adds support for the ‘fixed’ property.
-
_Fixed_mixin__fixed
= None¶
-
_Fixed_mixin__setFromKeywords
(**kw)¶
-
_setFromKeywords_vb
(**kw)¶ Extend base class.
Additional keywords: * fixed
-
fixed
()¶
-
-
class
pyxb.binding.facets.
_LateDatatype_mixin
(*args, **kw)¶ Bases:
pyxb.cscRoot
Marker class to indicate that the facet instance must be told its datatype when it is constructed.
This is necessary for facets like L{CF_minInclusive} and L{CF_minExclusive}, for which the value is determined by the base type definition of the associated STD. In some cases the value that must be used in the facet cannot be represented in the Python type used for the facet; see L{LateDatatypeBindsSuperclass}.
-
classmethod
BindingValueDatatype
(value_type)¶ Find the datatype for facet values when this facet is bound to the given value_type.
If the C{value_type} is an STD, the associated Python support datatype from this value_type scanning up through the base type hierarchy is used.
-
classmethod
LateDatatypeBindsSuperclass
()¶ Return true if false if the proposed datatype should be used, or True if the base type definition of the proposed datatype should be used.
-
_LateDatatypeBindsSuperclass
= None¶ The class variable that indicates that the Subclasses must override this variable with a value of C{True} or C{False}. The value is C{True} iff the value used for the facet is not within the value space of the corresponding value datatype; for example, L{CF_minExclusive}.
-
bindValueDatatype
(value_datatype)¶
-
classmethod
-
class
pyxb.binding.facets.
_PatternElement
(pattern=None, value=None, annotation=None, **kw)¶ Bases:
pyxb.utils.utility.PrivateTransient_mixin
This class represents individual patterns that appear within a CF_pattern collection.
-
_PatternElement__PrivateTransient
= {'compiledExpression'}¶
-
_PatternElement__compiledExpression
= None¶
-
_PatternElement__pythonExpression
= None¶
-
annotation
= None¶
-
matches
(text)¶
-
pattern
= None¶
-
-
class
pyxb.binding.facets.
_WhiteSpace_enum
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.NMTOKEN
,pyxb.binding.facets._Enumeration_mixin
The enumeration used to constrain the whiteSpace facet
-
_CF_enumeration
= <pyxb.binding.facets.CF_enumeration object>¶
-
_httpwww_w3_org2001XMLSchema__WhiteSpace_enum_FacetMap
= {<class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object at 0x7f04304c89e8>}¶
-
collapse
= 'collapse'¶
-
preserve
= 'preserve'¶
-
replace
= 'replace'¶
-
pyxb.binding.generate module¶
The really ugly code that generates the Python bindings. This whole thing is going to be refactored once customized generation makes it to the top of the task queue.
-
class
pyxb.binding.generate.
BindingIO
(binding_module, **kw)¶ Bases:
object
-
_BindingIO__bindingFile
= None¶
-
_BindingIO__bindingFilePath
= None¶
-
_BindingIO__bindingModule
= None¶
-
_BindingIO__postscript
= None¶
-
_BindingIO__prolog
= None¶
-
_BindingIO__stringIO
= None¶
-
_BindingIO__templateMap
= None¶
-
appendPrologBoilerplate
(tm)¶
-
bindingFile
()¶
-
bindingModule
()¶
-
contents
()¶
-
expand
(template, **kw)¶
-
literal
(*args, **kw)¶
-
postscript
()¶
-
prolog
()¶
-
write
(template, **kw)¶
-
-
pyxb.binding.generate.
BuildPluralityData
(term_tree)¶ Walk a term tree to determine which element declarations may appear multiple times.
The bindings need to use a list for any Python attribute corresponding to an element declaration that can occur multiple times in the content model. The number of occurrences is determined by the occurrence constraints on parent particles and the compositors of containing model groups. All this information is available in the term tree used for the content model automaton.
@param term_tree: A L{FAC term tree<pyxb.utils.fac.Node>} representing the content model for a complex data type.
@return: Plurality data, as a pair C{(singles, multiples)} where C{singles} is a set of base L{element declarations<xs.structures.ElementDeclaration>} that are known to occur at least once and at most once in a region of the content, and C{multiples} is a similar set of declarations that are known to potentially occur more than once.
-
pyxb.binding.generate.
BuildTermTree
(node)¶ Construct a L{FAC term tree<pyxb.utils.fac.Node>} for a L{particle<xs.structures.Particle>}.
This translates the XML schema content model of particles, model groups, element declarations, and wildcards into a tree expressing the corresponding content as a regular expression with numerical constraints.
@param node: An instance of L{xs.structures.Particle}
@return: An instance of L{pyxb.utils.fac.Node}
-
pyxb.binding.generate.
GenerateAutomaton
(ctd, **kw)¶
-
pyxb.binding.generate.
GenerateCTD
(ctd, generator, **kw)¶
-
pyxb.binding.generate.
GenerateED
(ed, generator, **kw)¶
-
pyxb.binding.generate.
GenerateFacets
(td, generator, **kw)¶
-
pyxb.binding.generate.
GeneratePython
(schema_location=None, schema_text=None, namespace=None, module_prefix_elts=[], **kw)¶
-
pyxb.binding.generate.
GenerateSTD
(std, generator)¶
-
class
pyxb.binding.generate.
Generator
(*args, **kw)¶ Bases:
object
Configuration and data for a single binding-generation action.
-
_DEFAULT_bindingRoot
= '.'¶
-
_Generator__OptionSetters
= (('binding_root', <function Generator.setBindingRoot>), ('schema_root', <function Generator.setSchemaRoot>), ('schema_stripped_prefix', <function Generator.setSchemaStrippedPrefix>), ('location_prefix_rewrite', <function Generator.argAddLocationPrefixRewrite>), ('schema_location', <function Generator.setSchemaLocationList>), ('module', <function Generator._setModuleList>), ('module_prefix', <function Generator.setModulePrefix>), ('archive_path', <function Generator.setArchivePath>), ('no_load_namespace', <function Generator._setNoLoadNamespaces>), ('import_augmentable_namespace', <function Generator._setImportAugmentableNamespaces>), ('archive_to_file', <function Generator.setArchiveToFile>), ('default_namespace_public', <function Generator.setDefaultNamespacePublic>), ('validate_changes', <function Generator.setValidateChanges>), ('write_for_customization', <function Generator.setWriteForCustomization>), ('allow_builtin_generation', <function Generator.setAllowBuiltinGeneration>), ('allow_absent_module', <function Generator.setAllowAbsentModule>), ('uri_content_archive_directory', <function Generator.setUriContentArchiveDirectory>), ('logging_config_file', <function Generator.setLoggingConfigFile>))¶
-
_Generator__allowAbsentModule
= None¶
-
_Generator__allowBuiltinGeneration
= None¶
-
_Generator__archivePath
= None¶
-
_Generator__archiveToFile
= None¶
-
_Generator__bindingModules
= None¶
-
_Generator__bindingRoot
= None¶
-
_Generator__componentGraph
= None¶
-
_Generator__componentOrder
= None¶
-
_Generator__defaultNamespacePublic
= None¶
-
_Generator__didResolveExternalSchema
= False¶
-
_Generator__generateBindings
()¶
-
_Generator__generateToFiles
= None¶
-
_Generator__generationUID
= None¶
-
_Generator__graphFromComponents
(components, include_lax)¶
-
_Generator__importAugmentableNamespaces
= None¶
-
_Generator__locationPrefixMap
= {}¶
-
_Generator__loggingConfigFile
= None¶
-
_Generator__moduleFilePath
(module_elts, inhibit_extension=False)¶
-
_Generator__moduleList
= None¶
-
_Generator__modulePrefix
= None¶
-
_Generator__moduleRecords
= None¶
-
_Generator__namespaceModuleMap
= None¶
-
_Generator__namespaceVisibilityMap
= None¶
-
_Generator__namespaces
= None¶
-
_Generator__noloadNamespaces
= None¶
-
_Generator__optionParser
= None¶
-
_Generator__resolveComponentDependencies
()¶
-
_Generator__schemaLocationList
= None¶
-
_Generator__schemaRoot
= None¶
-
_Generator__schemaStrippedPrefix
= None¶
-
_Generator__schemas
= None¶
-
_Generator__stripSpaces
(string)¶
-
_Generator__stripSpaces_re
= re.compile('\\s\\s\\s+')¶
-
_Generator__uriContentArchiveDirectory
= None¶
-
_Generator__validateChanges
= None¶
-
_Generator__writeForCustomization
= None¶
-
_setImportAugmentableNamespaces
(namespace_set)¶ Return the set of namespaces that may be augmented by import directives.
-
_setModuleList
(module_list)¶
-
_setNamespaceVisibilities
(public, private)¶
-
_setNoLoadNamespaces
(namespace_set)¶ Record the set of namespaces that should not be loaded from an archive.
The expectation is that any required entities in the namespace will be defined by loading schema.
-
addImportAugmentableNamespace
(namespace)¶ Mark that the specified namespace may be imported by new bindings.
Normally namespaces that are available from archives are considered to be complete, and schema locations in import directives are ignored. Use this to indicate that the bindings being generated import new bindings.
Note that attempts to import schema that contributed to the archive will only be detected if the archive was generated from the same schemaLocation URI; if the archive was generated from a different source component definitions might conflict.
-
addLocationPrefixRewrite
(prefix, substituent)¶ Add a rewrite entry for schema locations.
@param prefix : A text prefix that should be removed from schema location URIs.
@param substituent : The text prefix that should replace C{prefix} as a prefix in a schema location URI.
-
addModuleName
(module_name)¶ Add a module name corresponding to an entrypoint schema.
The namespace defined by the corresponding schema will be written to a binding using the given module name, adjusted by L{modulePrefix}.
-
addNamespace
(namespace)¶
-
addNoLoadNamespace
(namespace)¶ Mark that the specified namespace should not be loaded from an archive.
Use this when you are generating bindings for an application that has a restricted profile of a namespace that would otherwise be read from an archive. Be aware that this removes any knowledge of any archive in which this namespace is present as a non-private member.
-
addSchema
(schema)¶
-
addSchemaLocation
(schema_location, converter=None)¶ Add the location of an entrypoint schema.
@param schema_location: The location of the schema. This should be a URL; if the schema location does not have a URL scheme (e.g., C{http:}), it is assumed to be a file, and if it is not an absolute path is located relative to the C{schemaRoot}.
@keyword converter: Optional callable that will be invoked with the generator instance and the schema location, and is expected to return a L{pyxb.xmlschema.structures.Schema} instance. If absent, the contents of the location are converted directly.
@note: The C{converter} argument derives from WSDL support: we need to add to the sequence of schema locations a URI of something that will not parse as a schema, but does have inner material that can if treated properly. “Treated properly” may include having the archive path and other namespace manipulations configured before anything is done to it.
-
allowAbsentModule
()¶ Indicates whether the code generator is permitted to process namespace for which no module path can be determined.
Use this only when generating bindings that will not be referenced by other bindings.
-
allowBuiltinGeneration
()¶ Indicates whether bindings will be written for namespaces that are built-in to PyXB.
This must be enabled when building bindings for the XML, XMLSchema instance, and other built-in namespaces. Normally generation of these namespaces is inhibited lest it produce inconsistencies.
-
applyOptionValues
(options, args=None)¶
-
archivePath
()¶ A colon-separated list of paths from which namespace archives can be read.
The default path is the contents of the C{PYXB_ARCHIVE_PATH} environment variable, or the standard path configured at installation time. Any file with the extension C{.wxs} found in one of these directories is examined to see whether it is a namespace archive.
-
archiveToFile
()¶ Optional file into which the archive of namespaces will be written.
Subsequent generation actions can read pre-parsed namespaces from this file, and therefore reference the bindings that were built earlier rather than re-generating them.
The file name should normally end with C{.wxs}.
-
argAddLocationPrefixRewrite
(prefix_rewrite)¶ Add a rewrite entry for schema locations.
Parameter values are strings of the form C{pfx=sub}. The effect is that a schema location that begins with C{pfx} is rewritten so that it instead begins with C{sub}.
This applies to schemaLocation attributes in C{import} and C{include} elements. It may be used to convert absolute schema locations into relative ones to allow offline processing when all schema are available in a local directory. See C{schemaRoot}.
-
argAddSchemaLocation
(schema_location)¶ Add the location of an entrypoint schema. The provided value should be a URL; if it does not have a URL scheme (e.g., C{http:}), it is assumed to be a file, and if it is not an absolute path is located relative to the C{schemaRoot}.
-
assignModulePath
(module_record, module_path=None)¶ Provide a Python module path for the module record.
This is the path by which the module bindings associated with C{module_record} will be imported.
If a path had already been assigned to the module, it is left in place.
@param module_record: Information about a collection of related bindings @type module_record: L{pyxb.namespace.archive.ModuleRecord}
@param module_path: Default path to use @type module_path: C{str}
@return: C{module_record}
-
bindingModules
()¶
-
bindingRoot
()¶ The directory path into which generated bindings will be written. @rtype: C{str}
-
componentGraph
()¶
-
componentOrder
()¶
-
defaultNamespacePublic
()¶ Indicates whether unmentioned namespaces will be public or private (default) in the archive.
A namespace is I{mentioned} if it is the target namespace of an entrypoint schema, or appears in a namespace visibility specification. I.e., this default applies only to namespaces that are modified as a result of including some schema, which is generally a local customization of something.
-
generateToFiles
()¶
-
generationUID
()¶ A unique identifier associated with this Generator instance.
This is an instance of L{pyxb.utils.utility.UniqueIdentifier}. Its associated objects are L{pyxb.namespace.archive._SchemaOrigin} instances, which identify schema that contribute to the definition of a namespace.
-
getCommandLineArgs
()¶ Return a command line option sequence that could be used to construct an equivalent configuration.
@note: If you extend the option parser, as is done by C{pyxbgen}, this may not be able to reconstruct the correct command line.
-
importAugmentableNamespaces
()¶ A list of namespaces for which new bindings are allowd.
-
locationPrefixRewriteMap
()¶ Optional map to rewrite schema locations.
This applies only to the values of schemaLocation attributes in C{import} and C{include} elements. Its purpose is to convert remote or absolute schema locations into local or relative ones to allow offline processing when all schema are available in a local directory. See C{schemaRoot}.
-
loggingConfigFile
()¶ A file provided to L{logging.config.fileConfig} to control log messages.
In the absence of other configuration the Python standard logging infrastructure is used in its default configuration.
@rtype: C{str}
-
moduleForComponent
(component)¶
-
moduleList
()¶ A list of module names to be applied in order to the namespaces of entrypoint schemas
-
modulePathData
(module)¶
-
modulePrefix
()¶ The prefix for binding modules.
The base name for the module holding a binding is taken from the moduleList, moduleMap, or an XMLNS prefix associated with the namespace in a containing schema. This value, if present, is used as a prefix to allow a deeper module hierarchy.
-
moduleRecords
()¶ The set of L{pyxb.namespace.archive.ModuleRecord} instances associated with schema processed in this generation instance.
These should be in one-to-one correspondence with the namespaces for which bindings are being generated. Multiple input schemas may contribute to a single module record; all material in that record is placed in a single binding file.
-
namespaceModuleMap
()¶ A map from namespace URIs to the module to be used for the corresponding generated binding.
Module values are adjusted by L{modulePrefix} if that has been specified.
An entry in this map for a namespace supersedes the module specified in moduleList if the namespace is defined by an entrypoint schema.
@return: A reference to the namespace module map.
-
namespaceVisibilityMap
()¶ Indicates, for specific namespaces, whether their visibility in the archive should be public or private.
-
namespaces
()¶ The set of L{namespaces<pyxb.namespace.Namespace>} for which bindings will be generated.
This is the set of namespaces read from entrypoint schema, closed under reference to namespaces defined by schema import.
@rtype: C{set}
-
noLoadNamespaces
()¶ A frozenset of namespaces that must not be loaded from an archive.
-
normalizeSchemaLocation
(sl)¶
-
optionParser
(reset=False)¶ Return an C{optparse.OptionParser} instance tied to this configuration.
@param reset: If C{False} (default), a parser created in a previous invocation will be returned. If C{True}, any previous option parser is discarded and a new one created. @type reset: C{bool}
-
resolveExternalSchema
()¶
-
schemaLocationList
()¶ A list of locations from which entrypoint schemas are to be read.
The values in the list are either URIs, or tuples consisting of a value and a callable which, when passed the generator object and the value, will return a L{pyxb.xmlschema.structures.Schema} instance. See L{addSchemaLocation}.
See also L{addSchemaLocation} and L{schemas}.
-
schemaRoot
()¶ The directory from which entrypoint schemas specified as relative file paths will be read.
-
schemaStrippedPrefix
()¶ Optional string that is stripped from the beginning of schemaLocation values before loading from them. This now applies only to URIs specified on the command line so is unlikely to be useful.
-
schemas
()¶ Schema for which bindings should be generated.
These may be L{Schema<pyxb.xmlschema.structures.Schema>} instances, or strings; the latter is preferred, and is parsed into a Schema instance when required.
This is the list of entrypoint schemas for binding generation. Values in L{schemaLocationList} are read and converted into schema, then appended to this list. Values from L{moduleList} are applied starting with the first schema in this list.
-
setAllowAbsentModule
(allow_absent_module)¶
-
setAllowBuiltinGeneration
(allow_builtin_generation)¶
-
setArchivePath
(archive_path)¶
-
setArchiveToFile
(archive_to_file)¶
-
setBindingRoot
(binding_root)¶
-
setDefaultNamespacePublic
(default_namespace_public)¶
-
setFromCommandLine
(argv=None)¶
-
setLocationPrefixRewriteMap
(location_prefix_rewrite_map)¶
-
setLoggingConfigFile
(logging_config_file)¶
-
setModulePrefix
(module_prefix)¶
-
setNamespaceVisibility
(namespace, visibility)¶
-
setNamespaces
(namespace_set)¶
-
setSchemaLocationList
(schema_location_list)¶
-
setSchemaRoot
(schema_root)¶
-
setSchemaStrippedPrefix
(schema_stripped_prefix)¶
-
setSchemas
(schemas)¶
-
setUriContentArchiveDirectory
(ucad)¶
-
setValidateChanges
(validate_changes)¶
-
setWriteForCustomization
(write_for_customization)¶
-
uriContentArchiveDirectory
()¶ The directory path into which any content retrieved by URI will be written.
This serves as a local cache, and to give you an opportunity to inspect material retrieved from some other system. @rtype: C{str}
-
validateChanges
()¶ Indicates whether the bindings should validate mutations against the content model.
-
writeForCustomization
()¶ Indicates whether the binding Python code should be written into a sub-module for customization.
If enabled, a module C{path.to.namespace} will be written to the file C{path/to/raw/namespace.py}, so that the file C{path/to/namespace.py} can import it and override behavior.
-
writeNamespaceArchive
()¶
-
-
class
pyxb.binding.generate.
NamespaceGroupModule
(generator, namespace_modules, **kw)¶ Bases:
pyxb.binding.generate._ModuleNaming_mixin
This class represents a Python module that holds all the declarations belonging to a set of namespaces which have interdependencies.
-
_GroupPrefix
= '_group'¶
-
_NamespaceGroupModule__UniqueInGroups
= set()¶
-
_NamespaceGroupModule__componentBindingName
= None¶
-
_NamespaceGroupModule__components
= None¶
-
_NamespaceGroupModule__namespaceModules
= None¶
-
_NamespaceGroupModule__uniqueInModule
= None¶
-
_bindingPreface_vx
()¶
-
_bindingTagPrefix_vx
()¶
-
_finalizeModuleContents_vx
(template_map)¶
-
_initialBindingTemplateMap
()¶
-
_moduleUID_vx
()¶
-
moduleForNamespace
(namespace)¶
-
namespaceModules
()¶
-
-
class
pyxb.binding.generate.
NamespaceModule
(generator, module_record, mr_scc, components=None, **kw)¶ Bases:
pyxb.binding.generate._ModuleNaming_mixin
This class represents a Python module that holds all the declarations belonging to a specific namespace.
-
classmethod
ForComponent
(component)¶
-
_NamespaceModule__ComponentModuleMap
= {}¶
-
_NamespaceModule__componentBindingName
= None¶
-
_NamespaceModule__components
= None¶
-
_NamespaceModule__moduleRecord
= None¶
-
_NamespaceModule__namespace
= None¶
-
_NamespaceModule__namespaceGroup
= None¶
-
_NamespaceModule__namespaceGroupHead
= None¶
-
_NamespaceModule__namespaceGroupModule
= None¶
-
_UniqueInModule
= {'CreateFromDOM', 'CreateFromDocument', '_module_typeBindings', 'pyxb', 'sys'}¶
-
_bindingPreface_vx
()¶
-
_bindingTagPrefix_vx
()¶
-
_finalizeModuleContents_vx
(template_map)¶
-
_initialBindingTemplateMap
()¶
-
_moduleUID_vx
()¶
-
bindComponent
(component)¶
-
componentsInNamespace
()¶
-
moduleRecord
()¶
-
namespace
()¶
-
namespaceGroupHead
()¶
-
namespaceGroupModule
()¶
-
namespaceGroupMulti
()¶
-
setNamespaceGroupModule
(namespace_group_module)¶
-
classmethod
-
pyxb.binding.generate.
PrefixModule
(value, text=None)¶
-
class
pyxb.binding.generate.
ReferenceEnumerationMember
(**kw)¶ Bases:
pyxb.binding.generate.ReferenceLiteral
-
enumerationElement
= None¶
-
-
class
pyxb.binding.generate.
ReferenceExpandedName
(**kw)¶ Bases:
pyxb.binding.generate.ReferenceLiteral
-
_ReferenceExpandedName__expandedName
= None¶
-
-
class
pyxb.binding.generate.
ReferenceFacet
(**kw)¶ Bases:
pyxb.binding.generate.ReferenceLiteral
-
_ReferenceFacet__facet
= None¶
-
-
class
pyxb.binding.generate.
ReferenceFacetMember
(**kw)¶ Bases:
pyxb.binding.generate.ReferenceLiteral
-
_ReferenceFacetMember__facetClass
= None¶
-
-
class
pyxb.binding.generate.
ReferenceLiteral
(**kw)¶ Bases:
object
Base class for something that requires fairly complex activity in order to generate its literal value.
-
_ReferenceLiteral__literal
= None¶
-
_ReferenceLiteral__ownerClass
= None¶
-
_addTypePrefix
(text, **kw)¶
-
asLiteral
()¶
-
setLiteral
(literal)¶
-
-
class
pyxb.binding.generate.
ReferenceNamespace
(**kw)¶ Bases:
pyxb.binding.generate.ReferenceLiteral
-
_ReferenceNamespace__namespace
= None¶
-
-
class
pyxb.binding.generate.
ReferenceSchemaComponent
(component, **kw)¶ Bases:
pyxb.binding.generate.ReferenceLiteral
-
_ReferenceSchemaComponent__component
= None¶
-
-
class
pyxb.binding.generate.
ReferenceWildcard
(wildcard, **kw)¶ Bases:
pyxb.binding.generate.ReferenceLiteral
-
_ReferenceWildcard__wildcard
= None¶
-
-
class
pyxb.binding.generate.
_CTDAuxData
(ctd)¶ Bases:
object
Helper class holding information need in both preparation and generation.
-
classmethod
Create
(ctd)¶
-
classmethod
Get
(ctd)¶
-
automaton
= None¶
-
contentBasis
= None¶
-
ctd
= None¶
-
edMultiples
= None¶
-
edSingles
= None¶
-
termTree
= None¶
-
classmethod
-
pyxb.binding.generate.
_GenerateAutomaton
(automaton, template_map, containing_state, lines, **kw)¶
-
class
pyxb.binding.generate.
_ModuleNaming_mixin
(generator, *args, **kw)¶ Bases:
object
-
classmethod
BindComponentInModule
(component, module)¶
-
classmethod
ComponentBindingModule
(component)¶
-
classmethod
_ForRecord
(module_record)¶
-
_ModuleNaming_mixin__ComponentBindingModuleMap
= {}¶
-
_ModuleNaming_mixin__RecordModuleMap
= {}¶
-
_ModuleNaming_mixin__anonCTDIndex
= None¶
-
_ModuleNaming_mixin__anonSTDIndex
= None¶
-
_ModuleNaming_mixin__bindingFile
= None¶
-
_ModuleNaming_mixin__bindingFilePath
= None¶
-
_ModuleNaming_mixin__generator
= None¶
-
_ModuleNaming_mixin__modulePath
= None¶
-
_ModuleNaming_mixin__moduleUID
= None¶
-
_ModuleNaming_mixin__referencedFromClass
= None¶
-
_ModuleNaming_mixin__referencedNamespaces
= None¶
-
_ModuleNaming_mixin__uniqueInClass
= None¶
-
_ModuleNaming_mixin__uniqueInModule
= None¶
-
classmethod
_RecordModule
(module)¶
-
_ReferencedFromClass
= {'_module_typeBindings', 'sys', 'pyxb'}¶ Identifiers defined in module that are accessed unqualified from class.
These include standard import module names and globals such as references to namespaces.
-
_UniqueInModule
= {'_module_typeBindings', 'sys', 'pyxb'}¶ Identifiers that are reserved within a module.
Subclasses extend this with the identifiers they add to the module. Module-level schema-derived identifiers (such as type definition and element names) are deconflicted from this set and from each other.
-
_bindComponent
(component)¶
-
_bindingPreface_vx
()¶
-
_bindingTagPrefix_vx
()¶
-
_importModule
(module)¶
-
_initializeUniqueInModule
(unique_in_module)¶
-
_moduleUID_vx
()¶
-
_referencedNamespaces
()¶
-
_setModulePath
(path_data)¶
-
addImportsFrom
(module)¶
-
bindingFile
()¶
-
bindingIO
()¶
-
bindingPreface
()¶ Return a block of binding text (comment or code) serving as a preface.
Normally this should describe the module contents.
-
bindingTag
()¶ Return a distinct string recorded in the first 4096 bytes of the binding file.
This is used to ensure uniqueness and avoid overwriting data belonging to a different binding. The return value comprises the class-specialized L{_bindingTagPrefix_vx} with the L{moduleUID}.
-
defineNamespace
(namespace, name, definition=None, **kw)¶
-
generator
()¶
-
importForDeclaration
(decl)¶ Import the binding from which the declaration came.
Figure out where the declaration came from. If it’s not part of this binding, make sure we import the binding associated with the schema from which it came. We need that, if not for something in the declaration itself, at least to be able to get the Namespace for the declaration’s name. None of this is relevant if the declaration has no namespace.
-
literal
(*args, **kw)¶
-
moduleContents
()¶
-
modulePath
()¶
-
moduleUID
()¶
-
nameInModule
(component)¶
-
pathFromImport
(module, name)¶ Python code reference to an object in an imported module
-
referenceNamespace
(namespace)¶
-
referenceSchemaComponent
(component, in_class=False)¶
-
uniqueInClass
(component)¶
-
uniqueInModule
()¶
-
writeToModuleFile
()¶
-
classmethod
-
pyxb.binding.generate.
_PrepareComplexTypeDefinition
(ctd, generator, nsm, module_context)¶
-
pyxb.binding.generate.
_PrepareSimpleTypeDefinition
(std, generator, nsm, module_context)¶
-
pyxb.binding.generate.
_SetNameWithAccessors
(component, container, is_plural, binding_module, nsm, kw)¶
-
pyxb.binding.generate.
_VCAppendAuxInit
(vc_source, aux_init, binding_module, kw)¶
-
pyxb.binding.generate.
_useEnumerationTags
(td)¶
-
pyxb.binding.generate.
elementDeclarationMap
(ed, binding_module, **kw)¶
-
pyxb.binding.generate.
pythonLiteral
(value, **kw)¶
-
pyxb.binding.generate.
simpleTypeOwnedEnumerationFacet
(std)¶
pyxb.binding.saxer module¶
This module contains support for generating bindings from an XML stream using a SAX parser.
-
class
pyxb.binding.saxer.
PyXBSAXHandler
(**kw)¶ Bases:
pyxb.utils.saxutils.BaseSAXHandler
A SAX handler class which generates a binding instance for a document through a streaming parser.
An example of using this to parse the document held in the (unicode) text value C{xmlt} is:
import pyxb.binding.saxer import io saxer = pyxb.binding.saxer.make_parser() handler = saxer.getContentHandler() saxer.parse(io.StringIO(xmlt)) instance = handler.rootObject()
-
_PyXBSAXHandler__XSITypeTuple
= ('http://www.w3.org/2001/XMLSchema-instance', 'type')¶
-
_PyXBSAXHandler__domDepth
= None¶
-
_PyXBSAXHandler__domHandler
= None¶
-
_PyXBSAXHandler__rootObject
= None¶
-
_PyXBSAXHandler__trace
= False¶
-
endElementNS
(name, qname)¶
-
reset
()¶ Reset the state of the handler in preparation for processing a new document.
@return: C{self}
-
rootObject
()¶ Return the binding object corresponding to the top-most element in the document
@return: An instance of L{basis._TypeBinding_mixin} (most usually a L{basis.complexTypeDefinition}.
@raise pyxb.[UnrecognizedDOMRootNodeError: No binding could be found to match the top-level element in the document.
-
startElementNS
(name, qname, attrs)¶
-
-
class
pyxb.binding.saxer.
_SAXElementState
(**kw)¶ Bases:
pyxb.utils.saxutils.SAXElementState
State required to generate bindings for a specific element.
If the document being parsed includes references to unrecognized elements, a DOM instance of the element and its content is created and treated as a wildcard element.
-
_SAXElementState__XSINilTuple
= ('http://www.w3.org/2001/XMLSchema-instance', 'nil')¶
-
_SAXElementState__attributes
= None¶
-
_SAXElementState__bindingInstance
= None¶
-
_SAXElementState__constructElement
(new_object_factory, attrs, content=None)¶
-
_SAXElementState__delayedConstructor
= None¶
-
_SAXElementState__domDepth
= None¶
-
_SAXElementState__domDocument
= None¶
-
_SAXElementState__elementBinding
= None¶
-
_SAXElementState__enclosingCTD
= None¶
-
enclosingCTD
()¶ The nearest enclosing complex type definition, as used for resolving local element/attribute names.
@return: An instance of L{basis.complexTypeDefinition}, or C{None} if the element is top-level
-
endBindingElement
()¶ Perform any end-of-element processing.
For simple type instances, this creates the binding instance. @return: The generated binding instance
-
endDOMElement
()¶ Actions upon leaving an element that is part of a DOM subtree.
-
enterDOMMode
(attrs)¶ Actions upon first encountering an element for which we cannot create a binding.
Invoking this transitions the parser into DOM mode, creating a new DOM document that will represent this element including its content.
-
inDOMMode
()¶
-
setElementBinding
(element_binding)¶ Record the binding to be used for this element.
Generally ignored, except at the top level this is the only way to associate a binding instance created from an xsi:type description with a specific element.
-
setEnclosingCTD
(enclosing_ctd)¶ Set the enclosing complex type definition for this element.
@param enclosing_ctd: The scope for a local element. @type enclosing_ctd: L{basis.complexTypeDefinition} @return: C{self}
-
startBindingElement
(type_class, new_object_factory, element_decl, attrs)¶ Actions upon entering an element that will produce a binding instance.
The element use is recorded. If the type is a subclass of L{basis.simpleTypeDefinition}, a delayed constructor is recorded so the binding instance can be created upon completion of the element; otherwise, a binding instance is created and stored. The attributes are used to initialize the binding instance (now, or upon element end).
@param type_class: The Python type of the binding instance @type type_class: subclass of L{basis._TypeBinding_mixin} @param new_object_factory: A callable object that creates an instance of the C{type_class} @param element_decl: The element use with which the binding instance is associated. Will be C{None} for top-level elements @type element_decl: L{basis.element} @param attrs: The XML attributes associated with the element @type attrs: C{xml.sax.xmlreader.Attributes} @return: The generated binding instance, or C{None} if creation is delayed
-
startDOMElement
(attrs)¶ Actions upon entering an element that is part of a DOM subtree.
-
-
pyxb.binding.saxer.
make_parser
(*args, **kw)¶ Extend L{pyxb.utils.saxutils.make_parser} to change the default C{content_handler_constructor} to be L{PyXBSAXHandler}.
pyxb.binding.xml_ module¶
Binding classes for types referenced by the attribute and attribute group declarations in the XML namespace (http://www.w3.org/XML/1998/namespace).
The content of this module was generated by PyXB and is coupled to the components defined in L{pyxb.namespace.builtin._XML}.
-
class
pyxb.binding.xml_.
STD_ANON_emptyString
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.string
,pyxb.binding.basis.enumeration_mixin
No information
-
_CF_enumeration
= <pyxb.binding.facets.CF_enumeration object>¶
-
_ExpandedName
= None¶
-
_STD_ANON_emptyString_FacetMap
= {<class 'pyxb.binding.facets.CF_minLength'>: <pyxb.binding.facets.CF_minLength object>, <class 'pyxb.binding.facets.CF_maxLength'>: <pyxb.binding.facets.CF_maxLength object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_whiteSpace object>, <class 'pyxb.binding.facets.CF_length'>: <pyxb.binding.facets.CF_length object>}¶
-
emptyString
= ''¶
-
-
class
pyxb.binding.xml_.
STD_ANON_lang
(*args, **kw)¶ Bases:
pyxb.binding.basis.STD_union
Simple type that is a union of pyxb.binding.datatypes.language, STD_ANON_emptyString
-
_CF_enumeration
= <pyxb.binding.facets.CF_enumeration object>¶
-
_CF_pattern
= <pyxb.binding.facets.CF_pattern object>¶
-
_ExpandedName
= None¶
-
_MemberTypes
= (<class 'pyxb.binding.datatypes.language'>, <class 'pyxb.binding.xml_.STD_ANON_emptyString'>)¶
-
_STD_ANON_lang_FacetMap
= {<class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>, <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>}¶
-
_STD_ANON_lang__SimpleTypeDefinition
= <pyxb.xmlschema.structures.SimpleTypeDefinition object>¶
-
-
class
pyxb.binding.xml_.
STD_ANON_space
(*args, **kw)¶ Bases:
pyxb.binding.datatypes.NCName
,pyxb.binding.basis.enumeration_mixin
No information
-
_CF_enumeration
= <pyxb.binding.facets.CF_enumeration object>¶
-
_ExpandedName
= None¶
-
_STD_ANON_space_FacetMap
= {<class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pattern object>, <class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF_enumeration object>}¶
-
_STD_ANON_space__SimpleTypeDefinition
= <pyxb.xmlschema.structures.SimpleTypeDefinition object>¶
-
default
= 'default'¶
-
preserve
= 'preserve'¶
-
Module contents¶
Material used to generate and execute bindings generated by the PyXB package.