Re: XML libs (was Re: gconf backend)



On Sat, 2003-09-27 at 17:23, Havoc Pennington wrote:
> On Sat, 2003-09-27 at 11:23, Daniel Veillard wrote:
> > 
> > > So you could move the new
> > > backend to libxml SAX-style API and still have the same advantage.
> > 
> >   Are you suggesting "if you want the gconf code back on top of libxml2
> > then do it yourself" ? Using "you" instead of "one" suggest this but this
> > could be some misunderstanding from my part ...
> 
> "you" = "one", no I'm not saying you should do it. ;-) I'm just saying
> that the xml->markup thing is not the justification for this change.
> 
> >  But gconf as well as gmarkup is your code, so do what you 
> > prefer! It's just a bit of a shame that libxml2 wasn't used for your rewrite.
> > I find that surprising since you're trying to promote standardization
> > of tools, format and if possible codebases. It still puzzles me that I
> > have an easier job getting people outside of Gnome reuse libxml2 share
> > improvement and bugfixes, but that I have such a hard time within the
> > GNOME project.
> > 
> 
> Well, as the gconf backends link to gmarkup anyway, it's kind of "free"
> while libxml2 adds 800K. And as gmarkup parses an XML subset you can
> always move to full XML later.
> 
> It's only an hour of work if that to go between libxml2, expat, and
> gmarkup; I abstracted that in dbus for example to make everyone happy.
> (Essentially by making all of them convert the XML into three functions:
> start element with attributes, end element, content text.)
> 
> I can try to explain what my dream XML library would be like if you
> promise not to get offended by it:
> 
> I don't really believe that one XML library can be right for all
> situations; they can have very large differences in API, code size, and
> behavior in cases like error handling, namespaces, etc.
> So it's very possible to not use libxml2 always while still thinking
> libxml2 is an excellent library.
> 
> For the applications in GNOME my guess is that people imagine that XML
> is approximately the gmarkup subset and don't figure anything else out.
> I bet the apps using libxml2 get confused if libxml2 hands them anything
> other than elements, attributes, and content (in UTF-8 encoding); or at
> best they silently ignore other things. I know this is how I've used
> libxml2 in the past. PI_NODE, XINCLUDE_START, NAMESPACE_DECL, I don't
> know how to use these things, I just hope that libxml will not return
> any of them and write code to skip over those nodes.

Well, Conglomerate handles at least some of these, and if it doesn't,
please file bug reports. :-)  Though getting entities to work is a real
pain.

It looks to me like you want a markup language that looks a lot like XML
but which is, strictly speaking, not XML (a subset does not equal a
set).  Given some of the complexities of full XML, this seems fair
enough.

Is there a formal specification anywhere for the GMarkup language?  I
remember being confused when discovering that the < and > entities
existed, and wondering what other functionality it did or didn't have.

Perhaps there's a case for a FreeDesktop spec for "RML" ("Reduced Markup
Language"), or even "XMLWTRBOSLCR" ("XML With The Remaining Bits of SGML
Legacy Cruft Removed").  Or something like that?

But seriously, if only some parts of XML are supported, I think it's
important to know EXACTLY what is, rather than waving people in the
direction of the source code - usual concerns about multiple
implementations, interoperability etc.

[snip]

You might also want to have a look at this website:
http://xmlsucks.org/but_you_have_to_use_it_anyway/

-- 
David Malcolm
www.conglomerate.org




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