httpwebwitch - 1:26 pm on May 16, 2011 (gmt 0)
Browsers can only render (x)HTML. That's why XSL is so often used to transform from XML into HTML; so you can view an XML document in a browser.
If you were viewing the XML document with some other device or reader (client), you might have a different XSL for rendering the XML into whatever markup is appropriate for that client. (eg, Acrobat, Spreadsheet, Flash, speech reader, printer, teletype machine, or whatever).
The document you'll load into the browser is XML, but the layout you'll see in the browser window is the HTML that was generated by the XSL transformation.
CSS is just the icing
Here's a forum library post that I refer to for client-side XSL formatting:
If you load a "raw" XML document into a browser, you'll usually see just text.
If you provide your own XSL, that's when you get pretty formatting on the screen so your XML document doesn't look like a pile of nested brackets and tags.
However IE has a built-in XSL that renders XML docs into a pretty expandable/collapsible tree. I think Firefox has (or used to have) a built-in XSL for RSS feeds (RSS is an extension of XML).
So you can definitely create a "page" of XML that renders in a browser, which consists of nothing but <car> and <part> nodes. But in the XSL, you'll transform those into HTML elements like <body> and <table> and <div> and <p>.
There are as many XML Schemas as there are ways to organize information. Infinite. There are some standard ones, like HTML and VML and FBML, but you can certainly invent your own: "eXtensible" - that's what the "X" in XML stands for. When you create a Schema, you're "extending" XML and creating a new language with your own set of tags.
As you're experimenting, your goal should be to describe the relationships in your data as nicely as possible; for instance put your <page> nodes inside a <book> node and your <book> inside a <library>. Or, put your <lesson> into a <class> and <class> inside a <session> or <semester>.
The XML should be your rawest, most accurate and nicely organized representation of the data.
XSL is used to transform the data into something temporary, human-readable, interactive, that which is to be consumed by the client device, reader, processor, etc.