[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: HTML != XML (was Re: [ANN] Kludgey workarounds for xt)

  • From: Andrew Bunner <bunner@m...>
  • To: xml-dev@i...
  • Date: Wed, 09 Sep 1998 10:46:58 -0700

html amp

>It does seem odd that with the advent of the DOM which really eases
scripting and
>makes it much more powerful that almost simultaneously problems occur that
make
>generating those scripts more difficult.

  Odd is on way to describe it, I would say "frustrating".

>> Since HTML <= 4.0 is *not* XML, it is best to treat it as an output
>> format, like PDF, TeX, RDF, Postscript, etc. -- in other words, first
>> produce your XML, then run it through a filter (such as a SAX-based
>> app) that does a down-translation to HTML syntax.

  This doesn't have to be a very complicated animal. If I wanted to, I
could generate something that is ~almost~ HTML by doing things like <BR/>
and <IMG .../>. From there, a one line regular expression would make my
pages be readable by the major browsers. (Interesting aside, IE will
display the right thing if you close a stand-along tag with />, but
Netscape will not)

  It sounds like the smart thing to do is write an XML to HTML converter as
you suggest.

  The scripting workaround isn't as hard as it seems. You're example of...

document.write("She said &quot;run&quot;")

  ...would actually get turned into...

document.write(&quot;She said &amp;quot;run&amp;quot;&quot;)

  So, if we just go through and replace all the predefined entities with
the literal characters they represent, the workaround works.

  The fact that including a script in the generated file requires a
seperate utility will, I expect, become a non-trivial barrier to the
broader acceptance of XSL. I hope the working group chooses to address this
in their second draft.

  <stating-the-obvious>Java Script engines are not easy things to
write.</stating-the-obvious> I think it's unlikely that developers are
going to redefine the Java Script language to interpret &lt; as < ... my
opinion (hope) is that the standard should accomodate this.

-- Andrew

   Andrew Bunner
   President, Founder Mass Quantities, Inc.
   Professional Supplements for the Perfect Physique
   http://www.massquantities.com 

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.