logo       

Re: LibXSLT / XPathContext interaction: msg#00001

lang.perl.xml

Subject: Re: LibXSLT / XPathContext interaction

At 12:06 +0100 12/1/03, Petr Pajas wrote:
Elizabeth Mattijsen <liz@xxxxxxxxxx> writes:
> Looking at XML::LibXML::XPathContext, I wonder whether the following
> should work:
Unfortunatelly no.

Too bad.


You seem to be confusing two modules. You're trying to register a
function with XML::LibXML::XPathContext and call it from a XSTL
stylesheet. That won't work. LibXSLT has its own function registering
API. See LibXSLT documentation for that.

Well, I was hoping they would work together... as the register_function in the non-CVS version of LibXSLT is badly broken if you try to build nodesets inside the Perl function.


Functions registered with XPathContext only can be used with that
context, i.e. if you for example call
$context->find('foo:bar()',$dom). (Note, that there is no relation
between the LibXSLT objects and XPathContext objects).

Ok, that's cleared up now then.

Maybe a note in the pod to this effect would be helpful for other people suffering from the same misconception...


Liz
_______________________________________________
Perl-XML mailing list
Perl-XML@xxxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise