[thelist] The future of XML

Andy Warwick andy.w at creed.co.uk
Tue Oct 16 13:38:21 CDT 2001


On 2001-10-16 18:44, Peter Barrett at Peter.Barrett at corel.com wrote:

> Apologies if this was already mentioned, as I missed some of this
> thread, but:
> 
> XML is a data description language, describing what a thing *is*
> Strictly, HTML is a presentation language, describing how a thing should
> *look* (or behave, in the case of active content)

Nu-huh

CSS describes how things should *look*; HTML - when written properly -
should not define any presentation at all.

HTML - or rather the reformulation of HTML as xHTML - is a specific "case"
or subset of XML.

For instance, I might have an XML file that reads:

<book>
    <title>The Wizard of Oz</title>
    <author> L. Frank Baum</author>
    <quote>Even with eyes protected by the green spectacles, Dorothy and her
friends were at first dazzled by the brilliancy of the wonderful
City.</quote>
</book>

I might also have an xHTML file that reads (in part)

<html>
    <h1>The Wizard of Oz</h1>
    <h2> L. Frank Baum</h2>
    <p>Even with eyes protected by the green spectacles, Dorothy and her
friends were at first dazzled by the brilliancy of the wonderful City.</p>
</html>

The second example simply says that there is an important header, followed
by a less important header, followed by a paragraph of text; it doesn't say
what they relate to, as does the first example.

xHTML *is* describing what the file contains, but is describing it as
'types' of textual information and their relative importance, rather than
specific types of data. That's what makes xHTML so generic and thus ideal
for the web.

Because xHTML is a special case of XML you can easily convert the first -
which describes that the data is about a book - into the second - which
doesn't.

A related CSS file, with styles set for <h1>, <h2> and <p>, will tell the
browser - or other rendering device - that the important header (Title)
should be 12pt blue Verdana, and that the paragraph (Quote) should be 9pt
black Times.

It's the CSS file, therefore, that is the presentation language, not HTML
(xHTML).

HTML is describing the data still, but in looser terms.

This may help:

xHTML is a generic sports language, that describes <balls> and <sticks>.
A 'ball' XML describes a specific type of <ball> -using a <sport> tag - but
knows nothing about <sticks>.
CSS describes what objects looks like - white, dimpled, large, etc., but
can't tell us if we've got a white stick or a white ball.

So we can have an xHTML that describes a <ball> that is hit with a <stick>,
but we have no idea what sport it's for. This is because our generic xHTML
file has no tags to define '<sport>', only tags to define '<balls>' and
<sticks> that apply to a wide range of sports.

Our 'ball' XML file can describe a ball, its sport, and maybe it's
manufacturer and diameter, but without telling us it's small and dimpled.
We'd need a 'stick' XML file to describe the club.

Multiple XML files plus CSS gives us the full picture - small, white dimpled
ball hit with a long metal stick - golf.

Once browsers can read XML of any type, rather than the specific subset
called xHTML, we can use CSS files to style XML directly in the browser, so
that the 'HTML' used to write each page is a specific version describing the
data on the page.

And what a wonderful world that will be...

> The two are complementary rather than competative.

I agree, if you define complementary to mean one is a sub-set of the other.
 
Regards

-- 
Andy Warwick       

email: andy.w at creed.co.uk                      PGP ID: 0xB1D73499
=================================================================
Creed New Media Design                          tel: 07976 205085
Nottingham, England                        http://www.creed.co.uk
-----------------------------------------------------------------
website production - internet programming - new media consultancy
cdrom multimedia - graphic design - digital image retouching
=================================================================





More information about the thelist mailing list