Subject: Re: [boost] [GSOC] XML library of Boost
From: Stefan Seefeld (stefan_at_[hidden])
Date: 2013-05-06 09:18:07
On 05/06/2013 05:43 AM, Bjorn Reese wrote:
> On 05/05/2013 07:00 PM, Stefan Seefeld wrote:
>> How would you package boost.xml, to offer these different
>> implementations with varying feature sets ? I don't see any reasonable
>> way to achieve that.
> In the same way that you intend to support wrappers for libxml2 and
Well, I don't expect any packager to package both. Or perhaps they
might, so users have the choice to install, say, `yum install
boost-xml-xerces` or `yum install boost-xml-libxml2`. Still, for these
two the provided functionality should be mostly the same, while you are
advocating a 'boost-xml' package offering a reduced API. I'm not
convinced that will solve any real problem.
>> In contrast, there are a couple of well-established APIs to deal with
>> XML (notably SAX, XMLReader, and DOM), it just so happens that none of
>> them are available as standard C++ APIs.
> I must have expressed myself badly, if I left you with the impression
> that I am against these APIs or C++ versions thereof. Quite to the
> contrary. Let me outline how I would approach this project:
> Start with an XML lexer. This simply returns the next token (start tag,
> attribute, data, etc.) when called.
Fine, so you insist on writing your own XML implementation. That's
obviously up to you, and as long as your implementation is complete and
validates, there should be no problem using that as backend for the (to
be defined) boost.xml.
> By default, I would provide our own tree, although this is not terribly
Can you elaborate ? Each backend library has its own data structure to
keep content and associated state. Whatever of that state is made
visible through boost.xml needs to be done through a portable and public
API. Or do you expect users to access the backend directly ?
The two existing implementations that come close to what I think is a
good model to follow are the boost.xml sandbox project (which I now
moved to https://github.com/stefanseefeld/boost.xml), as well as arabica
(www.jezuk.co.uk/arabica). By mapping to a range of implementations
(libxml2, xerces, MSXML, etc.) they prove that the API is robust.
I suggest you base your critique on those APIs, and indicate what you
think isn't working there.
-- ...ich hab' noch einen Koffer in Berlin...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk