Re: [Planner Dev] XML File Format Problems



On ons, 2004-04-14 at 22:58 -0700, Chris Ladd wrote:
> Hi All,

Hi,

> I came across a couple of things that looked like errors in how the XML
> file is laid out but I wanted to run it by the group before I file bugs,
> in-case I have missed something.
> 
> 1. The XML file has 2 <properties> elements that both have the same
> <property> child elements. The first group of <property> elements has
> all the property attributes except the value. The second group of
> <property> elements contain the name and value attributes. 
> 
> Shouldn't there just be 1 group of <property> child elements which
> contain all the attributes, including the value?

Bascially the first occurrence sets up which custom properties are
available and what the GUI name and descriptions are. The second is per
task/resource and lists the values of the custom properties for each
task/resource. 

Ideally, the first properties tag should be named otherwise, there's a
comment in the DTD about that.

> 2. The <resource> elements have an attribute named std-rate that holds
> what the GUI calls "Cost". Then each <resource> element has a child
> <properties> element with a child <property> element. That <property>
> element has the name attribute of "cost" and value attribute of "".
> 
> Shouldn't the <resource> element's <properties> and <property> child
> elements be removed because they appear to be useless? Also, shouldn't
> the std-rate attribute be renamed to cost to match the GUI?

For cases when there are no custom properties, we could omit these.

The cost property should indeed be removed from the custom properties,
it's a leftover from when it was a custom property. I'm not sure that
cost is a good name actually since it really is a rate, i.e. a cost per
time unit. We'll need other types of cost later, such as per-use cost.
We could call it rate.

> 3. There is a separate <allocations> element with <allocation> child
> elements that map the assigned resources to their tasks. Shouldn't the
> <allocation> element be a child of the <task> instead? If so, the
> task-id attribute of the <allocation> element should be removed.
>
> Should I file these 3 items as new bugs? Unless I am missing something,
> I think these items need to be fixed to make the file format conform
> better to the nature of XML and OOP.

It would be pretty good if we could clean some things up for 1.0 as long
as we make sure that old files are still readable. So we would need to
make the file parser handle both "std-rate" and "cost" for example. We
should have two DTDs as well, one with the old backwards-compatible
stuff and a new one. We could then try the new first and if that fails,
we validate with the old one.

/Richard

-- 
Imendio HB, http://www.imendio.com/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]