Re: Proposal: Specifying Replaced Elements

On Mon, 23 Aug 1999, Ghadi Shayban wrote:

> @replaced simpleImage {
>     content-type: "image/png";
>     uri: attr(location);
>     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>

There has already been a suggestion for implementing replaced content, it
is listed at the www-style past suggestions list (PSL) [1]. Look for the
word 'replaced'.

This new suggestion could actually enhance the current suggestion a lot; I
suggest the WG look at both when examining this issue (AFAICT, none of the
latest series of WDs coveres replaced content, although one spec did
mention making 'content' apply to all elements as per the replaced content
suggestion in [1]).

Basically, the only changes required would be that instead of the
'replacement' property defined here, the 'content' property would be used
as in the previous suggestion, and in the previous suggestion the
'replaced()' function would take a name refering to an @replaced at-rule
instead of refering directly to a uri.


> /* uri is relative to doc, not stylesheet! */

There is, IIRC, either a section in one of the recent WDs or a suggestion
sent to www-style in recent months that would let you decide whether a
path was relative to the stylesheet or to the document.
 
 
> /* 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 */

If this functionality was to be added, then a new unit would have to be
found, as %, as currently defined, is very useful.
 

> ISSUE: We really need tooltips to satisfy WAI!

The 'tooltip' and 'staus' properties should be able to cover that. They
have been suggested previously, look for 'tooltip' in the PSL [1].


> 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.

I like that. A slight problem is that the UA will not necessarily know the
XML DTD in use, and so won't know which elements to take as the
PARAM-analogues. A possible solution is to go along with this
CSS-namespace idea that has been brewing, and add PARAM like elements to
this namespace.

So we would have three attributes and two elements:

   <... xmlns:css="...">
   <... css:class="" css:id="" css:style="">
   <css:param .../>
   <css:style title="...">
      ...
   </css:style>

Hmm...

-----
[1] http://www.bath.ac.uk/%7Epy8ieh/internet/wwwstyle.html

-- 
Ian Hickson
: Is your JavaScript ready for Nav5 and IE5?
: Get the latest JavaScript client sniffer at 
:
http://developer.netscape.com/docs/examples/javascript/browser_type.html

Received on Saturday, 28 August 1999 12:27:23 UTC