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

RE: The <blockcode> and <l> elements

From: Jewett, Jim J <jim.jewett@eds.com>
Date: Tue, 4 Nov 2003 09:09:28 -0500
Message-ID: <B8CDFB11BB44D411B8E600508BDF076C1A745B22@usahm010.exmi01.exch.eds.com>
To: www-html@w3.org

Lachlan Hunt:

	public static void main(String[] args) {
	<l>    System.out.println("Hello World");</l>
	... it is not logical for some lines of code to 
	have the <l> and other's to not.

In this example, yes.  But it would make more sense if
executable code had line markings and comments didn't,
or if the line markings were a form of emphasis.  (This is
an example, you don't have to do it this way, but see line
seven for the critical part and line 11 for a gotcha.)

Whether this should still be called "code" probably depends
on the whitespace conventions of the language being written.

	Also, with the existing content model, it is possible 
	to include virtually any element (all?) like <h>, <p>, 
	<ul>, etc...  Real program code cannot contain headings, 
	paragraphs or lists, only lines of code, 

Comments -- including function headers -- often contain all
of these things, as do documentation strings.  Whether they
should be shown as lists or as the raw PCDATA used to make
that list is probably a fair question.

	<p>This is a paragraph with a <l></l> line break in the middle.</p>

	This (poor) use, obviously, has no more structure than the <br/> 

	... specify in the DTD or Schema that this element *cannot* be

I would expect that to produce two line breaks - one at each end of the
marked line.  That seems OK to me; if you're worrying about individual 
lines, then the layout is semantically important.  The blank lines 
between stanzas of poetry (or blocks of code) do matter, at least in 
some cases.

Received on Tuesday, 4 November 2003 09:09:40 UTC

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