XML_Transformer - character data hook
| From: | Alan Knowles | Date: | Sun, 16 Mar 2003 14:39:28 +0000 |
| Subject: | XML_Transformer - character data hook | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-14333@lists.php.net to get a copy of this message | ||
I'm looking at openoffice transforming (into good ole html) at present,
and open office adds quite a few 'wierd' characters that need tidying
up. and for some reason I've been getting some raw <? in some code
examples.
Anyway attached is a modification to add a characterData callback to the
default namespace (eg. '' handler.)
The other one that may be worth considering is the str_replace '-' with
'_' for element methods. so
<line-break> maps to start_line_break()
I've got a few other ideas's that may be worth bouncing around on this.
- changing the extends check to do a method check on namespace objects.
- implement a base namespace that defaults to stripping tags rather than
dumping them.
- default to stdout debug logging rather than logfile
- implement pear::error emits for non supported namespaces/tags.. - or
some method to tally up and list this..
Otherwise it's great - A full open office to html convertor can be
thrown together in hours, rather than the weeks it would take to
understand XSLT :)
Regards
Alan