cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Owens <Mark.Ow...@coda.com>
Subject RE: C2: Sitemaps and DTD's
Date Thu, 03 May 2001 13:16:20 GMT
Thanks Berin,
All hope is not lost!
Regarding validation - As the files have been created with a DTD-aware tool,
I don't want Server validation to occur anyway as all I've done is copy them
from one place to another.
Will entities still be create OK?
Cheers
Mark

-----Original Message-----
From: Berin Loritsch [mailto:bloritsch@apache.org]
Sent: 03 May 2001 13:57
To: cocoon-users@xml.apache.org
Subject: Re: C2: Sitemaps and DTD's


> 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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>

Mime
View raw message