4Suite API Documentation

Module amara

#Module amara
Functions:

Modules

Convenience functions for using the Amara bindery.
# -*- coding: iso-8859-1 -*- #Required in Python 2.2, and must be the first import
Python compiler from DTLL (ISO DSDL Part 5: Datatypes) to a Python data types script
Python compiler from ISO Schematron to a Python validator script
A command line tool for running reports on XML files.

Functions

parse(source, uri=None, rules=None, binderobj=None, prefixes=None)
Convenience function for parsing XML. Use this function with a single argument, which is a string (not Unicode object), file-like object (stream), file path or URI. Returns a document binding object.
Only use this function to parse self-contained  XML (i.e. not requiring
access to any other resource).  For example, do not use it for XML with
external entities.  If you get URI resolution errors, pass in a URI
parameter.

uri - establish a base URI for the XML document entity being parsed,
      required if source is a string or stream containing XML that
      uses any external resources.  If source is a path or URI, then
      this parameter, if given, is ignored
rules - a list of bindery rule objects to fine-tune the binding
binderobj - optional binder object to control binding details,
            the default is None, in which case a binder object
            will be created
prefixes - dictionary mapping prefixes to namespace URIs
           the default is None