| Home | Trees | Indices | Help |
|
|---|
|
|
Copyright (c) 2005-2006 Guido Wesdorp. All rights reserved. This software is distributed under the terms of the Templess License. See LICENSE.txt for license text. E-mail: johnny@johnnydebris.net
A very compact, XML based templating system. It has only 5 different directives, and doesn't allow any logic inside the templates, but instead expects the application to provide a dict with all the data (as strings or XML nodes) completely prepared. This makes it quite restrictive, and harder to seperately work on design and logic (the template has to very strictly adhere to the format of the dict), but makes it an environment extremely suitable for developers (since all development is done from code rather than from the template, and they don't have to learn a new, quirky templating language).
|
|||
|
xmlstring wrapper around unicode to mark a string as XML |
||
|
objectcontext wrapper around objects to allow Templess to traverse attributes... |
||
|
node node base |
||
|
elnode XML element |
||
|
templessnode templess element node |
||
|
textnode text element |
||
|
cdatanode cdata node |
||
|
commentnode comment node |
||
|
treebuilderhandler nanosax handler to convert XML to a node tree |
||
|
template a Templess template |
||
|
cgitemplate simple cgi engine for serving templess templates |
||
|
|||
| iterwrapper(iterable) | ||
|
is_iterable_not_string(v) determine if something is iterable but not a string |
||
|
entitize(s) entitize a string so it can be used in XML content and attrs |
||
|
|||
|
__appname__ = 'templess'
|
||
|
__version__ = '0.2'
|
||
|
__author__ = 'Guido Wesdorp <johnny@johnnydebris.net>'
|
||
|
__last_modified_date__ = '$Date: 2006-10-06 13:20:37 +0200 (Fri, 06 Oct 2006) $'
|
||
|
__last_author__ = '$Author: johnny $'
|
||
|
__revision__ = '$Revision: 86 $'
|
||
|
__footer__ = 'templess v0.2, (c) Guido Wesdorp <johnny@johnnydebr...
|
||
|
XMLNS = 'http://johnnydebris.net/xmlns/templess'
|
||
|
xml = open(sys.argv [1]).read()
|
||
|
handler = treebuilderhandler('UTF-8')
|
||
|
parser = nanosax.nsparser(handler)
|
||
Imports: nanosax, sys
|
|||
|
|
|
|
|||
__appname__None
|
__version__None
|
__author__None
|
__last_modified_date__None
|
__last_author__None
|
__revision__None
|
__footer__None
|
XMLNSNone
|
xmlNone
|
handlerNone
|
parserNone
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0alpha3 on Mon Nov 13 21:49:06 2006 | http://epydoc.sourceforge.net |