Re: CSS in XML format ?

De: "Rowland Shaw" <Rowland.Shaw@crystaldecisions.com>

>
> > > the main syntax for CSS is impractical for a number of things. The
> > > nice and compact syntax works well for humans and computers alike.
> >
> > I'm not aware than computers care much about compactness.
>
> Not being sentient (just yet), I'm sure they don't actually care, but
their
> users will, as you're hopefully aware, string manipulation, particularly
> with C style strings (and other kinds of byte streams, eg stuff coming
over
> a network) is hideously inefficient.

Yes, yes. This is why XML and XHTML has been rejected by all B2B and B2C
applications : those tags are just too long (<TABLE COLSPAN=" " where <T1
C2=" could be sufficient).

> As has been said many times already in this thread, is you want it, write
> it.

I might or I'll do everything to avoid using stylesheets and prefer using
style attributes.

> If it's useful in the general, then publish your DTD/Schema - at the
> moment discussing an abstract idea that "could be useful" isn't going to
> sell that idea to anyone.

Yes, discussing ideas (always abstract as far as I know) is really a bad
idea ;-)

> I also happen to agree with Ian Hickson; XML is not really suited to CSS
as
> it is today, due to it's non treelike structure.

Yes, I would like to answer this (I find until now this the only compelling
objection, I think there is also a problem with pseudo selectors as opposed
to XPath). Not much time right now.

> For the record, I'd refine his example to:
> <rule>
>  <selector> <!-- I guess there's nothing to stop you using Xpath queries
> instead -->
>   *:test &gt; test:*
>  </selector>
>  <declaration>
>   <property>color</property>
>   <value>
>    <rgba red="25%" green="100%" blue="0%" alpha="0.5" />
>   </value>
>  </declaration>
> </rule>

Yes, this is what I thought he should have written when I read his mail.

> Oh, for the record, I've written a simple CSS parser written in XSLT, but
> it's not generalised enough for general use (it only handles in-line
style,
> (to convert some extensions into something User agents know about) and
> modification of it).

Which only proves (with the fact that someone has developed SAC) that other
people want to convert CSS. Why should everyone redo this job (write his
parser) when, if CSS could be expressed as XML, the parsing could be done
with the same W3C standard used to interpret the accompanying XHTML ?

P. A.
----------------
Unicode en français
(texte normatif, annotations, tous les caractères 3.2)
http://hapax.iquebec.com

Received on Thursday, 11 July 2002 08:46:45 UTC