- From: Lachlan Hunt <lhunt07@postoffice.csu.edu.au>
- Date: Wed, 05 Nov 2003 11:36:20 +1100
- To: ernestcline@mindspring.com
- Cc: W3C HTML List <www-html@w3.org>
Ernest Cline wrote: >>[Original Message] >>From: Lachlan Hunt <lhunt07@postoffice.csu.edu.au> >> >>1. <!ELEMENT blockcode (l)*> OR >>2. <!ELEMENT blockcode (PCDATA | l)*> >> >><snip/> (example program code) >> >> 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... > ><blockcode> >public static void <var>main</var>(String[] <var>args</var>) { > <var>System.out.println</var>("Hello World"); // Output <samp>Hello >World!</samp> >} ></blockcode> > This could still be done with <!ELEMENT blockcode (l)*> as the content model, (though each line would have to begin and end with <l>) since <l> can contain all the inline elements ... <l><var>System.out.println</var>("Hello World"); // Output <samp>Hello World!</samp></l> ... >> 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. > I agree. The second version should have actually been: <!ELEMENT blockcode (PCDATA | Inline)*> rather than just (PCDATA | l)*, I was just only thinking of the <l> element at the time and made a mistake. CYA ...Lachy
Received on Tuesday, 4 November 2003 19:36:24 UTC