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

tts:extent, region and the style element #475

Closed
cconcolato opened this issue May 23, 2019 · 12 comments · Fixed by #482
Closed

tts:extent, region and the style element #475

cconcolato opened this issue May 23, 2019 · 12 comments · Fixed by #482

Comments

@cconcolato
Copy link

The current text in https://www.w3.org/TR/ttml-imsc1.1/#text-extent-region says:

The tts:extent attribute SHALL be present on all region elements, where it SHALL use px units, percentage values, or root container relative units.

This forbids the following syntax:

<region xml:id="Region_00">
<style tts:textAlign="center"/>
<style tts:displayAlign="after"/>
<style tts:origin="10.00% 79.34%"/>
<style tts:extent="80.00% 10.66%"/>
</region>

And only for tts:extent not for tts:origin or others.

@nigelmegitt
Copy link
Contributor

Also for consideration here, from #480 (review):

Thanks, this is somewhat clearer. I had been hoping for a note that explains about the possibility of using the default region, pointing to https://www.w3.org/TR/ttml2/#semantics-default-region and warning that if any region is specified in head/layout then the default region can not be used.

For a concrete question, the Image profile requires that the images have the same size as the extent of the region in which it is presented. Does that mean that it is okay not to specify a region, if the size of the image is the same as the default region, i.e. the same as the root container region? (I assume Yes at the moment, if no region element exists in the document instance) Or is it a requirement to specify some region? (I assume No, again if no region element exists )

@palemieux
Copy link
Contributor

palemieux commented Jul 6, 2019

Looking back at my notes, it looks like the intent was for the author to explicitly specify an non-"auto" value for tts:origin for each region defined in the document instance since the initial value ('auto') is incorrect in anything other than the corner case where the region fills the entire root container.

SMPTE-TT explicitly contemplates the use of the default region.

The IMSC test suite include tests where region elements are specified without tts:origin, e.g. https://github.com/w3c/imsc-tests/blob/master/imsc1/ttml/extent/Extent001.ttml.

Proposal

Common to both profiles

Relax/clarify the requirement that the tts:extent attribute be present on region elements to state that the specified value of tts:extent for each region defined in the document instance SHALL not be "auto".

[edit: the requirement erroneously referred to tts:origin]

Note that:

  • in absence of a region defined in the document instance, the default region is used, and conversly if one or more regions are defined in the document instance, then the default region is not used.
  • the specified value of tts:extent can be set using set animation, referential styling, nested styling, etc.

Image Profile

Clarify that each image SHALL be associated with a region defined in the document instance.

Note that the default region can not be used in Image Profile unless no images are present.

@skynavga
Copy link
Contributor

skynavga commented Jul 6, 2019

The proposed change will make previously conforming documents non-conforming. This will break backwards compatibility with both existing documents and deployed implementations.

@palemieux
Copy link
Contributor

The proposed change will make previously conforming documents non-conforming. This will break backwards compatibility with both existing documents and deployed implementations.

@skynavga Oh. Do you mean the requirement on tts:origin? If so, this was a copy-paste error. I have edited the proposal accordingly.

@skynavga
Copy link
Contributor

skynavga commented Jul 7, 2019

IIRC, the existing text doesn't explicitly exclude auto, though it is ambiguous, because it talks only about constraints on units and not constraints on values that don't use units (such as auto).

You are proposing to explicitly exclude auto. That makes existing documents that use auto invalid, thus breaking backwards compatibility. Also, deployed implementations, such as validators or presentation implementations that validate, will continue to accept auto without reporting non-conformance unless their deployments are updated.

@skynavga
Copy link
Contributor

skynavga commented Jul 7, 2019

I would add that IMSC 1.0 allowed auto with the #extent feature designation. TTV has a (passing valid) test case that has tts:extent="auto" with region.

@palemieux
Copy link
Contributor

@skynavga I think the current text (see below) unambiguously prohibits the value "auto", and am curious to hear from others.

The tts:extent attribute SHALL be present on all region elements, where it SHALL use px units, percentage values, or root container relative units.

@skynavga
Copy link
Contributor

skynavga commented Jul 7, 2019

I contend that this is ambiguous because it is only defining constraints on the value when the value consists of two length expressions. If you want to make it unambiguous, you need to say:

The tts:extent attribute SHALL be present on all region elements, where it SHALL take the form of two length expressions that use pixel (px), percentage (%), or root container relative units.

@skynavga
Copy link
Contributor

skynavga commented Jul 7, 2019

However, this change is eliminating a possible reading by removing an ambiguity, so it potentially affects conformance where an implementer (or author) may have read it to permit auto, particularly since auto is permitted by #region as used in IMSC1.0 and 1.0.1.

@nigelmegitt
Copy link
Contributor

I've added this to the agenda for Thursday, since it might help to discuss the possible interpretations, and the proposal.

@palemieux
Copy link
Contributor

As an additional data point, https://subcheck.io reports an error when tts:extent="auto" is used on region.

@css-meeting-bot
Copy link
Member

The Timed Text Working Group just discussed IMSC.

The full IRC log of that discussion <plh> Topic: IMSC
<nigel> s/IMSC/tts:extent, region and the style element imsc#475
<plh> Nigel: that's IMSC issue #475
<nigel> github: https://github.com//issues/475
<plh> Nigel: one of them if whether it's ok to include an element style
<plh> ... and the syntax permitted in the extend attribute
<plh> ... 2 possible interpretation in the spec
<nigel> -> https://www.w3.org/TR/ttml-imsc1.1/#text-extent-region §8.4.2 of IMSC 1.1
<plh> [...]
<plh> Glenn: two 2 issues, style element child of region
<plh> ... and one of the values of extend
<plh> ... constrained by #extend-region
<plh> Nigel: let's settle the most recent one first
<plh> ... values of the extend attribute
<plh> ... does anyone disagree that the intent was to disallow auto?
<plh> Pierre: looked back at my notes and that was the case
<plh> Nigel: are you clear on the editorial change?
<plh> Pierre: happy to clarify this in my proposal. it's there already
<plh> Glenn: one alternative: ...
<plh> Pierre: that proposal doesn't take into account the issue raised my Cyril. to permit referenced styling as well as nested
<plh> Glenn: ok. happy to amend my proposal
<plh> Pierre: I'll take that into account when generating the PR
<plh> Nigel: ok. we prohibit auto and we allow nested style element
<plh> ... is that true for extend origin?
<plh> ... we talk about position attributes...
<plh> ... the problem is the constraint on the element
<plh> Pierre: we could interpret it as forbidding referencial and nested style. smae thing for position.
<plh> s/smae/same/
<plh> Nigel: whether it's style or region doesn't make a difference.
<plh> Pierre: if we use the term specified value, we'll want to do the same for origin and position
<nigel> q?
<plh> Pierre: what about default region?
<plh> ... my proposal addresses it as well
<plh> Nigel: I'll review it in the PR
<plh> Pierre: in an image profile, there must be a region. a default region can only exist if there is no images
<plh> ... there is text related to width/height depending on the region element, thus implying there is a region
<plh> Nige: we should adjust to say it's the specified extent of the region element...
<plh> s/Nige/Nigel/
<plh> Pierre: I'll address it in the PR as well
<plh> Nigel: summary: Pierre will create a PR to address all of the points on the issue
<plh> Pierre: corrections for IMSC 1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants