RE: Transforming HTML to WML

Subject: RE: Transforming HTML to WML
From: "White, David" <David.White@xxxxxx>
Date: Tue, 16 Nov 1999 20:02:24 +0100
> -----Original Message-----
> From: Olivier Martineau [mailto:alcatel-crc@xxxxxxxxxxxx]
> Sent: Tuesday, November 16, 1999 4:35 PM
> To: XSL-List@xxxxxxxxxxxxxxxx
> Subject: Transforming HTML to WML
> 

No, not directly, as HTML is a SGML dialect, and WML is an XML dialect.
Close, but not close enough.

That said...

I have seen a few SAX-style parsers for HTML (the W3C's libwww, just to name
an example; I think one comes with Java 2 as well). With such a beast, you
could read in HTML, an do the following cool things:

1) Output a simplified XML version which hides the all-too-common HTML
composition errors found "in the wild"
2) Writing a stylesheet for such a degraded dialect would be MUCH easier
than creating mappings for the whole HTML DTD
3) You could use it to pessimize* the content for handheld devices

Dave

*) About that "pessimization" - in general, the entire WAP protocol suite is
geared toward devices with small screens, little memory, murderous network
latencies and bizarre addressing schemes. Saying "optimized" sounds better,
but "pessimized" is closer to the truth.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread