PyXsdCompiler

class PyXsdCompiler

Bases: object

Has no public constructor, use PySaxonProcessor.new_xsd_compiler().

compile(**kwds)

Load a schema document from a given Source. Supplied as file name, schema text, or XDM node

Keyword Arguments:
  • xsd_text (str) – A string containing the schema document.

  • xsd_file (str) – The path to the XSD file to be compiled.

  • xsd_node (PyXdmNode) – The Schema document to be compiled.

  • xsd_list (list[str]) – A list of schema document file paths.

Only one of xsd_text, xsd_file, xsd_node, or xsd_list should be supplied.

cwd

Property represents the current working directory

empty_schema()
import_components(kwds)

Import a precompiled Schema Component Model from a given Source. The schema components derived from this schema document are added to the cache of schema components maintained by this SchemaManager

Keyword Arguments:
  • file_name (str) – The path to the Schema Component Model to be imported.

  • node (PyXdmNode) – The Schema Component Model to be imported.

set_cwd(self, cwd)

Set the current working directory :param cwd: current working directory :type cwd: str

set_property(name, value)

Set a property specific to the PyXsdCompiler in use.

Parameters:
  • name (str) – The name of the property

  • value (str) – The value of the property

Example

?? TODO:

set_xsd_version(version)

Set the XSD Version

Parameters:

version (str) – XSD Version

xsd_version

Property represents the XSD Version