You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Bart Guijt <b....@chello.nl> on 2003/01/28 00:16:46 UTC

Re: [RT] JavadocGenerator

Hi there,

As a result of gaining some hands-on Cocoon experience, I created a
JavadocSource and -SourceFactory which largely complies to what you are
discussing here.

Here are some feature hilights:
- uses the QDox parser;
- uses the Excalibur SourceResolver to resolve the source files;
- may be configured using multiple source root (uri's), like
<jar:file:///D:/java/jdk1.4.1/src.zip!> and
<cvs:pserver:anonymous.anonymous@cvs.apache.org:/home/cvspublic/xml-cocoon2/
www/api>
- creates inheritance information in the generated XML doc;
- comes with an XSLT stylesheet which creates a Class or Interface Javadoc
document (no package, overview, uses or index yet!) *exactly* like the JDK
javadoc;
- supports separately doc'ed inner classes;
- documents private members;
- the code has alpha status, but seems to works fine.


The JavadocSource is configured like this in cocoon.xconf:

  <source-factories>
    <component-instance
class="info.guijt.cocoon.source.JavadocSourceFactory" name="javadoc">
      <include-inheritance value="yes" />
      <source-roots group="JDK">
        <source-root uri="jar:file:///D:/java/jdk1.4.1/src.zip!" />
      </source-roots>
      <source-roots group="Avalon">
        <source-root
uri="file://D:/cvs-workspaces/apache/jakarta-avalon/src/java" />
        <source-root
uri="file://D:/cvs-workspaces/apache/jakarta-avalon-logkit/src/java" />
        <source-root
uri="file://D:/cvs-workspaces/apache/jakarta-avalon-excalibur/component/src/
java" />
        <source-root
uri="file://D:/cvs-workspaces/apache/jakarta-avalon-excalibur/sourceresolve/
src/java" />
        <source-root
uri="file://D:/cvs-workspaces/apache/jakarta-avalon-excalibur/pool/src/java"
/>
        <source-root
uri="file://D:/cvs-workspaces/apache/jakarta-avalon-excalibur/xmlutil/src/ja
va" />
      </source-roots>
      <source-roots group="Cocoon">
        <source-root
uri="file://D:/cvs-workspaces/apache/xml-cocoon2/src/java" />
        <source-root
uri="file://D:/cvs-workspaces/apache/xml-cocoon2/src/deprecated/java" />
      </source-roots>
    </component-instance>
  </source-factories>


If the following is put in the sitemap:

    <map:match pattern="javadoc/*">
      <map:generate src="javadoc:{1}" />
      <map:transform src="javadoc2html.xsl" />
      <map:serialize type="html" />
    </map:match>


you can request live Javadoc with a URL like

    http://localhost:8080/javadoc/java.util.HashMap


Would you like it as a donation to the Cocoon community?

Ciao,

Bart Guijt


----- Original Message -----
From: "Bernhard Huber" <be...@a1.net>
To: <co...@xml.apache.org>
Cc: <aj...@ascii27.net>; <je...@interface-projects.de>
Sent: Sunday, January 26, 2003 8:53 AM
Subject: [RT] JavadocGeneratro , was [STATUS] qdox java generator


> hi,
>
> as we had some off line talking about a JavadocGenerator i'd like
> to discuss this further on the dev-list.



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [RT] JavadocGenerator

Posted by Pier Fumagalli <pi...@betaversion.org>.
Bernhard Huber wrote:
> 
> any comments welcome,

What about a nice "compendium of thoughs" on the Wiki? :-)

	Pier


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [RT] JavadocGenerator

Posted by Bart Guijt <b....@chello.nl>.
Here it is!

Go to http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16523 and
unzip the zip in the xml-cocoon2 root, apply the diff which contains
modifications for build.xml, lib/jars.xml, project-info.xml and
properties.xml.

Hit 'build clean run' or something like that and point the browser to
'http://localhost:8888/samples/livedoc/samples'.

If it doesn't work, check the WEB-INF/cocoon.xconf and fiox the location of
the JDK sources.

All should work now.

Future directions:
- fix QDox bug - it doesn't respect newlines within <pre> tags;
- add package, index, search (lucene?) and overview pages;
- refactoring of source lookup. Right now a very brute algorithm is used to
track down the source of a Java class. Many improvements should be made
here;
- implement the 'use-inheritance' flag;
- configure member visibility (e.g. private, protected etc.) - now all
members are doc'ed;
- ...

