cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From " MailingList" <>
Subject A way to call N stylesheets like a fonction :
Date Fri, 14 Jun 2002 12:32:41 GMT
I used this to develop my siteweb in a oop way, but it begin to be 
difficult. (must be an expert in stylesheet call, import, ...)
But it could be useful to try N stylesheet without modifing your sitemap :

add this in your sitemap :

<!-- * * / i n s / * . x s p -->
<!-- pour n methodes en n passe sur une instance I de type xsp -->
<map:match pattern="**/auto/*-*.xsp_met-*.xsl">			
	<map:generate type="serverpages" 
	<map:transform src="cocoon:/{1}/met/{4}.xsl"/>
	<map:serialize type="xml"/>

<map:match pattern="**/auto/*.xsp_met-*_met-*.xsl">
	<map:generate src="cocoon:/{1}/edit/{2}.xsp_met-{3}"/>
	<map:transform src="cocoon:/{1}/met/{4}.xsl"/>
	<map:serialize type="xml"/>

<map:match pattern="**/auto/*.xsp_met-*.xsl_out-*.*">
	<map:generate src="cocoon:/{1}/edit/{2}.xsp_met-{3}.xsl"/>
	<map:serialize type="html"/>

it could be generalised.

you can do the same to *.xml (just change .xsp to .xml and the generator 

the last match-tag would use out-*.*
to modify the serialiser to the standard output :
	out-*.* could be :
but <map:serialize type="{4}"/> don't work.


ps : it is like in oop :

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message