On Sat, May 13, 2000 at 09:38:35AM +0200, Kaiserovi wrote:
> Jamie,
> 
> 1) In your last message, you asked about a Perl function that would set
> the log file. Currently, there's none, even in the C interface. But I
> miss it too.
> 2) Do you really have to initialize foo to 0? SablotFree should not be
> called at all when SablotProcessStrings returns an error (i.e. a nonzero
> return value)!
> 3) Getting the error string after processing. In the latest release (not
> out yet), you can register a "message handler" to receive all
> error/warning/log messages so Sablotron does not report them itself.
> Would that help?

Hi Tom,

Apparently, in mod_perl, it or it would dump core.  I do know that under
mod_perl Sablotfree() was definately being called, even in an error
condition.

Weird thing is that setting it to zero caused a core dump when NOT running
under mod_perl, and it couldn't access sablot.log  (in Make test)

Maybe the xs code needs to check the result and not call Sablotfree 
if it returned a non-zero, thats my guess anyway. (I don't know much about c,
I thought that Sablotfree was always supposed to be called)

Setting up a "message handler" would be nice, if it's convenient to do, 
(mainly just to avoid accessing a log file) 

I really like your package, and want to thank you very much for writing it.
I look forward to using it. 

You've probably already thought of this, but it's an idea that you
might want to think about.

Something like: (in perl psuedocode)

        $transformer = new Sablotron($stylesheet);      
        $new_xml_a = $transformer->process($old_xml_a);
        $new_xml_b = $transformer->process($old_xml_b);

If there were some way to keep the parsed stylesheet in memory, you could
apply several xml documents against it without having to re-parse the style
sheet each time, "objects" or "handles" or something.

Of course, I have no idea how feasable this is, was just a thought.

Jamie

Reply via email to