Feedback is much appreciated.

Ciao!

Bart.



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [RT] JavadocGenerator

Posted by Bart Guijt <b....@chello.nl>.
----- Original Message -----
From: "Bart Guijt" <b....@chello.nl>

> I'll be posting shortly (if I get it working in the latest CVS version!)

It works! It works!

I created a Cocoon block, integrated it into the build (wow, lets spend some
wiki quality time here! ;-) and fired up the webserver with generated
Javadoc content.

OK.

Creating diffs-using-winCVS now...




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [RT] JavadocGenerator

Posted by Bart Guijt <b....@chello.nl>.
----- Original Message -----
From: "Bernhard Huber" <be...@a1.net>
> Let me summarize the configuration:
> A new JavadocSource and -SourceFactory using uri-prefix javadoc:
> In the configuration of the JavadocSource you have to
> define the physical location of the java source, as noted
> by the  source-root/@uri attribute.
> I don't see the reason for source-roots/@group, yet.
> What is the purpose for defining it?

It is not used yet, perheps it should be removed for now. The original idea
was to mimic javadoc 'package groups'. Since you bring this up and I rethink
it, it would probably be better to remove it.

> As JavadocSource sticks to the Source contract it may be used
> in any src component definition.
> One obvious usage is using it as source for the xml filegenerator.
> eg. <map:generator src="javadoc:{javdoc-path}"/>,
> you may use it in cinclude, too.

Yes, indeed.

> The JavadocSource implements the javadoc: protocol, assuming
> that javadoc-path specifies a FQN java class, eg. java.util.HashMap.
>
> Resolving the FQN to a java source is done by JavadocSource using
> its source-root, and source-roots definitions.

Indeed again.

>
> Another question:
> Must javadoc-path specify a FQN only, is a package name allowed, yet?

No, not yet. Only (inner)class and (inner)interface documents are created
for now.

> A specification question: Shall be a package name allowed?

Yes! This is a planned feature.

> Next I'd like to ask about the XML namespace, and schema emitted by the
> JavadocSource.
>
> I'd like to suggest that we should use namespace:
> http://org.apache/cocoon/javadoc/1.0, default prefix jd

Sure, whatever ;-)

> The schema shall be more or less a marshalling of the Qdox objects.
> This marshalling part is something which i have elaborated, in my
> opionion it covers the qdox objects quite complete. That's what i might
> contribute to the overall JavaDoc contribution.

The object marshalling was not as straightforward as I would like. For
instance, QDox has both Type classes and JavaClass, which are the same
subject to some extend but completely different objects. This caused some
'ugly' code unfortunately...

> any comments welcome,
>
> regards bernhard

I'll be posting shortly (if I get it working in the latest CVS version!)

Ciao,

Bart


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [RT] JavadocGenerator

Posted by Bernhard Huber <be...@a1.net>.
hi,

great !

donation is very welcome.

as implementation is on the way,
i'd like to develop a bit of documentation via this mailing list.
Thus at the point of donation check-in we have a draft documentation, too.

Let me summarize the configuration:
A new JavadocSource and -SourceFactory using uri-prefix javadoc:
In the configuration of the JavadocSource you have to
define the physical location of the java source, as noted
by the  source-root/@uri attribute.
I don't see the reason for source-roots/@group, yet.
What is the purpose for defining it?

As JavadocSource sticks to the Source contract it may be used
in any src component definition.
One obvious usage is using it as source for the xml filegenerator.
eg. <map:generator src="javadoc:{javdoc-path}"/>,
you may use it in cinclude, too.

The JavadocSource implements the javadoc: protocol, assuming
that javadoc-path specifies a FQN java class, eg. java.util.HashMap.

Resolving the FQN to a java source is done by JavadocSource using
its source-root, and source-roots definitions.

Another question:
Must javadoc-path specify a FQN only, is a package name allowed, yet?
A specification question: Shall be a package name allowed?

Next I'd like to ask about the XML namespace, and schema emitted by the 
JavadocSource.

I'd like to suggest that we should use namespace:
http://org.apache/cocoon/javadoc/1.0, default prefix jd

