Date: 2007-07-13 00:47:48
> > I would do it over templates - than it's type safe and a
> part of the
> > xml validation can be done at compile time.
> > typedef tag<
> > mpl::vector< title, author > // tags
> > mpl::vector< isbn > // atributes
> > > article_info;
> I hadn't considered compile-time type safety when I wrote my
> above example.
> However, I feel an example like this might also preclude XML
> features like comments. If we were to parse an existing article:
> <article_info isbn="foo">
> <!--Article information goes here-->
> <author>Testy McTest</author>
> your definition doesn't immediately make it clear that the
> comment, when parsed, ends up in the document tree. I may,
> however, just be missing something. Complicating matters,
> according to the standard, they can also appear within the
> document type declaration, so comments significantly
> complicate the matter:
> And the standard also lists retrieval of comment text as optional:
> But I think that a Boost.XML library should support the
> retrieval of the text of comments.
I believe that comments could be supported with a typesafe
I don't know where you see problems with comments - article_info could
contain optional instances of comment-class.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk