Re: UrShape XML parser (Was: Shapes layout proposal)
From: Andre Kloss <kloss rbg informatik tu-darmstadt de>
To: dia-list gnome org
Subject: Re: UrShape XML parser (Was: Shapes layout proposal)
Date: Thu, 21 Jun 2001 17:21:46 +0200 (MET DST)
> Andre,
>
> I think the general consensus is to use libxml for loading and saving only
> since libxml only supports text data and no way to attach extra data to
> nodes. We also want to build a mini-DOM interface for accessing UrShapes.
That's what I thought of. But the interface will have some extensions
of which some might not be in a DOM (i.e. integer handling). The
tree-handling interface would be as close as possible to libxml-DOM.
> Since we are building our own tree then yes SAX is the way to go.
One issue I have here is saving: I see 2 implementation methods:
1. Run through our own tree and create a DOM tree, then use
libxml:xmlSaveFile
2. Do the XML encoding by hand.
The 1st has the advantage of code reuse, but slurps more memory, the
second should be somewhat faster and leaner, but takes more coding.
> No callbacks right now. That is the scripting phase. We want to work on
> default behavior first and then design a callback framework so that it is
> consistent and allows us to easily introduce scripting.
I didn't mean to make things too ambitious. I just thought of it as an
advantage, since once we get to the "scripting" phase, the callbacks
are quite easy to implement.
> I think this is what we have been discussing all along. Good, you can work
> on the parser while James works on the internal structure and interface.
Job taken. I'll mail you when I got through this SAX stuff.
cu Andre
--
Tolerance rulez, everything else sux! -- Andre Kloss