Tryton - Issues

 

Issue70

Title Move XML views into external files
Priority feature Status resolved
Superseder Nosy List bch, ced, htgoebel, paepke, udono
Type Components trytond
Assigned To ced Keywords
Reviews

Created on 2008-06-06.20:12:26 by htgoebel, last changed by ced.

Files
File name Uploaded Type Edit Remove
htgoebl-patch.txt udono, 2010-09-01.03:55:17 text/plain
issue184086_1.diff udono, 2010-09-01.03:56:27 text/plain
Messages
msg11549 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2012-09-26.19:39:20
Fixed with rev 318627a86be8
msg11391 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2012-08-23.15:56:03
Codereview updated to trunk:

https://codereview.appspot.com/3991046/
msg11388 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2012-08-22.23:02:52
Buttons etc. fixed with:

review481002, review482002, review483002, review484002
msg8791 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2011-09-30.23:57:10
Need first to move button definition outside the XML.
msg7425 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2011-01-22.14:20:30
http://codereview.appspot.com/3991046/
msg6818 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2010-09-03.23:29:26
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).
msg6807 (view) Author: [hidden] (udono) Date: 2010-09-01.03:56:27
Author of both attachments:
* issue184086_1.diff
* htgoebl-patch.txt
is htgoebel:
msg6806 (view) Author: [hidden] (udono) Date: 2010-09-01.03:54:44
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.
msg6681 (view) Author: [hidden] (paepke) Date: 2010-08-04.17:32:34
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.
msg5515 (view) Author: [hidden] (htgoebel) Date: 2010-01-12.17:15:04
http://codereview.appspot.com/184086
msg5484 (view) Author: [hidden] (htgoebel) Date: 2010-01-09.22:01:44
working on it.
msg5335 (view) Author: [hidden] (htgoebel) Date: 2009-12-15.18:40:44
No. I dod not had time yet top implement it.
msg5093 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2009-11-06.22:21:10
any news?
msg582 (view) Author: [hidden] (htgoebel) Date: 2008-06-27.12:13:39
I'll assign this issue to me :-)
msg486 (view) Author: [hidden] (htgoebel) Date: 2008-06-17.13:18:10
with lxml validation is easy :-)
Implemented relax-ng validation, see issue132
msg480 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2008-06-16.23:56:02
We have removed pyxml dependency and use lxml instead.
lxml have also validator for relax-ng.
msg440 (view) Author: [hidden] (htgoebel) Date: 2008-06-13.11:03:03
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 :-)
msg436 (view) Author: [hidden] (udono) Date: 2008-06-13.07:31:56
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.
msg267 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2008-06-06.20:26:08
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.
msg264 (view) Author: [hidden] (htgoebel) Date: 2008-06-06.20:12:26
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.
History
Date User Action Args
2012-09-26 19:39:20cedsetstatus: testing -> resolved
messages: + msg11549
2012-08-23 15:56:04cedsetstatus: in-progress -> testing
messages: + msg11391
2012-08-22 23:02:53cedsetstatus: deferred -> in-progress
messages: + msg11388
2011-10-10 20:51:13cedlinkissue2181 superseder
2011-10-10 20:48:30cedsettitle: xml: based validation on Namespaces -> Move XML views into external files
2011-09-30 23:57:10cedsetstatus: testing -> deferred
messages: + msg8791
2011-03-07 14:41:27cedsetkeyword: - patch
2011-01-22 14:20:31cedsetstatus: in-progress -> testing
messages: + msg7425
2010-09-03 23:29:27cedsetassignedto: htgoebel -> ced
messages: + msg6818
2010-09-01 03:56:30udonosetfiles: + issue184086_1.diff
messages: + msg6807
keyword: + patch

Showing 10 items. Show all history (warning: this could be VERY long)