I think there is a bug in the libxml2 xi:include handling or some
aspect of axkit.

Basically, I have two separate xml files which both include a third
xml file.  I can happily view the first file, or the second file, but
once the server has processed one of them it throws up an internal
server error processing the other one.

== test1.xml ===============================================================

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="stylesheet.xsl" type="text/xsl"?>

<sometag xmlns:xi="http://www.w3.org/2001/XInclude";>
  <xi:include href="include.xml"/>
</sometag>

== test2.xml ===============================================================

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="stylesheet.xsl" type="text/xsl"?>

<sometag xmlns:xi="http://www.w3.org/2001/XInclude";>
  <xi:include href="include.xml"/>
</sometag>

== include.xml =============================================================

<?xml version="1.0" encoding="utf-8"?>

<anothertag>
</anothertag>

== stylesheet.xsl===========================================================

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

<xsl:template match="/">
  <xsl:copy-of select="."/>
</xsl:template>

</xsl:stylesheet>

============================================================================

I am running apache with -X and axkit with AxNoCache on.  The
following is a copy of the error log (with AxDebugLevel 10) generated
by viewing test1.xml and then test2.xml:

== error.log ===============================================================

[Wed Nov 19 16:39:03 2003] [warn] pid file /home/mwk/html/undue/apache/apache.pid 
overwritten -- Unclean shutdown of previous Apache run?
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] fast handler called for 
/test1.xml
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] Content Provider 
Override: Apache::AxKit::Provider::File
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] decoding from UTF-8
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] [req] File Provider given 
$r: /home/mwk/html/undue/www/test1.xml
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] checking if we process 
this resource
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] media: screen, preferred 
style: #default
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] Cache: key = 
42da4cf029daed97d9768e4954c8b3bb
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] getting styles and 
external entities from the XML
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] styles not cached - 
calling $provider->get_styles()
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] using XS get_styles 
(libxml2)
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] encoding to UTF-8
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] calling xs_get_styles_fh()
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] calling 
xs_get_styles_str()
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] parse_pi: href = 
stylesheet.xsl
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] parse_pi: type = text/xsl
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] xs_get_styles returned: , 
, sometag
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] Calling 
GetMatchingProcessors with (screen, , , , sometag)
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] get_styles: loading style 
modules
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] get_styles: looking for 
mapping for style type: 'text/xsl'
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] cache doesn't exist
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] some condition failed. 
recreating output
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] styles: 
Apache::AxKit::Language::LibXSLT(stylesheet.xsl)
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] Style Provider Override: 
Apache::AxKit::Provider::File
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] [uri] File Provider 
looking up uri stylesheet.xsl
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] [uri] File Provider set 
filename to /home/mwk/html/undue/www/stylesheet.xsl
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] about to execute: 
Apache::AxKit::Language::LibXSLT::handler
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] [LibXSLT] getting the XML
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] LibXSLT match_uri: 
file:///etc/xml/catalog
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] LibXSLT match_uri: 
/include.xml
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] LibXSLT open_content_uri: 
/include.xml
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] Content Provider 
Override: Apache::AxKit::Provider::File
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] decoding from UTF-8
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] [req] File Provider given 
$r: /home/mwk/html/undue/www/include.xml
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] encoding to UTF-8
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] [LibXSLT] parsing 
stylesheet
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] [LibXSLT] parsing 
stylesheet /stylesheet.xsl
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] [LibXSLT] performing 
transformation
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] [LibXSLT] transformation 
finished, creating XML::LibXML::Document=SCALAR(0x841d0c8)
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] [LibXSLT] outputting to $r
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] [LibXSLT] storing results 
in pnotes(dom_tree) (AxKit::Apache=SCALAR(0x8346180))
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] 
Apache::AxKit::Language::LibXSLT::handler finished with code 0
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] execution of: 
Apache::AxKit::Language::LibXSLT::handler finished
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] delivering to browser
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] Delivering xml_string
[Wed Nov 19 16:39:06 2003] [warn] [client 127.0.0.1] [AxKit] writing xml string to 
browser
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] fast handler called for 
/test2.xml
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] Content Provider 
Override: Apache::AxKit::Provider::File
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] decoding from UTF-8
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] [req] File Provider given 
$r: /home/mwk/html/undue/www/test2.xml
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] checking if we process 
this resource
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] media: screen, preferred 
style: #default
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] Cache: key = 
beaad6ca6d3b923f54ec98d2b3c0a4a7
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] getting styles and 
external entities from the XML
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] styles not cached - 
calling $provider->get_styles()
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] using XS get_styles 
(libxml2)
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] encoding to UTF-8
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] calling xs_get_styles_fh()
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] calling 
xs_get_styles_str()
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] parse_pi: href = 
stylesheet.xsl
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] parse_pi: type = text/xsl
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] xs_get_styles returned: , 
, sometag
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] Calling 
GetMatchingProcessors with (screen, , , , sometag)
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] get_styles: loading style 
modules
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] get_styles: looking for 
mapping for style type: 'text/xsl'
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] cache doesn't exist
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] some condition failed. 
recreating output
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] styles: 
Apache::AxKit::Language::LibXSLT(stylesheet.xsl)
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] Style Provider Override: 
Apache::AxKit::Provider::File
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] [uri] File Provider 
looking up uri stylesheet.xsl
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] [uri] File Provider set 
filename to /home/mwk/html/undue/www/stylesheet.xsl
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] about to execute: 
Apache::AxKit::Language::LibXSLT::handler
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] [LibXSLT] getting the XML
[Wed Nov 19 16:39:08 2003] [warn] [client 127.0.0.1] [AxKit] Caught an exception
[Wed Nov 19 16:39:08 2003] [error] [client 127.0.0.1] [AxKit] [Error] I/O warning : 
failed to load external entity "/include.xml"
could not load /include.xml, and no fallback was found

