<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Edward,<br>
<br>
I was finally able to get this to work. I was putting a local
reference to the xsl stylesheet in my apache config, and mod_transform
wasn't able to find it. Once I put in the full path, everything
worked. Thanks for all your help.<br>
<br>
I have one last question: How do I access an xsl stylesheet that is in
the root html directory from an xml file that is in a subdirectory?
For example:<br>
<br>
Let's say my apache docroot is /usr/local/apache/html. So I have an
xml file and an xsl stylesheet:<br>
/usr/local/apache/html/foo.xsl<br>
/usr/local/apache/html/bar/baz.xml<br>
<br>
I've tried three different methods in the baz.xml file:<br>
<?xml-stylesheet type="text/xsl" href="foo.xsl"?><br>
<?xml-stylesheet type="text/xsl" href="/foo.xsl"?><br>
<?xml-stylesheet type="text/xsl" href="../foo.xsl"?><br>
<br>
The first two methods throw an internal server error. Here's what
shows up in the error_log:<br>
[Thu Aug 25 13:04:41 2005] [error] [client 206.169.96.36]
mod_transform::libxml2_error: I/O <br>
[Thu Aug 25 13:04:41 2005] [error] [client 206.169.96.36]
mod_transform::libxml2_error: warning : <br>
[Thu Aug 25 13:04:41 2005] [error] [client 206.169.96.36]
mod_transform::libxml2_error: failed to load external entity
"/foo.xsl"\n<br>
[Thu Aug 25 13:04:41 2005] [error] [client 206.169.96.36]
mod_transform: XSLT: Loading of the XSLT File has failed<br>
<br>
<br>
The third method doesn't give an internal server error, but it doesn't
render the page to html either. It just spits out the raw xml data.
What am I doing wrong?<br>
<br>
-Jeff<br>
<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:jclark@ephibian.com">jclark@ephibian.com</a> wrote:
<blockquote
cite="mid1590.68.228.48.145.1123364718.squirrel@neon.ephibian.com"
type="cite">
<pre wrap="">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?
</pre>
<blockquote type="cite">
<pre wrap="">On Fri, 2005-08-05 at 11:07, Jeffrey Clark wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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?
</pre>
</blockquote>
<pre wrap="">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.
</pre>
<blockquote type="cite">
<pre wrap="">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:
</pre>
<blockquote type="cite">
<pre wrap="">On Wed, 2005-08-03 at 10:25, Jeffrey Clark wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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
</pre>
</blockquote>
</blockquote>
<pre wrap="">the
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">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?
</pre>
</blockquote>
<pre wrap="">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
</pre>
</blockquote>
<pre wrap="">adding
</pre>
<blockquote type="cite">
<pre wrap="">ap_add_output_filter("XSLT", NULL, r, r->connection);
in the handler in mod_autoindex.
</pre>
<blockquote type="cite">
<pre wrap="">-jeff
Edward Rudd wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On Tue, 2005-08-02 at 16:09, Jeffrey Clark wrote:
</pre>
<blockquote type="cite">
<pre wrap="">i'm a newbie, so go easy on me... is there a way to transform
</pre>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<pre wrap="">xml that
</pre>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">gets outputted straight to the browser from an apache module?
</pre>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<pre wrap="">any
</pre>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">information would be appreciated.
</pre>
</blockquote>
<pre wrap="">mod_transform is an apache module that transforms XML and then
</pre>
</blockquote>
</blockquote>
</blockquote>
<pre wrap="">sends the
</pre>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">transformed output to the browser. This is how the outoforder.cc
</pre>
</blockquote>
</blockquote>
</blockquote>
<pre wrap="">website
</pre>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">is done.
</pre>
<blockquote type="cite">
<pre wrap="">-jeff
</pre>
</blockquote>
</blockquote>
<pre wrap="">--
Jeffrey Clark
Software Engineer
Ephibian, Inc.
6021 E. Grant Rd.
Tucson, AZ 85712
Phone: 520.917.4808
Fax: 520.917.4770
_____________________________________________________
<a class="moz-txt-link-freetext" href="http://www.ephibian.com">http://www.ephibian.com</a>
</pre>
</blockquote>
</blockquote>
<pre wrap="">--
Jeffrey Clark
Software Engineer
Ephibian, Inc.
6021 E. Grant Rd.
Tucson, AZ 85712
Phone: 520.917.4808
Fax: 520.917.4770
_____________________________________________________
<a class="moz-txt-link-freetext" href="http://www.ephibian.com">http://www.ephibian.com</a>
</pre>
</blockquote>
<pre wrap="">--
Edward Rudd <a class="moz-txt-link-rfc2396E" href="mailto:urkle@outoforder.cc"><urkle@outoforder.cc></a>
Website <a class="moz-txt-link-freetext" href="http://www.outoforder.cc/">http://www.outoforder.cc/</a>
</pre>
</blockquote>
<pre wrap=""><!---->
_______________________________________________
Download the latest version at <a class="moz-txt-link-freetext" href="http://www.outoforder.cc/projects/apache/mod_transform/">http://www.outoforder.cc/projects/apache/mod_transform/</a>
To unsubscribe send an e-mail to
<a class="moz-txt-link-abbreviated" href="mailto:mod_transform-unsubscribe@lists.outoforder.cc">mod_transform-unsubscribe@lists.outoforder.cc</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Jeffrey Clark
Software Engineer
Ephibian, Inc.
6021 E. Grant Rd.
Tucson, AZ 85712
Phone: 520.917.4808
Fax: 520.917.4770
_____________________________________________________
<a class="moz-txt-link-freetext" href="http://www.ephibian.com">http://www.ephibian.com</a> </pre>
</body>
</html>