forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@apache.org>
Subject Re: [Proposal] add DTDs to Apache website
Date Fri, 13 Feb 2004 04:48:24 GMT
I started to experiment with Stefano's suggestion to use
a .htaccess file and ProxyPass the DTDs via ViewCVS.

This approach may not work because the media types will
be wrong. Everything will come out as text/plain
whereas the DTDs and the associated *.mod need to be
application/xml-dtd and *.pen *.ent are a different media type.

ViewCVS does let you specify the "content-type". However, we
cannot use mod_proxy because query string cannot be passed.

So on to mod_rewrite.

Here is what i have so far. It is not yet in CVS,
but exists at /www/cocoon.apache.org/dtd/

You can experiment with it via http://cocoon.apache.org/dtd/
ask for say document-v12.dtd etc.

I have reached a stage where i need help. The Proxy stuff
and the Cache stuff need some work.

----------
# See the index.html in this directory.
#
# The reason for this .htaccess is to deliver DTDs and
# associated resources to some impoverished XML tools
# that do not use the Catalog Entity Resolver.

# Get the content straight out of ViewCVS
# and use the appropriate media type:
# See http://www.faqs.org/rfcs/rfc3023.html
# FIXME: Verify these media types and maybe add charset
#
RewriteEngine On
RewriteRule "(.*)\.dtd$"
"http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/core/context/resources/schema/dtd/$1.dtd?content-type=application/xml-dtd"
[P]
RewriteRule "(.*)\.mod$"
"http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/core/context/resources/schema/dtd/$1.mod?content-type=application/xml-dtd"
[P]
RewriteRule "(.*)\.pen$"
"http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/core/context/resources/schema/dtd/$1.pen?content-type=application/xml-external-parsed-entity"
[P]
RewriteRule "(.*)\.ent$"
"http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/core/context/resources/schema/dtd/$1.ent?content-type=application/xml-external-parsed-entity"
[P]

# FIXME: Cache stuff is not yet working
#
# Now, since ViewCVS is slow, make sure we cache it
#CacheEnable mem

# for a day
#CacheDefaultExpire 86400
   #MCacheSize 4096
   #MCacheMaxObjectCount 100
   #MCacheMinObjectSize 1
   #MCacheMaxObjectSize 2048

# and in case your client is a good web citizen, tell the proxies
# to avoid calling us, since we guarantee that the content is fresh
# for a day
#ExpiresActive On
#ExpiresDefault "access plus 1 day"
----------




Mime
View raw message