cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans ...@domek.be>
Subject Re: The XML declaration may only appear at the very beginning of the document
Date Wed, 24 Mar 2004 08:30:27 GMT
maybe you have some non-visible characters before your <?xml 
version="1.0" encoding="utf-8"?> or some process is inserting them?

Lyteck Lynhiavu wrote:

> I am trying to publish xml to pdf. the process is established and works 
> most of the time.
> 
> Would someone know why I sometimes get the cocoon error "The XML 
> declaration may only appear at the very beginning of the document." on 
> perfecly valid XML?
> 
>     Description:org.apache.cocoon.ProcessingException: Could not read
>     resource
>     file:/D:/Publisher/jakarta-tomcat-4.0.1/webapps/cocoon/test/test.xml:
>     org.xml.sax.SAXParseException: The XML declaration may only appear
>     at the very beginning of the document.
> 
> The XML declaration is indeed at the top and a sample fragment is below:
> 
>     <?xml version="1.0" encoding="utf-8"?>
>     <!DOCTYPE book PUBLIC "company x//DTD company x Technical
>     Publication//EN" "c:\documentum\xml applications\companyx.dtd"
>     [<!ENTITY fr PUBLIC "-//company x//Contact fr//EN" "fr.xml">
>     <!ENTITY uk PUBLIC "-//company x//Contact uk//EN" "uk.xml">
>     ]>
>     <!--ArborText, Inc., 1988-2001, v.4002-->
> 
> I hope this is a common enough error with a resolution?
> 
> The cocoon server is Windows to which I am supplying zipped xml/jpgs 
> remotely via the browser. I don't have much information beyond that.
> 
> Thanks very much, Lyteck
> 


Mime
View raw message