cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Schenck" <sche...@posc.org>
Subject Entity ContentType Parse Error
Date Fri, 31 Mar 2000 16:32:40 GMT
I am trying to use the samples/xsp/view-source.xml file to view the source of one
of my own XML files.  I have done this successfully on one file so I know it
works.  However, it does not work on another file.  I am not sure the problem is
with Cocoon.  I suspect Xalan.

I am using the latest versions of Xalan (1.0.0) and Xerces (1.0.3).  Here is the
error return I get:

org.xml.sax.SAXParseException: The declaration for the entity "ContentType" must
end with '>'.
	at org.apache.cocoon.parser.AbstractParser.fatalError(AbstractParser.java,
Compiled Code)
	at java.lang.Exception.(Exception.java, Compiled Code)
	at org.xml.sax.SAXException.(SAXException.java, Compiled Code)
	at org.apache.cocoon.parser.AbstractParser.fatalError(AbstractParser.java,
Compiled Code)
	at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java, Compiled
Code)
	at
org.apache.xerces.framework.XMLDTDScanner.reportFatalXMLError(XMLDTDScanner.java:
671)
	at org.apache.xerces.framework.XMLDTDScanner.abortMarkup(XMLDTDScanner.java:720)
	at org.apache.xerces.framework.XMLDTDScanner.scanEntityDecl(XMLDTDScanner.java,
Compiled Code)
	at org.apache.xerces.framework.XMLDTDScanner.scanDecls(XMLDTDScanner.java,
Compiled Code)
	at
org.apache.xerces.validators.dtd.DTDValidator.scanDoctypeDecl(DTDValidator.java,
Compiled Code)
	at org.apache.xerces.framework.XMLParser.scanDoctypeDecl(XMLParser.java,
Compiled Code)
	at
org.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher.dispatch(XMLDocu
mentScanner.java, Compiled Code)
	at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java,
Compiled Code)
	at org.apache.xerces.framework.XMLParser.parse(XMLParser.java, Compiled Code)
	at org.apache.cocoon.parser.XercesParser.parse(XercesParser.java, Compiled Code)
	at org.apache.cocoon.parser.AbstractParser.parse(AbstractParser.java, Compiled
Code)
	at
_D_._ApacheRoot._samples._xsp._view_source.populateDocument(_view_source.java:413
)
	at org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:96)
	at org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java,
Compiled Code)
	at org.apache.cocoon.Engine.handle(Engine.java, Compiled Code)
	at org.apache.cocoon.Cocoon.service(Cocoon.java, Compiled Code)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
	at org.apache.jserv.JServConnection.processRequest(JServConnection.java,
Compiled Code)
	at org.apache.jserv.JServConnection.run(JServConnection.java, Compiled Code)
	at java.lang.Thread.run(Thread.java:479)

Here is my dtd:

=======================================

<!-- General DTD for simple document -->

 <!ELEMENT page (title?, pageTitle?, content)>
 <!ELEMENT title (#PCDATA)>
 <!ELEMENT pageTitle (#PCDATA)>
 <!ELEMENT content ((para | table | list | head1 | head2 | head3)*)>
 <!ELEMENT para (#PCDATA)>
 <!ELEMENT table (thead*, row+)>
 <!ELEMENT thead (#PCDATA)>
 <!ELEMENT row (col+)>
 <!ELEMENT col ((para | content)+)>
 <!ELEMENT list (elem+)>
 <!ATTLIST list
   type	(ordered | unordered) 'unordered'>
 <!ELEMENT elem ((link | text)*)>
 <!ELEMENT head1 (#PCDATA)>
 <!ELEMENT head2 (#PCDATA)>
 <!ELEMENT head3 (#PCDATA)>
 <!ELEMENT text (#PCDATA)>
 <!ELEMENT link (#PCDATA)>
 <!ATTLIST link
   href	CDATA	#REQUIRED>

=======================================

Here is my XML file:

=======================================

<?xml version="1.0"?>

<!-- Author: Dan Schenck "schenck@posc.org" -->

<?cocoon-process type="xslt"?>
<?xml-stylesheet href="/stylesheets/std-page.xsl" type="text/xsl"?>

<!DOCTYPE WellLogML SYSTEM "http://dan.posc.org/dtd/simpleDocument.dtd" >

<!-- Written by Dan Schenck "schenck@posc.org" -->

<page>
 <title>Dan's Apache HTTP Server Home Page</title>
 <pageTitle>Apache's Cocoon at Work!</pageTitle>
 <content>
   <head1>What's This?</head1>
   <para>This site is a demonstration of Cocoon, the new XML publishing software
from xml.apache.org.
     Explore the links below to see what Cocoon is all about.</para>
   <head3>Links on dan.posc.org</head3>
   <list>
     <elem><link href="./samples/index.xml">Cocoon Samples</link></elem>
     <elem><link
href="./samples/xsp/view-source.xml?url=http://dan.posc.org/index.xml">View the
XML Source of this File</link></elem>
   </list>
 </content>
</page>

=======================================

The only DTD I find in the Apache distributions that contains the entity
'ContentType' is

  xalan/xdocs/style/dtd/xsl-html40s.dtd

Any help would be appreciated.

Thanks,

Dan Schenck

-------------------------------------------------
Dan R. Schenck        mailto:schenck@posc.org
Business Unit Manager http://www.posc.org
POSC, Suite 275
10777 Westheimer
Houston, TX 77042

voice: +1 (713) 267-5166 fax: +1 (713) 784-9219
-------------------------------------------------


Mime
View raw message