XML/XHTML Templates for peak.web , similar to Twisted's Woven
TODO
Address traversal nesting for referenced data
Dynamic attributes, independent of element?
Phase out old PWT syntax
implement sub-template support (convert doc->DOMlet in another doc)
add hooks for DOMlets to validate the list of supplied parameters
list DOMlet needs iteration variables, maybe paging
need translation DOMlets, among lots of other kinds of DOMlets
support DTD fragments, and the rest of the XML standard
Imported modules
|
|
from __future__ import generators
from environ import traverseItem, traverseDefault
from errors import NotFound
from interfaces import *
from peak.api import *
from peak.util import SOX, imports
from places import Decorator
from publish import TraversalPath
from xml.sax.saxutils import quoteattr, escape
|
Functions
|
|
|
|
URLTag
|
URLTag (
parentComponent,
componentName=None,
domletProperty=None,
**kw,
)
Create a URLText or URLAttribute DOMlet based on parameters
|
|
finishElement
|
finishElement ( parser, data )
|
|
infiniter
|
infiniter ( sequence )
|
|
negotiateDefine
|
negotiateDefine (
parser,
data,
name,
value,
)
|
|
negotiateDomlet
|
negotiateDomlet (
parser,
data,
name,
value,
)
|
|
negotiatorFactory
|
negotiatorFactory ( domletFactory )
|
|
nodeIs
|
nodeIs (
mode,
parser,
data,
name,
value,
)
|
|
setupDocument
|
setupDocument ( parser, data )
|
|
setupElement
|
setupElement ( parser, data )
|
|
startElement
|
startElement ( parser, data )
|
|
withParam
|
withParam (
parser,
data,
name,
value,
)
|
Classes
|
|
|
|