W3C home > Mailing lists > Public > www-html@w3.org > November 2002

Re: Subheadings desired in XHTML 2.0

From: Thomas Hurst <tom.hurst@clara.net>
Date: Sun, 17 Nov 2002 13:52:44 +0000
To: www-html@w3.org
Message-ID: <20021117135244.GA47715@voi.aagh.net>

* 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 :


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:

    <line><comment>#!/usr/bin/env ruby</comment></line>
    <line>if <var>foo</var></line>
      <line><func>puts</func> <var>bla</var></line>

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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:01 UTC