lxml.isoschematron

Package lxml :: Package isoschematron |
[hide private]
[frames] | no frames]

# Package isoschematron

source code

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

Classes | [hide private]
| Schematron An ISO Schematron validator.

Functions | [hide private]
stylesheet_params(**kwargs) Convert keyword args to a dictionary of stylesheet parameters. | source code
_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. | source code

Variables | [hide private]
| XML_SCHEMA_NS = ``'``http://www.w3.org/2001/XMLSchema``'``
| RELAXNG_NS = ``'``http://relaxng.org/ns/structure/1.0``'``
| SCHEMATRON_NS = ``'``http://purl.oclc.org/dsdl/schematron``'``
| SVRL_NS = ``'``http://purl.oclc.org/dsdl/svrl``'``
| _schematron_root = ``'``{http://purl.oclc.org/dsdl/schematron}schema``'``
| _xml_schema_root = ``'``{http://www.w3.org/2001/XMLSchema}schema``'``
| _resources_dir = ``'``/home/sbehnel/source/Python/lxml/lxml-HEAD/s``...``
| extract_xsd = `_etree.XSLT(_etree.parse(os.path.join(_resources`...``
| extract_rng = `_etree.XSLT(_etree.parse(os.path.join(_resources`...``
| iso_dsdl_include = `_etree.XSLT(_etree.parse(os.path.join(_reso`...``
| iso_abstract_expand = `_etree.XSLT(_etree.parse(os.path.join(_r`...``
| iso_svrl_for_xslt1 = `_etree.XSLT(_etree.parse(os.path.join(_re`...``
| svrl_validation_errors = `//svrl:failed-assert`
| schematron_schema_valid = `_etree.RelaxNG(_etree.parse(os.path.`...``
| __package__ = ``'``lxml.isoschematron``'``

Function Details | [hide private]

### stylesheet_params(**kwargs) | source code
    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.

Variables Details | [hide private]

  ### _resources_dir Value:
      '/home/sbehnel/source/Python/lxml/lxml-HEAD/src/lxml/isoschematron/res
      ources'

  ### extract_xsd Value:
      _etree.XSLT(_etree.parse(os.path.join(_resources_dir, 'xsl', 'XSD2Scht
      rn.xsl')))

  ### extract_rng Value:
      _etree.XSLT(_etree.parse(os.path.join(_resources_dir, 'xsl', 'RNG2Scht
      rn.xsl')))

  ### iso_dsdl_include Value:
      _etree.XSLT(_etree.parse(os.path.join(_resources_dir, 'xsl', 'iso-sche
      matron-xslt1', 'iso_dsdl_include.xsl')))

  ### iso_abstract_expand Value:
      _etree.XSLT(_etree.parse(os.path.join(_resources_dir, 'xsl', 'iso-sche
      matron-xslt1', 'iso_abstract_expand.xsl')))

  ### iso_svrl_for_xslt1 Value:
      _etree.XSLT(_etree.parse(os.path.join(_resources_dir, 'xsl', 'iso-sche
      matron-xslt1', 'iso_svrl_for_xslt1.xsl')))

  ### schematron_schema_valid Value:
      _etree.RelaxNG(_etree.parse(os.path.join(_resources_dir, 'rng', 'iso-s
      chematron.rng')))