W3C home > Mailing lists > Public > www-style@w3.org > August 1999

Proposal: Specifying Replaced Elements

From: Ghadi Shayban <shaybang@yahoo.com>
Date: Mon, 23 Aug 1999 16:18:42 -0700 (PDT)
Message-ID: <19990823231842.26605.rocketmail@web110.yahoomail.com>
To: www-style@w3.org
 It seems to me that one of the missing features of
CSS that limits it ability to render XML, is the
inability to specify replaced elements. It needs to be
able to specify images without relying on the HTML
namespace and without relying on <!NOTATION. So, here
goes my idiotic proposal:

 First of all, a few new properties, fairly
self-explanatory, except that <xpointer> is an
XPointer to a string that gives the value of the
property. The XPointer reference is calculated in
relation to the node specified by the selector.
'intrinsic-width' and 'intrinsic-height' serve only
for the purpose of incremental rendering.
'replacement' is intended to be used inside normal
rules, while all the other properties are used inside
the "replace" at-rule.

 A replaced element's children are not rendered.
Instead, the replaced element's entire infoset, as
defined by the XML-Infoset WD, are passed in to the
renderer and the application, which decide what to do
with them.

'replacement'
    Value: none | <name>
    Initial: no initial value
    Applies to: all elements?
    Inherited: n/a
    Media: all?

'uri'
    Value: attr(X) | <uri> | <xpointer>
    Initial: no initial value
    Applies to: all elements?
    Inherited: n/a
    Media: all? 

'content-type'
    Value: <mimetype>, maybe a better identifier in
the future
    Initial: no initial value
    Applies to: all elements?
    Inherited: n/a
    Media: all?

'intrinsic-width', 'intrinsic-height'
    Value: <length> | auto | inherit | attr(X) |
<xpointer>
    Initial: auto, which means retrieve or "download"
the content and figure it out, if possible
    Applies to: all elements?
    Inherited: no
    Media: all?

A new named at-rule:

@replaced simpleImage {
    content-type: "image/png";
    uri: attr(location); /* uri is relative to doc,
not stylesheet! */
    intrinsic-width: attr(foo);
    intrinsic-height: attr(bar);
}

image {
    replacement: "simpleImage";

    .......normal properties such as.......
    width: 125%;
    height: 125%;
}

<?xml version="1.0'>
<doc>
    <image location="image/asdf" foo="200" bar="300">
</doc>

/* New meaning for percentages on the width/height
properties of replaced elements: This percentage is
calculated according to the element's intrinsic-width
property, effectively making the element "stretch" to
125% of the intrinsic width */

ISSUE: We really need tooltips to satisfy WAI!
This proposal is very similar to HTML 4's 'object'
element, with the obvious exclusion of PARAM's. This,
though, is mimicked by passing the entire element's
Infoset to the application and the renderer.

Insight please?
Ghadi Shayban
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com
Received on Monday, 23 August 1999 19:19:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:00 GMT