message
Exception in creating Transform Handler
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
This is my xml document:
<?xml
version="1.0"?>
<sonnet type="Shakespearean">
<author>
<last-name>Shakespeare</last-name>
<first-name>William</first-name>
<nationality>British</nationality>
<year-of-birth>1564</year-of-birth>
<year-of-death>1616</year-of-death>
</author>
<title>Sonnet 130</title>
<lines>
<line>My mistress' eyes are nothing
like the sun,</line>
<line>Coral is far more
red than her lips red.</line>
<line>If snow
be white, why then her breasts are dun,</line>
<line>If hairs be wires, black wires grow on her
head.</line>
<line>I have seen roses
damasked, red and white,</line>
<line>But no
such roses see I in her cheeks.</line>
<line>And in some perfumes is there more
delight</line>
<line>Than in the breath that
from my mistress reeks.</line>
<line>I love
to hear her speak, yet well I know</line>
<line>That music hath a far more pleasing
sound.</line>
<line>I grant I never saw a
goddess go,</line>
<line>My mistress when
she walks, treads on the ground.</line>
<line>And yet, by Heaven, I think my love as
rare</line>
<line>As any she belied with
false compare.</line>
</lines>
</sonnet>
and the summary of the XLS-fo
one:
<?xml
version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template
match="/">
<xsl:apply-templates
select="sonnet"/>
</xsl:template>
<xsl:template
match="sonnet">
<xsl:processing-instruction
name="cocoon-format">type="text/xslfo"</xsl:processing-instruction>
....
</xsl:stylesheet>
What do you think is
wrong?
Thanks for your answers,
Cyril.
Thanks for your answer,
Cyril.