Subject: Re: LibXSLT problem (possibly)



To close this out incase someone else encounters a similiar problem. I had multiple stylesheets calling makeformelements.xsl. It would process the first call fine but when it came to the next stylesheet it would through up the error because the previous stylesheet had already declared it. I and an associate are suspecting that in the older version it worked fine by overwriting the previous definition but in the newer versions it would catch this overwrite and prevent it. Dam you for being newer and smarter :) As I looked back over my previous emails. I didn't provide enough info for anyone to catch this so I'm sorry for that.

Thanks all

Aaron Steager wrote:

Hi all,
I tracked the problem further and have it narrowed down but not sure what the problem is. I did alot of searching on google and forums to see if anybody encountered this before and I couldn't find any that came close to matching my problem The pertaint info from the error log is

[Wed Jan 4 14:52:32 2006] [warn] [client 192.168.2.222] [AxKit] LibXSLT match_uri: /styles/emailalerts.xsl
[Wed Jan 4 14:52:32 2006] [warn] [client 192.168.2.222] [AxKit] LibXSLT open_content_uri: /styles/emailalerts.xsl
[Wed Jan 4 14:52:32 2006] [warn] [client 192.168.2.222] [AxKit] Style Provider Override: Apache::AxKit::Provider::File
[Wed Jan 4 14:52:32 2006] [warn] [client 192.168.2.222] [AxKit] decoding from UTF-8
[Wed Jan 4 14:52:32 2006] [warn] [client 192.168.2.222] [AxKit] [req] File Provider given $r: /usr/local/www/data/mvp/styles/emailalerts.xsl
[Wed Jan 4 14:52:32 2006] [warn] [client 192.168.2.222] [AxKit] encoding to UTF-8
compilation error: file /styles/makeformelements.xsl line 8 element template
xsl:template: error duplicate name 'make-textfield'
compilation error: file /styles/makeformelements.xsl line 66 element template
xsl:template: error duplicate name 'make-textfield-ho'
compilation error: file /styles/makeformelements.xsl line 123 element template
xsl:template: error duplicate name 'make-textarea'
compilation error: file /styles/makeformelements.xsl line 170 element template
xsl:template: error duplicate name 'make-checkbox'
compilation error: file /styles/makeformelements.xsl line 204 element template
xsl:template: error duplicate name 'make-selectlist'
[Wed Jan 4 14:52:32 2006] [warn] [client 192.168.2.222] [AxKit] [LibXSLT] performing transformation
[Wed Jan 4 14:52:32 2006] [warn] [client 192.168.2.222] [AxKit] Caught an exception
[Wed Jan 4 14:52:32 2006] [error] [client 192.168.2.222] [AxKit] [Error] Can't call method "transform" on an undefined value at /usr/local/lib/perl5/site_perl/5.8.7/mach/Apache/AxKit/Language/LibXSLT.pm line 124.\n
[Wed Jan 4 14:52:32 2006] [error] [client 192.168.2.222] [AxKit] From: /usr/local/lib/perl5/site_perl/5.8.7/mach/Apache/AxKit/Exception.pm : 9

In emailalerts.xsl I have

<xsl:include href="/styles/makeformelements.xsl"/>
.......
<xsl:call-template name="make-checkbox">
<xsl:with-param name="checkname">monthly_winners</xsl:with-param>
<xsl:with-param name="checklabel">Monthly Winner Alerts</xsl:with-param>
<xsl:with-param name="checkvalue">1</xsl:with-param>
<xsl:with-param name="checked"><xsl:value-of select="monthly_winners"/></xsl:with-param>
<xsl:with-param name="newline">1</xsl:with-param>
</xsl:call-template>

to make a checkbox. And if I'm understanding the error it's saying that there are multiple

<xsl:template name="make-....">

in makeforelements.xsl. I did check it and there is only one instance of each template. Also the web files and perl files were pulled over from another AxKit system we have and it all works fine on that one so I think the different versions may be the issue.

Function Box's info
Debian
WebDev:~$ xsltproc -V
Using libxml 20419, libxslt 10016 and libexslt 707
xsltproc was compiled against libxml 20419, libxslt 10016 and libexslt 707
libxslt 10016 was compiled against libxml 20419
libexslt 707 was compiled against libxml 20419
perl 5.6.1
LibXSLT v 1.33
LibXML v 1.31

