You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by David Rosenstrauch <da...@dti.net> on 2001/11/14 15:34:02 UTC

Re: QUESTION on how to dynamically pass XSLT from the generator to a transformet

There's an unrelated FAQ question that might help your problem too:

"How do I create some content which isn't directly visible to everyone? 
Put the content in an internal pipeline...

<map:pipelines>
<map:pipeline internal-only="true">
<map:match pattern="int">
<map:generate src="docs/description.xml"/>
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
<map:pipeline>
<map:match pattern="desc.html">
<map:generate src="cocoon:/int"/>
<map:transform src="stylesheets/description2html.xsl"/>
<map:serialize type="html"/>
</map:match>
</map:pipeline>
</map:pipelines>
"


Maybe you can do something like this:

<map:pipeline>
<map:match pattern="xxx.html">
<map:generate src="xxx.xml"/>
<map:transform src="cocoon:/int"/>
<map:serialize type="html"/>
</map:match>
</map:pipeline>

Then have the "int" internal pipeline generate your stuff on the fly.

HTH.


DR



At 02:51 PM 11/14/01 +0200, you wrote:
>Hello,
>We are trying to use cocoon to develop a web service.
>
>After reading the cocoon documentation I have concluded that the XSLT that is used by a transformer must be statically declared in the sitemap file.
>What we want to do is at run time, generate an XSLT in the generator or in a XSP tag and then pass this XSLT to the next element in the pipeline, a transformer, to be used.
>
>So the pipeline should work as follows
>1)Generator reads the XML page
>2)Generator generates programmatically an XSLT
>3)Generator passes the XSLT to the first transformer in the pipeline.
>
>We assume that the XSLT will be generated inside a user defined XSP tag.
>
>I have the following questions
>1)Do we have to write our own generator to do that??
>2)Do we have to write our own transformer??
>3)Does cocoon provides APIs for doing what we want to do??
>
>Any suggestions of how to programmatically pass an XSLT from the generator to a transformer, are wellcomed.
>
>Napoleon
>
>
>---------------------------------------------------------------------
>Please check that your question has not already been answered in the
>FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
>To unsubscribe, e-mail: <co...@xml.apache.org>
>For additional commands, e-mail: <co...@xml.apache.org>


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

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>