Re: Discussion for a more robust panel layout



On Tue, 2007-03-20 at 15:23 -0400, Martin Meyer wrote:
> Correct me if I'm wrong, but isn't order not guaranteed to be
> respected in an XML file? You mention using order within the file to
> determine order of icons. Maybe add an attribute to each item,
> something like order="<number>". The problem I see with that idea
> though is that when you insert a new applet you have to change the
> order attribute of everything after it. That's not a good design, I
> know :-(

Order of elements is absolutely guaranteed to be respected.
Documents written in XML vocabularies (like, say, XHTML)
would look mighty funny otherwise.  It's attributes that
aren't guaranteed to have any order.

So these two are equivalent at the infoset level:

<foo fe="fi" fo="fum"/>
<foo fo="fum" fe="fi"/>

But these two most certainly are not:

<foo><fe>fi</fe><fo>fum</fo></foo>
<foo><fo>fum</fo><fe>fi</fe></foo>

--
Shaun





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