Re: The <blockcode> and <l> elements

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Lachlan, list members,

Am Dienstag, 4. November 2003 14:50 schrieb Lachlan Hunt:
> 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)*>
I wouldn't change it.
Imagine:
<blockcode>
<h>\chapter{introduction}</h>
<p>This is really interesting stuff.</p>
</blockcode>

Marking up LaTeX or XHTML using XHTML in a <blockcode/> while also 
demonstrating the results of the markup.

> Real program
> code cannot contain headings, paragraphs or lists, only lines of code,
> therefore, the current content model is semantically incorrect.
True for the code itself.
But still, markup must be possible. Links must be possible. Emphasis must be 
possible. Where to stop?
Some Java Markup in XHTML 2.0 could look like this:
<blockcode>
<l><span class="modifier">public</span> <span class="modifier">class</span> 
Hello {</l>
<l>    <span class="modifier">public</span> <span 
class="modifier">static</span> <span class="primitive">void</span> <span 
class="methoddef">main</span>(<span class="reftype java_lang">String</span>[] 
args) {</l>
<l>        <span class="reftype java_lang">System</span>.<span class="reftype 
java_io">out</span>.println(<span class="literal">"Hello, World"</span>);</l>
<l>    }</l>
<l>}|/l>
</blockcode>
Though the above example does not contain markup outside <l/> elements, I just 
gave it to demonstrate the usefulness of markup within <blockcode/> in 
general, I don't see why there mustn't ever be any markup within <blockcode/> 
outside <l/> elements.
For instance, in Java, I could want to use the class declaration as a 
blockcode heading:
<blockcode>
<h><span class="modifier">public</span> <span class="modifier">class</span> 
Hello {</h>
<!-- ... -->
</blockcode>

Thus I would have a heading without the need to repeat it by using a 
<section/> with its own <h/>.


Bye
- -- 
ITCQIS GmbH
Christian Wolfgang Hujer
Geschäftsführender Gesellschafter (Shareholding CEO)
Telefon: +49  (0)89  27 37 04 37
Telefax: +49  (0)89  27 37 04 39
E-Mail: Christian.Hujer@itcqis.com
WWW: http://www.itcqis.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/qSAjzu6h7O/MKZkRAlcaAKDG11IP/oJmthkk+9MRzzVo0ZBJvgCgjeyl
Mz0nteRk72ZUHq5P34KmErI=
=0KVR
-----END PGP SIGNATURE-----

Received on Wednesday, 5 November 2003 11:42:02 UTC