Re: CSS in XML format ?

----- Original Message -----
From: "Stuart Ballard" <sballard@netreach.com>


> Patrick Andries wrote:
> >
> > Yes, I have heard this argument. Right now, having to convert it, I'm
not at
> > all convinced of its strength...
>
> Compare the number of people in your position (having to convert it) to
> the number of people in the position of having to write it.

Manually ?

>Whose  concerns should be given more weight, honestly?

Well, I move that the number of people actually writing style sheets
manually is constantly diminishing (except for small samples) and for those
that have to do it (specialists) using an XML syntax would not be a big
hindrance (experience shows that people survive writing FO styles sheets). I
fear a useless religious war that would only have one net effect : no easy
convertibility with a W3C standard.

> How about "both intuitive syntax *and* straightforward processability
> are important"? It's not like it's terribly hard to write code to parse
> and process CSS syntax, it's just that XSLT by itself isn't the right
> tool for the job.

Could you suggest one, I'm open.

> > You mean FO ? Unfortunately, I do not control the XHTML that I need to
> > convert automatically. And these many files (constantly new ones are
being
> > created by the customer) use CSS !
>
> It seems to me that the only time that an XML syntax for CSS is useful
> is for things that are internal to a particular project, and therefore
> not a useful thing for the W3C to standardize.

Not sure to understand.

My particular project uses W3C standards (XML+XHTML+ CSS in Xmetal for
instance) and I want to convert it using a W3C standard (XSLT).

> That's not to suggest that it's not a good thing to *do* for your
> particular problem domain. There's plenty of open-source code out there
> that can parse CSS's grammar (and even if you can't find code that meets
> your needs, the grammar is simple enough to write your own parser) -
> once you can do that, you can spit out XML in whatever form you like.
>
> All you have to do is run your pages through a preprocessor that
> identifies <style></style> and <xxx style="..."> and converts the
> contents to your own XML representation.
> Then use XSLT to make whatever
> changes you want to make, then do the reverse transformation from XML to
> CSS in a "postprocessing" stage. You could even do *this* part in XSLT,
> also, because going from XML *to* text is something XSLT can do.

Thanks. I understand this. I think this would be unnecessary with an XML
syntax and CSS require non standard (non W3C)  transformation tools (not as
well supported as everything coming from the XSLT, XPath arena, I fear).

P. A.

Received on Wednesday, 10 July 2002 11:49:57 UTC