I have a set of different source XML files that have quite different schemas. I've got AxKit set up to use an XSLT stylesheet to convert each type of source XML into a standard scheme, and then another XSLT stylesheet to provide the final XML->XHTML conversion (adding in all the site specific styling).
My config looks like this (for processing XML source files with a 'news' root element'):
AxAddStyleMap text/xsl Apache::AxKit::Language::LibXSLT AxAddRootProcessor text/xsl stylesheets/news.xsl news AxAddRootProcessor text/xsl stylesheets/page.xsl news
The output is XHTML.
Now I want to add some dynamic elements into the output, such as those supplied by the taglibs (eg. AxKit::XSP::WebUtils). For instance, I'd like to use <web:header name="HTTP_USER_AGENT"/>.
So I've tried modifying the page.xsl so that it instead outputs XML with the format:
<xsp:page language="Perl" xmlns:xsp="http://www.apache.org/1999/XSP/Core" xmlns:web="http://axkit.org/NS/xsp/webutils/v1" xmlns="http://www.w3.org/1999/xhtml"> <html> ... <web:header name="HTTP_USER_AGENT"/> ... </html> </xsp:page>
I've modified my conf to be:
AxAddStyleMap text/xsl Apache::AxKit::Language::LibXSLT AxAddStyleMap application/x-xsp Apache::AxKit::Language::XSP AxAddRootProcessor text/xsl stylesheets/news.xsl news AxAddRootProcessor text/xsl stylesheets/page.xsl news AxAddRootProcessor application/x-xsp . news
Unfortunately, AxKit fails to produce any output and crashes instead. It appears to do the first 2 XSLT transformations fine, but then dies on the XSP. The backtrace is appended to this email.
Firstly, is this the correct way to achieve what I want? Second, if it is - any idea what the problem I'm having is?
Much thanks.
Regards, Chris
[Mon Mar 17 00:48:12 2003] [error] [client 127.0.0.1] [AxKit] [Error] bad name at /sw/lib/perl5/darwin/XML/LibXML.pm line 756.
[Mon Mar 17 00:48:12 2003] [error] [client 127.0.0.1] [AxKit] From: /sw/lib/perl5/darwin/Apache/AxKit/Exception.pm : 9
[Mon Mar 17 00:48:12 2003] [error] [client 127.0.0.1] [AxKit] [Backtrace] bad name at /sw/lib/perl5/darwin/XML/LibXML.pm line 756.
Apache::AxKit::Exception::new('Apache::AxKit::Exception::Error', '-text', 'bad name at /sw/lib/perl5/darwin/XML/LibXML.pm line 756.^J') called at /sw/lib/perl5/darwin/AxKit.pm line 988
AxKit::prep_exception('*UNIVERSAL::AUTOLOAD', '/System/Library/Perl/unicode/To/Lower.pl', 'bad name at /sw/lib/perl5/darwin/XML/LibXML.pm line 756.^J') called at /sw/lib/perl5/darwin/AxKit.pm line 162
AxKit::__ANON__('bad name at /sw/lib/perl5/darwin/XML/LibXML.pm line 756.^J') called at /sw/lib/perl5/darwin/XML/LibXML.pm line 756
XML::LibXML::Element::setAttribute('XML::LibXML::Element=SCALAR(0xb42a00 )', '', '') called at (eval 28) line 42
Apache::AxKit::Language::XSP::ROOT::Users::fred::Sites::ourax::index_2ex ml::xml_generator('Apache::AxKit::Language::XSP::ROOT::Users::fred::Site s::oura...', 'AxKit::Apache=SCALAR(0x56755c)', 'Apache::Request=SCALAR(0x800dfc)', 'XML::LibXML::Document=SCALAR(0xb429b8)') called at /sw/lib/perl5/darwin/Apache/AxKit/Language/XSP.pm line 1098
Apache::AxKit::Language::XSP::Page::handler('Apache::AxKit::Language::XS P::ROOT::Users::fred::Sites::oura...', 'AxKit::Apache=SCALAR(0x56755c)', 'Apache::Request=SCALAR(0x800dfc)', 'XML::LibXML::Document=SCALAR(0xb429b8)') called at /sw/lib/perl5/darwin/Apache/AxKit/Language/XSP.pm line 173
require 0 called at /sw/lib/perl5/darwin/Apache/AxKit/Language/XSP.pm line 173
Apache::AxKit::Language::XSP::handler('Apache::AxKit::Language::XSP', 'AxKit::Apache=SCALAR(0x56755c)', 'Apache::AxKit::Provider::File=HASH(0x5660e4)', 'Apache::AxKit::Provider::File=HASH(0x8d5280)', 1) called at /sw/lib/perl5/darwin/AxKit.pm line 739
AxKit::process_request('AxKit::Apache=SCALAR(0x56755c)', 'Apache::AxKit::Provider::File=HASH(0x5660e4)', 'ARRAY(0x556e18)', undef) called at /sw/lib/perl5/darwin/AxKit.pm line 461
AxKit::run_axkit_engine('AxKit::Apache=SCALAR(0x56755c)', 'Apache::AxKit::Provider::File=HASH(0x5660e4)') called at /sw/lib/perl5/darwin/AxKit.pm line 288
require 0 called at /sw/lib/perl5/darwin/AxKit.pm line 279
AxKit::main_handler('AxKit::Apache=SCALAR(0x56755c)', 'Apache::AxKit::Provider::File=HASH(0x5660e4)') called at /sw/lib/perl5/darwin/AxKit.pm line 193
AxKit::fast_handler('AxKit::Apache=SCALAR(0x56755c)') called at /dev/null line 0
require 2 called at /dev/null line 0
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
