[Doc-SIG] Alternative inline markup

Moore, Paul Paul.Moore@atosorigin.com
Fri, 9 Nov 2001 09:25:55 -0000


From: Alan Jaffray [mailto:jaffray@pobox.com]
> > It's interesting to note that in HTML, <a> elements
> > *don't* nest - so prior art here says that nesting
> > isn't useful for links.
> 
> Uh, that's not how I read the `HTML4 DTD`__ ... ::
> 
>     <!ELEMENT A - - (%inline;)* -(A)       -- anchor -->
>     <!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | 
> %special; | %formctrl;">
>     <!ENTITY % special "A | IMG | OBJECT | BR | SCRIPT | MAP 
> | Q | SUB | SUP | SPAN | BDO">

Sorry, I didn't look at the spec. Pragmatist that I am, I tried it :-)

On IE5.5 (not a bastion of standards-compliance, I know...) nested links
confuse it horribly. In <a href=1>first<a href=2>nested</a>second</a>,
"first" becomes a link to "1", "nested" becomes a link to "2" and "second is
not a link at all!

Even ignoring IE5.5, what would you expect "nested" to link to? (I know,
"2", but where's the nesting in that?)

So what I'm saying is that nesting is only semantically meaningful in
certain cases (assuming your point that there's no semantic meaning to
nested strong and emphasized, then I'm not sure we actually have a case of
meaningful nesting at all, but ignore that for now...). We need to codify
when nesting makes sense, *before* we decide how to spell it in those cases.

Your mission, should you choose to accept it [:-)], is to write down, in
excruciating legalese, precisely which inline constructs (as per the reST
spec) should nest. My answer is fairly simple - none. (I would have said
that strong and emphasized could nest in each other, but I've been convinced
that I'm thinking in display terms rather than semantics. And I can see
reasons for allowing strong/emphasized to go inside links, but I don't think
those reasons are strong enough to make the case.)

Paul.