Re: The <blockcode> and <l> elements

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

Hi Lachlan,

Am Mittwoch, 5. November 2003 01:36 schrieb Lachlan Hunt:
> >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>
> ...
I again disagree ;-)

It's really annoying having to markup all lines using an XSLT 2.0 regular 
expression, a vim :%s#^.*$#<l>\1</l># or something similar instead of simply 
including the source in <blockcode 
xml:space="preserve"><![CDATA[...]]></blockcode> or <blockcode 
style="white-space:pre;"><![CDATA[...]]></blockcode>.
For untagged source, <l/> is imho totally superflous.

> 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.
Okay, then think of markup up a group of lines for giving them an id.
<blockcode>
<div class="class" id="class_A">
<l>public class A {</l>
<div class="method" id="method_A_someMethod1">
<l>public void someMethod() {</l>
<l>System.out.println("Hello, World!");</l>
<l>}</l>
</div>
</div>
</blockcode>
<p>See method <code href="#method_A_someMethod1">someMethod()</code> in the 
above example <code href="#class_A">class A</code>, it just ...</p>

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/rzpAzu6h7O/MKZkRAsPNAKCi7lBgo8A+7x6eZkj4s2AiNV7lkQCfSH5g
qvhHZM1ArQG3Zz6vLp3eR9k=
=px7+
-----END PGP SIGNATURE-----

Received on Monday, 10 November 2003 02:16:27 UTC