Sylvain Wallez wrote:
Luca Morandini wrote:

Do you mind terribly showing me an example of the use of this API ?

Something like:
CocooonStream stream= new CocoonStream("file", "documents/mydoc.xml");
stream.transform("xslt", "xsl/doc2html.xsl");
return stream.serialize("html");

Yes, something like that. But add in the mix the often discussed content-aware selection

I remember that one, it was one of my first gripes with Cocoon, circa 2001... gee, that's 7 years ago !


I understand the usefulness of having a programmatic API and this approach plays well with the Java monoculture, but, there aren't libraries already doing that ?

I don't think we're talking about monoculture here, but about avoiding the clumsyness of a reinventing a real programming language in XML.

Point taken, though having a single place to look at in order to understand the URI routing has its merits. Moreover, since the introduction of Flowscript, the tricky things can be done in it, leaving the sitemap declarative syntax to what it does best.


About existing APIs, javax.xml.transform addresses part of it (it doesn't have stream inspection though) but it often perceived as difficult to grasp from the simple fact that you have to wire the pipeline backwards, starting with the serializer.

Ok, but... (bear with my my ignorance a bit more) is *that* difficult to develop such an API ? I mean, the classes dealing with the sitemap are already doing that, isn't just a matter of spreading an API over them ?

Regards,

--------------------
   Luca Morandini
www.lucamorandini.it
--------------------

Reply via email to