Thanks to Bob and Chris for their feedback.
However, my question is not how to serve up different CSS files
depending on the target
browser. What I would like to do is create those different CSS files
from a single source
(e.g. a transformer creates different CSS files from a common source
depending on what
the target browser is). It seems to me that it would be trivial if
CSS had an XML syntax: my
questions are:
1) is there a suitable XML DTD or schema for something (let's call it
XCSS) which is 1-to-1
mappable to CSS?
2) does an appropriate transformation (or serialisation) from XCSS to
CSS exist?
One answer to 1) is "yes, see JXCSS". An answer to 2) is what I am
looking for.
The pipeline should look something like the following (if you'll
excuse the meta-syntax):
match *.css
generate XCSS from a single source
if browser is standards- and security-challenged {
transform the XCSS stream to suit
}
transform for I18N
transform from XCSS to CSS
serialise using TextSerializer
or perhaps the serialisation could go direct from XCSS rather like FO
or POI.
The XHTML should contain no <style> tags to preserve SoC. In my
XHTML, all I want to have is
<link href="my.css" ...>
Steve
On 12 Jan 2006, at 19:37, Stephen Winnall wrote:
I am setting up a website using Cocoon and want to generate XHTML
and use CSS to
handle the presentation. Like everyone else I am being bitten by
the fact that 90% of all
browsers conform to the CSS standard, but the browser that 90% of
the users use does not :-(
(I think) I have managed to banish all the browser dependencies
(for my site, at least) into
the CSS file and I have a clean SoC-like separation of content and
presentation. So what I
would now like to do is use Cocoon to generate different CSS files
to accommodate MSIE.
I would also like to handle some I18N issues I have in the CSS files.
Does anyone know of a way of writing something that could be called
"XCSS", i.e. CSS
written in an XML syntax, which can be transformed/serialised into
proper CSS?
Apart from passing remarks (including one from the maestro at
http://mail-archives.apache.org/mod_mbox/cocoon-dev/200003.mbox/%
[EMAIL PROTECTED]
) I have been unable to find any references to much like this. I
have spent about some time
trawling Google, but XSL and CSS are not good search terms (they
throw up too many
results), and XCSS doesn't throw up anything conclusive, although
the results do confirm
that I am not the first person who wants to do this.
The project JXCSS does the other thing, i.e. convert CSS into XCSS,
but the documentation
says that there is no transformation available to produce CSS from
XCSS:
"Stylesheets need to be written to generate and pretty-print CSS
source code"
I will admit to being reluctant to write such a stylesheet myself
because I am already
severely sidetracked doing this website, and I need to get back to
my other tasks.
I would be grateful for any hints on where to look. And if there is
a Better Way, please
let me know.
Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]