[Cross posting to axkit-dev as I'm not sure which list to use for this.]

OK, I think I've made some headway in debugging this problem.

On May 13, 2005, at 10:57 PM, S. Woodside wrote:

[Fri May 13 18:08:31 2005] [warn] [client 69.157.21.164] [AxKit] LibXSLT match_uri: axkit:/xinc/sitemenu.xml
[Fri May 13 18:08:31 2005] [warn] [client 69.157.21.164] [AxKit] get_axkit_uri(axkit:/xinc/sitemenu.xml)
[Fri May 13 18:08:31 2005] [warn] [client 69.157.21.164] [AxKit] get_axkit_uri looking up abs: '/xinc/sitemenu.xml'

Note the document in question here is /xinc/sitemenu.xml

This document is located (temporarily for the moment) at
http://semacode.netdirect.ca/xinc/sitemenu.xml
If you follow that link you will see that processing that file directly works perfectly. It's just XML with a single XSLT processing it, nothing fancy.


[...]
[Fri May 13 18:08:31 2005] [warn] [client 69.157.21.164] [AxKit] [uri] File Provider looking up uri /xsl/sitemenu.xsl
[Fri May 13 18:08:31 2005] [warn] [client 69.157.21.164] [AxKit] [uri] File Provider set filename to /var/www/semacode.org/xsl/sitemenu.xsl
[Fri May 13 18:08:31 2005] [warn] [client 69.157.21.164] [AxKit] about to execute: Apache::AxKit::Language::LibXSLT::handler
[Fri May 13 18:08:31 2005] [warn] [client 69.157.21.164] [AxKit] [LibXSLT] getting the XML
[Fri May 13 18:08:31 2005] [warn] [client 69.157.21.164] [AxKit] [LibXSLT] parsing stylesheet
[Fri May 13 18:08:31 2005] [warn] [client 69.157.21.164] [AxKit] [LibXSLT] parsing stylesheet /xsl/sitemenu.xsl

here it grabs the right stylesheet...

[...]
[Fri May 13 18:08:31 2005] [warn] [client 69.157.21.164] [AxKit] [LibXSLT] storing results in pnotes(dom_tree) (AxKit::Apache=SCALAR(0x842f9ac))

note the result is in pnotes(dom_tree)

[Fri May 13 18:08:31 2005] [warn] [client 69.157.21.164] [AxKit] Apache::AxKit::Language::LibXSLT::handler finished with code 0
[Fri May 13 18:08:31 2005] [warn] [client 69.157.21.164] [AxKit] execution of: Apache::AxKit::Language::LibXSLT::handler finished
[Fri May 13 18:08:31 2005] [warn] [client 69.157.21.164] [AxKit] get_axkit_uri returning (str): '<?xml version="1.0" encoding="UTF-8"?>
[...]

get_axkit_uri returning (str):

AHA! AxKit.pm (in CVS) line 581:

        if ( my $str = $r->pnotes('xml_string') ) {
            # NB: this is naive, but "0" isn't valid XML anyway
            $r->pnotes('xml_string', undef);
            AxKit::Debug(10, "get_axkit_uri returning (str): '$str'");
            return $str;
        }
        elsif ($r->pnotes('dom_tree')) {
            my $str = $r->pnotes('dom_tree')->toString;
            $r->pnotes('dom_tree', undef);
            AxKit::Debug(10, "get_axkit_uri returning (dom): '$str'");
            return $str;
        }

So it's reading the result out of pnotes('xml_string') which is the WRONG place ! :-) It should be reading out of pnotes('dom_tree').

Anyway, the XML result is clearly the wrong one. It's actually the XML from the very start of the pipeline, it's NOT sitemenu.xml or the processed output of sitemenu.xml, which would look like this (again from http://semacode.netdirect.ca/xinc/sitemenu.xml ) :

<?xml version="1.0"?>
<page><xhtml><div id="sitemenu">
<div class="sitemenuitem"><b><a href="/software" title="Semacode software for download">Software</a></b> for download</div>
<div class="sitemenuitem"><b><a href="/about" title="What is Semacode">About</a></b> what is it?</div>
<div class="sitemenuitem"><b><a href="/about/apps" title="What can you do with Semacode">Applications</a></b> of semacode</div>
<div class="sitemenuitem"><b><a href="/create" title="Make a semacode">Create</a></b> online</div>
<br/>
<div class="sitemenuitem"><b><a href="/weblog" title="Weblog with news and thoughts">Semablog</a></b> latest news and thoughts</div>
<div class="sitemenuitem"><b><a href="/support" title="Get help with semacode">Support</a></b> </div>
<div class="sitemenuitem"><b><a href="/about/contact" title="Contact us">Contact</a></b> </div>
</div></xhtml></page>


So it seems as though the test, if ( my $str = $r->pnotes('xml_string') ) isn't valid any more. It seems that at some previous date, it was correct to assume that pnotes('xml_string') would return "0" if the result was actually in dom_tree. But now there is XML in pnotes('xml_string') ... just not the right stuff.

--simon

\n<?xml-stylesheet type="text/xsl" href="/xsl/site.xsl" ?>\n\n<page>\n <header>\n <title>URL barcodes | practical ubicomp</title>\n </header>\n <sidebar><includeblog/></sidebar>\n <xhtml>\n\n\n<div class="floating_right">\n<div class="menuicons">\n <a href="/software/reader"><img src="/software/images/reader.gif" alt=""/></a>\n <a href="/software/server"><img src="/software/images/server.gif" alt=""/></a>\n <a href="/software/sdk"><img src="/software/images/sdk.gif" alt=""/></a>\n <br/>\n <a href="/about/technical"><img src="/about/images/technical.gif" alt=""/></a>\n <a href="/about/hardware"><img src="/about/images/hardware.gif" alt=""/></a>\n <a href="/about/platform"><img src="/about/images/platform.gif" alt=""/></a>\n <br/>\n <a href="/about/apps/cases/2004_10_09"><img src="/images/conqwest.gif" alt=""/></a>\n <a href="/about/apps/guide"><img src="/about/apps/images/guide.gif" alt=""/></a>\n <a href="/about/apps/potential"><img src="/about/apps/images/potential.gif" alt=""/></a>\n</div>\n</div>\n\n<h3>URL barcodes</h3>\n\n<p>Simply put, a semacode is a URL barcode. Using our free software, you can scan a semacode, and with just one click the proper webpage will be loaded on your phone's browser. The system is open and extensible, and anyone can create semacodes on their own computer.\n</p>\n\n<h3>practical ubiquitous computing</h3>\n\n<p>\nSemacode is a platform for ubiquitous computing. Using our complete platform, you can build a ubiquitous application from the ground up to engage your users directly into the software, eliminating the barriers between the real world and the computer.\n</p>\n\n<div class="floating_left">\n <div class="image">\n <img src="/images/a_semacode.gif" border="0" alt="semacode example"/>\n <div class="caption">a semacode node</div>\n </div>\n</div>\n\n<h3>how it works</h3>\n\n<p>Semacode "nodes" or URL barcodes sit at the center of the system. We adapted the public domain standard \n<a class="external" href="http://www.rvsi.com/ACUITYCIMATRIX/DM%20Basics.html";>data matrix</a>\nbarcode format to encode plain-text URLs. Data matrix is a robust code that can store hundred of characters, recovering up to 50% of lost data due to damage.\n</p>\n\n<p>When you create a semacode node, you control the content on your own website or WAP pages. So you can completely design a user-specific application using standard web design tools, and then hook it into real-world ubiquitous use by generating semacode nodes for the different page addresses.\n</p>\n\n<div class="floating_left">\n <div class="image">\n <img src="/images/camera_phone.jpg" alt="camera phone"/>\n </div>\n</div>\n\n<p>With a \n<a class="external" href="http://en.wikipedia.org/wiki/Camera_phone";>\ncamera phone</a>, your users can "click" a semacode node with their camera to activate it. If they have the Semacode Reader installed on their phone, the phone will automatically read the URL out of the code and present it to the user. If they approve, it launches the appropriate browser using cellular data services like GPRS. The URL will lead them to the page or service that you specified when you created the code.\n</p>\n\n\n<h3 style="clear:both;">uses of semacode</h3>\n\n<p>The applications you can create are limited only by the still unexplored bounds of ubiquitous computing. Or, you can look at the places where semacode has already been used:\n</p>\n\n<div class="floating_right">\n <div class="image">\n <img src="/about/apps/cases/2004_10_09/images/players_small.jpg" border="1" alt="event"/>\n</div>\n</div>\n\n<ul>\n<li><a href="/about/apps/cases/2004_06_14">\na conference promotion</a>\n</li>\n<li><a class="external" href="http://www.etoy.com/daycare/amsterdam/";>\nan art exhibit (etoy)</a></li>\n<li><a href="/about/apps/cases/2004_08_08">\nbusiness cards</a></li>\n<li><a href="/about/apps/cases/2004_10_09">\nan urban mobile game (ConQwest&#153;)</a></li>\n</ul>\n\n\n\n<h3>feedback</h3>\n\n<p>Tell us what you think: \n<a href="mailto:[EMAIL PROTECTED] subject=SemaCode.org">[EMAIL PROTECTED]</a>.\n</p>\n\n\n </xhtml>\n</page>'
[Fri May 13 18:08:31 2005] [warn] [client 69.157.21.164] [AxKit] Caught an exception
[Fri May 13 18:08:31 2005] [error] [client 69.157.21.164] [AxKit] [Error] axkit:/xinc/sitemenu.xml:1: at /usr/local/lib/perl/5.8.4/Apache/AxKit/Language/LibXSLT.pm line 123.\n
[Fri May 13 18:08:31 2005] [error] [client 69.157.21.164] [AxKit] From: /usr/local/lib/perl/5.8.4/Apache/AxKit/Exception.pm : 9
[Fri May 13 18:08:31 2005] [error] [client 69.157.21.164] [AxKit] [Backtrace] axkit:/xinc/sitemenu.xml:1: at /usr/local/lib/perl/5.8.4/Apache/AxKit/Language/LibXSLT.pm line 123.
Apache::AxKit::Exception::new('Apache::AxKit::Exception::Error', '-text', 'axkit:/xinc/sitemenu.xml:1: at /usr/local/lib/perl/5.8.4/Apa...') called at /usr/local/lib/perl/5.8.4/AxKit.pm line 1021
AxKit::prep_exception('axkit:/xinc/sitemenu.xml:1: at /usr/local/lib/perl/5.8.4/Apa...') called at /usr/local/lib/perl/5.8.4/AxKit.pm line 227
AxKit::__ANON__('axkit:/xinc/sitemenu.xml:1: at /usr/local/lib/perl/5.8.4/Apa...') called at /usr/local/lib/perl/5.8.4/Apache/AxKit/Language/LibXSLT.pm line 123
Apache::AxKit::Language::LibXSLT::handler('Apache::AxKit::Language:: LibXSLT', 'AxKit::Apache=SCALAR(0x83696ec)', 'Apache::AxKit::Provider::File=HASH(0x836a3d8)', 'Apache::AxKit::Provider::File=HASH(0x8463cb8)', 1) called at /usr/local/lib/perl/5.8.4/AxKit.pm line 767
AxKit::process_request('AxKit::Apache=SCALAR(0x83696ec)', 'Apache::AxKit::Provider::File=HASH(0x836a3d8)', 'ARRAY(0x83eb160)', 'undef') called at /usr/local/lib/perl/5.8.4/AxKit.pm line 478
AxKit::run_axkit_engine('AxKit::Apache=SCALAR(0x83696ec)', 'Apache::AxKit::Provider::File=HASH(0x836a3d8)') called at /usr/local/lib/perl/5.8.4/AxKit.pm line 304
eval {...} called at /usr/local/lib/perl/5.8.4/AxKit.pm line 295
AxKit::main_handler('AxKit::Apache=SCALAR(0x83696ec)', 'Apache::AxKit::Provider::File=HASH(0x836a3d8)') called at /usr/local/lib/perl/5.8.4/AxKit.pm line 262
AxKit::handler('AxKit::Apache=SCALAR(0x83696ec)') called at /dev/null line 0
eval {...} called at /dev/null line 0\n




--
Simon Woodside - Founder
Semacode Corporation
http://semacode.com


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



-- Simon Woodside - Founder Semacode Corporation http://semacode.com



Reply via email to