Package pyxb :: Package binding :: Module facets :: Class CF_pattern
[hide private]
[frames] | no frames]

type CF_pattern

source code

    object --+            
             |            
       cscRoot --+        
                 |        
             Facet --+    
                     |    
     ConstrainingFacet --+
                         |
        object --+       |
                 |       |
           cscRoot --+   |
                     |   |
_CollectionFacet_mixin --+
                         |
                        CF_pattern

A facet that constrains the lexical representation of a value to match one of a set of patterns.

See 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 basestring. 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.

To Do: 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.

Nested Classes [hide private]
_CollectionFacet_itemType
This class represents individual patterns that appear within a CF_pattern collection.
_ValueDatatype
XMLSchema datatype string.
Instance Methods [hide private]
 
patternElements(self) source code
 
__init__(self, **kw)
Create a facet instance, initializing it from the keyword parameters.
source code
 
addPattern(self, **kw) source code
 
_validateConstraint_vx(self, value) source code

Inherited from ConstrainingFacet: validateConstraint

Inherited from ConstrainingFacet (private): _setFromKeywords_vb

Inherited from Facet: __str__, annotation, baseTypeDefinition, ownerTypeDefinition, setFromKeywords, value, valueDatatype

Inherited from Facet (private): _value, _valueString

Inherited from _CollectionFacet_mixin: items, iteritems

Inherited from _CollectionFacet_mixin (private): _items

Class Methods [hide private]

Inherited from Facet: ClassForFacet, Name

Class Variables [hide private]
  _Name = 'pattern'
  __patternElements = None

Inherited from ConstrainingFacet: Facets

Inherited from ConstrainingFacet (private): _FacetPrefix

Method Details [hide private]

__init__(self, **kw)
(Constructor)

source code 

Create a facet instance, initializing it from the keyword parameters.

Overrides: cscRoot.__init__

_validateConstraint_vx(self, value)

source code 
Overrides: ConstrainingFacet._validateConstraint_vx