> 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="http://www.w3.org/1999/XSL/Transform"> > > <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 XML+XSL. 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 component. 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. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>