cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernhard Huber <berni_hu...@a1.net>
Subject Re: [RT] JavadocGenerator
Date Tue, 28 Jan 2003 23:45:51 GMT
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" <berni_huber@a1.net>
> To: <cocoon-dev@xml.apache.org>
> Cc: <ajl@ascii27.net>; <jens.lorenz@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


Mime
View raw message