Re: Subheadings desired in XHTML 2.0

* fantasai (fantasai@escape.com) wrote:

> Thomas Hurst wrote:
> > * fantasai (fantasai@escape.com) wrote:
> > <p><line>if foo</line>
> >    <line>    puts bla</line>
> >    <line>end</line></p>

> > Would be:
> >
> >  if foo puts blaend
>
> No, it would be "if foo puts bla end". There's whitespace between
> 'bla' and 'end'.

Well, OK, so the original example would only render as you suggested if
the <line> lost it's whitespace, and :

  <h>Foo
     <line>Subfoo</line></h>

Would not result in FooSubfoo.

However, I still don't see why:

  <p><line>if foo</line><line>puts bla</line><line>end</line></p>

Should behave any differently - a <line> is not a <span>.  It should be
roughly equivilent to a <div> if anything.

> Code, btw, should be put in a <pre>, as it's "preformatted".

No, the use of <line> to mark up code is perfectly valid -- it's even
the provided example for the use of <line> in XHTML 2.0.

With <line> you can automatically number lines, hide particular lines,
create anchors for lines without overloading on a[id], style particular
lines (e.g. line:nth-child(odd) { background: #ccc; } or line.comment {
color: orange; }), and so on.

Really, part of me would like to do:

  <blockcode>
    <line><comment>#!/usr/bin/env ruby</comment></line>
    <line>if <var>foo</var></line>
    <indent>
      <line><func>puts</func> <var>bla</var></line>
      <line><var>bla</var>.<func>wibble!</func></line>
    </indent>
    <line>end</line>
  </blockcode>

It would make code highlighting much nicer - ATM it tends to be done
using <pre> and <span> soup.

[ponders whether <ol> would be suitable for something like this..]

-- 
Thomas 'Freaky' Hurst  -  freaky@aagh.net  -  http://www.aagh.net/
-
Every creature has within him the wild, uncontrollable urge to punt.

Received on Sunday, 17 November 2002 08:52:54 UTC