- From: Ernest Cline <ernestcline@mindspring.com>
- Date: Tue, 4 Nov 2003 13:10:55 -0500
- To: "W3C HTML List" <www-html@w3.org>
> [Original Message]
> From: Lachlan Hunt <lhunt07@postoffice.csu.edu.au>
>
> Hi,
> Should the <blockcode> element's content model be changed from:
>
> <!ELEMENT blockcode (PCDATA | Inline | Heading | Block | List)*>
>
> to something more like:
>
> 1. <!ELEMENT blockcode (l)*> OR
> 2. <!ELEMENT blockcode (PCDATA | l)*>
>
> These could be written, respectively,as:
>
> 1.
> <blockcode>
> <l>public static void main(String[] args) {</l>
> <l> System.out.println("Hello World"); <span class="comment">//
> Output Hello World!</span></l>
> <l>}</l>
> </blockcode>
>
> OR:
>
> 2.
> <blockcode>
> public static void main(String[] args) {
> <l> System.out.println("Hello World");</l>
> }
> </blockcode>
>
> For version 2, IMHO, it is not logical for some lines of code to have
> the <l> and other's to not. Version 1, IMO, represents more
> semantically what program code is -- many lines, making up a code block.
Several comments:
First, don't take away Inline as part of the content model for blockcode.
While I disagree on their utility, as long as they are part of the XHTML 2
proposal, I definitely want to be able to make use of the inline
programming elements for such purposes as:
<blockcode>
public static void <var>main</var>(String[] <var>args</var>) {
<var>System.out.println</var>("Hello World"); // Output <samp>Hello
World!</samp>
}
</blockcode>
> 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,
> therefore, the current content model is semantically incorrect.
A good argument against including the non-inline elements but not the
inline.
Even without the <var> and <samp> elements, I would still want to be able
to apply other inline elements such as <em> and <span> inside of a
blockcode.
Received on Tuesday, 4 November 2003 13:15:20 UTC