[ODE] XODE - attributes or elements?

William Denniss lists at omegadelta.net
Sat Mar 20 10:33:00 MST 2004


On Fri, 2004-03-19 at 18:27, Shaul Kedem wrote:
> Hi,
>  About the general question - please remmember that
> most DOMs will fill an attribute set (which usually
> goes with some kind of a map, hash or else) when
> encountered by an attribute, which means that the
> number of attributes within a specific element is best
> kept down (I can't tell you if the 11 axis' attribute
> (according to Nate's proposal) will cause such a
> drastic performance hit though.
> 
>  About the two questions-
> > 1) keep the current format
> 
> I vote for the current format, having loads of
> optional attributes is kind of a mess.
>  
> > 2) if an element has no attributes and a single
> value in its innertext, make it an attribute of its
> parent
> 
> yes, with the exception of elements like axis, which
> have too many attributes too-be. (+this is not to be
> confused with the previous discussion about why not to
> use attributes as data flags)

Having exceptions makes it less consistent and more confusing,
especially for people writing these files by hand (which is a totally
valid way of building a model - editors can be a bit of a pain some
times).

#1 feels more XML-ish, but #2 reflects OO design better.

I'd like to here some more thoughts on this matter :)

Will.

-- 
William Denniss - will@ http://tanksoftware.com/



More information about the ODE mailing list