Discussion:
Call for Wide Review of TTML2 WD for CSS Working Group
(too old to reply)
Thierry MICHEL
2017-07-12 12:32:12 UTC
Permalink
Raw Message
Dear CSS Working Group,

The W3C Timed Text Working Group has recently published a new working
draft of the Timed Text Markup Language 2 (TTML2).

https://www.w3.org/TR/2017/WD-ttml2-20170630/

TTML2, provides a standardized representation of a particular subset of
textual information with which stylistic, layout, and timing semantics
are associated by an author or an authoring system for the purpose of
interchange and processing.
In addition to being used for interchange among legacy distribution
content formats, TTML Content may be used directly as a distribution
format, providing, for example, a standard content format to reference
from a <track> element in an HTML5 document, or a <text> or <textstream>
media element in a [SMIL 3.0] document.

The TTML2 specification updates the TTML1 specification by adding
vocabulary and semantics to address more of its core requirements,
including the addition of support for:

raster images (both foreground and background)
author supplied fonts
audio descriptions and text to speech
ruby text annotations
improved vertical line layout
text emphasis, kerning, letter spacing, shadows, and variants
inline block layout
stereoscopic presentation (for 3-D viewing)
high definition resolution (HDR) presentation
continuous animation
hyperlinks
conditional element semantics
improved metadata extensibility
formalized intermediate document syntax
various other improvements and bug fixes

The TTWG invites you to review this draft, and requests comments to be
received by 30 Sept 2017. These comments will be used to fulfill the
W3C Process [3] requirement for Wide Review of drafts, and Horizontal
Review [4] prior to publication as Candidate Recommendation.

If you wish to make comments regarding this document, please send them
to public-***@w3.org <mailto:public-***@w3.org?subject=%5Bttml%5B> with
[ttml2] at the start of your email's subject. All comments are welcome,
however the scope of review will be mainly focused on the new features
introduced in TTML2.

A cumulative summary of all changes applied to this version since the
current (TTML1, 2nd Edition) Recommendation was published is available
for your convenience [5].


[1] TTML2 latest version https://www.w3.org/TR/ttml2/
[2] TTML1 Recommendation https://www.w3.org/TR/ttml1/
[3] W3C Process https://www.w3.org/2017/Process-20170301/
[4] Horizontal Review
https://www.w3.org/Guide/Charter.html#horizontal-review
[5] https://www.w3.org/TR/2017/WD-ttml2-20170630/ttml2-changes.html

Kind regards,

On behalf of Nigel Megitt, co-Chair, W3C Timed Text Working Group
Thierry Michel, Staff Contact for TTWG.
Florian Rivoal
2017-07-14 05:54:45 UTC
Permalink
Raw Message
Post by Thierry MICHEL
Dear CSS Working Group,
The W3C Timed Text Working Group has recently published a new working
draft of the Timed Text Markup Language 2 (TTML2).
https://www.w3.org/TR/2017/WD-ttml2-20170630/
These are just my comments, I am sending them here without the TTWG in CC as I do not know if this is a consensual position in the CSS WG or not. If we do have consensus on this, I am happy to replace all instances of "I think" and the like by "we think" or "the css wg thinks" and to send it as a group.

Disclaimer 1: I neither have the time nor the expertise to review the entire specification. I mainly looked at the parts that relate to styling and layout.

Disclaimer 2: I am not aware of the history of this technology, and some (or all) of my comments may be invalidated once that is taken into account.

The mechanism TTML defines for styling and layout is superficially similar, but not identical to CSS properties and values. I believe this similar-but-different situation is unfortunate. Some details:

