lxml.etree.Schematron

Package lxml :: Module etree :: Class Schematron |
[frames] | no frames]

# Class Schematron

    object --+
             |
    _Validator --+
                 |
                Schematron

Schematron(self, etree=None, file=None) A Schematron validator.

Pass a root Element or an ElementTree to turn it into a validator. Alternatively, pass a filename as keyword argument 'file' to parse from the file system.

Instance Methods
__call__(self, etree) Validate doc using Schematron. |
__init__(self, etree=None, file=None) x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
a new object with type S, a subtype of T |
__new__(T, S, ...) |
Inherited from `_Validator`: `assertValid`, `assert_`, `validate` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Properties
Inherited from `_Validator`: `error_log` Inherited from `object`: `__class__`

Method Details

### __call__(self, etree) (Call operator) |
Validate doc using Schematron. Returns true if document is valid, false if not.

### __init__(self, etree=None, file=None) (Constructor) |
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: object.__init__

### __new__(T, S, ...) |
Returns: a new object with type S, a subtype of T Overrides: object.__new__