cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: Resolution/validation woes
Date Wed, 02 Jan 2002 19:56:11 GMT
Gianugo Rabellino wrote:

> Looks like it's time to confess how much my hate for DTDs and validation 
> in general brought me to a deep ignorance and to what seems to be a dead 
> end alley.
> 
> I always try to avoid validation, but this time I have to: while playing 
> with a pretty cool DocBook add-on for M$ Word (you might want to check 
> it out at http://www.yawcpro.com: it's closed-source yet it has a free 
> that does all that is needed to me) I'm facing the fact that the 
> software saves its documents with a
> 
> <!DOCUMENT article SYSTEM "sdocbook.dtd">
> 
> directive. This caused my Cocoon to fail with a 
> ResourceNotFoundException on the missing DTD file.


This has nothing to do with Validation, or a Cocoon setting.  This has
everything to do with Xerces, or whatever your parser is.  The fact is
that Xerces will read the DTD if the DocType header is placed in the
document everytime.  It does this for entity resolution in your documents.

If you choose not to perform validation (the default), the DTD is still
read, although only the entity declarations are used.  Now, there *might*
be something in the way we create Parser objects that we need to change
so that they use the EntityResolver (i.e. catalog) for us.



> 
> Now... I tried to turn validation off in cocoon.xconf. No luck. I tried 
> then to resort to the entity resolver by adding the line
> 
> SYSTEM "sdocbook.dtd" "sdocbook.dtd"
> 
> to the end of resources/entities/catalog. No way: the little boy still 
> insists to have its private copy of sdocbook.dtd in the same directory.
> 
> Now for the question: how on earth am I supposed to tell to the parser 
> to simply *ignore* any DTD/Schema directive (or to ignore any error 
> coming from suche Handlers)? If this is not possible, how does the 
> catalog resolution work (i.e. where do I start in debugging it apart 
> from CocoonServlet :))?


If you want to completely ignore all DTD/Schema directives, do not supply
a DocType header!


Check the FAQs and docs on the Xerces 1 site.



-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message