Package s3 :: Module s3xml :: Class S3XMLFormat
[frames] | no frames]

Class S3XMLFormat

source code

object --+
         |
        S3XMLFormat

Helper class to store a pre-parsed stylesheet

Instance Methods
 
__init__(self, stylesheet)
Constructor
source code
 
get_fields(self, tablename)
Get the fields to include/exclude for the specified table.
source code
 
transform(self, tree, **args)
Transform an element tree using this format
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, stylesheet)
(Constructor)

source code 

Constructor

Parameters:
  • stylesheet - the stylesheet (pathname or stream)
Overrides: object.__init__

get_fields(self, tablename)

source code 

Get the fields to include/exclude for the specified table.

Parameters:
  • tablename - the tablename
Returns:
tuple of lists (include, exclude) of fields to include or exclude. None indicates "all fields", whereas an empty list indicates "no fields".

transform(self, tree, **args)

source code 

Transform an element tree using this format

Parameters:
  • tree - the element tree
  • args - parameters for the stylesheet