forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leo Simons <leosim...@apache.org>
Subject RE: [Fwd: invitation to check out dbdoc/ashkelon]
Date Tue, 30 Jul 2002 11:46:09 GMT
yes please!

Oh, and it would also be nice if the sources were wrapped at, say, X
chars. Current jakarta site is notorious for running off the page
because it uses <pre/> for sources.

thought: there might be stuff in javasrc that's easily ripped out for
this purpose.

cheers,

Leo Simons

> on the other hand, if I think about the more front-line-publishing approach
> we have here @forrest we should think more about parsing it to enrich
> publication (highlighting) then to parse it for understanding each detail in
> the code (i.e. where your example is heading to: that would be more
> interesting when building a repository like dbdoc is doing )
> [if nothing else the highlight only approach should be easier)
> 
> so the use case for forrest would rather be something allong these lines:
> inside e.g. the document-v11.dtd we could let  the <source> hava a @language
> and/or @file
> 
>   <source language="xml"><[CDATA[
>      <example att="4">
>         content <!-- and comment -->
>      </example>
>   ]]></source>
> 
>   <source language="java">
>     package mypack.test;
> 
>     import java.io.*;
> 
>     //well...
>     public interface WhatDoYaThink {
>       public static final String SOME = "RIGHT";
>     }
>   </source>
> 
>   <source language="java" file="path-to/MySource.java" />
> 
> so a source-code-highlighting transformer would be able to parse the
> contents and put out the <source> with nested tags to indicate the
> language-independant, but rather higlight-directed portions that any
> language knows about: literals, keywords, comment, names,...
> 
>   <source language="xml">
>      &gt;<name>example</name> <name>att</name>=<literal>"4"</literal>&lt;
>         content <comment>&gt;!-- and comment --&lt;</comment>
>      &gt;<name>/example</name&lt;
>   </source>
> 
>   <source language="java">
>     <keyword>package</keyword> <name>mypack.test</name>;
> 
>     <keyword>import</keyword> <name>java.io.*</name>;
> 
>     <comment>//well...</comment>
>     <keyword>public </keyword> <keyword>interface</keyword>
> <name>WhatDoYaThink</name> {
>        <keyword>public</keyword> <keyword>static</keyword>
> <keyword>final</keyword> <name>String</name> <name>SOME</name>
=
> <literal>"RIGHT"</literal>;
>     }
>   </source>



Mime
View raw message