Fwd: [xml-dev] SMIL markup

I'm forwarding this primarily as a courtesy, so as not to be speaking
badly of SMIL behind its creators' backs.  I sincerely hope that markup
design will get more attention in future versions of SMIL, or at least
that future integration with SVG and XHTML will reduce the impact of
these design choices.

====== Forwarded Message ======
Date: 8/14/03 11:18 AM
Received: 8/14/03 11:20 AM -0400
From: simonstl@simonstl.com (Simon St.Laurent)
To: xml-dev@lists.xml.org

I've talked in the past about how badly various XML formats use markup,
but until I got up close and personal with SMIL I didn't realize that
these problems extended to the W3C as well.  Functionally, I'm quite
happy with SMIL's capabilities, and I'm using it this week on a project
that uses about 5% of them.  Unfortunately, I'm also working with SMIL
at the markup level, generating my SMIL with XSLT, and finding some very
strange choices in the SMIL markup design.  

There are two main oddities I've noticed so far:

1) All elements in SMIL have empty or child element content.  It's not
just that there's no mixing of elements and text - it's that there's no
textual content at all!  Everything is done in element structure and
attributes.

2) For a few tasks, SMIL falls back on <param name="name"
value="value"/> style markup, seeming to forget that XML offers the
choice of <name>value</name> or even <name value="value"/>.

Choice (1) is especially complicating should you want to include textual
content in a SMIL presentation.  Instead of:

<text>This is a test</text>

You get to write:

<text src="data:,This+is+a+test" />

I'm glad that I'm using XSLT to generate these and can thereby avoid
URI-encoding everything I write by hand (extension functions considered
helpful), but this seems like a perverse choice given that they opted to
use such a text-friendly format in the first place.

Choice (2), the param elements - which also apply to text! - make me
roll me eyes. I'm very grateful that I'm working with this in XSLT, not
DOM or SAX.  One of my text elements currently looks like:

<text src="data:,This+is+a+test" region="text_region">
   <param name="hAlign" value="center" />
   <param name="fontSize" value="+2" />
   <param name="fontColor value="blue" />
</text>

I know people also complain about SVG's use of the style attribute and
its compound content, but by contrast with this...

So you have some idea what I'm doing, I'm generating slides from a
personal format I concocted to support a presentation with minor
animation and a few sounds.  For the actual presentation (my polemic
last week at Extreme), I was planning to use SMIL.  The text issue made
the XSLT complicated enough that I fell back on SVG, which included
enough of SMIL to do the job.  Recent developments like text-wrapping
and presentation of foreign (HTML) objects made it seem like a better
idea, though in the end I kept my text on a separate XHTML script and
presented only the pictures and sounds on screen.

Now, I'm using SMIL because of a piece of music I used in the
presentation (Also Sprach Zarathustra, opening movement), for which I
can find no public domain recording.  Public domain MIDI is available,
but MIDI is far better supported in SMIL than SVG.  And so it goes.  At
least it's not Flash, right?

-- 
Simon St.Laurent
Ring around the content, a pocket full of brackets
Errors, errors, all fall down!
http://simonstl.com -- http://monasticxml.org

Received on Thursday, 14 August 2003 11:30:04 UTC