cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <jer...@media.demon.co.uk>
Subject Re: Q: How do I create local variables with XSP?
Date Wed, 30 Aug 2000 08:37:21 GMT
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


<xsl:template match="xsp:page/*">

	[snip]

	String = blah "I am local to populateDocument";

<xsl:template>


The match attribute, could be better ....

I am using this in the soon to be released new version.

<xsl:template match="xsp:page/*[not(starts-with(name(.), 'xsp:'))]">
	[snip]
<xsl:template>

I find it a bit better.

hope this helps

regards Jeremy
-- 
   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <mailto:sharkbait@mac.com>     		 <http://www.media.demon.co.uk>
    <phone:+44.[0].20.7737.6831>        <pager:jermq@sms.genie.co.uk>

Mime
View raw message