cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Billard <obill...@rennes.jouve.fr>
Subject Re: Howto use a generated stylesheet
Date Tue, 01 Jul 2003 16:04:00 GMT
Hi Orson !

The problem is solved, finally !
As I wrote in my previous mail, the problem came from an error in the transformation...
The cocoon protocol works in the transformer...

Thanks anyway for your answer !

--
Olivier




Orson Davis wrote:

> Looking at how everything uses the avalon framework it appears that the
> initialize, configure and setup methods are called on every component of a
> pipeline before any processing occurs.  Whether that includes components of
> subpipelines I don't know, but in the case of Olivier Billard and his
> sitemap snippets the problem he was running into was the xsl sheet wasn't
> available when the components tried to initialize, configure and setup.
> 
> <map:match pattern="picto-filter.xsl">
> 	<map:generate src="context://WEB-INF/workflow.xconf"/>
> 	<map:transform src="stylesheets/picto-filter-generator.xsl"/>
> 	<map:serialize type="xml"/>
> </map:match>
> 
> ...
> 
> <map:match pattern="requestlist-part">
> 	...
> 	<map:transform src="cocoon:/picto-filter.xsl"/>
> 	<map:serialize type="xml"/>
> </map:match>
> 
> Now, I think for him your solution would work.  The reason Olivier's stuff
> doesn't work is that the xml from the pipeline for picto-filter.xsl isn't
> available when the <map:transform src="cocoon:/picto-filter.xsl"/>
> initializes. 
> 
> -----Original Message-----
> From: Upayavira [mailto:uv@upaya.co.uk]
> Sent: Tuesday, July 01, 2003 9:26 AM
> To: cocoon-users@xml.apache.org
> Subject: RE: Howto use a generated stylesheet
> 
> 
> On 1 Jul 2003 at 9:19, Orson Davis wrote:
> 
> 
>>The stylesheet must be available before the pipeline is setup.  The
>>setup, configure and compose methods for each component in a pipeline
>>is called before the startdocument method is called.  In the case of
>>the org.apache.cocoon.transformation.TraxTransformer the call to the
>>stylesheet is made in before any XML gets generated from the generate
>>portion of the pipeline.  
>>
>>The only way I can think to work around this is to write your own
>>version of the org.apache.cocoon.transformation.TraxTransformer such
>>that the getTransformerHandler(inputSource) is called from the
>>startDocument.  I modified the TraxTransformer in such a way for my
>>application.  It could probably be easily modified to meet your needs.
>>
>>If anyone knows a more graceful way to do this, please let me know.
> 
> 
> Hmm. Seems rather complicated. Doesn't the stuff on this wiki page work for
> you:
> 
> http://wiki.cocoondev.org/Wiki.jsp?page=MetaStylesheets
> 
> What you say may be correct, but the xsl for the TraxTransformer can be 
> initialized from another pipeline before the main pipeline is fully set up.
> Surely?
> 
> (Sorry about last message - accidentally sent message before I'd finished
> writing 
> it!)
> 
> Regards, Upayavira
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 
> 
> 



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


Mime
View raw message