On 6/29/11 4:04 PM, Adam Ruppe wrote:
Nick Sabalausky wrote:
I'm firmly in the camp that HTML *is* presentation.

The problem here is two things can look the same, but should be
treated differently by post-processing programs.

For example, lists of members. The presentational style code in
std.ddoc now generates this kind of thing:

<dl>
     <dt>enum Foo</dt>
     <dd><dl>
         <dt>member1</dt>
     </dl></dd>

     <dt>struct Bar</dt>
     blah blah blah
</dl>

Now, suppose you want to do a post-processor of some sort to grab all
enums. It's more painful than it has to be - instead of using the
html structure, you've gotta scan the inner text too for the keywords.


You might want them to look the same, but it's still sometimes helpful
to be able to differentiate them by some kind of metadata.


I'm not really against having both presentational and semantic
data in the html, since the post-processor can always strip out
stuff it doesn't care about.

But, if that semantic stuff isn't present, it causes pain for
other scenarios down the line. (Contrast to missing presentational
stuff, which can be fairly easily regenerated with rich enough
semantics.)


When I get around to updating std.ddoc, I'll have it looking almost
the same except I'd add class="struct" and class="enum" to the
list macros too.

Yes please. Excellent point.

Andrei

Reply via email to