Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > XML, XHTML, Text Structuring, and CSS

Reply
Thread Tools

XML, XHTML, Text Structuring, and CSS

 
 
Blue
Guest
Posts: n/a
 
      01-01-2004
Could someone draw me a picture?

I have been writting a web site in XHTML 1.1 and CSS and since I have
already locked myself into standard supporting browsers(Gecko and
Opera mainly) I am wondering what's the point of XHTML and CSS? It
seems to me I could just write XML+CSS. I have to write the CSS file
anyway so what's the purpose of the XHTML format?

Looking at all the span's and div's I create I keep thinking I'd be
better off just creating my own tags. It would certainly look better.
And then I think, why am I using HTML tags anyway when if I just
create all the tags myself the documents would be simplier.

In reading up on XHTML everyone is stressing that HTML is suppose to
be about data structuring and not display. Fine, can someone give me
an example of how wonderful HTML is at data structuring?

Of course I understand XML and CSS have limitations but eventually
that won't be. What's HTML's purpose? Why should it be used to
create web pages? What's so great about using <p>, <h1>, and <ul>?
Using an origional XML format and a CSS file, browsers could do the
same thing.

I'm must be missing the point somewhere.

 
Reply With Quote
 
 
 
 
brucie
Guest
Posts: n/a
 
      01-01-2004
in post <news:(E-Mail Removed) >
Blue said:

> Could someone draw me a picture?


///\\
// \\
| - - |
C ) D
|\___/|
\___/
___| |___
/ \
/ '.` '.' \
/ | ` | \
/ /| . |\ \
/ / | ___ | \ \
/ / |//|||\\| \ \
((( ||||||||| ))=
|||||||||
|||||||||
///|||\\\
=(( |_| |_| )))
\ \ / \ / /
\ \/ \/ /
___\/_/\__:__/\_\/______


--
brucie
01/January/2004 05:45:59 pm kilo
 
Reply With Quote
 
 
 
 
Leif K-Brooks
Guest
Posts: n/a
 
      01-01-2004
Blue wrote:
> I have been writting a web site in XHTML 1.1 and CSS and since I have
> already locked myself into standard supporting browsers(Gecko and
> Opera mainly) I am wondering what's the point of XHTML and CSS? It
> seems to me I could just write XML+CSS. I have to write the CSS file
> anyway so what's the purpose of the XHTML format?


There are at least two reasons to use XHTML instead of your own XML format:

1. If you want anything but text (images and forms, for instance),
you'll have a pretty hard time with a custom format. You'll either have
to write your own browser or use very new standards which aren't
supported anywhere.

2. With a few hacks, modern XHTML+CSS can display nearly everywhere --
even Mosaic! Can your custom XML format do that?

 
Reply With Quote
 
kayodeok
Guest
Posts: n/a
 
      01-01-2004
Blue <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> In reading up on XHTML everyone is stressing that HTML is
> suppose to be about data structuring and not display. Fine, can
> someone give me an example of how wonderful HTML is at data
> structuring?


This should start you on your way:
http://groups.google.com/groups?&(E-Mail Removed)
http://www.google.com/search?q=semantic+shirky

> Of course I understand XML and CSS have limitations but
> eventually that won't be. What's HTML's purpose? Why should it
> be used to create web pages? What's so great about using <p>,
> <h1>, and <ul>? Using an origional XML format and a CSS file,
> browsers could do the same thing.


Internet Explorer won't display your webpage (but I think the Gecko Browsers will).

--
Kayode Okeyode
http://www.kayodeok.co.uk/weblog/
http://www.kayodeok.btinternet.co.uk.../webdesign.htm
 
Reply With Quote
 
Toby A Inkster
Guest
Posts: n/a
 
      01-01-2004
Blue wrote:

> In reading up on XHTML everyone is stressing that HTML is suppose to
> be about data structuring and not display. Fine, can someone give me
> an example of how wonderful HTML is at data structuring?


HTML has *semantics* -- it attaches meaning to a document.

