[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Can I use XSL to convert HTML to WML ?
Hello Zhang: At 02:35 AM 4/5/00 +0800, you wrote: > I received a project to convert HTML to WML, I'm not sure if XSL can do >the job (HTML is really complex),or I must parse the HTML and output proper >WML . XSL can do this only if your HTML is well-formed XML (which it probably isn't). If the HTML is valid to an HTML DTD, converting it to well-formed XML is not too difficult. (It is largely a matter of normalizing it into "fully-tagged" format and changing the syntax of empty tags.) If it is not, then bad luck; the conversion may be difficult to automate. If you have a good HTML parser it might be possible to do it with that: it depends on what kinds of weirdness is in your HTML and how your parser handles it. Check out the HTMLTidy tool by Dave Raggett at w3.org. >If I can ,could someone explain it in some detail and give me some >examples? The best thing for you to do would be famililarize yourself with some XSL introductory materials (you can find some at http://www.xslinfo.com) along with some basic materials on the requirements of XML syntax. (You need especially to understand the concept of well-formedness.) I'd recommend Neil Bradley's book -An XML Companion- for these purposes -- at $US35.00 in a new (2nd) edition it's well worth it. > And I also know there is a tool named Cocoon , can it do the conversion >, and is the result good enough? I don't have personal experience with Cocoon, but I understand it can be wired to an XSL processor of choice, so yes -- IF your HTML is well-formed. Good luck, Wendell ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ====================================================================== XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|