It has been said on other threads that introduction of the
timing model into the layout was due to the following:
>>(1) we wanted regions to be temporally activated/deactivated;
>>(2) we want to animate certain region styles, such as background color
>>(which is independent of background colors deriving from content
>>elements) and position;
>>
>>In order to provide these temporally sensitive features, we need to make
>>regions timed elements, which implies a timing context, which in turn
>>indicated a need for having the root container element <tt/> be a timed
>>container.
The use of timing inside layout elements (and, in turn, in
the root container element <tt/>) is not necessary if certain
other attributes are allowed. I feel that adding timing to
these elements is adding unneeded complexity; if left as is,
I fear a lot more investigation and documentation will need
to be done to cover the non-obvious edge cases.
You can do both of the things you described, above, in
SMIL 2.0 without the existence of region timing attributes.
(1) To temporally activate/deactivate regions:
You could add the "showBackground" region attribute to TT
and allow the value of "whenActive". See:
http://www.w3.org/TR/SMIL2/layout.html#adef-showBackground
When "whenActive" is active, "...the background color will
not be shown in the region when no media object is rendering
into that region". Also, you could allow animation of that
attribute by using a <set> or <animate> element in the body
that targets the region and its showBackground attribute.
The latter option would allow you to turn the region's display
on and off when no text was displayed in it. When text is
displayed in the region and you want it to be hidden, you can
move it behind other regions, resize it to 0x0, move it off
screen, ...etc. The second two are contrived, I admit, but
moving a region behind another is not, IMHO.
(2) To animate region styles, you could use the <set> and/or
<animate> element in the body, with the region's id as the
targetElement value. For instance, the following SMIL2
Language-profile presentation animates the region's color
from blue to red to yellow then back to red then back to
blue at one-second intervals:
<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
<head>
<layout>
<root-layout width="340px" height="280px" />
<region id="r1" regionName="foo"
top="10px" left="10px"
height="240px" width="320px"
backgroundColor="blue" />
</layout>
</head>
<body>
<par>
<img src="data:text/plain,Hello" width="50px" height="50px"
region="r1" dur="5s" />
<set targetElement="r1" attributeName="backgroundColor"
to="red" begin="1s" dur="3s" />
<set targetElement="r1" attributeName="backgroundColor"
to="yellow" begin="2s" dur="1s" />
</par>
</body>
</smil>
Note: In SMIL 2.0 you can smoothly animate from one value to
another if the value is numerical, e.g., from="#0000FF" (blue)
to="#FF0000" (red). SMIL 2.0 also has a shortcut for smoothly
animating color called (naturally) "animateColor".
- Erik