On Thursday, February 27, 2003, at 09:31 AM, Tom Howe wrote:



Hi, Im trying to use document() to pull in another xml file from my xslt stylesheet and its not working as I expected. It's also not giving me particularly useful debug (below).

Here are the files I'm using..


....


test1.xsl --------- <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">

<xsl:template match="/">
<html>
<body>

    <p><b><xsl:value-of select="/page/para" /></b></p>
    <p><b><xsl:value-of select="document('test2.xml')/page" /></b></p>

This needs to be document('axkit:/test2.xml')/page or else you're going to get the raw test2.xml without any processing.



</body> </html>

</xsl:template>

</xsl:stylesheet>

. . .

test2.xml
---------
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="application/x-xsp" href="."?>
<?xml-stylesheet type="text/xsl"  href="test2.xsl" ?>

<xsp:page
    xmlns:xsp="http://apache.org/xsp/core/v1";
    language="perl">

<page>

    <xsp:logic>
      warn "test2.xml\n";
    </xsp:logic>

<para>test2</para>

  </page>
</xsp:page>

. . .


....


[Thu Feb 27 14:35:55 2003] [warn] [client 172.22.51.201] [AxKit] [LibXSLT]
performing transformation
[Thu Feb 27 14:35:55 2003] [warn] [client 172.22.51.201] [AxKit] LibXSLT
match_uri: file:///etc/xml/catalog
[Thu Feb 27 14:35:55 2003] [warn] [client 172.22.51.201] [AxKit] LibXSLT
match_uri: /test2.xml
[Thu Feb 27 14:35:55 2003] [warn] [client 172.22.51.201] [AxKit] LibXSLT
open_content_uri: /test2.xml
[Thu Feb 27 14:35:55 2003] [warn] [client 172.22.51.201] [AxKit] Content
Provider Override: Apache::AxKit::Provider::Filter
[Thu Feb 27 14:35:55 2003] [warn] [client 172.22.51.201] [AxKit] Caught an
exception
[Thu Feb 27 14:35:55 2003] [error] [client 172.22.51.201] [AxKit] [Error]
input callback died: Not a HASH reference at
/web/gccperl561/lib/site_perl/5.6.1/Apache/Filter.pm line 191.

I've never seen this HASH ref problem. Is there something wrong with one of the tools?


simon


[Thu Feb 27 14:35:55 2003] [error] [client 172.22.51.201] [AxKit] From:
/web/gccperl561/lib/site_perl/5.6.1/i686-linux-multi/Apache/AxKit/ Exception.pm
: 9
[Thu Feb 27 14:35:55 2003] [error] [client 172.22.51.201] [AxKit]
[Backtrace] input callback died: Not a HASH reference at
/web/gccperl561/lib/site_perl/5.6.1/Apache/Filter.pm line 191.
Apache::AxKit::Exception::new('Apache::AxKit::Exception::Error',
'-text', 'input callback died: Not a HASH reference at
/web/gccperl561/lib...') called at
/web/gccperl561/lib/site_perl/5.6.1/i686-linux-multi/AxKit.pm line 988
AxKit::prep_exception('input callback died: Not a HASH reference
at /web/gccperl561/lib...') called at
/web/gccperl561/lib/site_perl/5.6.1/i686-linux-multi/AxKit.pm line 212
AxKit::__ANON__('input callback died: Not a HASH reference at
/web/gccperl561/lib...') called at
/web/gccperl561/lib/site_perl/5.6.1/i686-linux-multi/Apache/AxKit/ Language/LibXSLT.pm
line 122

Apache::AxKit::Language::LibXSLT::handler('Apache::AxKit::Language::Lib XSLT',
'Apache::Filter=SCALAR(0x88b4d58)',
'Apache::AxKit::Provider::Filter=HASH(0x8a6977c)',
'Apache::AxKit::Provider::Filter=HASH(0x8a6968c)', 1) called at
/web/gccperl561/lib/site_perl/5.6.1/i686-linux-multi/AxKit.pm line 739
AxKit::process_request('Apache::Filter=SCALAR(0x88b4d58)',
'Apache::AxKit::Provider::Filter=HASH(0x8a6977c)', 'ARRAY(0x8a68d70)',
undef) called at
/web/gccperl561/lib/site_perl/5.6.1/i686-linux-multi/AxKit.pm line 461
AxKit::run_axkit_engine('Apache::Filter=SCALAR(0x88b4d58)',
'Apache::AxKit::Provider::Filter=HASH(0x8a6977c)') called at
/web/gccperl561/lib/site_perl/5.6.1/i686-linux-multi/AxKit.pm line 288
eval {...} called at
/web/gccperl561/lib/site_perl/5.6.1/i686-linux-multi/AxKit.pm line 279
AxKit::main_handler('Apache::Filter=SCALAR(0x88b4d58)',
'Apache::AxKit::Provider::Filter=HASH(0x8a6977c)') called at
/web/gccperl561/lib/site_perl/5.6.1/i686-linux-multi/AxKit.pm line 247
AxKit::handler('Apache::Filter=SCALAR(0x88b4d58)') called at
/dev/null line 0
eval {...} called at /dev/null line 0



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


--
     anti-spam: do not post this address publicly
www.simonwoodside.com -- 99% Devil, 1% Angel


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



Reply via email to