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.xml
---------
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="application/x-xsp" href="."?>
<?xml-stylesheet type="text/xsl"  href="test1.xsl" ?>

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

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

   <para>test1</para>
  </page>

</xsp:page>

 . . .

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>

</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>

 . . .


test2.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>
</body>
</html>
</xsl:template>

</xsl:stylesheet>


.. . . 

test2.xml works fine but when I go to test1.xml (which tries to pull in 
test2.xml) I get the error below.

TIA tom,


[Thu Feb 27 14:35:55 2003] [warn] [client 172.22.51.201] [AxKit] XSP 
Compilation finished
[Thu Feb 27 14:35:55 2003] [warn] [client 172.22.51.201] [AxKit] Turning 
off cache!
[Thu Feb 27 14:35:55 2003] [warn] [client 172.22.51.201] [AxKit] Cache: 
key = 54570ffe4a3e5c352dc1f97fc69b8ecc
test1.xml
[Thu Feb 27 14:35:55 2003] [warn] [client 172.22.51.201] [AxKit] [Cache] 
writing cache file /web/apache/cache/54/57/0ffe4a3e5c352dc1f97fc69b8ecc
[Thu Feb 27 14:35:55 2003] [warn] [client 172.22.51.201] [AxKit] 
Apache::AxKit::Language::XSP::handler finished with code 0
[Thu Feb 27 14:35:55 2003] [warn] [client 172.22.51.201] [AxKit] execution 
of: Apache::AxKit::Language::XSP::handler finished
[Thu Feb 27 14:35:55 2003] [warn] [client 172.22.51.201] [AxKit] Style 
Provider Override: Apache::AxKit::Provider::Filter
[Thu Feb 27 14:35:55 2003] [warn] [client 172.22.51.201] [AxKit] [uri] 
File Provider looking up uri test1.xsl
[Thu Feb 27 14:35:55 2003] [warn] [client 172.22.51.201] [AxKit] [uri] 
File Provider set filename to /web/apache/webdocs/test1.xsl
[Thu Feb 27 14:35:55 2003] [warn] [client 172.22.51.201] [AxKit] about to 
execute: Apache::AxKit::Language::LibXSLT::handler
[Thu Feb 27 14:35:55 2003] [warn] [client 172.22.51.201] [AxKit] [LibXSLT] 
getting the XML
[Thu Feb 27 14:35:55 2003] [warn] [client 172.22.51.201] [AxKit] [LibXSLT] 
parsing stylesheet
[Thu Feb 27 14:35:55 2003] [warn] [client 172.22.51.201] [AxKit] [LibXSLT] 
parsing stylesheet /test1.xsl
[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.

[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::LibXSLT', 
'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]

Reply via email to