ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-xml
perl-xml
Re: XML::LibXSLT callbacks - trying to "fake" the namespace prefix
by A. Pagaltzis other posts by this author
Mar 3 2006 1:09PM messages near this date
view in the new Beta List Site
[Announce] XML::XPathScript 1.01 | Re: XML::LibXSLT callbacks - trying to "fake" the namespace prefix
& XSLT * Randal L. Schwartz <merlyn@[...].com>  [2006-03-02 21:10]:
> Does XML::LibXSLT (and perhaps libxslt2) not provide the means
> by which I can register *all* calls from a namespace to be
> mapped to a class? Apparently, I must register each individual
> function instead.

libxslt has `xsltRegisterExtModule`, which translates to XML::LibXSLT
as a vestigial `register_xslt_module` method with a â??not
implemented� comment.

However, from the â??Writing Extensionsâ? document of libxslt, it
appears that the initialization function of a module is expected
to individually register each of the extensions it contains.

So it seems there is no way to do what you want at the libxslt
level.

> Can I override XML::LibXSLT::perl_dispatcher somehow to do the
> delivery I want, or will I not get called if I use
> "foo:unknown_function" in my expression?  I see $func can be
> either a coderef or a package name there, but it's still being
> mapped on a full Qname basis, not on a prefix basis.

When libxslt encounters an extension function, it triggers the
respective callback; in the case of XML::LibXSLT, thatâ??s always
`perl_dispatcher`, whose job it is to then find the actual
function to send the call to. So whatever you do in
`perl_dispatcher` wonâ??t help, because libxslt wonâ??t be calling it
in the first place if the specific QName is not invidiually
registered.

In short, you canâ??t do that. :-(

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/> 
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
A. Pagaltzis
Randal L. Schwartz

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved