[Mod_transform] want to transform xml output from module

jclark at ephibian.com jclark at ephibian.com
Sat Aug 6 16:45:18 EST 2005


i still can't seem to get this working...  when i put in the
ap_add_output_filter line, all i get in the browser is an empty html 4
document.  i tried moving this function call all around the
index_directory subroutine, but each time it produces the same results.

any ideas about what i might be doing wrong?

> On Fri, 2005-08-05 at 11:07, Jeffrey Clark wrote:
>> could you help me out a little further?  i tried putting that line in
>> mod_autoindex, but i wasn't sure exactly what it does or where to put
>> it.  also, i did some googling and saw some mention of the function
>> ap_register_output_filter.  is that needed in this case?  do i need to
>> add anything to my apache2.conf file?
>
> the ap_register_output_filter is to create an output filter, which
> mod_transform does to register the XSLT filter.
>
>
> You'd need to put the ap_add_output_filter in the index_directory
> function before anything is output. (after the directory opening check)
>
> that function will ADD mod_transform to handle the output of
> mod_autoindex and parse it through the XSLT.
>
>> if you would like, i could send you my modified mod_autoindex.c file.
>>
>> i appreciate your help so far and i'd really like to get this working.
>>
>> -jeff
>>
>> Edward Rudd wrote:
>> > On Wed, 2005-08-03 at 10:25, Jeffrey Clark wrote:
>> >
>> > > ok, i'm not that much of a newbie... :)  i know what mod_transform
>> > > does.  i have it set up on my apache server, and it is able to
>> > > transform both straight xml files, and xml output from a script (i'm
>> > > using perl).  let me explain a little further what i am trying to
>> > > accomplish.
>> > >
>> > > i've modified the apache module mod_autoindex to output xml rather
>> > > than html/xhtml.  i've tested it, and the xml it spits out is well
>> > > formed and ready to be transformed via an xsl stylesheet.  i have
>> > > included the line
>> > > <?xml-stylesheet href="foo.xsl"?>
>> > > in the xml output, but the page does not render this stylesheet in
>> the
>> > > browser.  it simply spits out the xml.
>> > >
>> > > so my question is, how can the xml output from my modified
>> > > mod_autoindex be transformed via mod_transform?
>> > >
>> > Ahaha..
>> >
>> > OK, what you are needing to do is to add an output filter after
>> > mod_autoindex.  The easiest way to do this is in mod_autoindex by
>> adding
>> >
>> > ap_add_output_filter("XSLT", NULL, r, r->connection);
>> >
>> > in the handler in mod_autoindex.
>> >
>> >
>> > > -jeff
>> > >
>> > > Edward Rudd wrote:
>> > >
>> > > > On Tue, 2005-08-02 at 16:09, Jeffrey Clark wrote:
>> > > >
>> > > >
>> > > > > i'm a newbie, so go easy on me...  is there a way to transform
>> xml that
>> > > > > gets outputted straight to the browser from an apache module?
>> any
>> > > > > information would be appreciated.
>> > > > >
>> > > > >
>> > > > mod_transform is an apache module that transforms XML and then
>> sends the
>> > > > transformed output to the browser. This is how the outoforder.cc
>> website
>> > > > is done.
>> > > >
>> > > >
>> > > >
>> > > > > -jeff
>> > > > >
>> > > > >
>> > > >
>> > > --
>> > > Jeffrey Clark
>> > > Software Engineer
>> > > Ephibian, Inc.
>> > > 6021 E. Grant Rd.
>> > > Tucson, AZ 85712
>> > > Phone: 520.917.4808
>> > > Fax: 520.917.4770
>> > >
>> > > _____________________________________________________
>> > > http://www.ephibian.com
>> > >
>>
>> --
>> Jeffrey Clark
>> Software Engineer
>> Ephibian, Inc.
>> 6021 E. Grant Rd.
>> Tucson, AZ 85712
>> Phone: 520.917.4808
>> Fax: 520.917.4770
>>
>> _____________________________________________________
>> http://www.ephibian.com
> --
> Edward Rudd <urkle at outoforder.cc>
> Website http://www.outoforder.cc/
>




More information about the Mod_transform mailing list