package documentation

The lxml.isoschematron package implements ISO Schematron support on top of the pure-xslt 'skeleton' implementation.

From __init__.py:

Class ​Schematron An ISO Schematron validator.
Function stylesheet​_params Convert keyword args to a dictionary of stylesheet parameters. XSL stylesheet parameters must be XPath expressions, i.e.:
Constant RELAXNG​_NS Undocumented
Constant SCHEMATRON​_NS Undocumented
Constant SVRL​_NS Undocumented
Constant XML​_SCHEMA​_NS Undocumented
Variable extract​_rng Undocumented
Variable extract​_xsd Undocumented
Variable iso​_abstract​_expand Undocumented
Variable iso​_dsdl​_include Undocumented
Variable iso​_svrl​_for​_xslt1 Undocumented
Variable schematron​_schema​_valid Undocumented
Variable svrl​_validation​_errors Undocumented
Function ​_stylesheet​_param​_dict Return a copy of paramsDict, updated with kwargsDict entries, wrapped as stylesheet arguments. kwargsDict entries with a value of None are ignored.
Variable ​_resources​_dir Undocumented
Variable ​_schematron​_root Undocumented
Variable ​_xml​_schema​_root Undocumented
XML_SCHEMA_NS: str =

Undocumented

Value
'http://www.w3.org/2001/XMLSchema'
RELAXNG_NS: str =

Undocumented

Value
'http://relaxng.org/ns/structure/1.0'
SCHEMATRON_NS: str =

Undocumented

Value
'http://purl.oclc.org/dsdl/schematron'
SVRL_NS: str =

Undocumented

Value
'http://purl.oclc.org/dsdl/svrl'
_schematron_root =

Undocumented

_xml_schema_root =

Undocumented

_resources_dir =

Undocumented

extract_xsd =

Undocumented

extract_rng =

Undocumented

iso_dsdl_include =

Undocumented

iso_abstract_expand =

Undocumented

iso_svrl_for_xslt1 =

Undocumented

svrl_validation_errors =

Undocumented

schematron_schema_valid =

Undocumented

def stylesheet_params(**kwargs):

Convert keyword args to a dictionary of stylesheet parameters. XSL stylesheet parameters must be XPath expressions, i.e.:

  • string expressions, like "'5'"
  • simple (number) expressions, like "5"
  • valid XPath expressions, like "/a/b/text()"

This function converts native Python keyword arguments to stylesheet parameters following these rules: If an arg is a string wrap it with XSLT.strparam(). If an arg is an XPath object use its path string. If arg is None raise TypeError. Else convert arg to string.

def _stylesheet_param_dict(paramsDict, kwargsDict):
Return a copy of paramsDict, updated with kwargsDict entries, wrapped as stylesheet arguments. kwargsDict entries with a value of None are ignored.