Package xmlschema_acue :: Package validators :: Module facets :: Class XsdEnumerationFacets

Class XsdEnumerationFacets

source code



Sequence of XSD enumeration facets. Values are validates if match any of enumeration values.

<enumeration
  id = ID
  value = anySimpleType
  {any attributes with non-schema namespace . . .}>
  Content: (annotation?)
</enumeration>

Instance Methods
 
__getitem__(self, i) source code
 
__setitem__(self, i, elem) source code
 
__delitem__(self, i) source code
 
__len__(self) source code
 
insert(self, i, elem) source code

Inherited from xsdbase.XsdComponent: __setattr__, get_global, match, tostring

Inherited from xsdbase.XsdValidator: __copy__, __str__, __unicode__, copy

Static Methods

Inherited from XsdFacet: validator

Class Variables

Inherited from xsdbase.XsdComponent: name, parent, qualified

Method Details

__init__(self, elem, schema, parent, base_type)
(Constructor)

source code 
Decorators:
Overrides: xsdbase.XsdValidator.__init__

__repr__(self)
(Representation operator)

source code 
Decorators:
Overrides: xsdbase.XsdComponent.__repr__

__call__(self, value)
(Call operator)

source code 
Decorators:
Overrides: XsdFacet.__call__

all_errors(self)

source code 

A list with all the building errors of the XSD validator and its components.

Decorators:
  • @property

base_facet(self)

source code 

An object of the same type if the instance has a base facet, `None` otherwise.

Decorators:
  • @property

built(self)

source code 

Property that is ``True`` if schema validator has been fully parsed and built, ``False`` otherwise.

Decorators:
  • @property
Overrides: xsdbase.XsdValidator.built
(inherited documentation)

default_namespace(self)

source code 

Property that references to schema's default namespaces.

Decorators:
  • @property

id(self)

source code 

The ``'id'`` attribute of the component tag, ``None`` if missing.

Decorators:
  • @property

is_global(self)

source code 

Is `True` if the instance is a global component, `False` if it's local.

Decorators:
  • @property

is_matching(self, name, default_namespace=None)

source code 

Returns `True` if the component name is matching the name provided as argument, `False` otherwise.

:param name: a local or fully-qualified name. :param default_namespace: used if it's not None and not empty for completing the name argument in case it's a local name.

Decorators:

iter_ancestors(self, xsd_classes=None)

source code 

Creates an iterator for XSD ancestor components, schema excluded. Stops when the component is global or if the ancestor is not an instance of the specified class/classes.

:param xsd_classes: provide a class or a tuple of classes to iterates over only a specific classes of components.

Decorators:

iter_components(self, xsd_classes=None)

source code 

Creates an iterator for XSD subcomponents.

:param xsd_classes: provide a class or a tuple of classes to iterates over only a specific classes of components.

Decorators:
Overrides: XsdValidator.iter_components

local_name(self)

source code 
Decorators:
  • @property

maps(self)

source code 

Property that references to schema's global maps.

Decorators:
  • @property

namespaces(self)

source code 

Property that references to schema's namespace mapping.

Decorators:
  • @property

parse_error(self, error, elem=None)

source code 

Helper method for registering parse errors. Does nothing if validation mode is 'skip'. Il validation mode is 'lax' collects the error, otherwise raise the error.

:param error: can be a parse error or an error message. :param elem: the Element instance related to the error, for default uses the 'elem' attribute of the validator, if it's present.

Decorators:

prefixed_name(self)

source code 
Decorators:
  • @property

qualified_name(self)

source code 
Decorators:
  • @property

schema_elem(self)

source code 

The reference element of the schema for the component instance.

Decorators:
  • @property

source(self)

source code 

Property that references to schema source.

Decorators:
  • @property

target_namespace(self)

source code 

Property that references to schema's targetNamespace.

Decorators:
  • @property

validation_attempted(self)

source code 

Property that returns the *validation status* of the XSD validator. It can be 'full', 'partial' or 'none'.

| https://www.w3.org/TR/xmlschema-1/#e-validation_attempted | https://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/#e-validation_attempted

Decorators:
  • @property
Overrides: xsdbase.XsdValidator.validation_attempted
(inherited documentation)

validity(self)

source code 

Property that returns the XSD validator's validity. It can be ‘valid’, ‘invalid’ or ‘notKnown’.

| https://www.w3.org/TR/xmlschema-1/#e-validity | https://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/#e-validity

Decorators:
  • @property