The schema shall be more or less a marshalling of the Qdox objects.
This marshalling part is something which i have elaborated, in my
opionion it covers the qdox objects quite complete. That's what i might
contribute to the overall JavaDoc contribution.

any comments welcome,

regards bernhard


Bart Guijt wrote:
> Hi there,
> 
> As a result of gaining some hands-on Cocoon experience, I created a
> JavadocSource and -SourceFactory which largely complies to what you are
> discussing here.
> 
> Here are some feature hilights:
> - uses the QDox parser;
> - uses the Excalibur SourceResolver to resolve the source files;
> - may be configured using multiple source root (uri's), like
> <jar:file:///D:/java/jdk1.4.1/src.zip!> and
> <cvs:pserver:anonymous.anonymous@cvs.apache.org:/home/cvspublic/xml-cocoon2/
> www/api>
> - creates inheritance information in the generated XML doc;
> - comes with an XSLT stylesheet which creates a Class or Interface Javadoc
> document (no package, overview, uses or index yet!) *exactly* like the JDK
> javadoc;
> - supports separately doc'ed inner classes;
> - documents private members;
> - the code has alpha status, but seems to works fine.
> 
> 
> The JavadocSource is configured like this in cocoon.xconf:
> 
>   <source-factories>
>     <component-instance
> class="info.guijt.cocoon.source.JavadocSourceFactory" name="javadoc">
>       <include-inheritance value="yes" />
>       <source-roots group="JDK">
>         <source-root uri="jar:file:///D:/java/jdk1.4.1/src.zip!" />
>       </source-roots>
>       <source-roots group="Avalon">
>         <source-root
> uri="file://D:/cvs-workspaces/apache/jakarta-avalon/src/java" />
>         <source-root
> uri="file://D:/cvs-workspaces/apache/jakarta-avalon-logkit/src/java" />
>         <source-root
> uri="file://D:/cvs-workspaces/apache/jakarta-avalon-excalibur/component/src/
> java" />
>         <source-root
> uri="file://D:/cvs-workspaces/apache/jakarta-avalon-excalibur/sourceresolve/
> src/java" />
>         <source-root
> uri="file://D:/cvs-workspaces/apache/jakarta-avalon-excalibur/pool/src/java"
> />
>         <source-root
> uri="file://D:/cvs-workspaces/apache/jakarta-avalon-excalibur/xmlutil/src/ja
> va" />
>       </source-roots>
>       <source-roots group="Cocoon">
>         <source-root
> uri="file://D:/cvs-workspaces/apache/xml-cocoon2/src/java" />
>         <source-root
> uri="file://D:/cvs-workspaces/apache/xml-cocoon2/src/deprecated/java" />
>       </source-roots>
>     </component-instance>
>   </source-factories>
> 
> 
> If the following is put in the sitemap:
> 
>     <map:match pattern="javadoc/*">
>       <map:generate src="javadoc:{1}" />
>       <map:transform src="javadoc2html.xsl" />
>       <map:serialize type="html" />
>     </map:match>
> 
> 
> you can request live Javadoc with a URL like
> 
>     http://localhost:8080/javadoc/java.util.HashMap
> 
> 
> Would you like it as a donation to the Cocoon community?
> 
> Ciao,
> 
> Bart Guijt
> 
> 
> ----- Original Message -----
> From: "Bernhard Huber" <be...@a1.net>
> To: <co...@xml.apache.org>
> Cc: <aj...@ascii27.net>; <je...@interface-projects.de>
> Sent: Sunday, January 26, 2003 8:53 AM
> Subject: [RT] JavadocGeneratro , was [STATUS] qdox java generator
> 
> 
> 
>>hi,
>>
>>as we had some off line talking about a JavadocGenerator i'd like
>>to discuss this further on the dev-list.
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [RT] JavadocGenerator

Posted by Bart Guijt <b....@chello.nl>.
From: "Sylvain Wallez" <sy...@anyware-tech.com>
> You're right : it's not very fast on well-known (and thus loaded) public
> CVS servers such as Apache and SourceForge. This may however prove
> useful if you want to avoid some local checkout.
>
> >Given the fact that creating one Javadoc document involves looking up
multiple Java sources (to find the inheritance tree) it might take some
time, decreasing usability. I'll try today to find out, I guess.
> >
>
> Mmmh... I definitely have to add the missing pieces to CVSSource to make
> it cacheable...

Yes, Yes, Yes!!

;-)

