Created on 2008-06-06.20:12:26 by htgoebel, last changed 99 months ago by ced.
Fixed with rev 318627a86be8
Codereview updated to trunk: https://codereview.appspot.com/3991046/
Need first to move button definition outside the XML.
Instead of complicate the edition by introducing namespaces (which require some kind of versioning), I propose to move out the XML of the view in a separate file. So we could have a views directory in each modules which contains XML files having the name of the record id. To achieve this, we must introduce a new field in ir.ui.view that is a path to XML file and change the arch field into a Function that will read this file. An other advantage of moving to this concept is that in development it will be possible to edit the views without update. (and even without restart but it will require some customization of the cache).
Author of both attachments: * issue184086_1.diff * htgoebl-patch.txt is htgoebel:
I made a copy of htgoebels patch for my last winter holiday. I'm unsure if it is the most recent version I catched. Anyway feel free to review it and bring it up to tip.
Are there any news on this? The appspot link doesn't work. I'd really like to see a full parseable xml file as it would ease the editing of the files. Its hard enough to have no gui builder.
working on it.
No. I dod not had time yet top implement it.
I'll assign this issue to me :-)
with lxml validation is easy :-) Implemented relax-ng validation, see issue132
We have removed pyxml dependency and use lxml instead. lxml have also validator for relax-ng.
So uso pointed out a very interesting part of my proposal: On-the-fly validation when writing/editing XML-files. The XML-structure is meant to have arbitrary data in the forms. Well, not really: if the field is of arch "xml", it's content hat to be valid xml. Even more: the allowed content depends on the field type (fomr, menu, tre, ...) If this could be checks as early as editing, this saves developer time :-)
Another flaw on CDATA is the missing syntax highlighting for this blocks. I am working with the terminal editor joe. As a workaround I avoid the CDATA block to the end of 'layout', but on debugging sessions it's hard to find errors.
CDATA in tryton xml are not ugly. They prevent the parser to parse usefulness xml part for view. The xml of views are validated when they are writing in the DB.
tryton's .xml files often contain CDATA sections for wrapping XML. This is ugly, unnecessary and unsafe: you can not validate the contained XML easily. I propose the following: 1) Move from DTD to Relax NG, which allows to use namespaces (and is easy to read). 2) Rework validation to use RelaxNG 3) Rework .xml files to contain NS (keep CDATA for this step) 4) Convert CDATA-XML to "normal" XML w/ namespaces 5) Be Happy :-) This would further allow removing the redundant <tryton> tag. If b2c supports this idea I may volunteer implementing this.
|2012-09-26 19:39:20||ced||set||status: testing -> resolved|
messages: + msg11549
|2012-08-23 15:56:04||ced||set||status: in-progress -> testing|
messages: + msg11391
|2012-08-22 23:02:53||ced||set||status: deferred -> in-progress|
messages: + msg11388
|2011-10-10 20:51:13||ced||link||issue2181 superseder|
|2011-10-10 20:48:30||ced||set||title: xml: based validation on Namespaces -> Move XML views into external files|
|2011-09-30 23:57:10||ced||set||status: testing -> deferred|
messages: + msg8791
|2011-03-07 14:41:27||ced||set||keyword: - patch|
|2011-01-22 14:20:31||ced||set||status: in-progress -> testing|
messages: + msg7425
|2010-09-03 23:29:27||ced||set||assignedto: htgoebel -> ced|
messages: + msg6818
messages: + msg6807
keyword: + patch
|2010-09-01 03:55:18||udono||set||files: + htgoebl-patch.txt|
|2010-09-01 03:54:44||udono||set||messages: + msg6806|
messages: + msg6681
|2010-01-12 17:15:04||htgoebel||set||messages: + msg5515|
title: xml: base validation on Namespaces -> xml: based validation on Namespaces
|2009-12-15 18:40:44||htgoebel||set||messages: + msg5335|
|2009-11-06 22:21:10||ced||set||messages: + msg5093|
|2009-08-04 17:54:20||ced||set||status: chatting -> in-progress|
|2008-06-27 12:13:39||htgoebel||set||assignedto: ced -> htgoebel|
messages: + msg582
|2008-06-17 13:18:10||htgoebel||set||messages: + msg486|
|2008-06-16 23:56:02||ced||set||messages: + msg480|
|2008-06-13 11:03:03||htgoebel||set||messages: + msg440|
|2008-06-13 07:31:56||udono||set||messages: + msg436|
|2008-06-13 06:52:32||udono||set||nosy: + udono|
|2008-06-09 08:33:10||ced||set||nosy: + bch|
|2008-06-06 20:26:08||ced||set||status: unread -> chatting|
messages: + msg267
nosy: + ced