cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Brisbin" <bris...@ipa.net>
Subject "can't output text before document element" problem solved
Date Sat, 03 Mar 2001 16:16:48 GMT
Hi all :-)

Thanks to some helpful suggestions, I thought I'd post a note for the
archives that, buried in the cocoon-users archives, is one message that
finally shed some light on what I wasn't doing that gave me the following
error:

org.apache.xalan.xslt.XSLProcessorException: Warning: can't output text
before document element!  Ignoring..

The message is:
http://mailman.real-time.com/pipermail/cocoon-users/2000-August/003105.html

Basically, you also have to copy the the last template from the sample
logicsheets to match all the other elements in your page, and not just the
one you're interested in using...I used this template:

    <xsl:template match="@*|*|text()|processing-instruction()">
    <xsl:copy>
      <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
    </xsl:copy>
    </xsl:template>

One thing I didn't really get, being somewhat new to XSL, is that your page
is fully processed by the logicsheet and that you have to handle all the
other tags in your page, just like you would for a normal stylesheet...

Jon Brisbin
www.jbrisbin.net


Mime
View raw message