You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axkit-dev@xml.apache.org by Scott Penrose <sc...@dd.com.au> on 2005/06/15 05:55:57 UTC

XML::LibXML Directory Root

Hey guys

I have the following code:

sub get_strref {
         my $self = shift;
         my $file = $self->{file};

         ...

         my $parser = XML::LibXML->new();
         my $doc = $parser->parse_html_file($file);
         my $str = $doc->toString;
         return \$str;

Taken from the HTML Provider as an example.

I am doing on the fly conversions of PDF to HTML - would like to use  
XML but having difficulty, so I am doing the HTML -> XML convert as  
per the HTML Provider.

Two quick dev questions.

1) Why does XML::LibXML above have an artificial root of the Apache  
DocumentRoot of the virtual server when I have loaded it up myself  
directly and other modules do not. Is this done by some "class"  
variable. The trick is here, that other modules need full path to  
real files and this does not, so I have to remember to convert...

2) Is there a way I can do two providers together, ie: must the HTML  
provider work on a file, or like a stylesheet can I cascade these  
after my provider produces HTML, thus allowing other HTML -> XML  
converts (eg: including content from a CGI or other non-AxKit Apache  
modules and converting to XML with Provider::HTML)

Ta

Scott
P.S. Tom, sorry have not had a chance to look at Apache 2 version  
yet, should do this weekend.
-- 
* - *  http://www.osdc.com.au - Open Source Developers Conference * - *
Scott Penrose
VP in charge of Pancakes
http://linux.dd.com.au/
scottp@dd.com.au

Dismaimer: If you receive this email in error - please eat it  
immediately to prevent it from falling into the wrong hands.

Please do not send me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

Microsoft is not the answer. It's the question. And the answer is no.