From a82b6dcec2155a105d1d8bdc6cea76107961b0bb Mon Sep 17 00:00:00 2001 From: Nigel Megitt Date: Mon, 13 Mar 2023 09:33:23 +0000 Subject: [PATCH] Clarify Profile Resolution semantics (#103) Closes #104. Pass through the profile features to check they are all the ones we want, and have the correct dispositions. Many removed, to do with visual presentation. Added a formal TTML2 profile document for the Content Profile and the Processor Profile, because there's no way, currently, to express a mix of "optional" and "permitted" when inferring a Processor Profile from a Content Profile. Defined some extension features to express formally some normative requirements, like the presence of `xml:lang` and `ttp:contentProfiles` on the root element. Specify normatively the permission to use features from other profiles and add a note about IMSC as an example. And fix CSS syntax errors, where some property declarations were missing the trailing semicolon. In passing, fix up language in other extensions to clarify that they are extensions not features. Closes #66: Specify Talent Name before Character, and add a SHOULD that their `ttm:agent` elements should be in that order too. Update the example to match. Clarify that if more than one Character needs to reference the same Talent Name, there should be only one `ttm:agent` for that Talent Name. Describe location of Character Style `style` elements in the XPath style. Specify the W3C document license. Also tidy some of the contradictory language about On Screen and make it only an attribute and not an element. Fixes #108 clarifying the representation of `daptm:onScreen`. Many commits: * Add Profile constraints, missing TTML2 features * Add in refs from features to profile constraints * Map feature dispositions to `ttp:feature` values * Add `#profile-root` feature and prohibit it * Define the DAPT Extension namespace (using same pattern as the IMSC extension namespace) * Link back to TTML2 definition for `ttp:processorProfiles` * Rename Features section Supported Features and Extensions * Create an Extensions appendix * Define the `#profile-root` feature as support for `ttp:profile` attribute on `` element * Prohibit use of `#profile-root` * Fix broken fragment id * Editorial improvements * fix `ttp:contentProflies` typo in Introduction * define and reference `ttp:contentProfiles` * Where needed, add "and Extension" wherever Feature is mentioned * Rename Features and Extensions to Profiles and move to the Appendix * Clarify in the Profiles section that the specification defines a content profile and a processor profile * Clarify profile-related feature text * Add TTML profiles * Prettify the disposition labels. * Put features into alphabetical order * Address review feedback * Change single profile designator to two designators, one each for content and processor profile * Add note about potential usage of `ttp:processorProfiles` * Simplify conformance section and have two separate sub-sections, one for document conformance and one for processor conformance. * Explain difference between `#contentProfiles-root` extension and TTML2 `#contentProfiles` feature. * Move the detailed profile conformance text from 6.1 into appendix C * Split the disposition of features and extensions into a separate sub-section for easier navigation * Remove dfn accidentally added during rebase * Add !! around "required" dispositions * Add and require `#scriptType-root` extension * Remove duplicated text, split Character Style from Character * Add agent extension - Effectively defines requirements for Character and Talent Name. * Add `#xmlID-div` extension * Add `#textLanguageSource` extension * Add `#serialization` extension * Add `#onScreen` extension * Address review feedback * Change `[[TTML2]]` to `[[ttml2]]` throughout for consistency * Switch the order of the Profiles and Extensions appendices * Clarify that `ttp:processorProfiles` is not expected to be present unless it is needed. * Explain more clearly what the TTML2 profile mechanism is, and how it is used in DAPT, and that support for it is not required in DAPT processors, but is permitted. * Describe how the profiles can be used, as a resource for implementers, or as a way to direct general purpose TTML2 processors. * List the set of TTML2 profile vocabulary for which support is optional. * Explain that the vocabulary is not expected to be used unless needed. * Change the conformance language to say that conformance is based on the normative provisions of this specification, and that those provisions are expressed using TTML2 profile vocabulary additionally. * Cross link the Profiles section to the Extensions section. * Note that the use of TTML2 profiles is not intended to imply that TTML2 profile processing must be implemented. --- index.html | 1505 +++++++++++++++++---------- profiles/dapt-content-profile.xml | 95 ++ profiles/dapt-processor-profile.xml | 94 ++ 3 files changed, 1128 insertions(+), 566 deletions(-) create mode 100644 profiles/dapt-content-profile.xml create mode 100644 profiles/dapt-processor-profile.xml diff --git a/index.html b/index.html index decb786..d2b1865 100644 --- a/index.html +++ b/index.html @@ -26,6 +26,7 @@ group: "wg/timed-text", github: "w3c/dapt", wgPublicList: "public-tt", + license: "document", // local bibliography localBiblio: { @@ -45,6 +46,7 @@ table.syntax th { border: 0px solid black; text-align: left } table.syntax td { border: 0px solid black } table.syntax div { background-color: #ffffc8 } + table#table-features-and-extensions tbody tr td:nth-child(2) { text-align: center;} div.exampleInner { background-color: #d5dee3; border-top-width: 4px; border-top-style: double; @@ -68,19 +70,35 @@ display: inline-block; border-radius: 3px; } + span.optional::before { + content: "\00A0?\00A0"; + font-weight: bold; + } span.permitted::before { - content: "\00A0\2713\00A0" + content: "\00A0\2713\00A0"; } span.prohibited::before { - content: "\00A0\2718\00A0" + content: "\00A0\2718\00A0"; } span.permitted-deprecated::before { font-weight: bold; - content: "\00A0!\00A0" + content: "\00A0!\00A0"; + } + span.label.required::before, span.label.required::after { + font-weight: bold; + color: white; + content: "\00A0!!\00A0"; } span.label::after { content: "\00A0"; } + span.optional { + color: black; + background-color: #FFFF50; + border-color: #444444; + border-style: solid; + border-width: 1px; + } span.permitted { color: black; background-color: #50FF50; @@ -93,6 +111,10 @@ color: black; background-color: #FFC000; } + span.required { + color: white; + background-color: black; + } @@ -107,10 +129,10 @@

Dubbing and Audio description Profiles of TTML2

Scope

-

This specification defines a text-based profile of the Timed Text Markup Language version 2.0 [[TTML2]] +

This specification defines a text-based profile of the Timed Text Markup Language version 2.0 [[ttml2]] intended to support dubbing and audio description workflows worldwide, to meet the requirements defined in [[?DAPT-REQS]], and to permit usage of visual presentation - features within [[TTML2]] and its profiles, for example those in [[ttml-imsc1.2]].

+ features within [[ttml2]] and its profiles, for example those in [[ttml-imsc1.2]].

@@ -136,7 +158,7 @@

Transcripts and Scripts

such as type of DAPT script, dialogue, descriptions, timing, metadata, original language transcribed text, translated text, language information, and audio mixing instructions, and to be extensible to allow user-defined annotations or additional future features.

This specification defines the data model for DAPT scripts and - its representation as a [[TTML2]] document (see [[[#data-model]]]) + its representation as a [[ttml2]] document (see [[[#data-model]]]) with some constraints and restrictions (see [[[#profile-constraints]]]).

A DAPT script is expected to be used to make audio visual media accessible or localized for users who cannot understand it in its original form, @@ -217,9 +239,9 @@

Audio Description scripts

Example documents

Basic document structure

The top level structure of a document is as follows. - The xmlns attribute and the tt element indicate that this is a TTML document - and the contentProfiles attribute indicates that it adheres to the DAPT profile defined in this specification. - The daptm:scriptType attribute indicates the type of DAPT script + The xmlns attribute and the <tt> element indicate that this is a TTML document + and the ttp:contentProfiles attribute indicates that it adheres to the DAPT content profile defined in this specification. + The daptm:scriptType attribute indicates the type of script but in this empty example, it is not relevant, as only the structure of the document is shown. The structure is applicable to all types of DAPT scripts, dubbing or audio description.

Dubbing Examples
     

Documentation Conventions

- This document uses the same conventions as [[TTML2]] for the specification of parameter attributes, styling attributes and metadata elements. In particular: + This document uses the same conventions as [[ttml2]] for the specification of parameter attributes, styling attributes and metadata elements. In particular:

- Section 2.3 of [[TTML2]] specifies conventions used in the [[XML]] representation of elements; and - Sections 6.2 and 8.2 of [[TTML2]] specify conventions used when specifying the syntax of attribute values. + Section 2.3 of [[ttml2]] specifies conventions used in the [[XML]] representation of elements; and + Sections 6.2 and 8.2 of [[ttml2]] specify conventions used when specifying the syntax of attribute values.

- This specification uses Feature designations as defined in Appendices E at [[TTML2]]: - when making reference to content conformance, these designations refer to the syntactic expression or the semantic capability associated with each designated Feature; and - when making reference to Processor conformance, these designations refer to processing requirements associated with each designated Feature. - If the name of an element referenced in this specification is not namespace qualified, then the TT namespace applies (see .) + This specification uses Feature designations as defined in Appendices E at [[ttml2]] + and defines Extension designations: + when making reference to content conformance, + these designations refer to the syntactic expression or the semantic capability associated with each designated Feature or Extension; + and when making reference to Processor conformance, + these designations refer to processing requirements associated with each designated Feature or Extension. + If the name of an element referenced in this specification is not namespace qualified, + then the TT namespace applies (see 9.3 Namespaces.)

@@ -351,7 +377,7 @@

Script Type

Pre-recording Dub Script, and As-recorded Dub Script are referred to as Dubbing Scripts.

-

To represent this property, the following TTML attribute MUST be present on the tt element:

+

To represent this property, the daptm:scriptType attribute MUST be present on the tt element:

   daptm:scriptType
@@ -507,14 +533,41 @@ 

Character

for example during recording by an actor or when transforming the script into subtitles.

+

A Character is represented in TTML with the following structure and constraints:

    -
  • There MUST be a <ttm:agent> element at the path +
  • If the Character has a Talent Name property: +
      +
    • A <ttm:agent> element corresponding to the Talent Name + MUST be present at the path + /tt/head/metadata/ttm:agent, with the following constraints: +
        +
      • its type attribute MUST be set to person
      • +
      • its xml:id attribute MUST be set.
      • +
      • it MUST have a <ttm:name> child element whose + type MUST be set to full and its content set to the Talent Name
      • +
      +
    • +
    • If more than one Character is associated with the same + Talent Name there SHOULD be a single + <ttm:agent> element corresponding to that Talent Name, + referenced separately by each of the Characters.
    • +
    • Each <ttm:agent> element corresponding to a Talent Name + SHOULD appear before any of the Character <ttm:agent> elements + whose <ttm:actor> child element references it.
    • +
    + +
  • The Character is represented by a <ttm:agent> element present at the path /tt/head/metadata/ttm:agent, with the following constraints:
    • The type attribute MUST be set to character.
    • The xml:id attribute MUST be present on the ttm:agent and set to the Character Identifier.
    • The ttm:agent MUST contain a ttm:name element with its type attribute set to alias and its content set to the Character Name.
    • +
    • If the Character has a Talent Name, it MUST contain a <ttm:actor> child element. + That child element MUST have an agent attribute set to + the xml:id of the <ttm:agent> element + corresponding to the Talent Name, + that is, whose type is set to person.
  • @@ -528,31 +581,18 @@

    Character

    ...
-
  • If the Character has a Talent Name property, the following TTML constraints apply: -
      -
    • Another <ttm:agent> element MUST be added at the path - /tt/head/metadata/ttm:agent, with the following constraints: -
        -
      • its type attribute MUST be set to person
      • -
      • its xml:id attribute MUST be set.
      • -
      • it MUST have a ttm:name child element whose type MUST be set to full and its content set to the Talent Name
      • -
      -
    • -
    • the ttm:agent whose type is set to character MUST have a ttm:actor child, with its agent attribute set to the xml:id of the ttm:agent whose type is set to person.
    • -
    • the ttm:agent whose type is set to character should appear before the ttm:agent whose type is set to person.
    • -
  •  ...
     <metadata>
    +  <ttm:agent type="person" xml:id="actor_A">
    +    <ttm:name type="full">Matthias Schoenaerts</ttm:name>
    +  </ttm:agent>
       <ttm:agent type="character" xml:id="character_2">
         <ttm:name type="alias">BOOKER</ttm:name>
         <ttm:actor agent="actor_A"/>
       </ttm:agent>
    -  <ttm:agent type="person" xml:id="actor_A">
    -    <ttm:name type="full">Matthias Schoenaerts</ttm:name>
    -  </ttm:agent>
     </metadata>
     ...
             
    @@ -561,10 +601,12 @@

    Character

    for example to include proprietary metadata but the above recommends that only one is used to define the characters.
    + -
  • A Character Style is represented in TTML with the following structure and constraints: +

    A Character Style is represented in TTML with the following structure and constraints:

      -
    • Each Character Style is represented by one or more <style> element children of the <styling> element.
    • +
    • Each Character Style is represented by one or more <style> elements + at the path /tt/head/styling/style.
    • Each such <style> element is associated with the Character by having a ttm:agent attribute whose value is the xml:id of the <ttm:agent> element representing the Character.
    • A Script Event MAY apply Character Styles by including the xml:id of each style @@ -574,9 +616,9 @@

      Character

    • A Script Event SHOULD NOT apply a Character Style for a Character that is not associated with that Script Event.
    • A Text object SHOULD NOT apply a Character Style for a Character that is not associated with that Text object's Script Event.
    -
  • + -

    Any style attribute defined in [[TTML2]] or [[ttml-imsc1.2]] +

    Any style attribute defined in [[ttml2]] or [[ttml-imsc1.2]] (or other profiles using non-W3C namespaces) can be present on the <style> element.

    A <style> element MAY omit the ttm:agent attribute if it is not associated with a Character. Such styles MAY be applied in the same way as any other style, via a reference in the style attribute.

    @@ -607,9 +649,6 @@

    Character

    </div>
    - -

    -

    @@ -671,7 +710,7 @@

    Script Event

  • It MAY contain zero or more p elements representing each Text object.
  • The style attribute MAY be present. If present, it MAY contain a reference to the <style> defining the Character Style. Additional style references or inline styles MAY be used.
  • -
  • It MAY contain a metadata element representing the On Screen property.
  • +
  • The daptm:onScreen attribute MAY be present to represent the On Screen property.
  • @@ -699,7 +738,7 @@

    Text

  • The style attribute MAY be present. If present, it MAY contain a reference to the <style> that defines the relevant Character Style. - Additional style references or inline styles MAY be used as defined in [[TTML2]], + Additional style references or inline styles MAY be used as defined in [[ttml2]], and MAY be applied to sub-sections of the text defined by <span> elements.
  • The <p> element MUST have one Text Language Source property.
  • The <p> element SHOULD have an xml:lang attribute corresponding to the language of the Text object. @@ -769,7 +808,7 @@

    On Screen

  • OFF_ON - the character starts off screen, but goes on screen at some point
  • -

    The On Screen property is represented as a metadata element with the following constraints: +

    The On Screen property is represented as a daptm:onScreen attribute with the following constraints: