cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@upaya.co.uk>
Subject Re: How to go about getting a handle on the "parent" of a transformer?
Date Fri, 13 Feb 2004 11:30:56 GMT
Corin Moss wrote:

> Hi Guys,
>
> I'm extending the CIncludeTransformer to support external caching, the 
> only stumbling block is getting a handle on the XSP which "called" the 
> transformer. 
>
> Obviously the include is specified in the XSP using the 
> <ci:cached-include> tag.  I need to get the name of the XSP from which 
> the transformer was called.  The xsp's class name in this case is 
> get_rdf_content_xsp.  Usually I'd get the name (or something similar) 
> within the generator by calling "this.source".  But I'm not sure how 
> to get a handle on that particular value from within a subsequent 
> generator.
>
> After writing this, it's fairly apparent that the XSP is not really 
> calling the transformer at all, so is there any way I can get the name 
> of the previous generator within the pipeline? :)
>
> I realise I could pass it in as a parameter - but there is noooo way I 
> want to do something that hacky ;)
>
No other way - pass a parameter from the sitemap. As far as a 
transformer is concerned, all it knows (and wants to know) in relation 
to previous pipeline stages is that there are SAX events coming along.

Upayavira



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message