diff options
| author | Simon Lejeune <sle@openerp.com> | 2016-12-28 13:52:29 +0100 |
|---|---|---|
| committer | Simon Lejeune <sle@openerp.com> | 2017-01-02 16:05:50 +0100 |
| commit | 45d26bc2572b5bdd348624936aeb1e3fbdb62c45 (patch) | |
| tree | 4021c0c5631ac779e1e03d976519336b4e5bab31 /setup/setup_dev.py | |
| parent | b3a1109372aca70f5839ed438039005ec59dee67 (diff) | |
[ADD] QWeb: xml namespaces support in static template
With this patch, QWeb is able to support xml namespace declaration and
prefixes. As this patch only deals with static template, the only method
we have to patch is `_compile_static_node`. We make it able to serialize
etree node having an nsmap by formating them to restore the xml prefix
if present or to declare the xmlns attribute if needed. To know if the
namespace definition is needed, we compare the tuples of (xmlprefix,
xmldefinition) of the node and its parent. The namespace definition of
the parent is passed by a dict in the `options` key. We took care of
dealing with the mutable + recursion thing by working with copy of this
namespace definition dict.
Two tests have been introduced, basically what we pass to QWeb is what
it has to return.
Diffstat (limited to 'setup/setup_dev.py')
0 files changed, 0 insertions, 0 deletions
