Martin Lucas-Smith wrote:
Can XML and XSL be used to show content to a browser? or can only
HTML do that?
All websites are output in HTML.
Are they? I thought IE6 and Moz et al supported XML/XSLT natively? I'm
sure I've seen sites using this..
What Tony meant is that what browsers receive is HTML; even if you send the
XML from the server and accompany it by XSL for the browser to transform it,
XSLT still transforms it into HTML before displaying it.
However, it doesn't have to be so. It is quite possible to serve a page as
pure XML and use CSS to give it appearance; actually, this is as XML was
originally intended, to replace HTML completely. As we know, that didn't
happen, but still the basic difference between XHTML and pure XML is that
browsers have defined default appearance for most XHTML elements.
As it comes to XSLT, it is designed to convert XML into any kind of
text-based output, so you can get another XML, XHTML, HTML, CSV or simple
plain text from your XML.
I guess that the OP is trying to decide what to use, client-side, to give
appearance to his content, outputted as XML. As someone else in the thread
mentioned, letting the client do the job is not really a good idea, as the
browser support for any of the above technologies is still far from ideal.
Probably the best approach is to create content as XML and then convert it
by XSLT, server-side, into HTML, possibly setting the appearance by CSS. The
downside of this approach might be (for someone) that you might need to know
a whole bunch of languages: PHP for server-side processing, HTML/HTML and
CSS for browser display, SQL for working with the database, XSLT and XPath
for working with XML and even Javascript for possible client-side
processing. (I didn't mention XML because there isn't really that much to
learn about it, being a meta-language; however, one would still be quite
familiar with XML vocabilaries used in the application, which might involve
learning DTD or XSchema.)
For good tutorials on most of the above technologies, see
http://www.w3schools.com
Berislav
--
If the Internet is a Marx Brothers movie, and Web, e-mail, and IRC are
Groucho, Chico, and Harpo, then Usenet is Zeppo.