> Sylvain
>
> --
> Sylvain Wallez                                  Anyware Technologies
> http://www.apache.org/~sylvain           http://www.anyware-tech.com
> { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [RT] JavadocGenerator

Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Bart Guijt wrote:

>----- Original Message -----
>From: "Sylvain Wallez" <sy...@anyware-tech.com>
>  
>
>>This looks _really cool_, and a donation to Cocoon would be more that
>>welcome !
>>
>>    
>>
>Thanks, Sylvain! Much appreciated.
>
>  
>
>>A little question, though : does <source-root> handle URIs other than
>>file, i.e. does use the SourceResolver ?
>>    
>>
>
>Yup: see the first message under 'features':
>

Oh, sorry. I've read too quickly :-/

So this is _really really cool_ ;-)

>>>- uses the Excalibur SourceResolver to resolve the source files;
>>>- may be configured using multiple source root (uri's), like
>>><jar:file:///D:/java/jdk1.4.1/src.zip!> and
>>>      
>>>
>><cvs:pserver:anonymous.anonymous@cvs.apache.org:/home/cvspublic/xml-cocoon/www/api>
>>
>  
>
>>Live Javadoc generation from the CVS repository. Cool, eh ?
>>    
>>
>
>Very cool indeed!
>
>I didn't try this setup (yet), as you mentioned in the cvssource announcements getting live files from CVS seems to be a little slow.
>

You're right : it's not very fast on well-known (and thus loaded) public 
CVS servers such as Apache and SourceForge. This may however prove 
useful if you want to avoid some local checkout.

>Given the fact that creating one Javadoc document involves looking up multiple Java sources (to find the inheritance tree) it might take some time, decreasing usability. I'll try today to find out, I guess.
>

Mmmh... I definitely have to add the missing pieces to CVSSource to make 
it cacheable...

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [RT] JavadocGenerator

Posted by Bart Guijt <b....@chello.nl>.
----- Original Message -----
From: "Sylvain Wallez" <sy...@anyware-tech.com>
>
> This looks _really cool_, and a donation to Cocoon would be more that
> welcome !
>
Thanks, Sylvain! Much appreciated.

> A little question, though : does <source-root> handle URIs other than
> file, i.e. does use the SourceResolver ?

Yup: see the first message under 'features':
> >- uses the Excalibur SourceResolver to resolve the source files;
> >- may be configured using multiple source root (uri's), like
> ><jar:file:///D:/java/jdk1.4.1/src.zip!> and
>
><cvs:pserver:anonymous.anonymous@cvs.apache.org:/home/cvspublic/xml-cocoon2
/
> >www/api>

> This would allow following :
> <source-root
>
uri="cvs:anoncvs:anoncvs@cvs.apache.org:/home/cvspublic:xml-cocoon2/src/java
"/>
>
> Live Javadoc generation from the CVS repository. Cool, eh ?

Very cool indeed!

I didn't try this setup (yet), as you mentioned in the cvssource
announcements getting live files from CVS seems to be a little slow. Given
the fact that creating one Javadoc document involves looking up multiple
Java sources (to find the inheritance tree) it might take some time,
decreasing usability. I'll try today to find out, I guess.

> Sylvain

BG



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [RT] JavadocGenerator

Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Bart Guijt wrote:

>Hi there,
>
>As a result of gaining some hands-on Cocoon experience, I created a
>JavadocSource and -SourceFactory which largely complies to what you are
>discussing here.
>
>Here are some feature hilights:
>- uses the QDox parser;
>- uses the Excalibur SourceResolver to resolve the source files;
>- may be configured using multiple source root (uri's), like
><jar:file:///D:/java/jdk1.4.1/src.zip!> and
><cvs:pserver:anonymous.anonymous@cvs.apache.org:/home/cvspublic/xml-cocoon2/
>www/api>
>- creates inheritance information in the generated XML doc;
>- comes with an XSLT stylesheet which creates a Class or Interface Javadoc
>document (no package, overview, uses or index yet!) *exactly* like the JDK
>javadoc;
>- supports separately doc'ed inner classes;
>- documents private members;
>- the code has alpha status, but seems to works fine.
>
>
>The JavadocSource is configured like this in cocoon.xconf:
>
>  <source-factories>
>    <component-instance
>class="info.guijt.cocoon.source.JavadocSourceFactory" name="javadoc">
>      <include-inheritance value="yes" />
>      <source-roots group="JDK">
>        <source-root uri="jar:file:///D:/java/jdk1.4.1/src.zip!" />
>      </source-roots>
>      <source-roots group="Avalon">
>        <source-root
>uri="file://D:/cvs-workspaces/apache/jakarta-avalon/src/java" />
>        <source-root
>uri="file://D:/cvs-workspaces/apache/jakarta-avalon-logkit/src/java" />
>        <source-root
>uri="file://D:/cvs-workspaces/apache/jakarta-avalon-excalibur/component/src/
>java" />
>        <source-root
>uri="file://D:/cvs-workspaces/apache/jakarta-avalon-excalibur/sourceresolve/
>src/java" />
>        <source-root
>uri="file://D:/cvs-workspaces/apache/jakarta-avalon-excalibur/pool/src/java"
>/>
>        <source-root
>uri="file://D:/cvs-workspaces/apache/jakarta-avalon-excalibur/xmlutil/src/ja
>va" />
>      </source-roots>
>      <source-roots group="Cocoon">
>        <source-root
>uri="file://D:/cvs-workspaces/apache/xml-cocoon2/src/java" />
>        <source-root
>uri="file://D:/cvs-workspaces/apache/xml-cocoon2/src/deprecated/java" />
>      </source-roots>
>    </component-instance>
>  </source-factories>
>
>
>If the following is put in the sitemap:
>
>    <map:match pattern="javadoc/*">
>      <map:generate src="javadoc:{1}" />
>      <map:transform src="javadoc2html.xsl" />
>      <map:serialize type="html" />
>    </map:match>
>
>
>you can request live Javadoc with a URL like
>
>    http://localhost:8080/javadoc/java.util.HashMap
>
>
>Would you like it as a donation to the Cocoon community?
>  
>

This looks _really cool_, and a donation to Cocoon would be more that 
welcome !

A little question, though : does <source-root> handle URIs other than 
file, i.e. does use the SourceResolver ?

This would allow following :
<source-root 
uri="cvs:anoncvs:anoncvs@cvs.apache.org:/home/cvspublic:xml-cocoon2/src/java"/>

Live Javadoc generation from the CVS repository. Cool, eh ?

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [RT] JavadocGenerator

Posted by Andy Lewis <aj...@ascii27.net>.
> Bart Guijt wrote:
>> Hi there,
>>
>> As a result of gaining some hands-on Cocoon experience, I created a JavadocSource and
>> -SourceFactory which largely complies to what you are discussing here.
> >...
>
> Yes! Yes! Wow!
>
> Obviously a donation is most welcome, we need this to implement our  "User Reference Pages"
> based on javadoc tags.
>
> I think Bernhard has been working on something too, so some merging of  ideas/code might be
> good once the code is in CVS.
>
> -Bertrand
>
Jens, Bernhard, and I had two different version we had been trying to reconcile, both using qdox.
One did a single file and used Source Resolver, the other handled the whole tree, and assumed a
file system. We were in the middle of figuring out how to still use source resolving, and handle
the entire tree when I think we all got busy with other stuff, and you appear ot have overtaken
us. The file system based version (Bernhard's) worked great if everything was on the filesystem,
and had a cleaner source seperation, although I had concerns about the memory consumption of qdox
hitting the whole tree at once. The version Jens and I had with source resolving was lighter on
resources, but couldn't navigate the source tree. I was pushing for source resolver since I was
already seeing dicussions about the CVSSource. and I think that is as far as it got. It sounds
like you have worked that part out - which is cool. As far as merging the code, I'm good with
that, provided there is anything useful to contribute.
I am definately in favor of the User Reference Pages though - I think they will make a huge
difernece!
>
>
> --------------------------------------------------------------------- To unsubscribe, e-mail:
> cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org


-- 
"The heights of genius are only measurable by the depths of stupidity."



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [RT] JavadocGenerator

Posted by Bart Guijt <b....@chello.nl>.
----- Original Message -----
From: "Bertrand Delacretaz" <bd...@codeconsult.ch>

> Obviously a donation is most welcome, we need this to implement our
> "User Reference Pages" based on javadoc tags.
>

OK.

> I think Bernhard has been working on something too, so some merging of
> ideas/code might be good once the code is in CVS.

Cool!
I hope I can find some time today to create a block out of it, otherwise
I'll send a zip containing the current sourcecode.

> -Bertrand


BG


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [RT] JavadocGenerator

Posted by Bertrand Delacretaz <bd...@codeconsult.ch>.
Bart Guijt wrote:
> Hi there,
> 
> As a result of gaining some hands-on Cocoon experience, I created a
> JavadocSource and -SourceFactory which largely complies to what you are
> discussing here.
 >...

Yes! Yes! Wow!

Obviously a donation is most welcome, we need this to implement our 
"User Reference Pages" based on javadoc tags.

I think Bernhard has been working on something too, so some merging of 
ideas/code might be good once the code is in CVS.

-Bertrand



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [RT] JavadocGenerator

Posted by Bart Guijt <b....@chello.nl>.
From: "Stefano Mazzocchi" <st...@apache.org>

> Send it on or tell me where to get it.
> 

Well... look in the patch queue, I posted the block last night!

> -- 
> Stefano Mazzocchi                               <st...@apache.org>


Bart Guijt


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [RT] JavadocGenerator

Posted by Stefano Mazzocchi <st...@apache.org>.
Bart Guijt wrote:
> Hi there,
> 
> As a result of gaining some hands-on Cocoon experience, I created a
> JavadocSource and -SourceFactory which largely complies to what you are
> discussing here.
> 
> Here are some feature hilights:
> - uses the QDox parser;
> - uses the Excalibur SourceResolver to resolve the source files;
> - may be configured using multiple source root (uri's), like
> <jar:file:///D:/java/jdk1.4.1/src.zip!> and
> <cvs:pserver:anonymous.anonymous@cvs.apache.org:/home/cvspublic/xml-cocoon2/
> www/api>
> - creates inheritance information in the generated XML doc;
> - comes with an XSLT stylesheet which creates a Class or Interface Javadoc
> document (no package, overview, uses or index yet!) *exactly* like the JDK
> javadoc;
> - supports separately doc'ed inner classes;
> - documents private members;
> - the code has alpha status, but seems to works fine.
> 
> 
> The JavadocSource is configured like this in cocoon.xconf:
> 
>   <source-factories>
>     <component-instance
> class="info.guijt.cocoon.source.JavadocSourceFactory" name="javadoc">
>       <include-inheritance value="yes" />
>       <source-roots group="JDK">
>         <source-root uri="jar:file:///D:/java/jdk1.4.1/src.zip!" />
>       </source-roots>
>       <source-roots group="Avalon">
>         <source-root
> uri="file://D:/cvs-workspaces/apache/jakarta-avalon/src/java" />
>         <source-root
> uri="file://D:/cvs-workspaces/apache/jakarta-avalon-logkit/src/java" />
>         <source-root
> uri="file://D:/cvs-workspaces/apache/jakarta-avalon-excalibur/component/src/
> java" />
>         <source-root
> uri="file://D:/cvs-workspaces/apache/jakarta-avalon-excalibur/sourceresolve/
> src/java" />
>         <source-root
> uri="file://D:/cvs-workspaces/apache/jakarta-avalon-excalibur/pool/src/java"
> />
>         <source-root
> uri="file://D:/cvs-workspaces/apache/jakarta-avalon-excalibur/xmlutil/src/ja
> va" />
>       </source-roots>
>       <source-roots group="Cocoon">
>         <source-root
> uri="file://D:/cvs-workspaces/apache/xml-cocoon2/src/java" />
>         <source-root
> uri="file://D:/cvs-workspaces/apache/xml-cocoon2/src/deprecated/java" />
>       </source-roots>
>     </component-instance>
>   </source-factories>
> 
> 
> If the following is put in the sitemap:
> 
>     <map:match pattern="javadoc/*">
>       <map:generate src="javadoc:{1}" />
>       <map:transform src="javadoc2html.xsl" />
>       <map:serialize type="html" />
>     </map:match>
> 
> 
> you can request live Javadoc with a URL like
> 
>     http://localhost:8080/javadoc/java.util.HashMap
> 
> 
> Would you like it as a donation to the Cocoon community?

I would!

Send it on or tell me where to get it.

-- 
Stefano Mazzocchi                               <st...@apache.org>
--------------------------------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org