You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Jon Smirl <jo...@mediaone.net> on 2000/06/05 15:53:54 UTC

Apache module

Would any already happen to have an Apache module built around Xalan? I've
started putting one together in the last couple of days, but I'm sure other
people on this list know a lot more about Xalan, Apache and character
encodings than I do.

Goals for first module:
1) Accept URL with parameters.
2) Load the XML file from the URL
3) Locate it's stylesheet PI
4) select the stylesheet and compile/cache/clone it
5) Apply the stylesheet with the params from the URL
6) Build the output stream will the correct headers
7) Look at the beautiful, transformed output in the browser

Jon Smirl
jonsmirl@mediaone.net



Re: Apache module

Posted by Murray Todd Williams <mu...@verinet.com>.
I would hope that looking at how Cocoon and JServ were written would give you
massive pointers on how to put it together.  JServ will show you how to
register an Apache module to intercept a request based on the .xml extension.
Cocoon would give a good idea of how to wrap around Xalan, cache the
"compiled" templates, etc.  I'm willing to bet since Xerces and Xalan C++ and
Java versions have similar/almost-identical APIs, that a C-based Cocoon
imitation could pretty-closely follow the original.

Murray Todd Williams



Jon Smirl wrote:

> Would any already happen to have an Apache module built around Xalan? I've
> started putting one together in the last couple of days, but I'm sure other
> people on this list know a lot more about Xalan, Apache and character
> encodings than I do.
>
> Goals for first module:
> 1) Accept URL with parameters.
> 2) Load the XML file from the URL
> 3) Locate it's stylesheet PI
> 4) select the stylesheet and compile/cache/clone it
> 5) Apply the stylesheet with the params from the URL
> 6) Build the output stream will the correct headers
> 7) Look at the beautiful, transformed output in the browser
>
> Jon Smirl
> jonsmirl@mediaone.net


Re: Apache module (xalan-c)

Posted by Jon Smirl <jo...@mediaone.net>.
I forgot this was a dual list for C and Java. I'm looking for a solution
based on Xalan-c.

I already have a Java version running using JServ and Apache. The
performance isn't good enough so I want to recode in C.

Jon Smirl
jonsmirl@mediaone.net



RE: Apache module

Posted by Sean Forde <sf...@lizardtech.com>.
We have built an apache module which utilizes Xalan java. We built a simple
java wrapper around the Xalan API which takes an XML text string, a
reference to an XSL file, and returns the processed string.

At start-up we load the java virtual machine, and forward requests to our
simple wrapper via the invocation api. It works great in test programs, but
under Apache it does not work. We believe the reason is that the JVM steps
on some resources which Apache uses. That is, the JVM raises signals which
it uses internally. Unfortunately, Apache gets the signal and terminates the
process.

I would advise against builing a module this way. I would suggest checking
out Xalan C, or isolating the JVM into its own process and forgoing JNI.

	-Sean

Sean Forde
Software Architect
LizardTech Inc.
sforde@lizardtech.com <ma...@lizardtech.com>


>   -----Original Message-----
>   From: Jon Smirl [mailto:jonsmirl@mediaone.net]
>   Sent: Monday, June 05, 2000 6:54 AM
>   To: xalan
>   Subject: Apache module
>
>
>   Would any already happen to have an Apache module built around
>   Xalan? I've
>   started putting one together in the last couple of days, but
>   I'm sure other
>   people on this list know a lot more about Xalan, Apache and character
>   encodings than I do.
>
>   Goals for first module:
>   1) Accept URL with parameters.
>   2) Load the XML file from the URL
>   3) Locate it's stylesheet PI
>   4) select the stylesheet and compile/cache/clone it
>   5) Apply the stylesheet with the params from the URL
>   6) Build the output stream will the correct headers
>   7) Look at the beautiful, transformed output in the browser
>
>   Jon Smirl
>   jonsmirl@mediaone.net
>
>
>