Boost logo

Boost :

Subject: Re: [boost] Probing interest in a typed XML traversal library
From: Sumant Tambe (sutambe_at_[hidden])
Date: 2010-12-02 12:52:30


Hi Mateusz and Klaim,

There are several complete examples available in the source repository. Here
is a link to the library example.
https://svn.dre.vanderbilt.edu/viewvc/LEESA/trunk/LEESA/tests/library-xsd/

Please see driver.cxx in the directory. I would not say it is documented
well, but there are #ifdefs WITH_LEESA and WITHOUT_LEESA that clearly show
differences between two approaches. WITHOUT_LEESA being just the API
generated by xml data binding tool. These are the same tests I used to get
the run-time and compile-time performance numbers below. I've a link for the
graphs, which can also be found in one of the papers on LEESA.

http://www.dre.vanderbilt.edu/~sutambe/files/LEESA/all-charts.png
http://www.dre.vanderbilt.edu/~sutambe/documents/pubs/LEESA-Multiparadigm.pdf

With respect to validating/non-validating XML parsers, LEESA is always a
validating library but the key difference
is that it does not validate the input XML (which can only be done at
runtime). It validates your queries at compile-time.
The programming model is vastly different due to its focus on types and
compile-time validation. LEESA always needs a
xml data binding tool that generates C++ classes from an xsd. If the xml
data binding tool is validating xml at
run-time, then your input xml and queries are both validated! Remember that
the queries are XPath-like. Many features
of XPath are not supported. But that is not the goal here. The goal is to
solve typed XML traversal.

The simplest example that highlights its strength I gave in the first email.
Think of the descendent axis without having
to know all the types/functions to navigate.

Thanks,

Sumant.

On 2 December 2010 09:31, Sumant Tambe <sutambe_at_[hidden]> wrote:

> Hi Mateusz and Klaim,
>
> Your library seems interesting (I'm not an expert at all here but I like
>> the
>> idea).
>>
>> However the examples are far from being obvious about this librarie's use.
>> Maybe some kind of "hello world" or simple FULL example might help?
>> A simple heavily commented program doing some simple manipulations using a
>> given test xml file and an xsd file might be a good idea.
>>
>
> There are several complete examples available in the source repository.
> Here is a link to the library example.
> https://svn.dre.vanderbilt.edu/viewvc/LEESA/trunk/LEESA/tests/library-xsd/
>
> Please see driver.cxx in the directory. I would not say it is documented
> well, but there are #ifdefs WITH_LEESA and WITHOUT_LEESA that clearly show
> differences between two approaches. WITHOUT_LEESA being just the API
> generated by xml data binding tool. These are the same tests I used to get
> the run-time and compile-time performance numbers below. I've attached an
> image with two graphs which can also be found in one of the papers on LEESA.
>
>
> http://www.dre.vanderbilt.edu/~sutambe/documents/pubs/LEESA-Multiparadigm.pdf
>
> With respect to validating/non-validating XML parsers, LEESA is always a
> validating library but the key difference
> is that it does not validate the input XML (which can only be done at
> runtime). It validates your queries at compile-time.
> The programming model is vastly different due to its focus on types and
> compile-time validation. LEESA always needs a
> xml data binding tool that generates C++ classes from an xsd. If the xml
> data binding tool is validating xml at
> run-time, then your input xml and queries are both validated! Remember that
> the queries are XPath-like. Many features
> of XPath are not supported. But that is not the goal here. The goal is to
> solve typed XML traversal.
>
> The simplest example that highlights its strength I gave in the first
> email. Think of the descendent axis without having
> to know all the types/functions to navigate.
>
> Hope that helps.
>
> Sumant.
>
>
>> I understand the global idea but your examples are only about retrieving
>> informations. Maybe I missed a more complete example?
>>
>> By the way, did you already setup some performance tests? Just to get an
>> idea.
>>
>> On Tue, Nov 30, 2010 at 20:21, Sumant Tambe <sutambe_at_[hidden]> wrote:
>>
>> > Hello boosters!
>> >
>> > I'm interested in gauging interest in a typed XML traversal library that
>> > combines the succinctness of XPath with the type-safety of XML
>> data-binding
>> > tools. I've been developing one such library called LEESA: Language for
>> > Embedded Query and Traversal <http://www.dre.vanderbilt.edu/LEESA>.
>> LEESA
>> > has several capabilities:
>> >
>> > 1. Succinct and expressive XPath-like notation for writing object
>> > structure traversals
>> > 2. Supports child, parent, sibling, descendant, ancestor axes
>> > 3. Compile-time schema conformance checking
>> > 4. Supports GOF visitors and hierarchical visitors
>> > 5. Strategic Programming ... and more!
>> >
>> > Here are two quick examples comparing XPath and LEESA. More examples are
>> > available on the LEESA homepage.
>> >
>> > XPath expression: "/catalog/book/author/name/text()"
>> > LEESA expression:
>> > *std::vector<name> author_names = evaluate(root, catalog() >> book() >>
>> > author() >> name()); *
>> >
>> >
>> > XPath expression: "//name/text()"
>> > LEESA Expression:
>> > *std::vector<name> names = evaluate(root, catalog() >>
>> > DescendantsOf(catalog(), name())); *
>> >
>> > The above expressions are checked for schema-conformance at
>> compile-time.
>> > LEESA builds these capabilities on top of existing XML data binding
>> tools
>> > that generate C++ code from .xsd files. The general process of using
>> LEESA
>> > is as follows:
>> >
>> > 1. Generate C++ classes using your favorite XML data binding tool
>> > 2. A python script that comes with LEESA adds a few functions in
>> > every generated
>> > C++ class. It generates a lot of typedefs and helper functions, which
>> > invoke tool generated code. This creates a bridge between LEESA and
>> the
>> > code generated by the xml data binding tool. Currently it supports
>> Code
>> > Synthesis's xsd and Universal Data Model (UDM) from Vanderbilt
>> University
>> > as
>> > the underlying code generators.
>> > 3. The user includes LEESA.h in his/her C++ program (it is
>> > header-only), uses
>> > its programming model, compiles, and links with the tool generated
>> code
>> > and
>> > libraries.
>> >
>> > So folks, please speak up if you are interested in having such a library
>> in
>> > Boost.
>> >
>> > Thanks,
>> >
>> > Sumant
>> > _______________________________________________
>> > Unsubscribe & other changes:
>> > http://lists.boost.org/mailman/listinfo.cgi/boost
>> >
>> _______________________________________________
>> Unsubscribe & other changes:
>> http://lists.boost.org/mailman/listinfo.cgi/boost
>>
>
>
>
> --
> int main(void)
> {
> while(1) KeepWorking();
> }
>
>

-- 
int main(void)
{
     while(1) KeepWorking();
}

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