cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Pogue <mpo...@apache.org>
Subject Re: [Bug in Xerces] Gets confused with CDATA
Date Tue, 18 Jan 2000 17:01:33 GMT
Phillipe,

	Thanks for sending me the entire doc-guidelines.xml file.  The file you
sent me contains 3 XML well-formedness errors:

1) missing </s1>
2) missing </p>
3) missing "<" in front of ![CDATA[  (not at the location you posted --
the problem is at a different spot)

When I corrected those problems, it went through the parser OK.  Try
making these same changes on your end, and see if it goes through
Cocoon!

I haven't tried the file with the DTD (because I don't have it).  But,
I'd suggest that the well-formedness errors need to go away before you
look at the DTD question!

For those other people using Cocoon, if you have trouble with a specific
XML file, try running it through the parser just by itself.  The parser
will usually tell you exactly where the problem is.  (Note that the
parser prints out the error line number...)

============================================================
Here's the error I got with the original file (Xerces-J 1.0.0):

Tue Jan 18 08:54:26  2000
******** Parsing "data/doc-guidelines.xml"
Symantec Java! JustInTime Compiler Version 3.10.088(i) for JDK 1.1.x
Copyright (C) 1996-98 Symantec Corporation

[Fatal Error] doc-guidelines.xml:95:4: The character sequence "]]>" must
not app
ear in content unless used to mark the end of a CDATA section.
Tue Jan 18 08:54:30  2000

============================================================
And, here are lines 94 and 95:

Make sure that you use <codelet>&lt;![CDATA[ something weird
]]></codelet> to mark weird characters you want to keep in the
============================================================

The "![CDATA[" should be "<![CDATA[".  Because it's not, it looks like
ordinary text to the parser, and therefore "]]>" is not allowed there.

Hope this helps!
Mike

Philippe Lavoie wrote:
> 
> Hi,
> 
> I should probably report this to the Xerces list, but I'm not a member, so
> perhaps someone
> can forward this message for me. Since it might affect anyone trying to use
> CDATA with Cocoon, I thought I'd let
> everybody know anyway :)  (reply to this e-mail if it is annopropriate to
> send Xerces bugs here)
> 
> The following code generated an error
> 
> <![CDATA[
> <?xml version="1.0"?>
> 
> <!DOCTYPE document SYSTEM "/eBusiness/dtd/document-v10.dtd">
> <?xml-stylesheet href="local.xsl" type="text/xsl"?>
> <?cocoon-process type="xslt"?>
> 
> <document version="$Revision: $" date="$Date: $">
>  <header>
>   <title>A nice title</title>
>   <subtitle>Something that gives a bit more about the intent</subtitle>
>   <authors>
>    <person name="Name of author 1" email="email1@cactus.ca"/>
>    <person name="Name of author 2" email="email2@cactus.ca"/>
>   </authors>
>  </header>
> 
>  ... The documentation goes here.
> 
> </document>
> ]]>
> 
> The Error was
> 
> The character sequence "]]>" must not appear in content unless used to mark
> the end of a CDATA section. at
> org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1256)

Mime
View raw message