summaryrefslogtreecommitdiff
path: root/setup/setup_dev.py
diff options
context:
space:
mode:
authorSimon Lejeune <sle@openerp.com>2016-12-28 13:54:29 +0100
committerSimon Lejeune <sle@openerp.com>2017-01-02 16:07:06 +0100
commit0d3af7ce1cf843cf00fbd719f2007cd0c6615404 (patch)
tree2ed346ca000804338ab37ffd02d22c52dc096fe9 /setup/setup_dev.py
parent2d3c928d4752bda69561a69ce92d14336b337732 (diff)
[FIX] ir.ui.view: `locate_node` of a ns prefixed element
According to [1], "If your XPath expression uses namespace prefixes, you must define them in a prefix mapping.". It makes sense because an xpath to a prefixed tag is not able to uniquely locate the tag in the parent view (it is possible to redefine the ns definition of a prefix, so you could have multiple elements matching). We chose to define the nsmap to locate the element in the parent view by using the lxml internal form to qualify a node ({ns def}tagname). This form is not compatible with etree.xpath but is with etree.ETXPath. Fortunately, etree.ETXPath is compatible with the classic xpath expressions so we'll use this one by default in `locate_node`. A test has been introduced to showcase the problem. http://lxml.de/xpathxslt.html#namespaces-and-prefixes: Namespaces and prefixes
Diffstat (limited to 'setup/setup_dev.py')
0 files changed, 0 insertions, 0 deletions