Re: Should I propose this class to pear?
| From: | till | Date: | Tue, 06 Oct 2009 13:05:23 +0000 |
| Subject: | Re: Should I propose this class to pear? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-52917@lists.php.net to get a copy of this message | ||
On Tue, Oct 6, 2009 at 2:48 PM, Dmitri <message@ptd.net> wrote:
> Hello!
>
> I wrote a very simple class to convert html into plaintext format.
> It's a very simple class that consists of one file and xsl template. It uses
> XSL template for transforming html into
> a usable plaintext format, dropping tags that cannot possibly be used in
> plaintext like <style>, <script>, <head>, <object>
> and applying some meaningful styles to some other tags like <h1>, <b>, <br>
> into newline, <p> into 2 new lines + tab + text + 2 more new lines
> <ol> items converted into numbered items (with actual numbers), the links
> are extracted so that the <a href...>title</a> tags are converted like this:
> Link title [Link: http://..... ]
>
> <img> tags are converted to links to img src tag.
Maybe you could take over and extend XML_XSLT_Wrapper?
http://pear.php.net/package/XML_XSLT_Wrapper
Till