Skip to content
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

Introduce anonymous span creation procedure (#358). #603

Merged
merged 12 commits into from
Feb 19, 2018

Conversation

cconcolato
Copy link
Contributor

@cconcolato cconcolato commented Jan 29, 2018

Partially addresses #358.
Closes #634.

nigelmegitt
nigelmegitt previously approved these changes Jan 31, 2018
spec/ttml2.xml Outdated
the anonymous span's parent time container is a parallel time container, then
<p>The implicit duration of an anonymous span, a <el>set</el> element, or a <el>span</el> element whose children are exclusively text nodes,
is defined as follows:
if the parent time container is a parallel time container, then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see there's a problem with the equivalent TTML1 text here: it says "if the span's parent time container ..." but the scope of this has been changed to it also covers anonymous spans and set elements. I think this here is better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nigelmegitt I raised that issue on TTML1 w3c/ttml1#335 and @palemieux has a PR.

Copy link
Collaborator

@skynavga skynavga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will be pushing an update to this PR very shortly that addresses my comments.

spec/ttml2.xml Outdated
@@ -17629,6 +17642,39 @@ based timing or event based timing in <bibref ref="smil3"/>, where the specific
<specref ref="time-expression-semantics-smpte"/> apply.</p>
</item>
</ulist>
<p>For the purposes of performing presentation processing, the <phrase role="strong">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong.

spec/ttml2.xml Outdated
parent time container is a sequential time container, then the implicit duration
is equivalent to zero.</p>
</item>
<item>
<p>The implicit duration of a <el>body</el>, <el>div</el>, <el>p</el>,
<el>span</el>, <el>audio</el> or <el>image</el> element is determined in accordance to (1) whether
<p>The implicit duration of a <el>body</el>, <el>div</el>, <el>p</el>, <el>audio</el> or <el>image</el> element, or a <el>span</el> whose children
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverting.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

spec/ttml2.xml Outdated
the implicit duration is equivalent to the <code>indefinite</code>
duration value as defined by <bibref ref="smil3"/>; if the anonymous span's
duration value as defined by <bibref ref="smil3"/>; if the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverting.

spec/ttml2.xml Outdated
@@ -17590,16 +17602,17 @@ i.e., parallel containment always applies.</p>
</issue>
<ulist>
<item>
<p>The implicit duration of an anonymous span is defined as follows: if
the anonymous span's parent time container is a parallel time container, then
<p>The implicit duration of an anonymous span, a <el>set</el> element, or a <el>span</el> element whose children are exclusively text nodes,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverting.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

spec/ttml2.xml Outdated
@@ -16697,6 +16697,32 @@ attribute are implied. In addition, a <el>layout</el> container element is impli
the implied <el>region</el> element.</p>
</note>
</div4>
<div4 id="anonymous-span-construction">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving this material closer to reference, and undoing bad changes.

spec/ttml2.xml Outdated
<p>For the purposes of performing presentation processing, the <phrase role="strong">
<loc href="#procedure-construct-anonymous-spans">[construct anonymous spans]</loc></phrase> procedure is applied before resolving begin and end
times of content elements.</p>
<p>The following example illustrates the timing semantics of anonymous spans that are children of sequential and parallel time containers.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting this into new sub-section that is clearly non-normative.

@skynavga
Copy link
Collaborator

skynavga commented Feb 8, 2018

The original PR is trying to make too many changes of different types, the substantive ones being of a nature that we do not have agreement (and I believe were semantically wrong). This now a purely editorial PR. We can do other PRs to address specific substantive changes, such as defining implicit duration for <set>.

Copy link
Collaborator

@skynavga skynavga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can now approve, mutatis mutandis.

@skynavga skynavga changed the title introduce anonymous span creation procedure (from TTML1 text) Introduce anonymous span creation procedure (#358). Feb 8, 2018
@nigelmegitt nigelmegitt dismissed their stale review February 8, 2018 13:05

Significant further changes made after my initial review.

Copy link
Contributor

@nigelmegitt nigelmegitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence:

For the purposes of performing presentation processing, the [construct anonymous spans] procedure is applied before resolving begin and end times of content elements.

which is present in TTML1 Third Edition ED §10.4 Time Intervals is important. I think it needs to be added.

spec/ttml2.xml Outdated
</def>
</gitem>
<gitem id="procedure-perform-flow-transformation">
<label>[perform flow transformation]</label>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This label is not used anywhere - the process is never called by anything, so giving it a name, while not a problem, is also not a solution.

Copy link
Collaborator

@skynavga skynavga Feb 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nigelmegitt the lack of a label is an inconsistency, since we have added labels elsewhere. Also, it is needed in this particular context to separate the new construct anonymous spans procedure from the flow transformation procedure.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skynavga Regardless of the language, please make sure the prose in TTML2 yields that same semantics as in https://rawgit.com/w3c/ttml1/issue-339-br-implicit-duration-build/index.html

Copy link
Contributor

@palemieux palemieux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is completely different than what I had approved. Why the changes?

spec/ttml2.xml Outdated
@@ -17590,16 +17602,17 @@ i.e., parallel containment always applies.</p>
</issue>
<ulist>
<item>
<p>The implicit duration of an anonymous span is defined as follows: if
the anonymous span's parent time container is a parallel time container, then
<p>The implicit duration of an anonymous span, a <el>set</el> element, or a <el>span</el> element whose children are exclusively text nodes,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

spec/ttml2.xml Outdated
parent time container is a sequential time container, then the implicit duration
is equivalent to zero.</p>
</item>
<item>
<p>The implicit duration of a <el>body</el>, <el>div</el>, <el>p</el>,
<el>span</el>, <el>audio</el> or <el>image</el> element is determined in accordance to (1) whether
<p>The implicit duration of a <el>body</el>, <el>div</el>, <el>p</el>, <el>audio</el> or <el>image</el> element, or a <el>span</el> whose children
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

@palemieux
Copy link
Contributor

At this point, this PR should match the changes made and approved in TTML1. Both specifications can be fixed post CR1 if needs be.

@skynavga
Copy link
Collaborator

@palemieux unfortunately, it cannot, since the changes in TTML are factually wrong (anonymous span creation does not occur before ISD construction)

@nigelmegitt
Copy link
Contributor

anonymous span creation does not occur before ISD construction

@skynavga we already agreed that it must do, on the basis that knowledge of anonymous span timing is a requirement for ISD construction.

@skynavga
Copy link
Collaborator

skynavga commented Feb 14, 2018

@nigelmegitt @palemieux the problem is the following language, which contradicts the language in TTML1 2e (9.33) and TTML2 ED (11.3.1.4) where anonymous span construction occurs as the initial step of the flow transformation process, which occurs AFTER ISD construction, which occurs AFTER timing resolution.

+<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>

@nigelmegitt
Copy link
Contributor

@skynavga why can anonymous span creation not be done both before and after ISD construction, i.e. before to establish which elements are in the ISD and after for flow transformation?

@skynavga
Copy link
Collaborator

@nigelmegitt it COULD be done before, but only if we don't use the phrase anonymous span, i.e., if we refer to an implicit duration in terms of text fragments that will eventually be mapped to an anonymous span

@skynavga
Copy link
Collaborator

skynavga commented Feb 16, 2018

@nigelmegitt @palemieux i have completed my updates for this PR, which ended up with a few changes from the original PR:

  • animate needed same treatment as set;
  • animate and set need to use implicit duration of nearest time container ancestor;
  • audio and image need to work like br and anonymous span;
  • removing attempt to resolve Inconsistent implicit duration of singleton span in sequential container. ttml1#193, which doesn't appear to represent the consensus expressed there, namely, to take no action at this time; and, as it turns out, the attempt to deal with this in w3c/ttml1@62ca221 doesn't quite work, for multiple reasons, one being that text fragments may have been converted to anonymous spans already, another being that span may specify @timeContainer;

@skynavga skynavga assigned skynavga and unassigned cconcolato Feb 16, 2018
@palemieux
Copy link
Contributor

@skynavga [construct anonymous spans] must be performed before 11.3.1.3 Intermediate Synchronic Document Construction since determining whether text node is temporally active requires wrapping it in an anonymous span, i.e. text nodes do not have timing semantics.

@palemieux
Copy link
Contributor

@skynavga The implicit duration of spans that only contain text nodes must be specified to be equivalent to that of anonymous spans (time container semantics do not apply since text nodes do not have timing semantics)

@palemieux
Copy link
Contributor

@skynavga The implicit duration of a set element should be set to that of anonymous span, as in TTML1, unless there is a reason not to.

@skynavga
Copy link
Collaborator

skynavga commented Feb 16, 2018

@palemieux no (it need not), no (we did not agree to take action on w3c/ttml1#193), and no (what you added in ttml1 for set is not correct)

@skynavga
Copy link
Collaborator

I have a feeling we will have to push PR out to CR2.

@palemieux
Copy link
Contributor

no (it need not), no (we did not agree to take action on w3c/ttml1#193), and no (what you added in ttml1 for set is not correct)

You have not indicated why it is not correct. I am waiting.

@skynavga
Copy link
Collaborator

By not correct, I am referring to the implicit duration of set. What does the following mean?

<span timeContainer='seq'>
  <set begin='1s' end='3s' tts:color='red'>
  <span dur='2s'>one</span>
  <span dur='3s'>two</span>
</span>

I think it means that the color of the outer span is set to red from 1 to 3s in the syncbase of the outer span, which means that the implicit duration of set should follow the implicit duration of the outer span.

@skynavga skynavga modified the milestones: CR2, CR1 Feb 16, 2018
@palemieux
Copy link
Contributor

palemieux commented Feb 16, 2018

@skynavga In the example at #603 (comment), the desired begin of <span dur='2s'>one</span> will be 3s according to TTML1 since:

  • the explicit end of set is 3s into the seq container
  • the implicit (and desired) begin of <span dur='2s'>one</span> is the desired end of the previous sibling.

As a result, the color will not change.

I am not saying this is ideal, but it is what TTML1 says.

To achieve the result you describe, the author would simply do the following:

<span>
<set begin='1s' end='3s' tts:color='red'/>
<span timeContainer='seq'>
  <span dur='2s'>one</span>
  <span dur='3s'>two</span>
</span>
</span>

or

<span>
  <set begin='1s' end='3s' tts:color='red'/>
  <span begin='0s' end='2s'>one</span>
  <span begin='2s' end='5s'>two</span>
</span>

Test cases below, which can be experimented with at http://sandflow.com/imsc1proc/index.html

set-duration-examples.zip

@palemieux palemieux closed this Feb 17, 2018
@palemieux palemieux reopened this Feb 17, 2018
@skynavga skynavga merged commit 5c6a9c7 into master Feb 19, 2018
@skynavga skynavga removed their assignment Feb 19, 2018
@skynavga skynavga deleted the issue-0358-ttml1-0310 branch March 9, 2018 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants