Re: Resources

by Simon Wickes <netlists(at)email.com>

 Date:  Thu, 30 Mar 2000 14:28:07 -0500
 To:  Peter-Paul Koch <ppk(at)xs4all.nl>,
hwg-xml(at)mail.hwg.org
 Cc:  mikec(at)bmts.com
 References:  bmts
  todo: View Thread, Original
At 01:28 PM 2000-03-30, Peter-Paul Koch wrote:
> >I am a little confused by this comment. The things you mention are all
> >scripting languages while xml is a markup language. You're still going to
> >need to script things aren't you?
>
>Exactly because XML is a markup language, you need some kind of script to
>produce HTML that can be shown in the browser. Pure XML either shows up as
>gibberish (all other browsers) or as the XML document (IE5). So somewhere
>between the XML file and the HTML the browser shows there has to be a
>script that handles the translation.
>
> >How are you going to do that?
>
>That's THE question of the moment. If you find a good answer, you can
>probably become a millionaire overnight.

You can use XSL. XSLT is the transformation part of the XSL spec and is stable.
Right now you can use the (limited) XSL support in IE5 to render an XML 
document as HTML.
You can also use CSS styles to format an XML document in both IE5 and Mozilla.

Create your XSL stylesheet to map the XML tags to HTML, reference the XSL 
stylesheet from the XML document and load it up in IE5 - voila!

A more flexible use of the IE5 capabilities is to tap into the DLL 
(MSXML.DLL) to get it to do the work at the server side. I built a couple 
of sites that do just this. That way, you can have the data as XML and the 
browser make and version is irrelevant (to all intents) as they get HTML 
from the server.

> >Javascript on the client?
>
>Maybe, but it'll only work in the Version 5 browsers because only they have
>DOM's that allow JavaScript to access the XML document.

This is true, but you can do some pretty sexy things with XML data islands 
and DOM scripting!

>At the moment I think a server side language like Perl or ASP is the best
>solution. Store the data as XML and when a user requests to see the data,
>start up a script that translates XML to HTML (or WML for mobile phones)
>and send it to the client.

Absolutely!



Simon

----
Simon Wickes
New Jersey, USA

HWG hwg-xml mailing list archives, maintained by Webmasters