Boost logo

Boost :

From: Jake Voytko (jakevoytko_at_[hidden])
Date: 2007-07-09 14:11:48


Stefan,

I'm working on the Boost.Plot GSoC project, and the first image format that
it will support is SVG, an XML based format. My project would benefit
greatly from this effort, so I'll be checking on it periodically (most of my
current logic is in the area of plotting, and very little in XML generation,
so changes can still easily be made).

Looking through dom.cpp, I like how your headers work. It's a similar
approach to how I'm manipulating a SVG document, but much better thought out
(mine acts more as a kludge than anything). I especially like the iterator
approach to enumerating children.

I'm looking through the example code and I have a few questions.

- Is it possible to have parameters in the tags? For example:

    element_ptr g_elem = root->insert_element("g");
    g_elem->add_parameter("stroke_color", "red");

produces:

<g stroke_color = "red">
..
</g>

Is this what append_element() does, or is there another function to do this?

- The operator->() syntax.. It would appear that you did this because all of
the elements act as pointers. However, I feel that some of the operations
are unclear as to why they should be implemented using the -> syntax

    my_elem -> write_to_file("my_file.xml"), for example.

- Also, how far does the pointer analogy carry? If I call

    ++my_elem();

does this go to the next child of my_elem->parent()?

I second the call for documentation from Mathias. This nonwithstanding, good
work so far!

Jake

On 7/6/07, Stefan Seefeld <seefeld_at_[hidden]> wrote:
>
> Hello,
>
> over the last couple of years we have discussed possible XML APIs
> for inclusion into boost. As I already had an early prototype for
> such an API, I kept evolving it, based on feedback from those
> discussions.
> A couple of weeks ago I actually checked it into the sandbox
> (http://svn.boost.org/trac/boost/browser/sandbox/xml). Today,
> I adjusted the source layout to conform to the sandbox layout
> we agreed on, including a boost.build - based build-system.
>
> I would appreciate if anybody interested into a future boost.xml
> submission would have a look, provide feedback, or even get
> involved into the (ongoing) development.
>
> Best regards,
> Stefan
>
> PS: The current scope of the project is described in
> http://svn.boost.org/trac/boost/browser/sandbox/xml/README
>
> --
>
> ...ich hab' noch einen Koffer in Berlin...
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk