Re: UA style sheet for <q>-- why required?

On Fri, Oct 31, 2008 at 5:49 AM, Jim Jewett wrote:
>
> On Fri, Oct 31, 2008 at 12:07 AM, Robert J Burns wrote:
>
>> Without a default UA stylesheet (or some equivalent
>> styling mechanism) then the best a UA could
>> do would be to present the DOM tree as simply a tree
>
> That is already some styling; I was talking about the extremely basic
> degrade-to-text option, in which all elements are replaced by their
> content -- effectively stripping out the element names and attribute
> information.

Thinking a bit more about it, we're already losing data in such a
scenario as soon as the document contains an IMG element (losing its
ALT attribute's value).

> Plucker does not support CSS.  It has been on the TODO list for a few
> years, but ... given that plucker continues to support monochrome
> 160x160 pixel screens, the styling will never be extensive.
>
> There is (usually) a step which replaces unknown characters, but there
> is nothing else that modifies the text itself -- as a change to
> quotation marks would require.  I'm not saying it couldn't be done,
> but it would require an extra pass, and special logic, and ... maybe
> that development time is better spent elsewhere.

Given that Plucker has no CSS support, I guess what others are
proposing here is that it nevertheless inserts quotation marks
(following HTML 4: "Visual user agents must ensure that the content of
the Q element is rendered with delimiting quotation marks." [1])

[1] As to identify quotation marks, it appears that Unicode defines Pi
and Pf categories (along with Po, Ps and Pe actually) and a
Quotation_Mark property (search for Quotation_Mark in
http://www.unicode.org/Public/5.1.0/ucd/PropList.txt for the list of
such characters). This means that it's actually "quite easy" (you'd
still have to add some heuristics I guess, such as whether a quotation
mark at the start –just before or at the beginning of the content– of
Q is an opening/initial mark, or if a neutral or ambiguous one whether
there is white space preceding it –a quotation mark 'attached' to a
preceeding word is probably not an opening mark for the quotation–) to
identify quotation marks around or within a Q element and determine
whether to generate ones or not.
In brief, I tend to believe that it'd be possible for UAs to generate
quotation marks only when not already provided in content. So maybe
what's missing is "just" a way to tell whether to generate quotation
marks in case ones are already provided (would need cooperation with
the CSS WG).

-- 
Thomas Broyer

Received on Friday, 31 October 2008 14:28:23 UTC