Ordered list syntax.

John Gruber gruber at fedora.net
Sun Mar 28 22:04:16 EST 2004


Jelks Cabaniss <jelks at jelks.nu> wrote on 03/28/04 at 2:09p:

> A quick clarification, since I see this issue has already been decided on
> for Markdown.

I'm not sure which issue you're talking about, but most of the list
stuff we're talking about here has *not* been decided. Or at least
not by me. :^)


> We weren't talking about adding <foo> elements (although that can certainly
> be done), just adding several attributes from 1.0 Transitional to a slightly
> modified 1.0 Strict DTD.  Then not only is your schema documented, your
> documents validatable, but browsers do what's expected -- the best of all
> worlds.  
> 
> Email me off-list if you'd like to know how (it's really not difficult at
> all.)

I agree that a change like this to the XHTML 1.0 Strict DTD wouldn't
be that difficult. But it simply doesn't sound very appealing to the
typical user. If I decide to support list syntax that generates HTML which uses attributes that are deprecated in the W3C's Strict DTDs, I'll just document it as such and recommend:

a.  If you create lists that start at ordinals other than 1, you should
    specify a Transitional DTD in your markup.

b.  If you want to validate using a Strict DTD, then you must
    start your Markdown lists at the first ordinal (`1`, `a`, `A`,
    etc.)


> To John: I think you were pretty much between a rock and a hard place on
> this, and given that you had to decided to stick with emitting XHTML 1.0
> Strict, you made probably the best choice possible.

I'm glad you agree about the choice being rock-vs.-hard-place. But
I'm unsure at the moment about what I'm going to do.


> I (and a number of others) don't care for emitted inline CSS (shades
> of MS Word!:), but in our granted rather infrequent use of alternate
> list-style numbering, there's always  fallback to embedded HTML.

I don't understand this adamant opposition to inline CSS. For
example, to produce an ordered list using letters, would you be
opposed to this?
    
    <ol style="list-style-type: lower-alpha">
    <li>First</li>
    <li>Second</li>
    </ol>

If so, why?

It produces the same rendered output in a browser as this:

    <ol type="a">
    <li>First</li>
    <li>Second</li>
    </ol>

but has the added benefit of validating under Strict DTDs. This is
exactly how the W3C recommends doing this. It's not inline CSS for
the purposes of *layout* or *design*.

 
-J.G.


More information about the Markdown-discuss mailing list