RE: The <blockcode> and <l> elements

Lachlan Hunt:

	<blockcode>
	public static void main(String[] args) {
	<l>    System.out.println("Hello World");</l>
	}
	</blockcode>
 
	... 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
empty.  


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.

-jJ

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