Re: [xslt] Re: XML::LibXSLT vs. document("") (fwd)



  That's a Windows specific problem. I can't test or debug it.
  xsltDocumentFunction(xmlXPathParserContextPtr ctxt, int nargs)
is in libxslt/functions.c the problem is likely to be around line 228.

Daniel

On Wed, Dec 04, 2002 at 06:33:51PM +0000, Matt Sergeant wrote:
> Slight bug in document("") perhaps?
> 
> -- 
> <!-- Matt -->
> <:->Get a smart net</:->
> 
> ---------- Forwarded message ----------
> Date: Wed, 04 Dec 2002 19:28:43 +0100
> From: Bjoern Hoehrmann <derhoermi@gmx.net>
> To: Matt Sergeant <matt@sergeant.org>
> Cc: "perl-xml@listserv.ActiveState.com" <perl-xml@listserv.ActiveState.com>
> Subject: Re: XML::LibXSLT vs. document("")
> 
> * Matt Sergeant wrote:
> >>   It seems to me the current XML::LibXSLT does not support document("")
> >> to refer to the current style sheet, e.g.
> >>
> >>   <xsl:copy-of select = 'document("")' />
> >>
> >> returns an empty node set. Is this a known limitation of the processor?
> >
> >No, it should work according to the spec. See the distribution's
> >t/07blankdoc.t file, and the large comment about having to use
> >callbacks.
> 
> Ok, I found the offending part:
> 
>   #!perl -w
>   use strict;
>   use warnings;
>   use XML::LibXML;
>   use XML::LibXSLT;
>   use Data::Dumper;
> 
>   my $parser = XML::LibXML->new();
>   my $xslt = XML::LibXSLT->new();
> 
>   my $source = $parser->parse_file('r.xml');
>   my $style_doc = $parser->parse_file(q(e:\ym\example\2\l2l.xslt));
>   #                                     ^^^^^^^^^^^^^^^^^^^^^^^^
> 
>   my $stylesheet = $xslt->parse_stylesheet($style_doc);
> 
>   my $results = $stylesheet->transform($source);
> 
>   print $results->toString;
> 
> Using a relative path like 'l2l.xslt' or slashes in the path like
> 'e:/ym/example/2/l2l.xslt' it works, but using the path above,
> document("") returns an empty node set, while the rest of the style
> sheet works as expected.
> 
> 
> _______________________________________________
> xslt mailing list, project page http://xmlsoft.org/XSLT/
> xslt@gnome.org
> http://mail.gnome.org/mailman/listinfo/xslt

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]