You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gergely Imre <gi...@mx.nextra.ro> on 2000/09/06 18:43:25 UTC
Re: Repeat
On Tue, 29 Aug 2000, Robin Green wrote:
> Gergely Imre <gi...@mx.nextra.ro> wrote:
> >On Mon, 28 Aug 2000, Robin Green wrote:
> >
> > > Four choices to include common content on each page:
> > >
> > > 3. <xsl:copy-of select="document('xyz.xml')"/> in a stylesheet
> >
> >And where should I put this line in the XSL, because I get the following
> >error: Warning: can't output text before document element! Ignoring...
>
> Just where you want to insert the file.
>
> >
> >How should the xyz.xml file look like?
>
> Just a valid XML file starting with <?xml version="1.0" ... etc.
When i try to load the file, I get the following error:
>>>
Warning: can't output text before document element! Ignoring...
>>>
What have I done wrong?
--
GImre
RE: Repeat
Posted by Per Kreipke <pe...@onclave.com>.
In my limited experience, I get your error when I try to output anything in
a XSL stylesheet from _outside_ a <xsl:template> block. E.g. <xsl:copy-of>
may not be a top-level element.
That is, this fragment is incorrect:
<xsl:stylesheet>
<xsl:copy-of ...>
<xsl:template match="/">
...
</xsl:template>
</xsl:stylesheet>
And should be:
<xsl:stylesheet>
<xsl:template match="/">
<xsl:copy-of ...>
</xsl:template>
</xsl:stylesheet>
Per.
> > Gergely Imre <gi...@mx.nextra.ro> wrote:
> > >On Mon, 28 Aug 2000, Robin Green wrote:
> > >
> > > > Four choices to include common content on each page:
> > > >
> > > > 3. <xsl:copy-of select="document('xyz.xml')"/> in a stylesheet
> > >
> > >And where should I put this line in the XSL, because I get the
> following
> > >error: Warning: can't output text before document element! Ignoring...
> >
> > Just where you want to insert the file.
> >
> > >
> > >How should the xyz.xml file look like?
> >
> > Just a valid XML file starting with <?xml version="1.0" ... etc.
>
> When i try to load the file, I get the following error:
>
> >>>
> Warning: can't output text before document element! Ignoring...
> >>>
>
> What have I done wrong?
>
> --
> GImre
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>