instead of <xsl:template match="/"> you could
try <xsl:template match="page"> and see whether this can solve the problem.

I had similar problem when I used <xsl:template match="/">, I solveed the
problem by remplacing "/" by the root element of my XML in the match
attribute of my xsl:template.

Bobo,


----- Original Message -----
From: "Tibi DONDERA" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 06, 2001 8:08 PM
Subject: Re: can't output text before document element


> IMHO:
>
> You have a newline char before your <?xml ?> tag (ie it's not on the first
> line, first char of the file). That is not allowed by the xml specs.
>
>
> ----- Original Message -----
> From: "JEULIN Olivier" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, September 06, 2001 11:20 AM
> Subject: RE: can't output text before document element
>
>
> > <?xml version="1.0"?>
> > <?cocoon-process type="xslt"?>
> > <?xml-stylesheet href="testsheet.xsl" type="text/xsl"?>
> > <page>
> >  <title>Hello World!</title>
> >  <content>
> >   <paragraph>This is my first Cocoon page!</paragraph>
> >  </content>
> > </page>
> >
> > the testsheet.xsl
> >
> > <?xml version="1.0"?>
> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
> > </xsl:stylesheet>
> > ------------------------
> > you don't even create a root element with your stylesheet.
> > create a template matching 'page' or '/':
> > <xsl:template match="/">
> >    <html>
> >       <body>
> >          <xsl:apply-templates />
> >       </body>
> >    </html>
> > </xsl:template>
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.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/faqs.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/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to