You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by David Crossley <cr...@indexgeo.com.au> on 2003/03/03 01:36:48 UTC
Re: doctype declaration -> java.net.ConnectException:Connection
refused
Goetz Botterweck wrote:
>
> I just did a reinstall of my cocoon server with current versions of the
> software: JDK 1.4.1_01, Tomcat/4.1.18-LE-jdk14, cocoon 2.0.4
>
> Since then, I have the problem ...
So are you saying that it did work before this?
Cocoon would have been fetching the DTD from across
the network. It should be able to continue with that
clumsiness. So perhaps something else is blocking you.
Were you offline at the time? Oh, you say "server", so
i suppose always connected?
> ...that if I attach a document type declaration
> to a xml file a request to that file results in
> "java.net.ConnectException:Connection refused"
>
> As an example see this dummy file:
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
> "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
> <article>
> (... rest of file deleted...)
> </article>
>
>
> A request to that file results in "java.net.ConnectException: Connection
> refused: connect"
>
> After removing the <!DOCTYPE ...> everything works fine.
>
> Looks like cocoon is failing when trying to get the referenced DTD
>
> 1) Can I switch off this behaviour
Yes, by removing the doctype declaration like you did.
A better solution is to resolve the request to a local copy
of the DTD. See the document:
Entity resolution with catalogs
http://xml.apache.org/cocoon/userdocs/concepts/catalog.html
You would need to specifically reference the local "OASIS Catalog"
for the DocBook DTDs.
> 2) Can I make the validiation (incl. fetching the DTD) work better?
Yes, By using the RELAX NG validation. Follow the examples
provided in the cocoon-2.0.4/build.xml (search for "jing").
--David
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org