Re: Problems getting start_prefix_mapping to fire
Robin Berjon <[email protected]>
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Message-ID | <[email protected]> |
Hi! On Mar 31, 2010, at 23:59 , Kjetil Kjernsmo wrote: > I need to remove some namespace prefix mappings from my result document. My first question here is "why?" Irrespective of which method you use, namespace declarations are pretty innocuous (unless you have zillions and you need to save space, which doesn't seem to be the case here). > but I never get warned at all, so it seems to me that the event never fires > at all. What can I do to get it to fire? Use a SAX generator that isn't deprecated, I think :) From a quick browse through your code and based on what you said previously, you're using XML::LibXML::SAX::Generator. It only has a limited implementation of SAX, and one of the things it never produces is namespace events. You might want to try the quick fix of inserting XML::Filter::SAX1toSAX2 as a filter before your own filter — it has code to generate namespace events (but I wrote that bit about a century ago, not sure it works for this! :). -- Robin Berjon - http://berjon.com/ _______________________________________________ Perl-XML mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs