Date: Thu, 6 Dec 2001 15:21:26 +0100 From: Anton Berezin <tobez@tobez.org> To: Sheldon Hearn <sheldonh@starjuice.net> Cc: Maxim Sobolev <sobomax@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, skv@protey.ru, dom@happygiraffe.net Subject: Re: cvs commit: ports/textproc/libxslt Makefile distinfo ports/textproc/libxslt/files patch-aa patch-breakpoint::Makefile.in Message-ID: <20011206152126.C8221@heechee.tobez.org> In-Reply-To: <45380.1007647460@axl.seasidesoftware.co.za>; from sheldonh@starjuice.net on Thu, Dec 06, 2001 at 04:04:20PM %2B0200 References: <38694.1007647030@axl.seasidesoftware.co.za> <45380.1007647460@axl.seasidesoftware.co.za>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Dec 06, 2001 at 04:04:20PM +0200, Sheldon Hearn wrote:
>
>
> On Thu, 06 Dec 2001 15:57:10 +0200, Sheldon Hearn wrote:
>
> > > I updated my local copy of these ports to 1.31 (both ports, same
> > > version), but did not commit them nor submit them since they still
> > > required some manual patches and I did not have time to do it
> > > properly.
> >
> > Is XML::SAX really required by XML::LibXML?
>
> Eek, sorry that's not what I meant. XML::LibXML-1.31 _does_ require
> XML::SAX. My question is, should p5-XML-LibXML depend on p5-XML-SAX or
> p5-XML-SAX-Expat?
>
> I've got the p5-XML-LibXML and p5-XML-LibXSLT ports upgraded to 1.31
> pretty trivially, so I'm nervous about the "other stuff" that held you
> back from committing.
/me is trying to remember what it was...
Well, if I remember correctly, you'll have to patch PagetKit. Lemme
see...
First, newer LibXML does not accept certain method calls as class
methods any longer. Second, new(er) libxml tries to request
/etc/xml/catalog file whenever it parses things, which confuses PageKit
1.07 quite a lot. Here's what I changed:
--- work/Apache-PageKit-1.07/lib/Apache/PageKit/Content.pm Tue Oct 23 23:49:55 2001
+++ /usr/local/lib/perl5/site_perl/5.005/Apache/PageKit/Content.pm Thu Dec 6 15:13:16 2001
@@ -20,11 +20,6 @@
require XML::LibXML;
require XML::LibXSLT;
- # call backs so that we can note the mtimes of dependant files
- XML::LibXML->match_callback(\&match_uri);
- XML::LibXML->open_callback(\&open_uri);
- XML::LibXML->close_callback(\&close_uri);
- XML::LibXML->read_callback(\&read_uri);
}
$CONTENT = $content;
@@ -62,6 +57,11 @@
# $INCLUDE_MTIMES->{$stylesheet_file} = $stylesheet_mtime;
my $parser = XML::LibXML->new(ext_ent_handler => \&open_uri);
+ # call backs so that we can note the mtimes of dependant files
+ $parser->match_callback(\&match_uri);
+ $parser->open_callback(\&open_uri);
+ $parser->close_callback(\&close_uri);
+ $parser->read_callback(\&read_uri);
my $xslt = XML::LibXSLT->new();
my $source = $parser->parse_file("/$component_id.xml");
my $style_doc = $parser->parse_file($stylesheet_file);
@@ -155,11 +155,12 @@
sub match_uri {
my $uri = shift;
- return $uri !~ /^\w+:/;
+ return $uri !~ /(^\w+:)|(catalog$)/;
}
sub open_uri {
my $uri = shift;
+ return "" if $uri =~ /catalog$/;
my $abs_uri = &rel2abs($uri);
die "XML file $abs_uri doesn't exist" unless (-e $abs_uri);
open XML, "$abs_uri";
I guess the last `+' is not needed, but I left it there anyways.
Mind you, *these* changes are only needed if you plan to use xslt with
PageKit. To get you an idea, in the PageKit examples in the eg/
directory (in the distribution; it is really a shame that the port does
not install it) the following works fine:
* Different Media outputs
* Using provided PageKit Templates
* HTML
* XML
And the following does not without my patch:
* Using PageKit Templates generated using XSLT
* HTML
* XML
There might be more bad things that I do not remember.
=Anton.
--
| Anton Berezin | FreeBSD: The power to serve |
| catpipe Systems ApS _ _ |_ | http://www.FreeBSD.org |
| tobez@catpipe.net (_(_|| | tobez@FreeBSD.org |
| +45 7021 0050 | Private: tobez@tobez.org |
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011206152126.C8221>
