Closed palemieux closed 5 years ago
@palemieux but do we need to say anything? since these containers do not have text node children it's a moot point, isn't it?
@palemieux in particular, we don't say anything about character properties not applying to a span that contains no text nodes in non-ruby contexts, e.g., the outer span in
<span xml:id="outer"><span>A</span><span> </span><span>Word</span</span>
so why should we specify a constraint in a ruby container context?
so why should we specify a constraint in a ruby container context?
Because a ruby container context specifically explicitly prohibits the presence of meaningful (non-LWSP) text.
That is no reason to add special case language saying that character properties don't apply to ruby (base or text) container spans. As you already admit, such containers don't contain non-LWSP text nodes, so there is already nothing to apply these properties to in the first place. In other words, adding language as you suggest is a NO-OP, and no different than observing that a (non-ruby context) span that contains no non-LWSP has nothing to apply character properties to.
@palemieux could you supply a test file that tests such a constraint that you propose?
I would argue that stating that styles apply to elements for which they are nonsensical is defect of the model in and of itself, for the same reason that tts:fontStyle
does not apply to region
.
It also introduces ambiguities in the rendering the following snippet (note the xml:space="preserve"
):
<?xml version="1.0" encoding="UTF-8"?>
<tt xml:lang="ja"
xmlns:tt="http://www.w3.org/ns/ttml"
xmlns:ttp="http://www.w3.org/ns/ttml#parameter"
xmlns="http://www.w3.org/ns/ttml"
xmlns:tts="http://www.w3.org/ns/ttml#styling"
xmlns:ttm="http://www.w3.org/ns/ttml#metadata"
ttp:contentProfiles="http://www.w3.org/ns/ttml/profile/imsc1.1/text">
<head>
<metadata>
<ttm:desc>Ruby container backgroundColor</ttm:desc>
</metadata>
<layout>
<region tts:displayAlign="center" tts:textAlign="center" tts:backgroundColor="black" xml:id="r1" tts:position="center center" tts:extent="40% 40%"/>
</layout>
</head>
<body>
<div region="r1">
<p begin="0s" end="1s">
<span tts:ruby="container" xml:space="preserve" tts:backgroundColor="red">
<span tts:ruby="base" tts:backgroundColor="black">利用許諾</span>
<span tts:ruby="text" tts:backgroundColor="black">ライセンス</span>
</span>
</p>
</div>
</body>
</tt>
I do not agree with your first statement
that styles apply to elements for which they are nonsensical is defect of the model in and of itself
In particular, we are talking about the span
element here, to which character properties most certainly do apply (in general). Your claim is that because there is some case (e.g., when a span is marked as a ruby {base,text} container) that we should create special case language that negates the general rule for these special cases. But, except for your contrived example, there will never be a case where character properties would apply in these special cases.
Have you considered that the preserved LWSP in your example will be wrapped in anonymous spans by the [construct anonymous span] procedure, and, consequently, even in your example, the outer ruby container does not contain any text nodes to which character properties might apply?
I would suggest a different solution to the possible ambiguity you are worried about, which is to replace the the three instances of the following text that appears after Table 10-1
each of its text node children contain only
<lwsp>
;
with
each of its text node children contain only
<lwsp>
, which must be ignored for the purpose of presentation processing regardless of whether the computed value ofxml:space
ispreserve
or not;
Your claim is that because there is some case (e.g., when a span is marked as a ruby {base,text} container) that we should create special case language that negates the general rule for these special cases.
My argument is much simpler: just as tts:fontStyle
does not apply to div
, it should not apply to ruby containers.
But ruby container is not an element type. It is a style applied to span
to which font styles apply in general. Adding language that states that "oh by the way, a span
which is assigned a ruby container attribute value doesn't have any content characters to which font styles could apply" is not only unnecessary, but creates a special case not motivated by actual processing requirements. Furthermore, this doesn't deal with the treatment of the edge case of the presence of XML whitespace characters to which xml:space="preserve"
might have been applied. My proposal for resolving this issue is simply to tweak the language I pointed out in https://github.com/w3c/ttml2/issues/1043#issuecomment-477403531 above. We could also add a note (in 10.2.35.1) that reminds the reader that significant content characters do not appear as children of a span
designated as a ruby container, and that, therefore, font related styles have nothing to apply to. What I am not willing to do is add special case semantics to every style property that applies to span
that repeats this same information.
It is a style applied to span to which font styles apply in general.
The fact that a ruby container is expressed as <span tts:ruby='container'>
instead of, say, <ruby>
has never been clear to me -- perhaps it was merely an editorial preference. It does not change the fact that a ruby container cannot contain meaningful text nodes, just as a region cannot, and thus tts:fontStyle
cannot apply.
No, not an editorial preference. It was based on a desire to provide interoperability with ARIB-TTML. See the arib-tt:ruby
style attribute referenced in §3.1 of https://www.itu.int/dms_pub/itu-r/opb/rep/R-REP-BT.2342-1-2018-MSW-E.docx.
Correction. The ARIB-TT reference is https://www.itu.int/dms_pub/itu-r/opb/rep/R-REP-BT.2342-1-2018-MSW-E.docx.
On Thu, Apr 11, 2019 at 9:09 AM Glenn Adams notifications@github.com wrote:
No, not an editorial preference. It was based on a desire to provide interoperability with ARIB-TTML. See the arib-tt:ruby style attribute reference in §3.1 of #1043 (comment) https://github.com/w3c/ttml2/issues/1043#issuecomment-477403531.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/w3c/ttml2/issues/1043#issuecomment-482154499, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXCb0UbSKdnIHdKWM_sZLvteoo_LPTkks5vf1AXgaJpZM4alq4w .
Good to know the background. It does not change the fact that a ruby container cannot contain meaningful text nodes, just as a region cannot, and thus tts:fontStyle cannot apply.
You keep repeating yourself. I agree that tts:fontStyle
doesn't apply. Where we don't appear to have agreement is whether it is necessary to point out the obvious or not. And if so, then how. I have proposed a specific approach. Shall I create a PR so we have something concrete to discuss?
I have proposed a specific approach.
I do not think the proposal at https://github.com/w3c/ttml2/issues/1043#issuecomment-477403531 is adequate.
An approach similar to that in tts:rubyAlign
, i.e. applies to: span only if the computed value of tts:ruby is container, is more explicit (and normative).
I am happy to propose a PR as well... as you prefer.
I cannot accept your proposed approach since it entails making changes in too many points in the document, and, moreover, it remains my opinion that such language is technically unnecessary.
The Timed Text Working Group just discussed Character-related style properties should not apply to ruby containers. ttml2#1043
.
Below is an example which, today, would result in an underline being applied to the text container -- as inherited from the ruby container:
<span tts:ruby="container" tts:textDecoration="underline">
<span tts:ruby="baseContainer">
<span tts:ruby="base">bonjour</span>
</span>
<span tts:ruby="textContainer">
<span tts:ruby="text">hello</span>
</span>
</span>
Is that really the intent?
No, that is not the intent. And that is why PR #1069 adds language to make this clear.
On Wed, May 1, 2019 at 4:28 PM Pierre-Anthony Lemieux < notifications@github.com> wrote:
Below is an example which, today, would result in an underline being applied to the text container -- as inherited from the ruby container:
bonjour hello
Is that really the intent?
[image: 0] https://user-images.githubusercontent.com/4871350/57046536-b9e6a100-6c25-11e9-9257-0fbfc59cd4c8.png
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/w3c/ttml2/issues/1043#issuecomment-488462399, or mute the thread https://github.com/notifications/unsubscribe-auth/AAC4E3YOT4LR3I44K2HMXYTPTIKSFANCNFSM4GUWVYYA .
Note from today's call: @palemieux pointed out that in the image above, there are two underlines beneath the word "hello", one for the text itself and another for the textContainer span. The reason there are not two underlines beneath "bonjour" is unclear - it is possible that there are, but that they are in the same place as each other.
The Timed Text Working Group just discussed TTML2 and TTML3 Pull Requests
.
The Timed Text Working Group just discussed Character-related style properties should not apply to ruby containers. w3c/ttml2#1043
.
The Timed Text Working Group just discussed Character-related style properties should not apply to ruby containers.
.
Replaced by #1100 and #1129 and #1130
By definition, ruby containers (
tts:ruby='container'
,tts:ruby='textContainer'
andtts:ruby='baseContainer'
) do not have text node children. As a result, character-related style properties (see below) should not apply to them, just like they do not apply top
.