Use of attributes in TTML namespace but NOT defined in TTML1 #251
Description
Content models of TTML elements are defined as Element Information Items and represented in XML. One example is the content model of the style element:
<style
style = IDREFS
xml:id = ID
xml:lang = string
xml:space = (default|preserve)
{any attribute in TT Style namespace}
{any attribute not in default or any TT namespace}>
Content: EMPTY
</style>
The content models give a "general allowance" to use attributes of a specific namespace. In the above example, any attribute that is in the TT Style namespace ("http://www.w3.org/ns/ttml#styling") can be used.
My question is, if this is restricted to just the attributes of "http://www.w3.org/ns/ttml#styling" that are defined in TTML1 (see Section 5.3.1 of TTML1, Table 5), if also attributes are allowed that have been defined for the TTML Style namespace in a later publication of W3C (e.g. TTML2) or if from the element type defintion it doesn't matter where attribute is defined, it just needs to be in the TTML Style namespace.
Activity
[-]Use of attributes in TTML namespace but defined in TTML1[/-][+]Use of attributes in TTML namespace but NOT defined in TTML1 2nd edition[/+][-]Use of attributes in TTML namespace but NOT defined in TTML1 2nd edition[/-][+]Use of attributes in TTML namespace but NOT defined in TTML1 [/+]andreastai commentedon Jul 25, 2017
My interpretation is that by the syntax definition all attributes are allowed to be added if they are in one of the namespaces in question, e.g. the following
{any attribute in TT Style namespace}would make the following TTML legal (prefix
ttsis bound as defined in TTML1):Although the namespaces defined TTML are in the authority of the W3C, a processor needs to accept a document with arbitrary attributes in the TTML style namespace. It is not possible to know which attributes in that namespace will be specified in the future (by whatever W3C standard group).
skynavga commentedon Jul 25, 2017
mikedo commentedon Jul 26, 2017
I'm not sure I agree with this implied broader interpretation. Conformant TTML1 documents have the up to the defined TTML1 (e.g. tts:) namespace attributes and no more.
That said, well-implemented TTML1 decoders should be tolerant (and gracefully ignore) unknown TTML1 (e.g. tts:) namespace attributes in TTML namespaces.
skynavga commentedon Jul 26, 2017
mikedo commentedon Jul 26, 2017
OK, glad we agree on the original intent. Then, what's the issue and what should change in TTML1? I'm not seeing it. Maybe a clarification somewhere? But I do not agree with the original premise in this issue about an instance document being therefore "legal". We should stick to instance document conformance and decoder conformance and not introduce "legal", "strict", and "lax" at this stage.
skynavga commentedon Jul 26, 2017
palemieux commentedon Jul 26, 2017
@mikedo How do you interpret
{any attribute in TT Style namespace}?andreastai commentedon Jul 27, 2017
(@mikedo)
@mikedo: Can you point me to the spec text that sets this constraint?
@skynavga: This issue should not be closed for now. #196 is not a duplicate of this issue. It is more related to processors behaviour, while my question is about document conformance against the grammar defined in TTML1.
palemieux commentedon Dec 16, 2017
Below is my understanding of the steps involved with evaluation Document Conformance using the
tts:foo="bar"example above against http://www.w3.org/TR/2013/REC-ttml1-20130924/.styleallows any attribute in theTT Style Namespace, which is mutable. [ed.: it is ambiguous whether the declared value of each attribute satisfies the type declared by the associated Abstract Document Type applies sincetts:foois not defined in the specification]So AFAIK the document is conformant.
[ed.: this conclusion was changed from an earlier version of the comment]
Two important points in my mind:
Based on discussions with @nigelmegitt , a step (4) to Section 4 to prune attributes without a type declared by the associated abstract document type might be useful.
15 remaining items
andreastai commentedon Jan 3, 2018
@nigelmegitt
Good!
An option is to also add text regarding processor conformance. It could be mandated to ingnore unknown attributes (regardless from which namespace) and to not reject documents with unknown attributes. This should go in TTML2. It could also be discussed if it could be added as clarification in TTML1.
nigelmegitt commentedon Jan 4, 2018
@TairT Both!
palemieux commentedon Jan 9, 2018
See #196
css-meeting-bot commentedon Jan 9, 2018
The Working Group just discussed
Use of attributes in TTML namespace but NOT defined in TTML1 ttml1#251, and agreed to the following resolutions:SUMMARY: General agreement to allow documents vocabulary not defined in the spec but extra wording to be proposed by @tairtThe full IRC log of that discussion
<nigel> Topic: Use of attributes in TTML namespace but NOT defined in TTML1 ttml1#251<nigel> github: https://github.com//issues/251
<atai2> q+
<nigel> ack atai2
<nigel> Andreas: Two distinctions we made in the thread:
<nigel> .. 1. Attributes not defined in TTML1 - are they part of the TTML1 document model? Are they allowed in the syntax?
<nigel> .. 2. If the attributes are not yet defined in TTML1 but they appear, how should a processor behave and treat them?
<nigel> .. Both issues need to be discussed differently.
<atai2> q+
<atai2> ack atai2
<atai2> q+
<nigel> Glenn: The ambiguity is between style attributes defined in the TTS namespace and those
<nigel> .. listed in the TTML1 spec.
<nigel> Cyril: We should take the looser interpretation, allow things in the TTS namespace even if
<nigel> .. they are not defined.
<pal> q+
<nigel> Pierre: We should ask ourselves what problems that could cause for processors?
<nigel> Nigel: That's the same as processors seeing a TTML1 tts attribute profiled out.
<nigel> ack atai2
<nigel> Andreas: If you just want to make sure that expected vocabulary you expect then you
<nigel> .. need something stronger for say schema validation. If you make an error in attribute
<nigel> .. name spelling and allow a lax interpretation then it will not be spotted.
<nigel> ack pal
<nigel> Pierre: What's the difference between making a typo in a foreign namespace attribute and
<nigel> .. a TTML2 namespace attribute? And if a document has profiles that apply then they can
<nigel> .. impose stricter rules that a validator can use. Those things to me mitigate your point.
<nigel> Andreas: For foreign namespace attributes they are stripped out anyway and you do not
<nigel> .. care from a TTML1 processor perspective so that's different from TTML1 core vocabulary
<nigel> .. secondly, EBU for example did not put stricter rules in on the basis that the interpretation
<nigel> .. is that unexpected vocabulary is not allowed.
<nigel> .. Note Glenn's point in the thread that the schema provided a hint about the intent.
<nigel> Nigel: We need to get to a resolution here.
<nigel> Pierre: The downside I have heard is that schema validation won't catch some errors.
<nigel> Glenn: It significantly complicates schema validation if we use the looser interpretation
<nigel> .. because it will require adding a wildcard that does not exist now.
<nigel> Pierre: If you tell a validator to use a TTML1 model then I would expect a non-TTML1
<nigel> .. piece of vocabulary to generate a warning, which would show up typos.
<atai2> q+
<nigel> Nigel: I'm wondering about saying anyone who wants TTML2 defined syntax needs a
<nigel> .. TTML2 profile with stuff subtracted.
<nigel> Pierre: I wonder if we could add to the pruning list things not in the TTML1 defined vocabulary
<nigel> .. as well as non-TTML1 namespace content.
<nigel> Glenn: That would avoid the need for a schema change but the schema might end up
<nigel> .. overly restrictive.
<nigel> ack atai2
<nigel> Andreas: I wanted to ask Tess your opinion - there's a similar problem in WebVTT and
<nigel> .. maybe also HTML5, which is not XHTML5 because of the XML error handling.
<nigel> .. I wonder if there's a solution to separate document conformance from processor conformance.
<nigel> .. In WebVTT as far as I can see there is a clear line what an author is allowed to put in the
<nigel> .. document, but on the other hand the processor can support more. Is that correct?
<nigel> Tess: Yes that's correct.
<nigel> Andreas: So I think it makes sense in terms of general strategy to handle these cases
<nigel> .. like this.
<nigel> Glenn: I would not agree to use the same error strategy as in HTML and WebVTT.
<nigel> Pierre: The proposal on the table is to prune non-TTML1 defined vocabulary before validating
<nigel> .. for the purpose of TTML1 document conformance. After that profiles can do whatever
<nigel> .. they want.
<nigel> Tess: That's doing half of what Andreas suggests anyway.
<atai2> q+
<nigel> ack atai2
<nigel> ack
<nigel> ack atai2
<nigel> ack atai
<nigel> Glenn: The section to change would be §4 bullet 3. It would be consistent with the way
<nigel> .. we prune foreign elements.
<nigel> Andreas: I don't think so because foreign namespace attributes are specifically permitted
<nigel> .. in the model. Now we are discussing more - I am flexible if everyone agrees we should
<nigel> .. have this new approach, I can accept it but I still have concerns.
<nigel> Pierre: I think that's what we're saying. In addition to fixing bullet 3 of section 4, I think
<nigel> .. Andreas wants to state explicitly that, say, in §7.13 body, that it is any attribute in the
<nigel> .. TT style namespace not just those listed in the TTML1 vocabulary?
<nigel> Andreas: Yes, either this or do nothing. Then we don't want to do pruning for validation.
<nigel> Glenn: There's a major disconnect here - all of the foreign namespace elements and attributes
<nigel> .. are removed before considering element item definitions, therefore it is irrelevant what
<nigel> .. the "any attribute not in default of any TT namespace" is irrelevant for this purpose because
<nigel> .. it is post pruning. In fact it is misleading to have that in there in the first place.
<atai2> q+
<nigel> Nigel: If we do this we really need to have an informative statement explaining what is
<nigel> .. permitted and what is not.
<nigel> Pierre: I would add an example to section 4.
<nigel> ack atai2
<nigel> Andreas: We could add something to the end of 5.1 where we say [gap]
<nigel> Glenn: We've already done the work in the ED to prune out attributes not associated with
<nigel> .. the abstract document type.
<nigel> Pierre: My proposed step is for Andreas to craft some text that I can put in a pull.
<nigel> Andreas: From my interpretation the document model is strict but I would accept something
<nigel> .. else. I definitely will add some text to the issue for example to say in 5.1 that all undefined
<nigel> .. names in those mutable namespaces are part of the document model, regardless of which
<nigel> .. specification defines it.
<nigel> Pierre: I think we need an informative note and example explaining the difference between
<nigel> .. pre- and post-pruning syntax permission and behaviour.
<glenn> See https://github.com//issues/196 for issue where we updated section 4, item 3.
<nigel> Andreas: Okay I will add to the issue.
<nigel> SUMMARY: General agreement to allow documents vocabulary not defined in the spec but extra wording to be proposed by @TairT
skynavga commentedon Jan 9, 2018
As pointed out by @palemieux, we have already updated section 4, item 3 to explicitly prune unknown/undefined attributes from existing TT namespaces.
andreastai commentedon Jan 9, 2018
This text should be added as the end of section 4.
css-meeting-bot commentedon Jan 9, 2018
The Working Group just discussed
Use of attributes in TTML namespace but NOT defined in TTML1 #251.The full IRC log of that discussion
<nigel> Topic: Use of attributes in TTML namespace but NOT defined in TTML1 #251<nigel> github: https://github.com//issues/251
<nigel> Glenn: I'd reduce the example to a fragment here.
<nigel> Pierre: I'll take the action to add that.
skynavga commentedon Jan 9, 2018
A more minimal version of the above suggestion in the form of a note may be acceptable to me.
nigelmegitt commentedon Jan 9, 2018
@skynavga to propose an informal note at the end of §4.1 to state that the application of schemas for validation is expected nominally to occur post pruning.
andreastai commentedon Jan 9, 2018
The following text could be added as note before the existing note of section 4.1:
Clarify validation of undefined items in TT namespaces (#251)
Clarify validation of undefined items in TT namespaces (#251)