[Standards-JIG] Re: JEP-0071 XHTML-IM lack of scope

Byron Ellacott bje at apnic.net
Thu Sep 2 00:43:41 UTC 2004


Peter Saint-Andre wrote:
> In article <4133C19D.2020606 at apnic.net>, Byron Ellacott <bje at apnic.net> 
> wrote:
>>the <em/> element is not about italics, it's about emphasis.
> Indeed it is:
> http://www.saint-andre.com/elegant-html/1_09.html

I'll use these terms from here on, to keep things clear.  I generally 
prefer "structural markup" versus "presentational markup" since that 
suggests, to me, that they do different things that sometimes have the 
same effect.

>>The main reason XHTML seems like a bad fit 
> A bad fit for addressing the requirements of lightweight text formatting?

Yes.

>>is you specify a relatively 
>>small subset of XHTML to use, and for the things which aren't available 
>>in XHTML, you specify a very small subset of CSS to use, which includes 
>>font-weight and font-style.  
> Is this inconsistent in some way?

No, it's just that XHTML overlaps the JEP's requirements.  There's that 
bit missing from XHTML that a small part of CSS provides.  XHTML alone 
doesn't quite fit, and CSS alone doesn't quite fit, and so you use both.

>>Is it better for a client to generate <em/> 
>>or <span style="font-style: italics"/> elements when the user requests 
>>italics?  
> This is addressed by Business Rule #3:
[snip rule #3]
> Now, we know that users (and even HTML authors) don't know anything 
> about the distinction between logical and physical, because plenty of 
> people still mark up their pages with <b> and <i>. But perhaps people 
> are smarter than protocol geeks, and what they really wanted all along 
> was bold and italics, not strong and emphasis....

This is, in fact, what I'm suggesting.  If the user requests that a 
piece of text is to be sent as italics, shouldn't the client use <span 
style="font-style: italics"> rather than <em>, since the user asked 
specifically for italics, not for emphasis?  This line of argument is, 
as Rachel Blackman pointed out, just ideology.  It's pretty irrelevant. 
  As you said, it doesn't seem to matter that some people don't see <em> 
as italics.

> Perhaps removing the CSS features would make people happier?

Probably not, since then you'd lose the ability to control most of the 
appearance of the text - you'd only be left with the structural 
elements, and those two oddballs, <em> and <strong>.

>>One final example:
>><span style="text-style: none !important;">
>>   <em>What does this look like now?</em>
>></span>
> What does it look like in a web browser? Go here to see:

It looks like I wasn't thinking when I gave the example.  !important 
doesn't work like I was suggesting it works, which I should've known, 
and I guessed at the wrong CSS attribute name and value, it should have 
been font-style: normal.  Please ignore my screwups. :)

The introduction you've recently added to the JEP to clarify its scope 
has actually defined a broader scope than I was working with.  I was 
imagining users selecting chunks of text to make bold, or bigger, or 
green, not putting in headings, quotations and paragraph structures.

I still imagine that will be by far the most common use.

And in that case, XHTML is just getting in the way.  Consider what 
information XHTML is adding in this example:

  <body xmlns="http://www.w3.org/1999/xhtml">
   <p>She had the most lovely <span style="color: blue">eyes</span>.</p>
  </body>

First up, we've got to put in the <p> element, since the <body> element 
cannot have inline elements as direct children.  Next, when we want to 
use colour to 'subtly' tell our friend about the lady's eyes, we've put 
in an XHTML span, simply as a container for the style.  In this bit of 
text, the only important parts are the text, and the bit that says 
"color: blue."

Since the XHTML's only purpose is to serve as a carrier for the real 
formatting information in the CSS, it doesn't strike me as a good fit 
for solving the problem.

Now I'm going to shoot my own arguments down.  The JEP as it stands is 
well written and effective.  It is currently working, and in my opinion 
ready for real world use.  As such, I can't really recommend that you 
stop using XHTML.  The fact that there are working implementations of 
XHTML-IM (as far as I know, anyway) speaks strongly in favour of not 
altering it at this point.  XHTML may be (in my view) a bad fit, but it 
/does/ fit in the end.

-- 
bje



More information about the Standards mailing list