You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Dude <re...@gmx.net> on 2002/07/20 17:16:34 UTC
dynamic xsp
hello
i have to create xsp depending on xml content.
compiles cocoon the generated xsp from xsl every request?
my pipeline:
---
<map:match pattern="check*.html">
<map:generate type="serverpages" src="cocoon:/genxsp{1}"/>
<map:transform src="feedback.xsl">
<map:parameter name="aufgabennr" value="{1}"/>
</map:transform>
<map:serialize type="html"/>
</map:match>
<map:match pattern="genxsp*">
<map:generate src="aufgabe{1}.xml"/>
<map:transform src="genxsp.xsl"/>
<map:serialize type="xml"/>
</map:match>
---
here is my problem:
bla.xml -> ... <test> hallo </test> ...
bla.xsp -> ... <xsp:logic> String a=<content of element test in bla.xml>; </xsp:logic> ...
how can i retrieve content of an xml file in xsp fast?
Greets, Steve
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: dynamic xsp
Posted by Luca Morandini <lu...@tin.it>.
Yes, it gets recompiled every time, since it is dynamic.
Regarding your second question, you could read an XML file by
using XSPUtil.getContents() and then parse it a you like.
Alternatively, you could use writeDOMSessionTransformer to write an XML element into a session variable for later use by XSP.
Best regards,
---------------------------------------------
Luca Morandini
GIS Consultant
lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------
> -----Original Message-----
> From: Dude [mailto:realdude@gmx.net]
> Sent: Saturday, July 20, 2002 5:17 PM
> To: cocoon-users@xml.apache.org
> Subject: dynamic xsp
>
>
> hello
>
> i have to create xsp depending on xml content.
> compiles cocoon the generated xsp from xsl every request?
>
> my pipeline:
>
> ---
>
> <map:match pattern="check*.html">
> <map:generate type="serverpages" src="cocoon:/genxsp{1}"/>
> <map:transform src="feedback.xsl">
> <map:parameter name="aufgabennr" value="{1}"/>
> </map:transform>
> <map:serialize type="html"/>
> </map:match>
>
> <map:match pattern="genxsp*">
> <map:generate src="aufgabe{1}.xml"/>
> <map:transform src="genxsp.xsl"/>
> <map:serialize type="xml"/>
> </map:match>
>
> ---
>
> here is my problem:
>
> bla.xml -> ... <test> hallo </test> ...
>
> bla.xsp -> ... <xsp:logic> String a=<content of element test in bla.xml>; </xsp:logic> ...
>
> how can i retrieve content of an xml file in xsp fast?
>
> Greets, Steve
>
>
>
>
>
> ---------------------------------------------------------------------
> 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: <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/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>