1. While many tts:* attributes have the same name as a css property, the acceptable values for quite a few of these are different from the css equivalent.
* Sometimes TTML accepts a subset of what CSS does (e.g. tts:backgroundRepeat takes a single value while css background-image takes a list)
* Sometimes TTML accepts a superset of what CSS does (in TTML, <length> always includes <percent> while in css, it does not and some properties that take a <length> do not take a <percent>)
* Sometimes it accepts different values, neither subset nor superset (tts:display accepts fewer values than css's display property, but it does have an auto value that css does not have)
* Sometimes TTML conflates into one attribute things that CSS splits into several properties (e.g. ts:border includes borderRadii, while in css border-radius is not part of the border shorthand).
* Sometimes TTML matches the syntax of earlier CSS drafts which have been replaced by a different syntax and semantics as the draft has matured (e.g. tts:writingMode vs css's writing-mode property).

2. TTML has some attributes which accomplish things that css also solves with unrelated properties whose behavior is different. (e.g. tts:displayAlign does alignement in the block direction, which is differently addressed by css properties like align-content, align-self, and align-items).

3. For attributes/properties where TTML and css do match at the syntactic level, TTML does not defer to CSS the definition of the behavior, but has its own normative statements about their effect. These normative statements are not always compatible with the corresponding thing in CSS (e.g. tts:lineHeight defines the inter-baseline separation, which is not what the css line-height does). TTML does claim that its model comes from XSL-FO rather than CSS, so this may explain part of the difference, but nonetheless multiple attribute are normatively defined in TTML in ways that do conflict with CSS (I did not review whether they also conflicted with XSL-FO, but given that there are standalone normative statements, I would be surprised if there was not some level of tension).

This does not in itself make TTML styling & layout necessarily a bad model in isolation, but it makes it doubtful that a CSS engine can be effectively used to render it with any level of fidelity. Given that CSS is the main client-side layout technology in Browsers, this is regrettable. It either means browser would have to have a completely separate style and layout engine just for TTML (or a meta engine that is flexible enough to handle both), or that they will simply not support it. My expectation, which seems supported by at least some browser vendors [1][2], is that they will chose not to support it.

Given that most of what TTML does in terms of layout and styling is already available via standard CSS, and that there is no obvious reasons to think that the things it has that CSS does not could not be added to CSS, this is unfortunate.

The fact that TTML has a mechanism that is different from CSS selectors and the cascade to associate styles with elements does not seem as problematic as the mismatch between TTML style attributes and css properties. Had the layout engine worked the same, the fact that properties get assigned to elements differently could be overcome comparatively simply. Nonetheless, it was not fully clear to me why using the CSS cascade would not be have been appropriate. Maybe there is a justification, but otherwise, reusing an existing mechanism would have been preferable. Similarly, though the abstract syntax is similar (but not identical as discussed above), it is not clear to me what the benefit of having camelCased properties and values over hyphenated properties and values is. Not reusing the concrete CSS syntax as-is is not necessarily a deal breaker on its own, but reusing it would also seem preferable.

Moreover, the normative descriptions of tts:* attribute are generally shorter than their css equivalents (e.g. see tts:writingMode vs css's writing-mode for a rather extreme example), making me doubt that there is sufficient detail for fully interoperable implementations.

In conclusion, the styling and layout aspects of TTML make me strongly doubt it is well suited for client side use on the web. Whether its other aspects are well suited or not, and whether TTML can be well suited to non web contexts is out of scope for this review.

Finally, I think it would be useful for the Timed Text Working Group to give feedback to the CSS WG about things its members think are needed for layout that are not adequately covered by CSS, so that CSS can be improved to handle these use cases.

—Florian

[1] https://lists.w3.org/Archives/Public/www-archive/2013May/0034.html
[2] https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/vXuOTK5M0hM
fantasai
2017-07-19 02:15:18 UTC
Permalink
Raw Message
Post by Thierry MICHEL
Dear CSS Working Group,
The W3C Timed Text Working Group has recently published a new working
draft of the Timed Text Markup Language 2 (TTML2).
https://www.w3.org/TR/2017/WD-ttml2-20170630/
These are just my comments, [...]
They seem reasonable to me. I have often been concerned about the same things.

~fantasai
Tab Atkins Jr.
2017-07-19 02:41:19 UTC
Permalink
Raw Message
Florian's review also seems substantially similar to dbaron's review
last December: https://lists.w3.org/Archives/Public/www-style/2016Nov/0106.html

~TJ
Theresa O'Connor
2017-07-19 18:34:21 UTC
Permalink
Raw Message
Hi,

We generally agree with Florian's concerns.


Tess
Thierry MICHEL
2017-09-04 08:09:38 UTC
Permalink
Raw Message
This is a reminder for the review of TTML2 ending 30 Sept 2017 (see
previous message bellow).

Regards,
On behalf of Nigel Megitt, co-Chair, W3C Timed Text Working Group
Thierry Michel, Staff Contact for TTWG.
Post by Thierry MICHEL
Dear CSS Working Group,
The W3C Timed Text Working Group has recently published a new working
draft of the Timed Text Markup Language 2 (TTML2).
https://www.w3.org/TR/2017/WD-ttml2-20170630/
TTML2, provides a standardized representation of a particular subset of
textual information with which stylistic, layout, and timing semantics
are associated by an author or an authoring system for the purpose of
interchange and processing.
In addition to being used for interchange among legacy distribution
content formats, TTML Content may be used directly as a distribution
format, providing, for example, a standard content format to reference
from a <track> element in an HTML5 document, or a <text> or <textstream>
media element in a [SMIL 3.0] document.
The TTML2 specification updates the TTML1 specification by adding
vocabulary and semantics to address more of its core requirements,
    raster images (both foreground and background)
    author supplied fonts
    audio descriptions and text to speech
    ruby text annotations
    improved vertical line layout
    text emphasis, kerning, letter spacing, shadows, and variants
    inline block layout
    stereoscopic presentation (for 3-D viewing)
    high definition resolution (HDR) presentation
    continuous animation
    hyperlinks
    conditional element semantics
    improved metadata extensibility
    formalized intermediate document syntax
    various other improvements and bug fixes
The TTWG invites you to review this draft, and requests comments to be
received by 30 Sept 2017. These comments will be used to fulfill the
W3C Process [3] requirement for Wide Review of drafts, and  Horizontal
Review [4]  prior to publication as Candidate Recommendation.
If you wish to make comments regarding this document, please send them
[ttml2] at the start of your email's subject. All comments are welcome,
however the scope of review will be mainly focused on the new features
introduced in TTML2.
A cumulative summary of all changes applied to this version since the
current (TTML1, 2nd Edition) Recommendation was published is available
for your convenience [5].
[1] TTML2 latest version https://www.w3.org/TR/ttml2/
[2] TTML1 Recommendation https://www.w3.org/TR/ttml1/
[3] W3C Process https://www.w3.org/2017/Process-20170301/
[4] Horizontal Review
https://www.w3.org/Guide/Charter.html#horizontal-review
[5] https://www.w3.org/TR/2017/WD-ttml2-20170630/ttml2-changes.html
Kind regards,
On behalf of Nigel Megitt, co-Chair, W3C Timed Text Working Group
Thierry Michel, Staff Contact for TTWG.
Loading...