Package restxsl :: Module loader :: Class EntityLoader
[frames | no frames]

Type EntityLoader

object --+
         |
        EntityLoader


libxml2 callback that applies a base path to all absolute stylesheet references. This callback is used by libxml2 when an XSL include or import directive is encountered.

Subclasses can extend this class and override loadFile() if they wish to load XSL files from other locations (a database, for example).
Method Summary
  __init__(self, basePath, relPath)
Initialize the EntityLoader with the base and relative paths that will be used to locate stylesheets.
  __call__(self, url, id, ctx)
libxml2 entity loader callback.
str loadFile(self, path)
Load the XSL file with the given path.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Method Details

__init__(self, basePath, relPath)
(Constructor)

Initialize the EntityLoader with the base and relative paths that will be used to locate stylesheets.
Parameters:
basePath - The base path that should be used for absolute stylesheet references.
           (type=str)
relPath - The path that should be used for relative stylesheet references.
           (type=str)
Overrides:
__builtin__.object.__init__

__call__(self, url, id, ctx)
(Call operator)

libxml2 entity loader callback.

loadFile(self, path)

Load the XSL file with the given path.
Parameters:
path - The path to the XSL file that need to be loaded. This path is taken straight from the XSL file and may be relative, absolute, or even a URL>
           (type=str)
Returns:
The contents of the XSL file, or None if the file was not found.
           (type=str)

Generated by Epydoc 2.1 on Wed Jul 12 11:20:40 2006 http://epydoc.sf.net