This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 10829 - Remove the whitespace from the <rp> example
Summary: Remove the whitespace from the <rp> example
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-29 13:37 UTC by i18n CJK group
Modified: 2012-01-31 22:34 UTC (History)
10 users (show)

See Also:


Attachments
Ruby in IE showing white-space is kept around. (894 bytes, image/png)
2010-09-30 19:50 UTC, I18n Core WG
Details

Description i18n CJK group 2010-09-29 13:37:00 UTC
Comment from the i18n review of:
http://dev.w3.org/html5/spec/

Comment 6
At http://www.w3.org/International/reviews/0802-html5/
Editorial/substantive: E
Tracked by: RI

Location in reviewed document:
4.6.18 The ruby element [http://www.w3.org/TR/2010/WD-html5-20100624/text-level-semantics.html#the-ruby-element]

Comment:The code samples in the ruby section are misleading because they show white-space between the components that should not be there. 

eg.

...

<ruby>

 &#28450; <rt> &#12363;&#12435; </rt>

 &#23383; <rt> &#12376; </rt>

</ruby>

...

Please either show the examples as the code should look, eg.

...

<ruby>&#28450;<rt>&#12363;&#12435;</rt>&#23383;<rt>&#12376;</rt></ruby>

...

or add a note to say that the extra white space is there to show the structure clearly, but should not be copied.

Similar comments apply to the examples in the rp section that follows.
Comment 1 Ian 'Hixie' Hickson 2010-09-30 09:06:46 UTC
Would the white space actually affect the rendering? i.e. why is the whitespace bad?
Comment 2 fantasai 2010-09-30 09:27:24 UTC
(In reply to comment #1)
> Would the white space actually affect the rendering? i.e. why is the whitespace
> bad?

Chinese and Japanese do not use white space to separate words or other linguistic constructs. Therefore in these languages white space should not be introduced between characters.

The white space collapsing rules in CSS2.1 do allow UAs to collapse white space surrounding a line feed to nothing; however this is not normatively required, and only IE has implemented this behavior. Additionally, the css3-ruby spec still does not define its interaction with white space collapsing rules. Even the line break transformation rules were normatively defined (which they will be in css3-text), to correctly collapse away white space between the base characters when using Pinyin ruby, the white space processing rules would have to ignore the ruby text.

Given these complications, it is therefore safer to not include such white space in the source markup, and the HTML5 spec should adopt such a practice in its examples.
Comment 3 I18n Core WG 2010-09-30 19:50:05 UTC
Created attachment 919 [details]
Ruby in IE showing white-space is kept around.
Comment 4 I18n Core WG 2010-09-30 19:53:01 UTC
If drop the code in the example into a file and look at it in Chrome, the white-space disappears, but look at it in IE (on which this markup is supposed to be modelled) and you see the spaces in the text (see attachment just above). 

I wasn't able to tell from the spec why this should be treated differently from other phrasing content elements, such as span, where white-space is not automatically removed.

This also brings into question the intended use of ruby markup. Some people view ruby markup as a mechanism that could be used for things like linguistic glosses (in fact i had a query from a member of the public just today about exactly that). In such cases they may want to annotate a string of words separated by spaces.  If spaces are removed automatically from the outside edges of the base text, they would be forced to use separate <ruby> elements for each word annotated in such a sentence - which seems counter to the change in the HTML5 ruby markup model that allows several ruby base/text pairs within a single <ruby> element vs the more cumbersome Ruby Annotation model, where each simple ruby pairing had to have it's own <ruby> element. In other words, if white space is removed from around the base of HTML5 ruby, then presumably several pairs of ruby+ruby text should only be used with Japanese and Chinese.

It's beginning to appear to me that this reveals a substantive rather than a merely editorial issue.
Comment 5 Ian 'Hixie' Hickson 2010-10-07 19:51:07 UTC
I'll take comment 2, comment 3, and comment 4 to be a "yes" to comment 1. A simple "yes" would have sufficed. :-)

EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter's comments.
Comment 6 contributor 2010-10-07 19:52:35 UTC
Checked in as WHATWG revision r5590.
Check-in comment: Fix the markup to match the example renderings.
http://html5.org/tools/web-apps-tracker?from=5589&to=5590
Comment 7 Richard Ishida 2011-07-27 13:36:02 UTC
Thanks for the fixes to 4.6.20 The ruby element in the LC version, although I noticed that there's a trailing space on the last <rt> element in the first two examples.  Is that intentional?

The main purpose of this comment, however, is to mention that 4.6.22 The rp element in the LC version still has the original problem.  

If you really wanted to have the spaces beside the parens, you should add those to the rp element (because otherwise you'd have an anomaly between the last paren and the following text).  But actually, in Japanese text you wouldn't have such space characters anyway.
Comment 8 Martin Dürst 2011-07-28 00:49:51 UTC
(In reply to comment #7)

> The main purpose of this comment, however, is to mention that 4.6.22 The rp
> element in the LC version still has the original problem.  
> 
> If you really wanted to have the spaces beside the parens, you should add those
> to the rp element (because otherwise you'd have an anomaly between the last
> paren and the following text).

Yes indeed.

> But actually, in Japanese text you wouldn't
> have such space characters anyway.

Not exactly true. JIS X 4051 defines parentheses as half-width, with a half-width space attached to the outside, to together result in a full-width block. When there is a need for stretching or shrinking the line, the parentheses isn't affected, but the space is streched or shrunk. See also http://www.w3.org/TR/jlreq/#en-subheading2_1_2. Ideally, this should happen automatically, independent of whether it's a half-width (ASCII) parenthesis or a full-width parenthesis (which has the half-width space 'built-in'). But current Web layout technology isn't there yet (at least not as far as I know), so it may need to be faked. Using a half-width (ASCII) parenthesis and a half-width (ASCII) space (outside the parenthesis, but inside the <rp>) is one way to do that. Using a full-width parenthesis is another way to do it.
Comment 9 Michael[tm] Smith 2011-08-04 05:36:03 UTC
mass-move component to LC1
Comment 10 Ian 'Hixie' Hickson 2011-08-06 03:31:05 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with comment 7
Comment 11 contributor 2011-08-06 03:33:47 UTC
Checked in as WHATWG revision r6380.
Check-in comment: didn't fix this properly in r5590
http://html5.org/tools/web-apps-tracker?from=6379&to=6380
Comment 12 Kang-Hao (Kenny) Lu 2011-12-08 12:46:25 UTC
You forgot to fix the example for rp.
Comment 13 Ian 'Hixie' Hickson 2012-01-31 22:33:02 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter's comments.
Comment 14 contributor 2012-01-31 22:34:07 UTC
Checked in as WHATWG revision r6954.
Check-in comment: Make this example more realistic.
http://html5.org/tools/web-apps-tracker?from=6953&to=6954