cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthieu Benéteau <>
Subject RE: XML Declaration
Date Tue, 19 Mar 2002 15:53:18 GMT
You may get a more explicit error message if you use the following error
handler in your pipeline :

        <map:transform src="stylesheets/error2html.xsl"/>
        <map:serialize status-code="500"/>

where "error2html.xsl" is the error stylesheet provided in the cocoon
default webapp (in webapp\stylesheets\system).


  -----Message d'origine-----
  De : cyril vidal []
  Envoyé : mardi 19 mars 2002 16:26
  Objet : XML Declaration

  I hope one day I will succeed in transforming  XML->PDF  with Cocoon...
  After the "tranform" corrected, I now obtain the following message:
  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">
    <title>Sonnet 130</title>
      <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>

  and the summary of the XLS-fo one:

  <?xml version="1.0"?>
  <xsl:stylesheet version="1.0"
  <xsl:template match="/">
      <xsl:apply-templates select="sonnet"/>

  <xsl:template match="sonnet">



  What do you think is wrong?

  Thanks for your answers,


  Thanks for your answer,


View raw message