W3C home > Mailing lists > Public > www-style@w3.org > July 2002

Re: CSS in XML format ?

From: Robin Berjon <robin@knowscape.com>
Date: Wed, 10 Jul 2002 18:53:07 +0200
To: www-style@w3.org
Message-Id: <0207101853071Y.15602@morgaine>

On Wednesday 10 July 2002 18:26, Patrick Andries wrote:
> De: "Robin Berjon" <robin@knowscape.com>
> > Pretty much the rest of the world is though,
> A fine psychologist, I see : peer pressure.

I think you missed the smiley.

> >especially as there are other  ways of solving your problem ;-)
> In a standard W3C fashion  ?   ;-)

SAC is a W3C Note, which is a first step. A few people (I one of them) wanted 
to work on developing it into a larger spec but time is unfortunately missing.

Besides, thank $DEITY not everything needs to be a W3C standard. The W3C 
isn't there to standardise left, right, and center. What's wrong with coming 
up with your own personal standard? Nothing. In fact unless you need your XML 
CSS to be widely distributed it's almost certainly better that way as you'll 
be able to choose the granularity that best suits you. If you don't need 
selectors to be individually marked up you could use <selectors>a > 
foo|b</selectors> instead of something insanely long.

If it turns out afterwards that such a type of document is widely useful, 
then I'm sure there'll be a consortium out there (perhaps the W3C, perhaps 
another) to ratify it.

> I partly agree with this : it would have been dead initially (in the
> absence of GUI tools). I will not dwell on this longer (I fear I will only
> hear the same argument repeated : it is terse and you can use a program
> instead of XSLT) but let me state (a last time ?) my position : terseness
> is a virtue for manually produced stylesheets, I believe more and more are
> automatically produced.

I understand your argument but I believe that's not the case. I've never seen 
a CSS editor that I liked (not to mention HTML editors). Last time I checked 
none of them supported, say, SVG CSS or vendor/user extensions. I still write 
my CSS by hand and I don't know anyone around me that uses a GUI (though many 
do use simple templates to avoid repeating colours and the such too much).

> > If you absolutely need to have some CSS expressed as XML,
> Prima facie, yes, I have many other XML tags (XHTML is embedded in XML) to
> convert.

I don't deny the fact that you might need it, the world is full of use cases 
that are rare but nevertheless valid.

> > then just dump the SAC  output as XML. A SAC2SAX filter would be at most
> half a day's work.
> Do you do such work contractually ? ;-)

I do actually ;-) Provided that the job's in Perl so that I can use my own 
CSS::SAC processor. However this list is hardly the place to discuss such 

> > The fact
> > that something as trivial as that isn't available (that I know of) shows
> > just how much interest there is in having CSS expressed as XML.
> One may even wonder why SAC exist !

I doubt that many people use it. I have in the past but the need to parse CSS 
is scarce. It's nice that there are tools for that in several languages 
though (though I would mourn the lack of cooperation between implementers).

> > Once you have the XML, you can run XSLT on it to your heart's content. It
> > doesn't need to be standardised, very few things do.
> I thought the elements in this solution: XML and XSLT were standards.

They're not, they're *cough*recommendations*cough*. Seriously though, an XML 
encoding of CSS isn't, and that's what I meant.

> Thanks for the SAC link, though.

De rien :)

Robin Berjon <robin@knowscape.com> -- for hire: http://robin.berjon.com/
  Don't panic.
Received on Wednesday, 10 July 2002 12:53:53 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:02 UTC