cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <>
Subject Re: C2: Sitemaps and DTD's
Date Thu, 03 May 2001 12:57:21 GMT
> Mark Owens wrote:
> Hi,
> Using C2/Tomcat4/Xalan_2_0_1/Xerces_1_3_1/Linux. (The mail archives are currently down)
> I'm not sure if this is a nonsense question but is there any way I can get a dtd location
mapped via the sitemap?
> I'm comitting files created under Windows (using XMetaL) to CVS on my Server. From there,
they are loaded into my Tomcat/cocoon
> webapp space.
> Trouble is, the dtd locations on Windows don't work under Cocoon - e.g. they use full
paths to dtd's. Also, can't simply strip out
> the DOCTYPE line as the DTD also declares entities.
> Ideally, I'd like to leave the XML files alone and map the dtd file via Cocoon.
> I'd appreciate any advice on how this issue could be resolved.

Yes you can.  There are two issues however:

1) you need to specify the location of the DTD as http://server/file.dtd
   which means that Xerces will open a socket to find it (very heavy).
2) Validation is expensive.  It will affect the performance of Cocoon.

You would map the dtd like this in the sitemap:

<map:match pattern="*.dtd">
  <!-- If DTDs have a unique mime type, then substitute that -->
  <map:read type="file" src="{1}.dtd" mime-type="text/plain"/>

In this manner, You should be able to tell XMetaL to point to the web server for the
DTD files.  XMetaL should populate the DOCTYPE declaration with the web server version.

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message