Subject: Re: Can I use XSL to convert HTML to WML ? From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Thu, 06 Apr 2000 13:07:19 +0100 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Can I use XSL to convert HTML t, Eric van der Vlist | Thread | <xsl:choose> <xsl:when> and graphic, Medina, Edward |
Re: Printing XML reports, Sebastian Rahtz | Date | RE: Combo box and event Onchange, SeJo |
Month |