Sorry for the late reply, I had to read the whole thread in www-html first and was away for a few days.

Ian Hickson:
On Mon, 23 May 2005, Christoph Päper wrote:
Ian Hickson:

 <section>
   <div class="pov Foo">...</div>
   ...

...has no semantics apart from delineating one section. Remember that class="" and <div> are meaningless. A document has the same semantics after you strip out any class attributes and <div> elements.

You say that and some others share that point of view, but I (and probably others) disagree. It is true that 'div' or 'class' don't provide semantics directly, but they do indirectly: Everything inside a 'div' belongs together somehow and everything that shares a class (inside a document instance) is related to each other somehow. You cannot know /how/, but /that/.

If one doesn't like

  <section><div class="foo"><p/>+</div>+</section>

for the added level in the document tree, then he might use the semantically similar

  <section><p class="bar"/>+<p class="baz"/>+</section>.

'div' is the proper HTML element type for subdivisions (of sections) that
actually are not sections.

According to what specification? According to HTML4, <div> only "defines content to be block-level" (whatever that means!).

HTML also calls it a element type for grouping (alongside 'span'). [Well, actually it just calls it an element, not an element type.]

Anyhow you can still group paragraphs by wrapping them in a division instead of dividing them by a separator. The latter is IMO not a very markupish approach.

The paragraphs are all part of the <section> (chapter).

Yes.

> They're not further grouped together, IMHO.

All paragraphs that share a perspective or language or something are logically linked, they belong to one group (or class) and maybe to others, too. It can make sense to express this in mark-up. Then it's easy (depending on your styling language of choice) to add visual (or aural) clues to make the changes in perspective (or language) visible. That doesn't have to be a more or less fancy rule or pause, but may be a change in font, color, sound etc.

If they are wrapped together by any element, they definitely are grouped together.

> An <hr> is equivalent to a <p> with the
content "Meanwhile, somewhere else..." or similar ("From someone else's point of view...", "At another time...").

No, it's not. You are connecting it with the succeeding element
instance, but it's not.

Anyhow, if it was, why wouldn't you use a 'p' with that content or an empty one?

   <p><q>No!</q> said Fred.</p>
   <hr>
   <p>The tree stood alone.</p>

   +----------+ +--------------+-------+
   |  _____   | | Meanwhile... |       |
   | < No! >  | +--------------+       |
   |  \/^^^   | |         /|\          |
   |  o       | |         /|\          |
   | -+-      | |          |           |
   | / \      | |          |           |
   +----------+ +----------------------+

my point is that the <hr> here is a unit on par with a paragraph,

So why is it rendered embedded into the box of one of the paragraphs? Shouldn't it be a child of it then?

> it's not an artefact of an implied higher level grouping.

Show me the whole text, I'll show you the higher level grouping.

If we didn't have <hr>,
   <p>* * *</p>

Or "<p/>" or "<p><img src="fancy-divider" alt="* * *"></p>".
Does this provide the semantics? (IMHO it does not, because 'hr' or 'plot' are one level higher than the 'p', but) if so, why should we retain that limited 'hr' element type, which could ambiguously be in par with other elements than 'p' (as in "</section><hr><section>")?

I really don't think:

    <p><q>No!</q> said Fred.</p>
   </plot>
   <plot>
    <p>The tree stood alone.</p>

...would be better than <hr>,

I do. (Although I'm fine with using 'div' for this.)

in fact I think it would be unnatural from an authoring perspective.

I, on the opposite, think that it's unnatural to mark the end of one thing and the start of a second, but neither the start of the first nor the end of the second. The reason you can do this in a printed work is, that these are *implied* by chapter starts and ends. In SGML that translates to something like (simplified)

  <!ELEMENT section - - (h?, (hr*|p*)) -- a chapter -->
  <!ELEMENT hr      O O (p*)>

such that

  <section>
    <h>Foo</h>
      <p>Bar</p>
    <hr>
      <p>Baz</p>
  </section>

generates this tree:

  section
    h
      "Foo"
    hr
      p
        "Bar"
    hr
      p
        "Baz"

(My DTD skills are rusting, but I think this magic is actually possible.) XML DTDs are not that powerful, so we would have to rewrite this to:

  <!ELEMENT section (h?, (hr*|p*))>
  <!ELEMENT hr      (p*)>

  <section>
    <h>Foo</h>
    <hr>
      <p>Bar</p>
    </hr><hr>
      <p>Baz</p>
    </hr>
  </section>

That's the same as above, just well-formed.

> We mustn't fall into the trap of considering everything to be a
> hierarchy, just because that is what XML most easily marks up.

I'm trying not to, but in all the alledged use cases that have presented in favor of 'hr' or 'separator', I see a structure (or hierarchy), that demands not a divider but a grouper.

Book authors have managed quite well for centuries without
considering their documents to be formed of trees!

I don't think so. They're just not that much aware of it, they do it subconsciously (at least the good ones).

        Christoph Päper

Reply via email to