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]
  unicode
str(object='') -> string
  basestring
str(object='') -> string
  Schematron
An ISO Schematron validator.
Functions [hide private]
 
stylesheet_params(**kwargs)
Convert keyword args to a dictionary of stylesheet parameters. XSL stylesheet parameters must be XPath expressions, i.e.:
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/stefan/source/Python/lxml/lxml-release...
  extract_xsd = <lxml.etree.XSLT object>
  extract_rng = <lxml.etree.XSLT object>
  iso_dsdl_include = <lxml.etree.XSLT object>
  iso_abstract_expand = <lxml.etree.XSLT object>
  iso_svrl_for_xslt1 = <lxml.etree.XSLT object>
  svrl_validation_errors = //svrl:failed-assert
  schematron_schema_valid = <lxml.etree.RelaxNG object>
  __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/stefan/source/Python/lxml/lxml-release/src/lxml/isoschematron/r\
esources'