On Monday 21 October 2002 05:38 pm, Daisuke Maki wrote:
> > I was just wondering how come it is that the XML parser that parses
> > the XSP in the first place doesn't process XINCLUDE???
> > Given that its going in through XML::LibXML shouldn't it kinda just
> > happen automagically at that point?
>
> You'd think.... :) But here's a snippet from XSP.pm:
>
> sub parse {
>     my ($self, $thing) = @_;
>
>     my $doc;
>
>     my $parser = XML::LibXML->new();
>     local $XML::LibXML::match_cb = \&match_uri;
>     local $XML::LibXML::open_cb = \&open_content_uri;
>     local $XML::LibXML::read_cb = \&read_uri;
>     local $XML::LibXML::close_cb = \&close_uri;
>     $parser->expand_entities(1);
>
>     if (ref($thing)) {
>         $doc = $parser->parse_fh($thing);
>     }
>     else {
>         $doc = $parser->parse_string($thing);
>     }
>     $doc->process_xinclude;
>

Or maybe process_xinclude should just be set to 1..., to my mind it seems 
reasonable to want to xinclude at any stage in the pipeline. I know once you 
get to XSLT they get handle automatically, so it would seem consistent at 
least if XSP did too.

> So  apparently expand_entities is set to true, but not process_xinclude.
> There's also that mysterious line
>
>     $doc->process_xinclude;
>
> that seems to use a non-documented sub? I know
> XML::LibXML::process_xinclude is documented, but I can't seem to find
> XML::LibXML::Document::process_xinclude. Perhaps the above should be
> changed such that $parser->process_xinclude() is set to 1?
>
> --d

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

Reply via email to