summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/xml
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2019-05-27 06:58:48 +0000
committerXavier Morel <xmo@odoo.com>2019-05-27 06:58:48 +0000
commit16cd987a53bcc7c29af28b58bec8d8bf6cc1b9d7 (patch)
tree14d22691be9801986bb133adac3d614399e8d15f /addons/web_editor/static/src/xml
parent9b823c9c6a6333ee9b13cd2096afe46cbf8eddd5 (diff)
[IMP] validation error messages through optional use of jing
A long-standing issue with data files is that lxml (libxml2) has trouble reporting useful errors, often going no further than "the file is not valid" (libxml2 apparently has issues reporting useful errors within non-trivial <choice>, which Odoo's data file schema makes extensive use of) e.g. if a data file has some stray text in an unexpected place (in this case, after a `</field>` tag in a `<record>`), libxml2 will report: ERROR:RELAXNGV:RELAXNG_ERR_EXTRACONTENT: Element odoo has extra content: data Jing (the reference implementation) provides significantly better error reporting: error: text not allowed here; expected the element end-tag or element "field" It's in java which is inconvenient and expensive for baseline validation (and as a hard dependency), but there's now a "jingtrang" package which bundles the relevant jars & invocation on pypi (https://pypi.org/project/jingtrang/), making for a convenient optional dependency for better development experience. closes odoo/odoo#33666 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Diffstat (limited to 'addons/web_editor/static/src/xml')
0 files changed, 0 insertions, 0 deletions