From user-return-2623-apmail-forrest-user-archive=forrest.apache.org@forrest.apache.org Mon Sep 05 08:33:11 2005 Return-Path: Delivered-To: apmail-forrest-user-archive@www.apache.org Received: (qmail 27741 invoked from network); 5 Sep 2005 08:33:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Sep 2005 08:33:11 -0000 Received: (qmail 16797 invoked by uid 500); 5 Sep 2005 08:33:11 -0000 Delivered-To: apmail-forrest-user-archive@forrest.apache.org Received: (qmail 16607 invoked by uid 500); 5 Sep 2005 08:33:09 -0000 Mailing-List: contact user-help@forrest.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@forrest.apache.org List-Id: Delivered-To: mailing list user@forrest.apache.org Received: (qmail 16590 invoked by uid 99); 5 Sep 2005 08:33:09 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Sep 2005 01:33:09 -0700 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [81.169.145.161] (HELO natfrord.rzone.de) (81.169.145.161) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Sep 2005 01:33:23 -0700 Received: from 172.26.0.5 (242.Red-213-97-135.pooles.rima-tde.net [213.97.135.242]) by post.webmailer.de (8.13.1/8.13.1) with ESMTP id j858X5lU010816 for ; Mon, 5 Sep 2005 10:33:06 +0200 (MEST) Subject: Re: coding dynamicall in xdocs/ and to delimit output in meta-data? From: Thorsten Scherler To: user@forrest.apache.org In-Reply-To: <431BF0E6.5060809@apache.org> References: <431618CF.4050407@greenjaguar.com> <43161F68.6000806@apache.org> <43162405.1080903@greenjaguar.com> <431BF0E6.5060809@apache.org> Content-Type: text/plain Date: Mon, 05 Sep 2005 10:31:11 +0200 Message-Id: <1125909071.5050.5.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I reckon Helena wants a piece of code (maybe a plugin) that looks up meta-data (meta/foo.xml) and provides links "like" google about authors and their articles. Like I understood it she wants to have 2 different pages for that. e.g. overview page (generated from meta/foo.xml): All articles by thorsten All articles by ross ... Then each by_author_*.html should contain links to the articles the author wrote in a paginator style view (as well generated from meta/foo.xml or by a xpath dir generator?). e.g. All articles by ross ross on plugins ... http://cocoon.apache.org/2.1/howto/howto-paginator-transformer.html Helena we do not use yet metadata in forrest. What you are planing to do would IMO be a good plugin, but you would need to write it. AFAIK nobody have done that before. Besides that it is far more then a user question and should better discussed on dev. Please follow Ross tips. ;-) salu2 On Mon, 2005-09-05 at 08:16 +0100, Ross Gardler wrote: > Helena Edelson wrote: > > I mean how in *xdocs* files would you do the equivalent of @author_id or: > > > > {name} > > I'm still not sure what you mean, where is the {author_id} parameter > coming from? That is, what supplies that value for this token? > > Like I said earlier, there is an author element in the XDoc, can't you > just use that with a custom transformation to give you the link you want? > > If the author tag is no use to you then you need to create your own > pipelines to do these replacements. There are a number of ways of doing > it. Perhaps the easiest way, if you do not have detailed Cocoon > knowledge, is to use an XSLT transformation to do the replacements. You > need to pass the values in to the transformation and have the XSLT do > the replacements, see my earlier reply (copied below) for a hint on how > to do this. > > You may also consider using the JXTempalteTransformer > http://cocoon.apache.org/2.1/userdocs/transformers/jx-template-transformer.html > > Another alternative is XSP: > http://cocoon.apache.org/2.1/userdocs/xsp/index.html > > If you more clearly define the problem we can probably give you more > direct help, i.e. code examples. > > > on the second, I mean how to write the line of code, I'm not sure what > > the $x or @x I have to look at the number of entries of type foo and > > only show say 4 of the total number in an xsl file. how you would write > > the value to stop at and the ($entries.......)*] part > > does that make any sense at all? > > I'm reeally not sure I am understranding your problem. The xsl is: > > > > If you want to pass the number of elements being processed in as a > parameter then see my earlier response which tells you how to find > examples in our source code. > > Note, this list is not the best place to get help with XSLT. If you need > more help with XSLT I'd recomend taking a look at the tutorials on > http://www.zvon.org > > Ross > > > > > thx > > Holly > > > > > > > > Ross Gardler wrote: > > > >> Helena Edelson wrote: > >> > >>> I know how to code for forrest for this link in the xsl files: > >>> > >>> Holly Edelson > >>> > >>> but how do you code for this sort of link in an xdocs/*.xml file? > >>> can I put dynamic code there? > >> > >> > >> In what way is it dynamic? Isn't the authors tag sufficient? > >> > >> http://forrest.apache.org/dtdx/document-v20.dtdx.html#authors > >> > >>> Also, how, for src/xdocs/index.xml file can you code the xsl for it > >>> to count the entries in the /meta-data/foo.xml, set a max integer > >>> (value) for to generate on the xdocs/index.html page when you run > >>> forrest to only show x number of entries for category foo if exists > >>> and not show the rest? > >>> > >>> I mean, say I have type foo and type bar in my meta-data/foo.xml > >>> file. Say I have 10 items of type foo and 10 items of type bar, but I > >>> only want the generated home page (html) to display 4 per type? > >>> is it like ? > >>> > >>> ->this is where I don't have a clue > >> > >> > >> Do you mean you want to know how to pass the value of $entries into > >> the XSL? > >> > >> If so take a look at our sitemaps, there are lots of examples. Search > >> for " >> > >> You could also pass it in using a configuraiton file. You can also see > >> examples of this in our skins, search for "$config". > >> > >> Ross > >> > >> > -- thorsten "Together we stand, divided we fall!" Hey you (Pink Floyd)