forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Portier" <...@outerthought.org>
Subject RE: [Fwd: invitation to check out dbdoc/ashkelon]
Date Tue, 30 Jul 2002 10:47:40 GMT
I do take this serious, and if a melting brain helps you think like this: go
visit the sauna!
we actually had goes at this in the past... (we (!=me, was slightly known to
the project, could get a hold of sources again though) used some layer on
top op javacc: jtb IIRC?)

line of thinking today would be along the lines of
- finding a standard ML for the Java code:
http://www.cs.washington.edu/homes/gjb/JavaML/ ?
- take a look at what alphaworks has here
http://www.alphaworks.ibm.com/tech/ret4j


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>


wondering if we could use the XNI interface of xerces to have it parse this
kind of content?
does anyone know how multi-type editors (like vim) and the like do this?
and I also guess preserving the space will be a chalenge...

-marc=

> -----Original Message-----
> From: Piroumian Konstantin [mailto:KPiroumian@protek.com]
> Sent: dinsdag 30 juli 2002 12:09
> To: 'forrest-dev@xml.apache.org'
> Subject: RE: [Fwd: invitation to check out dbdoc/ashkelon]
>
>
> > From: Steven Noels [mailto:stevenn@outerthought.org]
> >
> > fyi - looks cool
>
> Yes, gives a feeling of something cool, but rather unusual.
>
> On the page the common mistake is made: the background color is
> not set and
> I get grey pages with images on white background ;)
>
> I've been recently thinking about (Java | XML) source code
> highlighting with
> Cocoon. A crazy idea came: generate an XML from Java source and then
> transform it using a stylesheet, e.g.:
> <java package="org.apache.forrest">
> 	<import>org.apache.cocoon.*</import>
> 	<class visibility="public" is-abstract="no" is-final="no"
> name="MyCoolClass" extends="java.lang.Object">
> 		<implements>java.io.Serializable</implements>
>
> 		<field visibility="private" type="java.lang.String"
> name="cool" />
>
> 		<method visibility="public" returns="void" name="setCool">
> 			<argument type="java.lang.String" name="cool" />
> 			<method-body>
> 				<statement><keyword>this<keyword>.cool =
> cool;</statement>
> 				...
> 			</method-body>
> 		</method>
> 	</class>
> </java>
>
> Don't get this serious, it's really hot here and my brain is melting ;)
>
> Konstantin
>
> >
> > -------- Original Message --------
> > Subject: invitation to check out dbdoc/ashkelon
> > Date: Mon, 29 Jul 2002 22:36:13 -0500
> > From: "Eitan Suez" <eitan@uptodata.com>
> > Reply-To: "Jakarta General List" <general@jakarta.apache.org>
> > To: <general@jakarta.apache.org>
> >
> > dear jakarata'ers,
> >
> >    a few months back i posted a message about a project
> >    i was working on called dbdoc (not that i expect
> >    anyone to recall the post).  at that time, i was still
> >    mulling open-sourcing the app.  the feedback i got
> >    from several of you was very positive (jon, i am
> >    very proud of the fact that you once called it
> >    'very cool softare').
> >
> >    dbdoc is now open source project 'ashkelon' at
> >    sourceforge.net.  there's an article currently out
> >    that discusses the technical aspects of dbdoc on the
> >    sun site (at http://java.sun.com/ ).  dbdoc still needs a lot
> >    of work but i'm glad it seems to be gathering
> >    a little momentum in terms of persons interested
> >    in spending their spare time contributing to the
> >    code base.
> >
> >    ashkelon is basically a different way of compiling
> >    and serving javadocs that leverages a sql database
> >    (like mysql or oracle) and dynamic page serving
> >    systems.  the viewer app currently has two gui's:
> >
> >      - a modern dhtml gui that now works in both
> >        ie 5.x & 6.x and mozilla 1.x
> >      - a "classic" look & feel that mimics the javadoc
> >        style we all know and love
> >
> >    the main reason i started and pursued this project
> >    is a rooted belief that there's value to the community
> >    in having a multi-api java api documentation system.
> >    i think lots can be done with it (after it's made
> >    more robust and better integrated with other jakarta
> >    api's) such as having a central site for java developers
> >    to reference javadocs for many popular open-source api's
> >    (i.e. apache).
> >
> >    i invite you to download or just try out dbdoc at
> >     www.dbdoc.org and look forward to your input (good &
> >    bad).
> >
> >
> > thanks, eitan
> >
> > (eitan suez
> >   austin texas)
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:general-unsubscribe@jakarta.apache.org>
> > For
> > additional commands, e-mail: <mailto:general-help@jakarta.apache.org>
> >
> >
> > --
> > Steven Noels                            http://outerthought.org/
> > Outerthought - Open Source, Java & XML Competence Support Center
> > stevenn@outerthought.org                      stevenn@apache.org
> >
>


Mime
View raw message