Difference: XmlCssExperiment (1 vs. 2)

Revision 211 Nov 2003 - TobyCabot

Line: 1 to 1
 (TobyCabot - 11 Nov 2003)
Changed:
<
<
Everybody complains about the weather, but nobody does anything about it. Same with HTML. The future is XML, XML will save us all, but can XML be sent to browsers with some hope of being displayed in interesting ways? Not yet; Internet Explorer is the problem. Mozilla seems to do a pretty good job displaying simple XML documents and applying style to them, but IE falls over even on trivial examples.
>
>
Everybody complains about the weather, but nobody does anything about it. Same with HTML. XML is the future, but can XML be sent to browsers with some hope of being displayed in interesting ways? Not yet - Internet Explorer is the problem. Mozilla seems to do a pretty good job displaying simple XML documents and applying style to them, but IE fails on trivial examples.
 
Changed:
<
<
What does XML look like in a browser? To start with, here's a very very trivial document:
>
>
What does XML look like in a browser? To start with, here's a trivial XML document:
 
<?xml version="1.0" ?>
<body>
Line: 14 to 14
 
Changed:
<
<
It's pretty simple, and it will be displayed "raw" in most browsers. Now we want to provide instructions to the browser telling it how to display the document. We do this using an XML processing instruction that points to a CSS stylesheet. CSS sheets can be used for XML as well as HTML. The instruction looks like:
>
>
It will be displayed "raw" in most browsers. Now we want to provide instructions to the browser telling it how to display the document. We do this using an XML processing instruction that points to a CSS stylesheet (CSS sheets can be used for XML as well as HTML). The instruction looks like:
 
<?xml version="1.0" ?>
Line: 23 to 23
 ...
Changed:
<
<
The CSS stylesheet doesn't have to be very complex, just a few instructions setting the colors:
>
>
The CSS stylesheet doesn't have to be very complex, just a few instructions that set the colors:
 
body {
Line: 35 to 35
  The result is now displayed in a more stylish way, however IE 6 will botch the display and give the page a white background, instead of grey as it was instructed. So at this point there's not really much hope, at least until IE7, unless you're in the unlikely (but lucky) position of having a user community that uses only Mozilla.
Added:
>
>
XSLT is another technology that can be used in a similar way, you can learn more at XmlXslCssExperiment.

Revision 111 Nov 2003 - TobyCabot

Line: 1 to 1
Added:
>
>
(TobyCabot - 11 Nov 2003)

Everybody complains about the weather, but nobody does anything about it. Same with HTML. The future is XML, XML will save us all, but can XML be sent to browsers with some hope of being displayed in interesting ways? Not yet; Internet Explorer is the problem. Mozilla seems to do a pretty good job displaying simple XML documents and applying style to them, but IE falls over even on trivial examples.

What does XML look like in a browser? To start with, here's a very very trivial document:

<?xml version="1.0" ?>
<body>
 This is an XML document.  It's well-formed but doesn't have a DTD so
 we can't say if it's valid or not.  Because it has no instructions
 telling a browser how to display it they will probably show it in
 "raw" form including the elements and braces.
</body>

It's pretty simple, and it will be displayed "raw" in most browsers. Now we want to provide instructions to the browser telling it how to display the document. We do this using an XML processing instruction that points to a CSS stylesheet. CSS sheets can be used for XML as well as HTML. The instruction looks like:

<?xml version="1.0" ?>
<?xml-stylesheet type="text/css" href="trivial.css" ?>
<body>
...

The CSS stylesheet doesn't have to be very complex, just a few instructions setting the colors:

body {
 display: block;
 background: #ccc;
 color: #0c0;
 }

The result is now displayed in a more stylish way, however IE 6 will botch the display and give the page a white background, instead of grey as it was instructed. So at this point there's not really much hope, at least until IE7, unless you're in the unlikely (but lucky) position of having a user community that uses only Mozilla.

View topic | History: r2 < r1 | More topic actions...
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding The Caboteria? Send feedback