473,796 Members | 2,607 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 misunderstandin g 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:generato r name="html" src="org.apache .cocoon.generat ion.HTMLGenerat or"/>
</map:generators>
<map:transforme rs>
<map:transforme r name="mytransfo rmer" src="MyTransfor mer"/>
<map:transforme r name="xslt" src="org.apache .cocoon.transfo rmation.TraxTra nsformer"/>
</map:transformer s>
<map:serializer s>
<map:serializ er name="html" mime-type="text/html"
src="org.apache .cocoon.seriali zation.HTMLSeri alizer"/>
</map:serializers >
</map:components>

<map:pipeline s>

<map:pipeline >
<map:match pattern="">
<map:generate type="file" src="formpage.h tml"/>
<map:serializ e type="html"/>
</map:match>
</map:pipeline>

<map:pipeline >
<map:match pattern="analys e?url-form=*">
<map:generate type="html" src="{1}"/>
<map:transfor m type="mytransfo rmer"/>
<map:transfor m type="xslt" src="stylesheet .xsl"/>
<map:serializ e 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 2318

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

Similar topics

0
1793
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 not found.: org.apache.excalibur.source.SourceNotFoundException: file:/F:/Program Files/Apache Software Foundation/Tomcat 5.0/webapps/cocoon/portal/sitemap.xmap doesn't exist. Do you have any suggestions where to check for the error? Why does the
1
1869
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 tried to position them relative to the sitemap and relative to the xml file, but nothing worked. Could you assist me please. Do you have any advices? Sincerely
1
2059
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 Possible..? I already worked on sample xml,xslt,but i need an example where servlet or JSP would call Cocoon application to display it in the browser.
0
1728
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 sample code, it working fine in tomcat, but not websphere. any ideas?
0
1241
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 samples and generating javadocs, it fails to compile Cocoon.java, complaining about the org.apache.tools.ant.xxxx. Then I set CLASSPATH to the ant.jar file. Still cannot compile. Win2k + Tomcat 4.1.29 + JDK 1.4
0
1471
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: My xml document contains, among other elements, two distinct elements that need external java processing by a custom-made Cocoon serializer that converts the contents of these elements to "other stuff".
3
1215
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 say a textbox and a submit button....and then how to handle these things like submitting data,fetching from database and then processing the data to XML or PDF using cocoon...is there any good example?Plzzz help me ASAp.
0
1014
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 multiple emails with different body and to different users. I am using a for loop and I want this sendmail functionality in this for loop. Form a database a different email is picked and a new email body is created and the email goes to a different...
0
1377
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 of Cocoon using PHP5. Cocoon is a means of building Web Sites using a pipelined XML/XSLT/CSS approach based on sitemaps. I have used Cocoon for
0
9685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9531
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10459
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10237
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10187
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9055
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5446
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5578
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.