473,394 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Cocoon: variables in the sitemap

mcv

I'm currently learning to use Cocoon, and although I really like it,
there are a couple of things that don't seem to be explained very well.
I've seen lots of articles explaining really complicated stuff with
actions and selectors and stuff, but I can't find a simple explanation
of how variables in the sitemap actually work. Can anyone direct me to
a good article on that?

Another problem I'm having is that for some strange reason, my stylesheet
replaces the XML file, instead of being applied on the XML. What I'm
doing seems right, and my stylesheet looks perfect, but for some reason
it doesn't work.

Below I've included my sitemap file, because I suspect both problems
are caused by me completely misunderstanding how the sitemap works.
Note that apart from these problems, this is a pretty trivial exmaple,
just intended for to learn to use Cocoon.

The "analyse" pipeline should be triggered by a http GET-request that
contains a URL which then needs to be passed to the HTML Generator,
which doesn't seem to work, whatever I try. At the moment I receive
an error that no pipeline matched request analyse. With slight changes
to the sitemap I receive a variety of exceptions, including one that
says a file with the name of the root directory of this project doesn't
exist. When I put a hard URL in the sitemap, I get the stylesheet
problem mentioned above.

<?xml version="1.0"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">

<map:components>
<map:generators>
<map:generator name="html" src="org.apache.cocoon.generation.HTMLGenerator"/>
</map:generators>
<map:transformers>
<map:transformer name="mytransformer" src="MyTransformer"/>
<map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransfor mer"/>
</map:transformers>
<map:serializers>
<map:serializer name="html" mime-type="text/html"
src="org.apache.cocoon.serialization.HTMLSerialize r"/>
</map:serializers>
</map:components>

<map:pipelines>

<map:pipeline>
<map:match pattern="">
<map:generate type="file" src="formpage.html"/>
<map:serialize type="html"/>
</map:match>
</map:pipeline>

<map:pipeline>
<map:match pattern="analyse?url-form=*">
<map:generate type="html" src="{1}"/>
<map:transform type="mytransformer"/>
<map:transform type="xslt" src="stylesheet.xsl"/>
<map:serialize type="html"/>
</map:match>
</map:pipeline>
</map:pipelines>

</map:sitemap>

I'm using Cocoon 2.1.5.1, Java 1.5.0 (shouldn't be relevant) and
Windows 2000 (shouldn't be relevant either).

I'm happy with just a pointer to an article explaining clearly how
these things should work, but if someone could explain it for me here,
that would be great too, ofcourse.
mcv.
Jul 20 '05 #1
0 2289

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Adam | last post by:
Hi! I'm trying to do a login form in cocoon. Login data are taken from MySQL, but before the data are checked cocoon throws such an error: org.apache.cocoon.ResourceNotFoundException: Resource...
1
by: K. Toni | last post by:
Hi there, I have one XML-Document being transformed via XSL to a HTML document. The transformation is done in a COCOON pipeline. The problem is, that no pictures of the HTML-version are shown. I...
1
by: Jawahar | last post by:
Hi All.. Currently in our application, we are using Serlvet as Controller,Jsp to View,BusinessLogic in EJB. We planned to implement Cocoon frame work in our existing application. Is this...
0
by: wai | last post by:
hi all, i running cocoon 2.1.1 with websphere 5, i have a problem related to xsp cinclude. everything after my first cinclude statement, it become bank. i been tested the cocoon cinclude...
0
by: itpcl | last post by:
I have set the JAVA_HOME, ANT_HOME and CATALINA_HOME environment variables. After download and unzip the cocoon 2.1.3 source file, I type "build war". As the building process go after loading...
0
by: Hugh Sparks | last post by:
If I configure and use two different fragment extractors on the same XML document, how can I write xslt template match patterns that distinguish which elements these fragments replaced? Details:...
3
by: ScarFace | last post by:
Hi...I am working on a project and going to work with cocoon. I am completely new to cocoon and still having theoritical ideas...any one can give me a simple example of a client side form with lets...
0
by: malini_ss | last post by:
Hi guys, I am trying to use the action "Sendmail" in my cocoon based web application. When ever this action is executed the control goes to the sitemap (out of flowscript), but I want to send...
0
by: Hugh Field-Richards | last post by:
Hi This was original posted only on the Cocoon Users Group last year but Paloose is now reasonably mature enough for exposure on this forum. Paloose is a simplified (much simplified) version...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.