"display: image;" for CSS styling of images embedded in XML documents?

This is still a list about discussion and proposal of future CSS 
direction, right? Lately the messages posted (e.g., Center DIV thread) 
seem better suited to the CSS-D list.

I just wanted to make sure this was the right place to be asking these 
questions because I got no response to my other post on Tuesday 
(Subject: text flow from one element to pseudo-element).

---------------------------------------------

Anyway, I've previously done some experiements styling pure XML in a 
browser with CSS and have noticed no shortcomings except for the 
display/functionality of elements like images, objects, and forms.

How about an "disply: image;" value for viewing images embedded in XML 
documents? Here's what I was thinking:

XML example:

   <myImage mySource="img/foo.gif" myAlt="foo" />

   myImage {
     display: image;
     text-alternative: attr(myAlt);
     source: attr(mySource);
     }

HTML equivalent:

   <img src="img/foo.gif" alt="foo" />

   img {
     display: image;
     text-alternative: attr(alt);
     source: attr(src);
     }

Any ideas on this?

I thought of an issues that might arise. For example, should the  source 
path be relative to the document or stylesheet? Since it's from the 
document, I would say document, but URL values from a stylesheet are 
usually evaluated to be relative to the stylesheet. What if it were like 
this?

   source: url(attr(src));

Um... Probably not. I like the first way better.

Should there be a mime-type spec in the CSS for these images?

   myImage[mySource$=".gif"] {
     mime-type: "image/gif";
     }
   myImage[mySource$=".png"] {
     mime-type: "image/png";
     }

If this idea pans out, what kind of proposals might there be for 
displaying other kind of things that would typicially be held in HTML 
<object> elements?

Thanks,
James Craig

-- 
http://www.cookiecrook.com/

Received on Thursday, 3 July 2003 13:01:46 UTC