Return-Path: Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 26703 invoked by uid 500); 20 Jul 2003 18:09:30 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 26688 invoked from network); 20 Jul 2003 18:09:29 -0000 Received: from moutng.kundenserver.de (212.227.126.189) by daedalus.apache.org with SMTP; 20 Jul 2003 18:09:29 -0000 Received: from [212.227.126.205] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 19eIcn-0006GV-00 for users@cocoon.apache.org; Sun, 20 Jul 2003 20:09:33 +0200 Received: from [80.143.140.113] (helo=gmx.net) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 19eIcm-0007h7-00 for users@cocoon.apache.org; Sun, 20 Jul 2003 20:09:32 +0200 Message-ID: <3F1ADAE5.9000909@gmx.net> Date: Sun, 20 Jul 2003 20:09:41 +0200 From: Marco Stolpe User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3.1) Gecko/20030425 X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: How to redirect XSL output to more than one file? References: <3F1930FB.8090109@gmx.net> <3F1A5995.9070202@gmx.at> In-Reply-To: <3F1A5995.9070202@gmx.at> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Alexander Schatten wrote: > Marco Stolpe wrote: >> One solution which came to my mind was to use XSP together with fields >> in a query string pointing to the portion of the document the user >> likes to read. But I'm asking myself if this is the best solution >> available, since using XSP wouldn't be a very portable solution, would >> it? Moreover, could I still produce a static version of the document >> (consisting of several files) using Cocoon from the command line with >> XSP? >> > I think XSP is not necessarily required. you can do this in a stylesheet > approach too. but it is very dependend on the problem. > > consider a document having parts like this: > > > ... > > > > ... > > > and so on, then you could write "simply" XSLT stylesheets that create an > index page with links, as well as stylesheet(s) that render one part > with a previous/next function. In fact, this is exactly the structure of a document I had thought of (like a book consisting of chapters or a presentation consisting of slides, all having a unique name/id). One idea I had was the same you're suggesting: create a stylesheet producing an index page with links to the chapters and a stylesheet rendering a single chapter (together with a navigation bar). The only question left was how to tell the stylesheet rendering a single chapter what chapter to render. It came to my mind that stylesheets can use parameters, but it still isn't entirely clear to me how to "hand them over" to a template dynamically. I remembered that with XSP one can use parameters of a query string in XML documents/stylesheets. With a document named mybook.xml, that might lead to index links of the form mybook.xml?chapter=intro mybook.xml?chapter=chap1 mybook.xml?chapter=chap2 ... and to a stylesheet rendering the document based on the chapter ID. Now that you told me one could do that without XSP, I looked at the documentation again. In the user docs about the XSLT transformer I found the statement: "In addition all other parameters to the transformer are available in the stylesheet as s (These values are also used in the caching algorithm.)". It appears to me I have to use the sitemap and matching to achieve what I want: The stylesheet "book-index.xsl" would produce links of the form mybook-intro.html mybook-chap1.html mybook-chap2.html ... which could be matched with Would that approach work or did I misunderstand anything? Thanks, Marco --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org