Blue's Random XML Document Format [TM] (BRXDF) does not have semantics.
OK, well it may do, but it's unlikely any browser understands them.

With an HTML document, a browser can use the semantics attached to the
document to do stuff. For example, create a document outline from the
headings:

http://www.goddamn.co.uk/tobyink/scr...dings-in-dillo

Or automatically add section numbering:

http://www.goddamn.co.uk/tobyink/scr...ering-in-amaya

With a BRXDF document, a browser couldn't do that.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      01-01-2004
On Thu, 01 Jan 2004 07:43:17 GMT, Blue <(E-Mail Removed)> wrote:

>It seems to me I could just write XML+CSS. I have to write the CSS file
>anyway so what's the purpose of the XHTML format?


Congratulations - you already are. XHTML is as much "XML" as anything
else.

It's impossible to write "pure XML". As soon as you write your first
element, you've chosen a DTD, even if this is informal and only
expressed by the document itself. If you use CSS, then you're relying
on this DTD being shared between the XML document and the CSS
stylesheet.

So your question really reduces to "When I write XML, should I use the
XHTML DTD or some other DTD of my own invention ?" Stated like this,
it's obvious that the "roll your own" approach is no _simpler_ than
using XHTML, because it's just not possible to reject DTDs altogether.

As to whether it's better, then I don't think so. XHTML has the
following advantages:

- It's supported by non-CSS browsers (and various other legacy
scenarios, including non-XML tag-soup browsers). The "Best viewed with
browser Foobar" approach is bad (posts passim.) Remember too that one
of the most important browsers around is a search engine's spider.

- CSS can't emulate links

- CSS can't emulate <img>, unless you go overboard with the id
attributes and also embed a lot of image URLs into the CSS, which
starts to encroach on being content rather than presentation.

- CSS only gets applied inside the <body> element. It helps you
naught for the stuff in <head>


Yes, you _can_ write your entire document with <p class="foo" >
<xhtml:span class="bar"> elements and use CSS to do the rest. But you
don't _gain_ anything by doing this over a more traditional HTML-like
approach with <p> and <h*>. You lose a lot of backward compatibility
too.


A few years back, I had a content assembly problem where I was
assembling lots of text stored as XML, then eventually outputting it
as HTML (and PDFs, SMIL and other things too). I published on this at
ICALT 2001 in Wisconsin. I started off with DocBook as my DTD, but in
the end I switched to XHTML. I was using very little other than <p
class="..." > and DocBook was offering me little useful in addition. I
could have invented my own DTD, but this was a lot more work, again
for little benefit (over using classes). Using XHTML from content to
published output was technically little simpler, but it did make the
code easier to read and be human-understandable.


BTW - If you do publish as XML, then don't stop at CSS. You really
don't start to gain real advantages until you're using XSLT.

--
Klein bottle for rent. Apply within.
 
Reply With Quote
 
Toby A Inkster
Guest
Posts: n/a
 
      01-01-2004
I think you underestimate the power of CSS.

Andy Dingley wrote:

> - CSS can't emulate <img>, unless you go overboard with the id
> attributes and also embed a lot of image URLs into the CSS, which
> starts to encroach on being content rather than presentation.


You might be able to do:

<myImg mysrc="blah.png" />
myImg:before { content: url(attr(mySrc)); }

Although I'm not sure.

> - CSS only gets applied inside the <body> element. It helps you
> naught for the stuff in <head>


Not true.

head { display: block; }
head * { display: none; }
head title { display: block;
color: red; background: blue;
text-align: center; font-size: 1.8em; }

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      01-01-2004
Leif K-Brooks <(E-Mail Removed)> wrote:

> 2. With a few hacks, modern XHTML+CSS can display nearly everywhere
> -- even Mosaic! Can your custom XML format do that?


Indeed - with some trickery and hackery, XHTML is almost as useful as
HTML 4!

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      01-01-2004
Andy Dingley <(E-Mail Removed)> wrote:

> It's impossible to write "pure XML".


It isn't. Here's a proof:

<foo>Hello world</foo>

That's pure XML. I just wrote it.

> As soon as you write your
> first element, you've chosen a DTD,


No, I haven't. See, no DTD:

<foo>Hello world</foo>

> even if this is informal


There's no such thing as an informal DTD - that's a real oxymoron, like
a rectangular circle.

> and only expressed by the document itself.


I don't see what you mean by that. A DTD can be included into a
document or referred to by the document. The difference between these
two only matters (apart from practical efficiency considerations)
only misguided doctype sniffers.

> If you use CSS, then you're
> relying on this DTD being shared between the XML document and the
> CSS stylesheet.


No, I'm not.

<?xml-stylesheet type="text/css" href="test.css"?>
<foo>Hello world</foo>

> So your question really reduces to "When I write XML, should I use
> the XHTML DTD or some other DTD of my own invention ?"


Does it? If that's the question, then the answer simply depends on
whether you are using XHTML or not.

> Stated like
> this, it's obvious that the "roll your own" approach is no
> _simpler_ than using XHTML, because it's just not possible to
> reject DTDs altogether.


It is. And if you use a DTD, then XHTML DTDs are not the only existing
DTDs to choose from.

> As to whether it's better, then I don't think so. XHTML has the
> following advantages:


I think you are making some (good) points on the benefits of HTML over
markup (SGML or HMTL) without publicly specified semantics and
widespread browser support. The "X" prefix just causes confusion here.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      01-01-2004
Blue <(E-Mail Removed)> wrote:

> I have been writting a web site in XHTML 1.1 and CSS


Why XHTML 1.1? The whole specification is an exercise in futility and
deprives you of things that are useful on the Web of today and the near
future. And the browser that is by far the most common on the Web
chokes on XHTML 1.1 when served in the recommended way.

> and since I
> have already locked myself into standard supporting browsers(Gecko
> and Opera mainly) I am wondering what's the point of XHTML and CSS?


Pardon? You have dug yourself into a hole where only a small avantgarde
minority can access your pages, and now you are asking why you did
that?

> It seems to me I could just write XML+CSS. I have to write the CSS
> file anyway so what's the purpose of the XHTML format?


Oh. So you are now asking how to dig deeper. The avantgarde of the
avantgarde is already using user style sheets that may override
anything you say in your style sheet. So even they will find your pages
inaccesible.

> I'm must be missing the point somewhere.


Now that's something to agree on. There's some scent of trolling in the
air, but I think you are serious - and seriously misguided. It's so sad
to see how right I was in my article "Lurching Toward Babel: HTML, CSS,
and XML", Computer, July 1998 (!),
http://www.computer.org/computer/co1998/pdf/r7103.pdf
where I warned:
"The XML metalanguage can define the
formal syntax of a language, such as nesting
rules for elements. The semantics could
of course be described in plain English. But
this doesn’t seem to be of interest to XML
evangelists. They are more interested in
just specifying presentation with CSS.
Naturally, this means that they do not use
CSS as a presentation suggestion only,
since (with the XML/CSS model) there is
no default or user-defined presentation."
and
"As a publishing method, XML/CSS is
comparable to using text processing
software with styles or macros:"
That is, it means a huge leap - into the bad old times
before the ideas of platform, device and program independence.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS MENU and CSS photo gallery desjardins.daniel@gmail.com Javascript 1 02-19-2006 06:22 PM
Controlling text in a Text Area or Text leo ASP General 1 12-05-2005 01:13 AM
Whining and bitching about MSIE 6 CSS bugs and CSS support =?ISO-8859-1?Q?G=E9rard_Talbot?= HTML 0 07-09-2005 06:48 AM
CSS Layout question - how to duplicate a table layout with CSS Eric ASP .Net 4 12-24-2004 04:54 PM
print.css and screen.css tom watson HTML 1 09-09-2003 02:48 PM



Advertisments