From b3b6f7092a3200b1373148525610d3b23fb684fc Mon Sep 17 00:00:00 2001 From: Nigel Megitt Date: Thu, 14 Nov 2024 09:21:21 +0000 Subject: [PATCH] Make "Using computed attribute values" normative (#256) * Make "Using computed attribute values" normative Retain and reformat the example about non-DAPT functionality. * Address review feedback * Include this change in substantive-changes-summary.txt * Reword begin time paragraph in Using Computed Attribute Values As per review comment and discussion. --- index.html | 27 ++++++++++++++------------- substantive-changes-summary.txt | 2 ++ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/index.html b/index.html index d0ff5ae..bc4d212 100755 --- a/index.html +++ b/index.html @@ -2548,25 +2548,23 @@

Handling <div> and <p> elements

-
+

Using computed attribute values

-

Some normative provisions relating to this section are defined in [[TTML2]].

Some attributes have semantics for computing their value that depend on the computed value of the attribute on some other element. For example if the xml:lang attribute is not specified on an element then its computed value is the computed value of the same attribute on the element's parent.

Or, for another example, the computed times of an element in a DAPT document are relative - to the begin time of its parent element. If a <div> element specifies a begin - attribute, and that element does not correspond to a Script Event, then the computed times - of its descendant <div> elements that do correspond to Script Events - are different to what they would be if that intermediate <div> element's begin - time were ignored.

-

MAYBE REMOVE Or, also for example, if styling is used in a TTML document, the computed value of the tts:fontSize - attribute when expressed as a percentage is relative to the computed value of the same attribute - on the element's parent. - Furthermore, in this example, the algorithm for generating ISDs (Intermediate Synchronic Documents) - involves reparenting some elements. The computed value that applies is the one before - rehoming has taken place.

+ to the begin time of the element's parent. + If a <div> element specifies a begin attribute, + then the computed times of its child <div> elements + are relative to that parent <div> element's begin time, + and so on down the hierarchy. + It is important to include those "intermediate" <div> elements' + times in the computation even if the processing target is + an instance of the DAPT data model in which they have no direct equivalent; + otherwise the Script Event Begin and End times would be wrong. +

Considering this situation more generally, it is possible that, within a DAPT document, there can be TTML elements that do not directly correspond to objects in the DAPT data model, @@ -2576,6 +2574,9 @@

Using computed attribute values

The semantics defined by [[TTML2]] or, for vocabulary defined herein, this specification, take precedence in this scenario. Implementations MUST compute attribute values based on the contents of the document instance before applying those computed values to DAPT data model objects. + For example a processor that supports TTML2 styling features would need + to implement the TTML2 semantics for inheritance and computing relative values + of attributes like tts:fontSize.