cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ROSSEL Olivier <>
Subject RE: how to write a simple Hello World
Date Wed, 12 Jun 2002 08:47:20 GMT
> Hi folks,
> I'm new in the Cocoon world and I try to test a simple Hello 
> World program.
> Here my hello.xml document:
> <?xml version="1.0"?>
> <?cocoon-process type="xslt"?>
> <?xml-stylesheet href="hello.xsl" type="text/xsl" ?>
> <page>
>   <titre>Hello World!</titre>
>   <content>
>     <paragraph>It's my first Cocoon page !</paragraph>
>   </content>
> </page>
> And here my hello.xsl stylesheet:
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0" 
> xmlns:xsl="">
> <xsl:template match="page">
> <html>
> <head>
> <title/><xsl:value-of select="titre"/>
> </head>
> <body>
> <xsl:apply-templates/>
> </body>
> </html>
> </xsl:template>
> </xsl:stylesheet>
> But when I request the hello.xml from my browser, nothing happend!
> I just see my hello.xml file in the browser.
> do I have fogotten something?
> Thank you
> Sylvain

If you use Cocoon2, it does not work the way it used to work in Cocoon1.
You have to declare excplicitely which URL pattern will trigger your
In fact, in the file sitemap.xmap, you declare all URL patterns that Cocoon
will handle, and associate a data chain (called a "pipeline").

Have a look at your sitemap.xmap.

A piepilne is a chain of Cocoon components that send SAX events to the next
A pipeline is defined as a XML generator, zero or more XSL transformers and
a HTML serializer
(: transforms SAX events into a character stream). I think that by studying
the sitemap.xmap, you will
find a pipeline description that matches your HelloWorld example.

Feel free to tell us which difficulties block you.

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message