3 |
# this file is placed on public domain |
# this file is placed on public domain |
4 |
|
|
5 |
from backwards_compatibility import * |
from backwards_compatibility import * |
6 |
from utils import pack_list |
from utils import pack_list, XML |
7 |
|
from core import Literal |
8 |
import types |
import types |
9 |
|
|
10 |
class StopTransform(Exception): |
class StopTransform(Exception): |
106 |
element = pp(element, context) |
element = pp(element, context) |
107 |
return element |
return element |
108 |
|
|
109 |
|
class RenderingEngine(Engine): |
110 |
|
"Transforms something, and renders it to XML" |
111 |
|
def postprocess(self, element, context): |
112 |
|
element = Engine.postprocess(self, element, context) |
113 |
|
return Literal(XML(element, context.root_xmlns_map, context.encoding)) |
114 |
|
|
115 |
|
|
116 |
class AttributeHandler(object): |
class AttributeHandler(object): |
117 |
"Handler that handles each attribute in turn" |
"Handler that handles each attribute in turn" |