W3C home > Mailing lists > Public > www-style@w3.org > December 2005

Re: styling xml with css - copying xml attribute values into CSS attribute values

From: Laurens Holst <lholst@students.cs.uu.nl>
Date: Thu, 15 Dec 2005 12:13:47 +0100
Message-ID: <43A14FEB.3020008@students.cs.uu.nl>
To: Noah Scales <noahjscales@yahoo.com>
Cc: www-style@w3.org

Hi Noah,

CSS is simply not the place for it. CSS is a styling language, and it 
would be bad if that styling were to be mixed with meaning. Think of it 
in similar terms as that it’s bad to mix styling with markup in HTML, 
<font> tags and all. If you want to describe the meaning of elements in 
an XML language, you have to use a third language, e.g. RDF or even OWL. 
XHTML 2.0 will also provide additional hooks for that in the form of the 
role and property attributes.

With regard to your comparison of the two documents, I really do not 
think that your XML is any better than the HTML. In that XML I see 99% 
overlap with HTML, just differently named elements. Why choose a 
nonstandard format? As I said before, just an aesthetic difference. 
Maybe your version is a little clearer to you, but e.g. to a non-English 
speaker both documents are equally puzzling. In fact, he probably still 
understands the second document, because HTML is a (well-known) 
standard, but your first is pure riddles to him. And to an English 
speaker, too, HTML would probably be clearer as well, because he knows 
about the meaning of the HTML elements but not of yours. Even though the 
names might be suggestive, he has to inspect a stylesheet to really find 
out what you mean.

By the way, instead of using a table for your image and its caption, it 
would make a lot more sense using the <img>’s ‘title’ attribute in HTML.

Quite some thought went into HTML and the standard as it exists now is 
usable. It contains a lot of structure and elements that you would 
commonly use (even more so for XHTML 2), maybe not directly but in the 
future. For example, what if you want to add more meta-information? What 
if someone who can’t control ‘your’ language wants to add additional 
meta-information to your XML? Author, description, etc? He can’t just 
add elements then, your language would be worthless to that person 
because he can’t extend it.

If everyone were to make up his own language, I would say that would 
cause a lot of wasted effort. It’s just re-inventing the wheel. And 
because you have to create semantic definitions in some file, it will 
create an extra step that has to be made, a step that most people would 
likely omit or postpone for later anyway, just like people seldom write 
Schemas for their own XML formats.

Also, each such ‘personal’ language would likely change a couple of 
times over time as there are more requirements or limitations are 
discovered. There would be no consistency at all.

In any case, I really recommend you to look at RDF and ‘the semantic 
web’. I’m sure it would interest you, and I myself also find it an 
interesting technology. But right now it’s just not ready for ‘prime 
time’ yet, it’s being used too little on the internet, browsers don’t do 
anything extra with the added information (the no. 1 browser in market 
share can’t even properly handle XML), search engines won’t process the 
information, so for most authors there is little value in taking the 
extra effort to create more descriptive documents. So before ‘the 
semantic web’ becomes a reality, we still have some years to go.

Finally, RDF is much richer than the ‘semantic CSS extensions’ you 
proposed. In the latter case, a set of semantic labels (e.g. 
‘browser-bar-title’, which is by the way hardly semantic because it says 
something about a ‘bar’ and a ‘browser’, none of which have to be 
present for the title to be meaningful) would still have to be 
established by the CSS working group.

In the case of RDF, everyone can create ontologies for specific 
disciplines (e.g. microbiology), and the idea is that different people 
of the same discipline would join efforts and work together to 
standardise their own ontologies for their specific area of interest, 
which they know most about. That will spread the effort, and make sure 
that each discipline receives the extent of expressiveness that they 
desire. Kind of like the opposite of HTML, which is more of a ‘joint 
base of common elements’, which is a compromise and will never fully 
satisfy anyone. Combine XHTML with RDF and you have something very 
powerful, I’d say.


~Grauw

-- 
Ushiko-san! Kimi wa doushite, Ushiko-san!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Laurens Holst, student, university of Utrecht, the Netherlands.
Website: www.grauw.nl. Backbase employee; www.backbase.com.
Received on Thursday, 15 December 2005 11:13:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:42 GMT