Re: Style in SMIL

Philipp,

In practice, there is no way to use a style sheet within a "text" media
object,
as the only "text" media object currently in use is the Real Text, which
does not implement styles yet.

So the input from Kari should be considered usefull and should be
checked against the current SMIL 2.0

- Henning


Philipp Hoschka wrote:
> 
> Kari,
> 
> short answer: there is no text in SMIL, so there
> is no "need" to do text styling. Styling should
> happen in the text media object itself, e.g. in the
> html file that the "text" media object refers to
> in its "src" attribute.
> 
> You could imagine an architecture where style
> information in the SMIL document influences the
> style information contained in the text media
> object, but I guess that may be difficult to do
> in a general way.
> 
> Does this make sense ?
> 
> -Philipp
> 
> --- Kari Pihkala <kpihkala@cc.hut.fi> wrote:
> >
> > Hello,
> >
> > I got a question about styles in SMIL after staring
> > at standard
> > Courier 10 black on white font in the text elements.
> > It would be nice
> > to format text using CSS2. However, none of the SMIL
> > elements have
> > the style attribute. It would be nice to know why?
> >
> > I know there are alternative ways to do this, one is
> > to use external
> > stylesheets in the beginning of the XML document:
> >
> > <?xml-stylesheet href="style.css" type="text/css"?>
> >
> > However, I consider this limiting, especially for
> > scripting.
> > Frequently, the color of the text is wanted to be
> > changed when mouse
> > is over it. But, the above stylesheet can't be
> > modified from the script
> > and prevents changing the color.
> >
> > One solution is to use the <layout type="text/css">
> > element.
> > The regions will then be defined using CSS2, which
> > includes text
> > formatting, for example:
> >
> > [region="b"] { top: 20px; left: 10px; font-family:
> > Arial; color: blue; }
> > [region="r"] { top: 20px; left: 10px; font-family:
> > Arial; color: red; }
> >
> > The script would then change the region of the text
> > element from 'b' to 'r'.
> > <text region="b" ... > becomes
> > <text region="r" ... >
> >
> > Another way is to use CSS2 classes:
> >
> > [region="area"] { top: 20px; left: 10px; }
> > .red  { color: red; }
> > .blue { color: blue; }
> >
> > The script would then change the class attribute of
> > the text element
> > from 'red' to 'blue'.
> > <text class="red" region="area" ... > becomes
> > <text class="blue" region="area" ... >
> >
> > But I find this a bit cumbersome. The way it would
> > be done in HTML is:
> >
> > <text region="area" style="color: red;">
> >
> > and the style attribute would then be changed using
> > the script.
> > I understand this may produce some problems. The
> > region of the media
> > element could be defined using the style attribute:
> >
> > <text region="area" style="top: 10px; left: 20px">
> >
> > and this is probably something unwanted. (or is it?)
> >
> > It would be nice to hear opinions about this. Is
> > there a reason not to
> > have the style attribute?
> > SVG and XHTML have it. They also have a style
> > element.
> >
> >  - Kari
> >
> >
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/

Received on Wednesday, 23 May 2001 09:41:33 UTC