<commit_before>"""Helper classes that maintain the content model of XMLSchema in the binding
classes.

AttributeUse and ElementUse 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.

ContentModelTransition, ContentModelState, and ContentModel are used to store
a deterministic finite automaton which is used to translate DOM nodes into
values stored in an instance corresponding to a complex type definition.

ModelGroupAllAlternative and ModelGroupAll represent special nodes in the DFA
that support a model group with compositor "all" in a way that does not result
in an exponential state explosion in the DFA.

Particle, ModelGroup, and Wildcard are used to encode an earlier
representation of the content model, now used only for generating DOM
instances from bindings (as opposed to the other direction handled by
ContentModel).
"""

import pyxb
import pyxb.Namespace
import basis

import xml.dom

class AttributeUse (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 as pairs of (provided, value), where provided is a
    boolean indicating whether a value for the attribute was provided by the
    DOM node, and value is an instance of the attribute datatype.  The
    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.
    """

    __tag = None       # Unicode XML tag @todo not including namespace
    __pythonField = None # Identifier used for this attribute within the owning class
    __valueAttributeName = None # Private attribute used in instances to hold the attribute value
    __dataType = None  # PST datatype
    __unicodeDefault = None     # Default value as a unicode string, or None
    __defaultValue = None       # Default value as an instance of datatype, or None
    __fixed = False             # If True, value cannot be changed
    __required = False          # If True, attribute must appear<commit_msg>Note Wildcard is still being used<commit_after>"""Helper classes that maintain the content model of XMLSchema in the binding
classes.

AttributeUse and ElementUse 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.

ContentModelTransition, ContentModelState, and ContentModel are used to store
a deterministic finite automaton which is used to translate DOM nodes into
values stored in an instance corresponding to a complex type definition.

ModelGroupAllAlternative and ModelGroupAll represent special nodes in the DFA
that support a model group with compositor "all" in a way that does not result
in an exponential state explosion in the DFA.

Particle, ModelGroup, and Wildcard are used to encode an earlier
representation of the content model, now used only for generating DOM
instances from bindings (as opposed to the other direction handled by
ContentModel).  Wildcard is also used in the DFA-based content model.
"""

import pyxb
import pyxb.Namespace
import basis

import xml.dom

class AttributeUse (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 as pairs of (provided, value), where provided is a
    boolean indicating whether a value for the attribute was provided by the
    DOM node, and value is an instance of the attribute datatype.  The
    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.
    """

    __tag = None       # Unicode XML tag @todo not including namespace
    __pythonField = None # Identifier used for this attribute within the owning class
    __valueAttributeName = None # Private attribute used in instances to hold the attribute value
    __dataType = None  # PST datatype
    __unicodeDefault = None     # Default value as a unicode string, or None
    __defaultValue = None       # Default value as an instance of datatype, or None
    __fixed = False             # If True, value cannot be changed
    __required = False          # If True, attribute must appear
{'fraction_non_alphanumeric': 0.030500112132765194, 'fraction_numerical': 0.0, 'mean_word_length': 3.8373101952277655, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1967726', 'n_tokens_mistral': 1034, 'n_tokens_neox': 1003, 'n_words': 631}