cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colin Paul Adams <>
Subject Re: Request headers
Date Mon, 26 Jul 2004 11:23:34 GMT
>>>>> "Colin" == Colin Paul Adams <> writes:

    Colin> I think I'll write a RegexpHeaderSelector.

I've done this, and it works to the limit of my testing - namely one

     <map:selector name="content-type" src="org.apache.cocoon.selection.RegexpHeaderSelector">
	<pattern name="xhtml">^.*application/xhtml\+xml.*$</pattern>

     <map:match pattern="test">
	<map:select type="content-type">
	  <map:when test="xhtml">
	    <map:read src="test.xhtml" mime-type="application/xhtml+xml"/>
	    <map:read src="test.html" mime-type="text/html"/>

Mozilla and Opera display test.xhtml whereas Lynx and Konqueror
display test.html. I don't have MSIE, but I've asked a friend to test
it, and I have no doubt it will display test.html.

This I think is useful. How can I contribute it to Cocoon (I've only
written the java class - I don't know where I should add documentation).
Colin Paul Adams
Preston Lancashire

View raw message