cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piroumian Konstantin <KPiroum...@protek.com>
Subject RE: Modifying an xslt stylesheet before utilisation.
Date Thu, 18 Jul 2002 12:45:35 GMT
> From: GB [mailto:guy.bobenrieth@neurosoft.fr] 
> 
> Dear Cocoon readers !
> 
> I need to transform a xslt stylesheet before using it over an 
> xml file.
> 
> In fact, what I want to do is to modify the stylesheet so 
> that a parameter,
> taken out of the http request, could be used as an xpath 
> string inside an
> xsl:apply-templates' select attribute.
> 
> The problem is that it isn't allowed to do that inside the 
> xslt directly by
> using something like <xsl:apply-templates select="$value"/>
> 
> I thought of using XSP to replace the $value field by its 
> real value before
> using this stylesheet.
> 
> Well, I don't know  how to specify the use of the a 
> transformed xsl as a
> transfomer inside a sitemap.

You two options here to solve your problem:
1) Use Xalan extension funcation: evaluate()
2) Setup a pipeline for your stylesheet transformation before applying and
call it through: <map:transform src="cocoon:/mystylesheet.xsl" />

<map:match pattern="*.xsl">
	<map:generate src="{1}.xsl" />
	<map:transform type="replaceXPath" />
	<map:serialize type="xml" />
</map:match>

Konstantin

> 
> Can you help me ???
> 
> Thanks a lot.
> 
> Guy Bobenrieth
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
> 

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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