Issue 70

Title
Move XML views into external files
Priority
feature
Status
resolved
Nosy list
bch, ced, htgoebel, paepke, udono
Assigned to
ced
Keywords

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

Files

File name Uploaded Type Details
htgoebl-patch.txt udono, 2010-09-01.03:55:17 text/plain view
issue184086_1.diff udono, 2010-09-01.03:56:27 text/plain view

Messages

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2012-09-26.19:39:20
Fixed with rev 318627a86be8
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2012-08-23.15:56:03
Codereview updated to trunk:

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

review481002, review482002, review483002, review484002
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2011-09-30.23:57:10
Need first to move button definition outside the XML.
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2011-01-22.14:20:30
http://codereview.appspot.com/3991046/
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).
Author: [hidden] (udono) Tryton translator
Date: 2010-09-01.03:56:27
Author of both attachments:
* issue184086_1.diff
* htgoebl-patch.txt
is htgoebel:
Author: [hidden] (udono) Tryton translator
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.
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.
Author: [hidden] (htgoebel)
Date: 2010-01-12.17:15:04
http://codereview.appspot.com/184086
Author: [hidden] (htgoebel)
Date: 2010-01-09.22:01:44
working on it.
Author: [hidden] (htgoebel)
Date: 2009-12-15.18:40:44
No. I dod not had time yet top implement it.
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2009-11-06.22:21:10
any news?
Author: [hidden] (htgoebel)
Date: 2008-06-27.12:13:39
I'll assign this issue to me :-)
Author: [hidden] (htgoebel)
Date: 2008-06-17.13:18:10
with lxml validation is easy :-)
Implemented relax-ng validation, see issue132
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.
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 :-)
Author: [hidden] (udono) Tryton translator
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.
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.
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
2010-09-01 03:55:18udonosetfiles: + htgoebl-patch.txt
2010-09-01 03:54:44udonosetmessages: + msg6806
2010-08-04 17:32:35paepkesetnosy: + paepke
messages: + msg6681
2010-01-12 17:15:04htgoebelsetmessages: + msg5515
2010-01-09 22:01:45htgoebelsetmessages: + msg5484
title: xml: base validation on Namespaces -> xml: based validation on Namespaces
2009-12-15 18:40:44htgoebelsetmessages: + msg5335
2009-11-06 22:21:10cedsetmessages: + msg5093
2009-08-04 17:54:20cedsetstatus: chatting -> in-progress
2008-06-27 12:13:39htgoebelsetassignedto: ced -> htgoebel
messages: + msg582
2008-06-17 13:18:10htgoebelsetmessages: + msg486
2008-06-16 23:56:02cedsetmessages: + msg480
2008-06-13 11:03:03htgoebelsetmessages: + msg440
2008-06-13 07:31:56udonosetmessages: + msg436
2008-06-13 06:52:32udonosetnosy: + udono
2008-06-09 08:33:10cedsetnosy: + bch
2008-06-06 20:26:08cedsetstatus: unread -> chatting
assignedto: ced
messages: + msg267
nosy: + ced
2008-06-06 20:12:26htgoebelcreate