Re: [PHP] "Downgrading" HTML

2010-09-16 Thread Ashley Sheridan
On Thu, 2010-09-16 at 14:07 -0400, Matt Neimeyer wrote:

> I know I could possibly hack something together using the Tidy
> libraries... (maybe...) but are there any existing php libraries /
> projects that already have the ability to take some HTML and
> "downgrade" the version of HTML being used.
> 
> One example: turn this...
> 
>Blah
> 
> ... into ...
> 
>Blah
> 
> This is for an eReader I love but is long out of production and the
> converter tool only works with HTML 3.2
> 
> Thanks in advance.
> 
> Matt
> 


You'd need a full on HTML parser, as what about an element that is given
a bold font from an included stylesheet? Where would you put the bold
tag then? Regular expressions really won't cut this either. Maybe it's
time to look for a different reader?

Thanks,
Ash
http://www.ashleysheridan.co.uk




[PHP] "Downgrading" HTML

2010-09-16 Thread Matt Neimeyer
I know I could possibly hack something together using the Tidy
libraries... (maybe...) but are there any existing php libraries /
projects that already have the ability to take some HTML and
"downgrade" the version of HTML being used.

One example: turn this...

   Blah

... into ...

   Blah

This is for an eReader I love but is long out of production and the
converter tool only works with HTML 3.2

Thanks in advance.

Matt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php