Return-Path: Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 91309 invoked from network); 30 Aug 2000 09:11:06 -0000 Received: from anchor-post-31.mail.demon.net (194.217.242.89) by locus.apache.org with SMTP; 30 Aug 2000 09:11:06 -0000 Received: from media.demon.co.uk ([158.152.20.147] helo=[10.0.1.123]) by anchor-post-31.mail.demon.net with esmtp (Exim 2.12 #1) id 13U3th-000LAo-0V for cocoon-users@xml.apache.org; Wed, 30 Aug 2000 10:11:06 +0100 Mime-Version: 1.0 X-Sender: media@pop3.demon.co.uk Message-Id: In-Reply-To: References: Date: Wed, 30 Aug 2000 09:37:21 +0100 To: cocoon-users@xml.apache.org From: Jeremy Quinn Subject: Re: Q: How do I create local variables with XSP? Content-Type: text/plain; charset="us-ascii" X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N At 12:42 +0400 28/08/00, Tagunov Anthony wrote: >Hello evrybody! > >Can anybody tell me how to create a LOCAL variable in an XSP page? > >I do not want a variable like count in page.xml example, I wan a local >variable in PopulateDocument method. How do I do that ? > >Regards, > >Tagunov Anthony >NNT Telecom Russia >(http://www.mavicanet.com) You need a template for your "user" root, or a template for one of your tags to put it in. Problem is, you might not know (in the case of a TagLib) what the user has called their user root. have a look at the logicsheet for FP xml-cocoon/src/org/apache/cocoon/processor/xsp/library/fp/fp.xsl [snip] String = blah "I am local to populateDocument"; The match attribute, could be better .... I am using this in the soon to be released new version. [snip] I find it a bit better. hope this helps regards Jeremy -- ___________________________________________________________________ Jeremy Quinn Karma Divers webSpace Design HyperMedia Research Centre