BigBrotherBot v1.9.0
System Development Information for the BigBrotherBot project.

b3::lib::elementtree::ElementInclude Namespace Reference

Classes

class  FatalIncludeError
 Fatal include error. More...

Functions

def copy
def default_loader
 Default loader.
def include
 Expand XInclude directives.

Variables

string XINCLUDE = "{http://www.w3.org/2001/XInclude}"
string XINCLUDE_INCLUDE = "include"
string XINCLUDE_FALLBACK = "fallback"

Function Documentation

def b3::lib::elementtree::ElementInclude::copy (   elem)
def b3::lib::elementtree::ElementInclude::default_loader (   href,
  parse,
  encoding = None 
)

Default loader.

This loader reads an included resource from disk.

Parameters:
hrefResource reference.
parseParse mode. Either "xml" or "text".
encodingOptional text encoding.
Returns:
The expanded resource. If the parse mode is "xml", this is an ElementTree instance. If the parse mode is "text", this is a Unicode string. If the loader fails, it can return None or raise an IOError exception.
Exceptions:
IOErrorIf the loader fails to load the resource.
def b3::lib::elementtree::ElementInclude::include (   elem,
  loader = None 
)

Expand XInclude directives.

Parameters:
elemRoot element.
loaderOptional resource loader. If omitted, it defaults to default_loader. If given, it should be a callable that implements the same interface as default_loader.
Exceptions:
FatalIncludeErrorIf the function fails to include a given resource, or if the tree contains malformed XInclude elements.
IOErrorIf the function fails to load a given resource.

Variable Documentation

string b3::lib::elementtree::ElementInclude::XINCLUDE = "{http://www.w3.org/2001/XInclude}"
 All Classes Namespaces Files Functions Variables Properties