[Wed Nov 19 16:39:08 2003] [error] [client 127.0.0.1] [AxKit] From: 
/usr/lib/perl5/Apache/AxKit/Exception.pm : 9
[Wed Nov 19 16:39:08 2003] [error] [client 127.0.0.1] [AxKit] [Backtrace] I/O warning 
: failed to load external entity "/include.xml"
could not load /include.xml, and no fallback was found
        Apache::AxKit::Exception::new('Apache::AxKit::Exception::Error','-text','I/O 
warning : failed to load external entity "/include.xml"\x{a}c...') called at 
/usr/lib/perl5/AxKit.pm line 988
        AxKit::prep_exception('I/O warning : failed to load external entity 
"/include.xml"\x{a}c...') called at /usr/lib/perl5/AxKit.pm line 162
        AxKit::__ANON__('I/O warning : failed to load external entity 
"/include.xml"\x{a}c...') called at /usr/lib/perl5/XML/LibXML.pm line 465
        
XML::LibXML::processXIncludes('XML::LibXML=HASH(0x836ad38)','XML::LibXML::Document=SCALAR(0x836aba0)')
 called at /usr/lib/perl5/XML/LibXML.pm line 670
        
XML::LibXML::Document::process_xinclude('XML::LibXML::Document=SCALAR(0x836aba0)') 
called at /usr/lib/perl5/Apache/AxKit/Language/LibXSLT.pm line 70
        
Apache::AxKit::Language::LibXSLT::handler('Apache::AxKit::Language::LibXSLT','AxKit::Apache=SCALAR(0x841d134)','Apache::AxKit::Provider::File=HASH(0x83453d8)','Apache::AxKit::Provider::File=HASH(0x8356a8c)',1)
 called at /usr/lib/perl5/AxKit.pm line 739
        
AxKit::process_request('AxKit::Apache=SCALAR(0x841d134)','Apache::AxKit::Provider::File=HASH(0x83453d8)','ARRAY(0x841cf00)','undef')
 called at /usr/lib/perl5/AxKit.pm line 461
        
AxKit::run_axkit_engine('AxKit::Apache=SCALAR(0x841d134)','Apache::AxKit::Provider::File=HASH(0x83453d8)')
 called at /usr/lib/perl5/AxKit.pm line 288
        eval {...} called at /usr/lib/perl5/AxKit.pm line 279
        
AxKit::main_handler('AxKit::Apache=SCALAR(0x841d134)','Apache::AxKit::Provider::File=HASH(0x83453d8)')
 called at /usr/lib/perl5/AxKit.pm line 193
        AxKit::fast_handler('AxKit::Apache=SCALAR(0x841d134)') called at /dev/null 
line 0
        eval {...} called at /dev/null line 0

============================================================================

It seems that libxml2 is having difficulty finding include.xml for
test2.xml.  (Despite the fact that it found it without any problems
for test1.xml.)

I am running:
  axkit     1.6.1
  libxml2   2.6.2
  libxslt1  1.0.33

Has anyone seen this before?  I would like the opinions of any axkit
users/developers before escalating to the libxml dev list.

Cheers,
Matt

P.S.  Please CC me in any reply;  I am not subscribed to the list.

-- 
Matt Kern
http://www.undue.org/

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

Reply via email to