[opencms-dev] DTDs for configuration files

Jason Trump jason.trump at brulant.com
Mon Oct 3 16:35:40 CEST 2005

You might want to examine the code of
org.opencms.xml.CmsXmlEntityResolver, as this is what looks up DTDs for
config documents parsed at runtime.  You'll see that the
http://www.opencms.org/dtd/... URLs are generally substituted for local
classpath resources at runtime.  This is a fairly common practice.

What XML development tools are you using?  Most XML editors allow you to
do the same thing: associate system id URLs with resources on the local
filesystem, in the event that you are working without an internet
connection or something like that.  Generally changing the DOCTYPE decl
is not required (and probably not recommended...)

Finally, I think if you really did want to change your system id to
something like "/path/to/file.dtd", you probably at least need to
include a URL scheme like "file:///path/to/file.dtd" (of course, I
haven't tried this, so I can't say that it will work.)

Good luck,

> -----Original Message-----
> From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-
> bounces at opencms.org] On Behalf Of Andreas Deininger
> Sent: Monday, October 03, 2005 6:59 AM
> To: opencms-dev at opencms.org
> Subject: [opencms-dev] DTDs for configuration files
> Hi all,
> recently, there was post, complaining about  the fact the all DTDs
> used by the OpenCms configuration files are not available at
> http://www.opencms.org/dtd/6.0/*.dtd" like stated in the FPI of the
> Doc Type definition of these config files. This might no only cause
> problems during deployment, but also prevents the XML files to be
> checked by my XML-editor plugin. So I tried to the change the FPI
> inside my Doc type declaration to SYSTEM "/path/to/file.dtd", however
> this prevented OpenCms from starting up, both will relative and
> absolute system paths:
> ERROR [  org.opencms.main.OpenCmsCore: 296] Critical error during
> OpenCms initialization: Unable to read the OpenCms XML configuration.
> ERROR [g.opencms.main.OpenCmsListener:  91]
> org.opencms.main.CmsInitException: Critical error during OpenCms
> initialization: Unable to read the OpenCms XML configuration.
> It even looks like as changing the URL inside the DOC Type-Definition
> causes start up to fail, even though this URL cannot be reached.
> Is there any workaround for that?
> Thanks in advance
> Regards
> Andreas
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please
> http://mail.opencms.org/mailman/listinfo/opencms-dev

More information about the opencms-dev mailing list