[Laszlo-dev] escaped code in live examples

Lou Iorio liorio at laszlosystems.com
Tue Oct 23 10:01:32 PDT 2007


I didn't change to angle brackets, I removed the escaped code  
altogether.  When I build,
I see no difference whether the escaped code is there or not.

I think the code shown in the html gets put there by the build.

On Oct 23, 2007, at 12:51 PM, Benjamin Shine wrote:

>
> Seems like it wouldn't validate as docbook with angle brackets,  
> unless docbook explicitly allows anything at all inside <example>  
> and <informalexample> tags. Does the whole build still run and the  
> examples work if you do it with normal brackets?
>
>
>
> On Oct 23, 2007, at 9:40 AM, Lou Iorio wrote:
>
>> What is the purpose of the escaped code in live examples?
>>
>> In the debug chapter (example 50.2) we have this:
>>
>>
>> <<example role="live-example">
>>    <title>Runtime exceptions printed once per line</title>
>>    <programlisting language="lzx">
>>    <textobject><textdata fileref="programs/debugging-$3.lzx"/></ 
>> textobject>
>>    </programlisting>
>> </example>
>> <?informalexample role="live-example"><programlisting role="lzx- 
>> embednew"><filename>debugging-$3.lzx</filename><parameter/><code>
>> &lt;canvas debug="true" height="150"&gt;
>>   &lt;handler name="oninit"&gt;&lt;![CDATA[
>>     for (var i = 0; i &gt; 10; i ++) {
>>       canvas.width();
>>     }
>>   ]]&gt;&lt;/handler&gt;
>> &lt;/canvas&gt;
>> </code></programlisting><programlisting>
>> &lt;canvas debug="true" height="150"&gt;
>>   &lt;handler name="oninit"&gt;&lt;![CDATA[
>>     for (var i = 0; i &gt; 10; i ++) {
>>       canvas.width();
>>     }
>>   ]]&gt;&lt;/handler&gt;
>> &lt;/canvas&gt;
>> </programlisting><?lzx-edit programs/debugging-$3.lzx></ 
>> informalexample?>
>>
>> As far as I can tell, this does exactly the same thing:
>>
>> <example role="live-example">
>>    <title>Runtime exceptions printed once per line</title>
>>    <programlisting language="lzx">
>>    <textobject><textdata fileref="programs/debugging-$3.lzx"/></ 
>> textobject>
>>    </programlisting>
>> </example>
>> <?informalexample role="live-example"><programlisting role="lzx- 
>> embednew"><filename>debugging-$3.lzx</filename><parameter/><code>
>> </programlisting><?lzx-edit programs/debugging-$3.lzx></ 
>> informalexample?>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20071023/5dc15622/attachment.html


More information about the Laszlo-dev mailing list