cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luca Morandini" <l.mo...@tin.it>
Subject RE: Re[2]: Chaining XML->XSP->XML->XSP->etc.
Date Fri, 23 Feb 2001 14:17:22 GMT
Sandor,

	ahem... this was not *exactly* the problem I face; to make things clear,
let's suppose you have more than one XSP page to go through, like:

XML (query parameters) --> ESQL taglib (retrieves data from database) -->
XML (retrieved data)   --> PROC taglib (does something on data) -->
XML (processed data)   --> XSL (renders processed data) -->
HTML (shown to the user)

	How you do this ?

	The idea, basically, is to have a more complex pipeline than just the usual
XML --> XSP --> XSL --> HTML. I'd like to have a pipeline with more XSP
pages / taglibs in between.

	Sure, you can always build a giant taglib custom-made for your application;
a taglib which does everything inside it... but then, how to re-use all
those specialized taglibs you can find (or develop yourself) when the next
application comes ?

Best regards,
 
---------------------------------------------
               Luca Morandini
               GIS Consultant
            lmorandini@ieee.org
          +39 (0)744  59 85  1 Office
          +39 0335 681 02 12 Mobile
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------


> -----Original Message-----
> From: Sandor Spruit [mailto:sandor@cs.uu.nl]
> Sent: venerdì 23 febbraio 2001 10.48
> To: Luca Morandini
> Cc: cocoon-users@xml.apache.org; lmorandini@ieee.org
> Subject: Re[2]: Chaining XML->XSP->XML->XSP->etc.
>
>
>
> Luca,
>
> On Friday, February 23, 2001, 10:16:00 AM, you wrote:
>
> Luca> Emilio,
>
> Luca> since I face your same problem (chaining XSPs adn XMLs), do you
> Luca> mind sending me your solution, as soon as you have one ?
>
> I had roughly the same problem earlier this week. Some web searching
> yielded this little tutorial:
>
> http://www.suranyami.com/XSPtutorial/
>
> The pictures were *very* useful to improve my understanding of what's
> going on with XSP pages, XML, XSL, logicsheets, taglibs and relations
> between them. In fact, I had my own solution worked out half an hour
> after I'd studied these and looking at my own Cocoon installation.
>
> I have attached two files to this e-mail:
>
> - student-list.xml;
> - student-list.xsl;
>
> First file:
>
> It gets processed by - see the two processing instructions at the
> beginning of the file - (1) the xsp processor (2) the xslt processor,
> where the stylesheet will be "student-list.xsl". The key thing to see
> is, that there's another file involved: the esql tab library declared
> at the top of the file, listed in your Cocoon.properties. This library
> is yet another stylesheet (esql.xsl) tucked away in Cocoon files. So,
> it's: student-list.xml -> esql.xsl -> student-list.xsl.
>
> The ESQL taglibrary (stylesheet) uses Java code embedded in it to, in
> this case, query a database and transform a document e.g. by inserting
> extra elements. In my case, the large 'esql:connection' element gets
> transformed into series of 'student', 'name', 'student-nr' tags filled
> with information from a phony student database.
>
> Second file:
>
> This stylesheet takes the student/name/student_nr tags produced by the
> first (ESQL) transformation and turns them into an HTML table. Some
> basic layout information gets added to it along the way.
>
> Hope this helps,
> Cheers,
> Sandor
>
> --
> ir A.G.L. Spruit, Utrecht University, the Netherlands
> Institute of information and computing sciences
> "There is a bit of magic in everything, and then some
> loss to even things out" (from: Lou Reed, "Magic and Loss")


Mime
View raw message