cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Rosenstrauch <dar...@dti.net>
Subject Re: [c2] q: howto use ESQL inside own logicsheets?
Date Tue, 04 Dec 2001 17:32:10 GMT
At 06:20 PM 12/4/01 +0100, you wrote:
>I'm no familiar with Ant, can you tell me how to do it (some build.xml i gues?).


Ant is like a "make" utility.  It compiles all your java files, etc.  I also use it to perform
any XSLT transformations I need to generate static XSP pages (using the optional "style" action).
 e.g.:

<target name="xslt">
         <style
                 style="${style}.xsl"
                 in="${in}.xml"
                 out="${out}"
         />
</target>

But since you want to do this in Cocoon, you can ignore this Ant stuff.


>Or how to do it in cocoon, because that is what i was trying to do.
>I wanted to achieve this by using logicsheet, which is an xsl:stylesheet, as
>documented in c2docs. what i should do, i think, is to
>         <map:match patter="my_xsp.xsp">
>                 <map:generate type="file" src="my_xsl-file-containing-logicsheet-tags.xml"/>
>                 <map:transform type="xslt" src="my-logicsheet.xsl"/>
>                 <map:serialize type="xml"/>
>         </map:match>
>but that is what i thought c2 is doing with logisheet.
>if it's not then please let me know.



If you want to do this in cocoon I think it would look something like this:

<map:pipeline internal-only="true">
         <map:match pattern="generate_xsp">
                 <map:generate type="file" src="my_xsl-file-containing-logicsheet-tags.xml"/>
                 <map:transform type="xslt" src="my-logicsheet.xsl"/>
                 <map:serialize type="xml"/>
         </map:match>
</map:pipeline>

<map:pipeline>
         <map:match pattern="my_xsp.xsp"">
                 <map:generate type="serverpages" src="cocoon:/generate_xsp"/>
                 <map:transform type="xslt" src="convert_to_html.xsl"/>
                 <map:serialize type="html"/>
         </map:match>
</map:pipeline>


This is what I meant by it being more complicated.  For your stuff to execute properly it's
now a 2 step process for cocoon:

1) create the xsp page (by applying your logicsheet to an xml file)
2) execute the xsp page and format the results

It's more complicated because there's now 2 pipelines to deal with.


HTH.  Email back if you need more info.


DR


---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message