Hi,
Here's my setup,
1. My data source is a single XML file, e.g. "ch1o1.xml".
2. Based on the request URI, I process this XML file in different ways.
e.g.
/Da/ch1o1/ -> present the whole chapter.
/Da/ch1o1/sec1o2o1/ -> present only section 1.2.1 of this chapter.
So if they request /Da/ch1o1/sec1o2o1/
I parse the URI, note that they are requesting a section
reset the URI to where the actual XML uri and file are
$r->uri($ch_xml_uri);
$r->filename($ch_xml_filename);
and set section specific query_string
$r->args($new_query_string)
This works fine accept Axkit is always setting the content-type to
"text/xml".
I've tried putting
$r->content_type('text/html')
in my plugin but it has not effect.
As a result explorer keeps displaying the output as a tree structured XML
file rather than an HTML file.
So my question is how can I stop Axkit from setting the content to to
"text/xml" instead of "text/html"/
Thanks for any help.
PS.
Below is the relevent part of the debug log where it calls my plugin
"Apache::AxKit::Plugin::ITables::Request"
[Fri Nov 11 13:28:18 2005] [notice] Apache/1.3.34 (Unix) AxKit/1.7
mod_perl/1.29 configured -- resuming normal operations
[Fri Nov 11 13:28:18 2005] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Fri Nov 11 13:28:20 2005] [warn] [client 127.0.0.1 <http://127.0.0.1>]
[AxKit] handler called for /Da/ch1o1/sec1o1o1/
[Fri Nov 11 13:28:20 2005] [warn] [client 127.0.0.1 <http://127.0.0.1>]
[AxKit] Running plugin: Apache::AxKit::Plugin::ITables::Request
[Fri Nov 11 13:28:20 2005] [warn] [client 127.0.0.1 <http://127.0.0.1>]
[AxKit] [dh] Plugin::ITables::Request URI has trailing slash
[Fri Nov 11 13:28:20 2005] [warn] [client 127.0.0.1 <http://127.0.0.1>]
[AxKit] [dh uri] Plugin::ITables::Request /Da/ch1o1/sec1o1o1/
[Fri Nov 11 13:28:20 2005] [warn] [client 127.0.0.1 <http://127.0.0.1>]
[AxKit] [dh filename] Plugin::ITables::Request
/Local/Ix86/Linux/httpd_axkit/htdocs/Da/ch1o1/sec1o1o1
[Fri Nov 11 13:28:20 2005] [warn] [client 127.0.0.1 <http://127.0.0.1>]
[AxKit] [dh document_root] Plugin::ITables::Request
/Local/Ix86/Linux/httpd_axkit/htdocs
[Fri Nov 11 13:28:20 2005] [warn] [client 127.0.0.1 <http://127.0.0.1>]
[AxKit] [dh] Plugin::ITables::Request it_parts has values
[Fri Nov 11 13:28:20 2005] [warn] [client 127.0.0.1 <http://127.0.0.1>]
[AxKit] [dh new_query_string] Plugin::ITables::Request
pt=chsec&secid=divsec1o1o1
[Fri Nov 11 13:28:20 2005] [warn] [client 127.0.0.1 <http://127.0.0.1>]
[AxKit] [dh ch_xml_uri] Plugin::ITables::Request /Da/ch1o1/ch1o1.xml
[Fri Nov 11 13:28:20 2005] [warn] [client 127.0.0.1 <http://127.0.0.1>]
[AxKit] [dh ch_xml_filename] Plugin::ITables::Request
/Local/Ix86/Linux/httpd_axkit/htdocs/Da/ch1o1/ch1o1.xml
[Fri Nov 11 13:28:20 2005] [warn] [client 127.0.0.1 <http://127.0.0.1>]
[AxKit] Running plugin: Apache::AxKit::Plugin::QueryStringCache
[Fri Nov 11 13:28:20 2005] [warn] [client 127.0.0.1 <http://127.0.0.1>]
[AxKit] Running plugin: Apache::AxKit::StyleChooser::QueryString
[Fri Nov 11 13:28:20 2005] [warn] [client 127.0.0.1 <http://127.0.0.1>]
[AxKit] Running plugin: Apache::AxKit::Plugin::AddXSLParams::Request
[Fri Nov 11 13:28:20 2005] [warn] [client 127.0.0.1 <http://127.0.0.1>]
[AxKit] Content Provider Override: Apache::AxKit::Provider::File
[Fri Nov 11 13:28:20 2005] [warn] [client 127.0.0.1 <http://127.0.0.1>]
[AxKit] decoding from UTF-8
[Fri Nov 11 13:28:20 2005] [warn] [client 127.0.0.1 <http://127.0.0.1>]
[AxKit] [req] File Provider given $r:
/Local/Ix86/Linux/httpd_axkit/htdocs/Da/ch1o1/ch1o1.xml[Fri Nov 11 13:28:20
2005] [warn] [client 127.0.0.1 <http://127.0.0.1>] [AxKit] checking if we
process this resource
--
Dr. David Holden.
Please avoid sending me Word or PowerPoint attachments, thanks.
See: <http://www.gnu.org/philosophy/no-word-attachments.html>
Public GPG key available on request.
-------------------------------------------------------------