Question about linking CSS to XML vocabularies

Hi,

I've been trying to find an answer to this in the archives, and I think
I might be getting close, but I wanted to ask before I spent much more
time going in circles.  What I'm looking for is the current status of
any efforts to applying CSS to arbitrary XML vocabularies which weren't
XHTML.

In doing some investigation on this topic, it seems like there is some
support in CSS3 for dealing with namespaces.  This means that you can
style elements with basic, typography type styles, but I'm wondering if
there was already some way to apply specific class/id type styles.

Where I'm going with this is that if you had a CSS engine that could be
loaded with rules and apply them to a particular document, using the
namespace support already being proposed for CSS3, wouldn't you
potentially also need a corresponding CSS XML vocabulary to define the
necessary attributes, e.g. css:class, css:style and arguably a css:id?  
The down-side is that to take advantage of this with vocabularies which
were validated, support for these attributes or an open attribute
content model must be supplied in the schema.

I was wondering if something like this has been discussed before.  If
I'm on the wrong list, my apologies, but since this is really more of a
CSS thing than an XML thing, I figured this would be a good place to
start.

The use case for something like the above CSS XML attribute definitions
would be if you were dealing with documents of a particular XML
vocabulary that you wanted to directly incorporate into a hypermedia
application.  The use of the css: attributes would allow you to be able
to treat certain elements in the vocabulary with conditional styling as
the user interacted with the application, e.g. selecting an element from
a dynamic user interface.  You'd need to dynamically modify the content
model to add/remove the attribute when the user interacted with the
application, but I think this would be the best way to accomplish such a
scenario.

What I'm trying to avoid is transforming the underlying XML vocabulary
to XHTML for display purposes because I want to preserve the
vocabulary's semantics within the hypermedia application, but have to do
as little work as possible to render any given view of a particular
element.  Maybe the above doesn't really make any sense, but I wanted to
ask the question before I went off and tried some things along these
lines.

Thanks in advance,

ast
-- 
Andrew S. Townley <ast@atownley.org>
http://atownley.org

Received on Thursday, 28 December 2006 17:49:30 UTC