-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify anonymous span construction and implicit duration semantics #318
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe changing "timing semantics" to "timing behavior"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting a formatting change but more importantly I don't agree with the given explanation for the behaviour (I do agree with the described behaviour though!).
spec/ttml1.xml
Outdated
@@ -8094,6 +8094,30 @@ based timing or event based timing in <bibref ref="smil21"/>, where the specific | |||
<specref ref="time-expression-semantics-smpte"/> apply.</p> | |||
</item> | |||
</ulist> | |||
<p>The following example illustrates the timing semantics of anonymous spans that are children of sequential time containers. The words <emph>Hello</emph> and <emph>Allo</emph> are both contained in anonymous spans that are children of a sequential time container (the <code>p</code> element). As such, neither <emph>Hello</emph> nor <emph>Allo</emph> will be displayed since the implicit duration of the anonymous spans is 0. In contrast, the word <emph>Bonjour</emph> is contained within an anonymous span that is the child of a parallel time container (the <code>span</code> element). As such, <emph>Bonjour</emph> will be displayed since the implicit duration of the anonymous span is indefinite, resulting in the implicit duration of its <code>span</code>, <code>p</code>, <code>div</code> and <code>body</code> ancestors to also be indefinite. </p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the normal editorial practice is to put the explanation in a Note beneath the example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is true that the word "Bonjour" is contained in an anonymous span. The text in §7.1.5 p:
If a sequence of children of a p element consists solely of character information items, then that sequence must be considered to be an anonymous span for the purpose of applying style properties that apply to span elements.
does not appear in 7.1.6 span so I don't think it applies.
Rather, the reason the word Bonjour appears indefinitely is because the explicit span's implicit duration is indefinite.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please disregard the previous comment - I've gone and checked and read it again properly and realise that 7.1.6 does have text that provides this behaviour:
The span element accepts as its children zero or more elements in the Metadata.class element group, followed by zero or more elements in the Animation.class element group, followed by zero or more intermixed span elements, br elements, or text nodes interpreted as anonymous spans.
(my emphasis added)
Sorry for the noise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nigelmegitt In fact, I think you were right in your first thought. In 9.3.3 it actually says:
for each span element whose child is a single anonymous span, replace the anonymous span with its sequence of child text nodes;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cconcolato This clause applies when constructing ISDs, which happens after timing is resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@palemieux I'm confused. The creation of 'anonymous spans' is only defined in 9.3.3, therefore for me it does not make sense to talk about timing of an anonymous span, because as you say timing has been resolved already in 9.3.3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@palemieux TTML2 has a note that covers that:
Note: A compliant presentation processor is permitted to perform the previous step (anonymous span generation) and this step (style resolution) as post-processing steps while performing the [construct intermediate document] procedure, in which case each intermediate synchronic document produced by 11.3.1.3 Intermediate Synchronic Document Construction will contain anonymously generated spans and computed
but I couldn't find this text in TTML1. Maybe this should be backported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to understand why that note was added to TTML2.
In fact, TTML2 changed the sentence the span element accepts as its children zero or more elements in the Metadata.class element group, followed by zero or more elements in the Animation.class element group, followed by zero or more intermixed span elements, br elements, or text nodes interpreted as anonymous spans to remove the mention of anonymous spans.
This is a problem since TTML2 also states that If no timeContainer attribute is specified on a span element, then it must be interpreted as having parallel time containment semantics., which leaves the implicit duration of a span undefined if the span element does not contain anonymous spans.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does seem that we should not have a discrepancy here between TTML1 and TTML2 if at all possible. I've added an agenda item for this, but perhaps it is something that can be covered in offline discussions before the F2F on Tuesday?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The formatting is a little inconsistent but I'm basically happy with the content here.
Notes on e093565 :
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One editorial point, one technical issue in the example that certainly needs to be fixed, and one possibly hypothetical or irrelevant question that I'd like to be more certain about before moving forwards with this change.
spec/ttml1.xml
Outdated
<p>The implicit duration of a <el>body</el>, <el>div</el>, <el>p</el>, | ||
or <el>span</el> element is determined in accordance to (1) whether | ||
<p>The implicit duration of a <el>body</el> element, <el>div</el> element, <el>p</el> element, | ||
or <el>span</el> element (but not of a <el>span</el> element whose children |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than the parentheses it would be consistent with the previous bullet, and clearer, to say "or span
element whose children are not exclusively text nodes".
spec/ttml1.xml
Outdated
@@ -8106,7 +8123,7 @@ based timing or event based timing in <bibref ref="smil21"/>, where the specific | |||
<div> | |||
<p timeContainer="seq"> | |||
Hello | |||
<span>Bonjour</span> | |||
<p>Bonjour</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not valid TTML - a p
cannot contain a p
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nigelmegitt Thanks for the catch!
spec/ttml1.xml
Outdated
@@ -8094,7 +8110,8 @@ based timing or event based timing in <bibref ref="smil21"/>, where the specific | |||
<specref ref="time-expression-semantics-smpte"/> apply.</p> | |||
</item> | |||
</ulist> | |||
<p>The following example illustrates the timing semantics of anonymous spans that are children of sequential time containers. The words <emph>Hello</emph> and <emph>Allo</emph> are both contained in anonymous spans that are children of a sequential time container (the <code>p</code> element). As such, neither <emph>Hello</emph> nor <emph>Allo</emph> will be displayed since the implicit duration of the anonymous spans is 0. In contrast, the word <emph>Bonjour</emph> is contained within an anonymous span that is the child of a parallel time container (the <code>span</code> element). As such, <emph>Bonjour</emph> will be displayed since the implicit duration of the anonymous span is indefinite, resulting in the implicit duration of its <code>span</code>, <code>p</code>, <code>div</code> and <code>body</code> ancestors to also be indefinite. </p> | |||
<p>For the purposes of performing presentation processing, the <phrase role="strong">[construct anonymous spans]</phrase> procedure is applied before resolving begin and end times of content elements.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is all of [construct anonymous spans] performed before resolving begin and end times? Consider:
<p>
Wibble
<span begin="2s" end="3s">Wobble</span>
Wibble
</p>
Before 2s and after 3s, if you resolve the timing before step 2 of [construct anonymous spans] there are two contiguous anonymous spans that get replaced by a single anonymous span in step 2. Between 2s and 3s the anonymous spans are not contiguous.
If you resolve the timing after completing [construct anonymous spans] then the anonymous spans are never contiguous.
The next question is: does it ever make any difference? I think it makes no difference, but then I wonder what the point of step 2 is at all, and suspect I've missed something... Any further thoughts or ideas @palemieux @skynavga ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but then I wonder what the point of step 2 is at all, and suspect I've missed something
FWIW, I think of step (2) as a clean-up pass that create a single anonymous span from the multiple text nodes that an XML element can have.
Thanks @palemieux those changes fix the main issues. I'd like to cover #318 (comment) on the call later today, hopefully briefly, before I approve this pull. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See also the point discussed today (minutes); following that discussion, I'm approving this.
Closes #193
Closes #310