cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessandro Marcellini <amarc...@tiscalinet.it>
Subject Bug? org.xml.sax.SAXException: The encoding declaration is required ...
Date Thu, 26 Jul 2001 17:25:50 GMT
Hi all,
I've found a strange behaviour in parsing:
I include a xml document in another xml document as an entity and if I
don't write <?xml version="1.0" encoding="UTF-8"?> cocoon throws an
exception:
Error found handling the request.
org.xml.sax.SAXException: The encoding declaration is required in the
text declaration. [FATAL ERROR] [File:
"file:/opt/tomcat/webapps/epieng/admin/html.xml" Line: 1 Column: 21]
(nested exception: org.xml.sax.SAXParseException: The encoding
declaration is required in the text declaration. )
              at
org.apache.cocoon.parser.AbstractParser.fatalError(AbstractParser.java:105)

              at
org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1085)
...

This is the called file:
<?xml version="1.0"?>
<!DOCTYPE html [
  <!ENTITY hello SYSTEM 'html.xml'>
]>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="copy.xsl" type="text/xsl"?>
<html>
  <body>
    &hello;
  </body>
</html>

Where html.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<p>Hello World!!</p>

Where copy.xsl is:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
  <xsl:template match="/">
    <xsl:copy-of select="*"/>
  </xsl:template>
</xsl:stylesheet>

Please give me some help!
Bye
    Alessandro





---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message