You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mark Owens <Ma...@coda.com> on 2001/05/03 14:49:45 UTC
C2: Sitemaps and DTD's
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.
Thanks
Mark
Re: C2: Sitemaps and DTD's
Posted by Berin Loritsch <bl...@apache.org>.
> 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"/>
</map:match>
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. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>