Problem Box's info
FreeBSD
$ xsltproc -V
Using libxml 20622, libxslt 10115 and libexslt 812
xsltproc was compiled against libxml 20622, libxslt 10115 and libexslt 812
libxslt 10115 was compiled against libxml 20622
libexslt 812 was compiled against libxml 20622
perl 5.8.7
LibXML v1.58
LibXSLT v1.58

Any insight would be greatly appreciated.
Thanks
Aaron

Aaron Steager wrote:

Happy New Year all. I get to start mine with a problem. I'm setting up AxKit on a FreeBSD box. And it throws an error saying that "Can't call "transform" on an undefined value" in LibXSLT.pm I did some research and from what few I came across the problems seemed to be in the LibXSLT version 1.58 and I might need to downgrade to 1.50. But I wanted to shoot an email out to everybody and see if I was missing something (wouldn't surprise me if I was). Thanks in advance.

XML-LibXML-1.58_1
XML-LibXSLT-1.58
AxKit 1.6.2
perl 5.8.7


[Sat Dec 31 18:05:10 2005] [warn] [client 192.168.2.222] [AxKit] [LibXSLT] performing transformation
[Sat Dec 31 18:05:10 2005] [warn] [client 192.168.2.222] [AxKit] Caught an exception
[Sat Dec 31 18:05:10 2005] [error] [client 192.168.2.222] [AxKit] [Error] Can't call method "transform" on an undefined value at /usr/local/lib/perl5/site_perl/5.8.7/mach/Apache/AxKit/Language/LibXSLT.pm line 124.\n
[Sat Dec 31 18:05:10 2005] [error] [client 192.168.2.222] [AxKit] From: /usr/local/lib/perl5/site_perl/5.8.7/mach/Apache/AxKit/Exception.pm : 9
[Sat Dec 31 18:05:10 2005] [error] [client 192.168.2.222] [AxKit] [Backtrace] Can't call method "transform" on an undefined value at /usr/local/lib/perl5/site_perl/5.8.7/mach/Apache/AxKit/Language/LibXSLT.pm line 124.\n at /usr/local/lib/perl5/site_perl/5.8.7/mach/Apache/AxKit/Exception.pm line 9\n\tApache::AxKit::Exception::new('Apache::AxKit::Exception::Error', '-text', 'Can\\'t call method "transform" on an undefined value at /usr/...') called at /usr/local/lib/perl5/site_perl/5.8.7/mach/AxKit.pm line 1015\n\tAxKit::prep_exception('Can\\'t call method "transform" on an undefined value at /usr/...') called at /usr/local/lib/perl5/site_perl/5.8.7/mach/AxKit.pm line 173\n\tAxKit::__ANON__('Can\\'t call method "transform" on an undefined value at /usr/...') called at /usr/local/lib/perl5/site_perl/5.8.7/mach/Apache/AxKit/Language/LibXSLT.pm line 124\n\tApache::AxKit::Language::LibXSLT::handler('Apache::AxKit::Language::LibXSLT', 'AxKit::Apache=SCALAR(0x865d164)', 'Apache::AxKit::Provider::File=HASH(0x865d29c)', 'Apache::AxKit::Provider::File=HASH(0x8757bf4)', 1) called at /usr/local/lib/perl5/site_perl/5.8.7/mach/AxKit.pm line 759\n\tAxKit::process_request('AxKit::Apache=SCALAR(0x865d164)', 'Apache::AxKit::Provider::File=HASH(0x865d29c)', 'ARRAY(0x859b598)', 'undef') called at /usr/local/lib/perl5/site_perl/5.8.7/mach/AxKit.pm line 474\n\tAxKit::run_axkit_engine('AxKit::Apache=SCALAR(0x865d164)', 'Apache::AxKit::Provider::File=HASH(0x865d29c)') called at /usr/local/lib/perl5/site_perl/5.8.7/mach/AxKit.pm line 300\n\teval {...} called at /usr/local/lib/perl5/site_perl/5.8.7/mach/AxKit.pm line 291\n\tAxKit::main_handler('AxKit::Apache=SCALAR(0x865d164)', 'Apache::AxKit::Provider::File=HASH(0x865d29c)') called at /usr/local/lib/perl5/site_perl/5.8.7/mach/AxKit.pm line 204\n\tAxKit::fast_handler('AxKit::Apache=SCALAR(0x865d164)') called at /dev/null line 0\n\teval {...} called at /dev/null line 0\n



--
Aaron Steager
Web Programmer




Privacy