Re: XSL-handler
On Wed, 14 Jun 2000, Joshua Chamas wrote: I have heard complaints about XML::XSLT, but since I have been working with Geert on the module these past months, it has increased in rendering speed by a factor of 3, there is a real OO interface, and DOM memory garbage collection is production worthy. There is no DOM memory garbage collection (you have to manually call dispose() on the DOM tree) - is that why it's production ready? -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org http://xml.sergeant.org
Re: XSL-handler
Matt Sergeant wrote: On Wed, 14 Jun 2000, Joshua Chamas wrote: I have heard complaints about XML::XSLT, but since I have been working with Geert on the module these past months, it has increased in rendering speed by a factor of 3, there is a real OO interface, and DOM memory garbage collection is production worthy. There is no DOM memory garbage collection (you have to manually call dispose() on the DOM tree) - is that why it's production ready? The internal interface would not dispose of DOMs on its own when appropriate before, and now the OO interface gives the developer hooks to call dispose on the internal result DOM generated by the transformation. Also, there seems to have been some other large mem leak plugged in the past couple months, probably from changing some copy node behaviors /or disposing of them properly, such that the process of just running the transformations barely leaks at all, and should be fine for use under persistent mod_perl. -- Joshua
Re: XSL-Handler
I still can't get it to work. I've installed XML-Sablot 0.35 (and Sablot 0.36 and XML-Parser and XML-XPath and Storable and perl 5.6.0 ...) Same error! Also, when I start up the webserver, I get: [jon@zappa]/home/hal/foo/binapachectl start Ambiguous use of caller = resolved to "caller" = at /usr/lib/perl5/site_perl/Apache/AxKit/Exception.pm line 15. Ambiguous use of package = resolved to "package" = at /usr/lib/perl5/site_perl/Apache/AxKit/Exception.pm line 16. apachectl start: httpd started Each time I access the xml-file, the error-log prints: [Thu Jun 15 10:55:43 2000] [error] [client 10.10.1.186] [AxKit] [UnCaught] Apache::AxKit::Exception::Declined=HASH(0x849a8cc) at /usr/lib/perl5/site_perl/Apache/AxKit/Provider/File.pm line 151. [Thu Jun 15 10:55:43 2000] [error] [client 10.10.1.186] [AxKit] [UnCaught] Apache::AxKit::Exception::Declined=HASH(0x849ab84) at /usr/lib/perl5/site_perl/Apache/AxKit/Provider/File.pm line 123. Should I give up? /Jonas Thanks for the AxKit tip! =20 I have some problems though. I used AxKit-0.94, but it doesn't work yet. =20 My http.conf configuration: PerlModule AxKit Location /~jon/xml SetHandler perl-script PerlHandler AxKit =20 # Setup style type mappings AxAddStyleMap text/xsl Apache::AxKit::Language::Sablot AxAddStyleMap application/x-xpathscript \ Apache:AxKit::Language::XPathScript =20 # Optionally setup a default style mapping AxAddDefaultStyleMap /default.xsl text/xsl =20 # Optionally set a hard coded cache directory #AxCacheDir / /Location The error should have said "handler method not found", which is referring to the Sablot processor. I'm going to assume you don't have XML::Sablot installed. Get it from http://www.gingerall.com/ --=20 Matt/ -Original Message- From: Matt Sergeant [SMTP:[EMAIL PROTECTED]] Sent: den 14 juni 2000 19:27 To: Jonas Nordström Cc: '[EMAIL PROTECTED]' Subject:RE: XSL-handler This message uses a character set that is not supported by the Internet Service. To view the original message content, open the attached message. If the text doesn't display correctly, save the attachment to disk, and then open it using a viewer that can display the original character set. File: message.txt
RE: XSL-handler
On Wed, 14 Jun 2000, Kip Hampton wrote: Have a look at AxKit. It does what you are looking for and quite a bit more. http://xml.sergeant.org/axkit/ Or visit a CPAN nearest you for a slightly dated version. Don't go to cpan yet - any version below 0.90 contains a deprecated API. I'll be uploading a newer version to CPAN once I'm happy with the examples and documentation (read: not yet). And axkit.org should come online fairly soon once I update the documentation and things. -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org http://xml.sergeant.org
RE: XSL-handler
Thanks for the AxKit tip! I have some problems though. I used AxKit-0.94, but it doesn't work yet. My http.conf configuration: PerlModule AxKit Location /~jon/xml SetHandler perl-script PerlHandler AxKit # Setup style type mappings AxAddStyleMap text/xsl Apache::AxKit::Language::Sablot AxAddStyleMap application/x-xpathscript \ Apache:AxKit::Language::XPathScript # Optionally setup a default style mapping AxAddDefaultStyleMap /default.xsl text/xsl # Optionally set a hard coded cache directory #AxCacheDir / /Location xml-file: ?xml version="1.0" encoding="UTF-8"? ?xml-stylesheet type="text/xsl" href="konsult.xsl"? konsulter konsult id="1" efternamnAston/efternamn fornamnSam/fornamn telnr607/telnr /konsult /konsulter Error message from logfile when accessing the document: Use of uninitialized value at /usr/lib/perl5/site_perl/AxKit.pm line 246. [Wed Jun 14 15:57:44 2000] [error] [client 10.10.1.186] [AxKit] [UnCaught] Died at /usr/lib/perl5/site_perl/AxKit.pm line 246. The webbrowser receives the xml-output and since I'm using IE5, it uses the xsl-file to create HTML. /Jonas Nordstrom -Original Message- From: Matt Sergeant [SMTP:[EMAIL PROTECTED]] Sent: den 14 juni 2000 15:28 To: Kip Hampton Cc: Jonas Nordström; [EMAIL PROTECTED] Subject: RE: XSL-handler On Wed, 14 Jun 2000, Kip Hampton wrote: Have a look at AxKit. It does what you are looking for and quite a bit more. http://xml.sergeant.org/axkit/ Or visit a CPAN nearest you for a slightly dated version. Don't go to cpan yet - any version below 0.90 contains a deprecated API. I'll be uploading a newer version to CPAN once I'm happy with the examples and documentation (read: not yet). And axkit.org should come online fairly soon once I update the documentation and things. -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org http://xml.sergeant.org
Re: XSL-handler
On Wed, Jun 14, 2000 at 02:27:45PM +0100, Matt Sergeant wrote: Don't go to cpan yet - any version below 0.90 contains a deprecated API. I'll be uploading a newer version to CPAN once I'm happy with the examples and documentation (read: not yet). And axkit.org should come online fairly soon once I update the documentation and things. If I may, I'd suggest you send out as much of the new versions to CPAN as possible. People might become confised if they don't find the current version on CPAN. The 0.91/0.92 seems pretty stable for me. Just my $0.02. Yours, -- Honza Pazdziora | [EMAIL PROTECTED] | http://www.fi.muni.cz/~adelton/ .project: Perl, DBI, Oracle, MySQL, auth. WWW servers, MTB, Spain.
Re: XSL-handler
On Wed, 14 Jun 2000, Honza Pazdziora wrote: On Wed, Jun 14, 2000 at 02:27:45PM +0100, Matt Sergeant wrote: Don't go to cpan yet - any version below 0.90 contains a deprecated API. I'll be uploading a newer version to CPAN once I'm happy with the examples and documentation (read: not yet). And axkit.org should come online fairly soon once I update the documentation and things. If I may, I'd suggest you send out as much of the new versions to CPAN as possible. People might become confised if they don't find the current version on CPAN. The 0.91/0.92 seems pretty stable for me. My problem with this is, I'd like to add dependencies to at least one of the XSLT parser modules to the MakeMaker parameters. Unfortunately XML::XSLT seems broken in this regard for some reason beyond me, and XML::Sablot isn't on CPAN, it's just on www.gingerall.com. As soon as XML::XSLT puts out 0.22, I'll probably release another AxKit to CPAN. -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org http://xml.sergeant.org
RE: XSL-handler
On Wed, 14 Jun 2000, [iso-8859-1] Jonas Nordström wrote: Thanks for the AxKit tip! I have some problems though. I used AxKit-0.94, but it doesn't work yet. My http.conf configuration: PerlModule AxKit Location /~jon/xml SetHandler perl-script PerlHandler AxKit # Setup style type mappings AxAddStyleMap text/xsl Apache::AxKit::Language::Sablot AxAddStyleMap application/x-xpathscript \ Apache:AxKit::Language::XPathScript # Optionally setup a default style mapping AxAddDefaultStyleMap /default.xsl text/xsl # Optionally set a hard coded cache directory #AxCacheDir / /Location The error should have said "handler method not found", which is referring to the Sablot processor. I'm going to assume you don't have XML::Sablot installed. Get it from http://www.gingerall.com/ -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org http://xml.sergeant.org
Re: XSL-handler
Jonas Nordström wrote: Is there some form of XSL-module for mod-perl? I want to send some XML as a response to the Apache-server and then have it picked up by an Apache module that uses an XSL-template to render it in HTML or WML based on the original URL. Is that possible? If you want my latest .19 dev Apache::ASP with XSLT built-in, just ask and I'll send it over. With PerlSetVar XSLT $file.xsl specified Apache::ASP runs XML files as ASP scripts, and then uses XML::XSLT to transform the XML output with the XSL file. With PerlSetVar XSLTCacheSize specified, XSLT transformations will be cached with Tie::Cache, for a huge speedup on XML output that is unchanging. The XSLT DOM is cached regardless. I have heard complaints about XML::XSLT, but since I have been working with Geert on the module these past months, it has increased in rendering speed by a factor of 3, there is a real OO interface, and DOM memory garbage collection is production worthy. Let me know if you'd like to test things out. The only thing missing is adequate documentation. -- Joshua _ Joshua Chamas Chamas Enterprises Inc. NodeWorks free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051