I just worked out why I argued against this in the first place.  JDOM
handles pulling out the right type of node so well that it actually makes
the code more complex to have a wrapper element. The difference to the code
really isn't that significant though so it's probably worth keeping it just
to simplify the XSD.  I'm now ambivalent on the idea.

So, any preferences on which way to do it?

Regards,

Adrian Sutton.

On 28/09/2003 4:18 PM, "Adrian Sutton" <[EMAIL PROTECTED]> wrote:

> Hi all,
> Alain, I think you might kill me for this - I think I've stuffed up my
> advice to you on the XML file format.  Nothing too major, but I think it
> goes almost directly against something we argued about for a fair while -
> the good news is you were right. :)
> 
> I've just started looking into updating FreeCard's XML DataStore
> implementation to use Alain's XML file format and noticed this type of
> structure:
> 
> <background>
>   ...
>   <part type="..."/>
>   ...
> </background>
> 
> I think I specifically asked for that type of layout but Alain is quite
> right in saying it would be much easier to parse if we had something like:
> 
> <background>
>   ...
>   <parts>
>       <part type="..."/>
>   </parts>
>   ...
> </background>
> 
> The same would be true of the group element so it should be:
> 
> <groups>
>   <group>
>       ...
>   </group>
> </groups>
> 
> Oh and cards in a background:
> 
> <cards>
>   <card>
>       ...
>   </card>
> </cards>
> 
> No need for a wrapper around <menu> since we already have <menubar> doing
> that.  The advantage of this is partly that it will be faster to parse
> (though I will have to deal with extracting the parts of a specific type so
> you can say things like "card field 3" and not have it count buttons as
> well), but mostly so we can have a generic, reusable <parts> component in
> the schema which is conceptually neater.
> 
> Make sense?  Any objections?
> 
> Regards,
> 
> Adrian Sutton.

----------------------------------------------
Intencha "tomorrow's technology today"
Ph: 38478913 0422236329
Suite 8/29 Oatland Crescent
Holland Park West 4121
Australia QLD
www.intencha.com



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Freecard-general mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freecard-general

Reply via email to