-
Notifications
You must be signed in to change notification settings - Fork 12
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
Clarified TAB character presentation semantics #258
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d1ab77e
Clarified TAB character presentation semantics (#235)
palemieux 23d65eb
Addresses https://github.com/w3c/ttml1/pull/258#discussion_r151732684
palemieux 9e00ee2
Merge branch 'master' into issue-235-tab-presentation-semantics
nigelmegitt ef7811c
Address https://github.com/w3c/ttml1/pull/258#discussion_r154138166
palemieux d8f432c
Removed ignored artifacts
palemieux 128731f
Revert "Removed ignored artifacts"
palemieux 828e3ca
Removed build artefacts
palemieux 8e46b83
Merge branch 'master' into issue-235-tab-presentation-semantics
palemieux File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change as follows:
Add normative text:
"If an unnormalized U+0009 Horizontal Tab (HT) character appears in a character information item of a Reduced XML Infoset, then, when presented visually, that HT character may be treated as if it were a single U+0020 (SPACE) character."
then change note to read
"Because the presentation semantics of U+0009 Horizontal Tab (HT) are not fixed, the use of HT in
<code>#PCDATA</code>
content is not recommended."There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proposed note does not include the observation that the TAB (U+0009) character is not collapsed when
xml:space="default"
, which is was led to this issue in the first place.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And, the reason it does not include that observation is that it is incorrect. In fact,
xml:space='default'
maps to XSL-FO semanticswhite-space-collapse='true'
, which, for mixed elements, non-line-initial HT are required to be mapped SPACE. It is only the edge case of a mixed element line-initial HT where XSL-FO is unclear on whether it is mapped to SPACE or not, and there is some (indirect) evidence in XSL-FO that it is.Therefore, there is no question that HT in non-line-initial positions in mixed content are mapped to SPACE (and therefore subject to normal SPACE collapse rules). Only in the case of line-initial HT in mixed content does a possible ambiguity arise. Furthermore, it would be very odd indeed for an implementation that collapses non-line-initial HTs (which is required) to not also collapse line-initial HTs. In fact, I know of no such implementation.
Even if an implementation did not collapse line-initial HT to SPACE, there are other presentation semantics in XSL-FO that essentially imply that XML white space at a line break are not presented, i.e., do not consume IPD space, except when
white-space-collapse='false'
.In TTML2 we clear up the ambiguity by requiring that line-initial XML whitespace be collapsed when
white-space-collapse='true'
applies. In other words, we explicitly make the semantics equivalent to the CSS2.1 clarified semantics. We can do this with some confidence that it will not cause an interoperability problem because we know with reasonable certainty that no TTML1 implementation fails to collapse line-initial XML white space.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make the same change to clear up the ambiguity in TTML1 Third Edition then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was my original proposal (above), but @palemieux desired to not mandate collapse of HT as specified in TTML2, but instead (effectively) make it optional. Personally, I have no problem making it mandatory in TTML1 3Ed, which IMO, has very little likelihood of requiring a change in any implementation, since they are already doing the "right thing".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about: No presentation semantics are specified for the TAB (U+0009) character. Furthermore, the TAB (U+0009) character can generate a glyph area. As a result, the use of the TAB (U+0009) character in
#PCDATA
content withinp
andspan
elements is not recommended.