cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <>
Subject Re: [C2] XSP / keywords in directory names
Date Thu, 01 Mar 2001 16:31:20 GMT
"Matthias D. Herold" wrote:
> "Berin Loritsch" wrote:
> >
> > "Matthias D. Herold" wrote:
> > >
> > > Hello Davanum,
> > >
> > > if I rename the directory, it works. But I think it should also work
> > > with java keywords as directory name...
> > >
> > > IMO there should be a better method for mapping directories to package names
> > > (for example just adding underscores to the beginning and the end of each
> > > package name would be fine: directory /static maps to org.apache.cocoon._static_).
> > >
> > > I am currently not familiar enough with the code to be able to fix such things;
> > > so I'll just send bug reports  ;-)
> >
> > If you actually had an extension on your file name, it would work as well:
> > org.apache.cocoon.static_xmap
> There is an extension on the file name; the file is named 'index.jsp' and put
> in a directory named 'static': 'static/index.xsp'.

Ah. so the class is:

com.mycom.www.static.index_xsp (or equiv.).

That makes sense that your having this problem.  It's too much work to check for
keywords in the path, and I want the clean com.mycom.www prefix to work.  Another
solution would be that ALL generated classes have the same prefix, but no subdirectories:


Or preferably, remove the underscore and capitalize the first char of each word:


The problem with that is we might reach a limit on the character length of the class

Truthfully, the most scalable approach is still prefixing or postfixing a character
to the directory name.  We already mangle the name to remove periods and dashes, but
who said we have to use an underscore?


The thing is the prefixing with an underscore according to some C/C++ coding practices
is indicative of a compiler or system constant that you can't rely on to be useable.
That is my beef with the underscore thing.

View raw message