OK thanks!
It was because of spurious whitespaces before the xml declaration.
It runs well now...;-)
Cyril.
> ----- Original Message -----
> From: "Joerg Heinicke" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 31, 2002 3:15 AM
> Subject: Re: pb with http request
>
>
> > This has nothing to do with the example, it's a common error message,
> > when having the Xril.ML declaration not as the absolutely first thing in
> the
> > XML file. There must not be any whitespaces or other characters in front
> > of the XML declaration and it has to be in the form as at
> > http://www.w3.org/TR/REC-xml#sec-prolog-dtd. Watch for case-sensitivity
> > too. Have a look in all the related files to fix the bug.
> >
> > cyril vidal wrote:
> > > Hy,
> > >
> > > I just was trying to run the example wrotten by Steve Punk in "Getting
> > > started with Cocoon 2"
http://www.xml.com/lpt/a/2002/07/10/cocoon2.html
> > >
> > > More precisely, the last example that calculates a factorial from a
> > > numeric value submitted via HTTP POST.
> > >
> > > Here's the sitemap:
> > >
> > > <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
> >
> > <snip/>
> >
> > > </map:sitemap>
> > >
> > >
> > > and here's the file mystylesheet.xsl that I've copied in integrality
> > > from the original source:
> > >
> > >
> > > <?xml version="1.0"?>
> >
> > This one seems to be ok, but I can't see whether there are any
> > whitespaces in the file of course.
> >
> > >
> > > <!-- Author: Steven P. Punte "[EMAIL PROTECTED]" -->
> > >
> > > <!-- Description: Computes Factorial -->
> > >
> > > <xsl:stylesheet version="1.0"
> >
> > <snip/>
> >
> > > </xsl:stylesheet>
> > >
> > >
> > >
> > > When I run this by pointing my browser to
> http://localhost/mypage?input=5
> > >
> > > I receive the following error message:
> > >
> > > *description* _org.apache.cocoon.ProcessingException: Exception in
> > > creating Transform Handler: org.xml.sax.SAXParseException: The XML
> > > declaration may only appear at the very beginning of the document._
> > >
> > > _I _don't understand why this occurs. Can you help me please?
> > >
> > > Thanks in advance,
> > >
> > > Cyril Vidal
> > > Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> > > Web: http://www.planetexml.com
> >
> > Regards,
> >
> > Joerg
> >
> >
> > ---------------------------------------------------------------------
> > 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]>
> >
>
---------------------------------------------------------------------
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]>