You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Gianugo Rabellino <gi...@apache.org> on 2003/08/01 10:03:03 UTC

Promotion of [XPath]TraversableGenerators to main trunk

Before the upcoming release, I'd like to promote the 
TraversableGenerator stuff to the main trunk. There are several things 
to discuss, though:

1. naming. TraversableGenerator sucks, yes. I guess the best option as 
of now is SourceHierarchyGenerator, any others?

2. merge Sylvain's stuff (caching, directory filter...). Sylvain, do you 
think you can take care of that?

3. namespace: is http://apache.org/cocoon/collection/1.0 ok?

4. back-compatibility: should we deprecate DirectoryGenerator? Should we 
provide a stylesheet to convert the output of Traversable to Directory's?

5. xpath: I'm starting to wonder whether is OK to have a separate 
XPathTraversableGenerator or if it would be better having a single 
SourceHierarchyGenerator with (optional) XPath capabilities. How about it?

Let's discuss all these issue (and I might well have forgotten some): I 
think that at a very least we need a [VOTE] on the namespace afterwards.

-- 
Gianugo Rabellino
Pro-netics s.r.l. -  http://www.pro-netics.com
Orixo, the XML business alliance - http://www.orixo.com
     (Now blogging at: http://blogs.cocoondev.org/gianugo/)


Re: Promotion of [XPath]TraversableGenerators to main trunk

Posted by Steven Noels <st...@outerthought.org>.
On 1/08/2003 14:28 Vadim Gritsenko wrote:

> I can spell "hierarchy" too when not too drunk, it just takes more 
> mental resources ;-P
> 
> Is there anybody against CollectionGenerator?

Could we have that with one 'l' for alcoholics, since they tend to 
drawllll anyhow?

</Steven>
-- 
Steven Noels                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at            http://blogs.cocoondev.org/stevenn/
stevenn at outerthought.org                stevenn at apache.org


Re: Promotion of [XPath]TraversableGenerators to main trunk

Posted by Vadim Gritsenko <va...@verizon.net>.
Gianugo Rabellino wrote:

> Stephan Michels wrote:
>
>>
>
>>>
>>> Mmmh... "collection" it a bit too vague IMO. Why not keeping the 
>>> current
>>> "directory" namespace ?
>>
>>
>>
>> At least, we should agree on one name
>>
>> SourceHierarchyGenerator -> http://apache.org/cocoon/hierachy/1.0
>> SourceCollectionGenerator -> http://apache.org/cocoon/collection/1.0
>> SourceDirectoryGenerator -> http://apache.org/cocoon/directory/1.0
>>
>> or DirectoryGenerator.
>>
>
> Makes sense. I'm a bit against using "directory" since it's definitely 
> filesystem oriented. Both WebDAV and XML:DB have the more generic 
> concept of "collection" and "resource", which I like. I now tend to 
> think that, semantically, the best option is to use "hierarchy" and 
> have the output as:
>
> <hierarchy:hierarchy>
>   <hierarchy:collection name="cocoon-2.1">
>      <hierarchy:resource name="build.xml"/>
>      <hierarchy:collection name="src">
>         <hierarchy:resource name="Cocoon.java"/>
>      </hierarchy:collection>
>   </hierarchy:collection>
> </hierarchy:hierarchy>
>
> How does it sound?


I'm damn sure that CollectionGenerator sounds much more simple. However 
I can spell "hierarchy" too when not too drunk, it just takes more 
mental resources ;-P

Is there anybody against CollectionGenerator?

Vadim



Re: Promotion of [XPath]TraversableGenerators to main trunk

Posted by Gianugo Rabellino <gi...@apache.org>.
Stephan Michels wrote:
> 

>>
>>Mmmh... "collection" it a bit too vague IMO. Why not keeping the current
>>"directory" namespace ?
> 
> 
> At least, we should agree on one name
> 
> SourceHierarchyGenerator -> http://apache.org/cocoon/hierachy/1.0
> SourceCollectionGenerator -> http://apache.org/cocoon/collection/1.0
> SourceDirectoryGenerator -> http://apache.org/cocoon/directory/1.0
> 
> or DirectoryGenerator.
> 

Makes sense. I'm a bit against using "directory" since it's definitely 
filesystem oriented. Both WebDAV and XML:DB have the more generic 
concept of "collection" and "resource", which I like. I now tend to 
think that, semantically, the best option is to use "hierarchy" and have 
the output as:

<hierarchy:hierarchy>
   <hierarchy:collection name="cocoon-2.1">
      <hierarchy:resource name="build.xml"/>
      <hierarchy:collection name="src">
         <hierarchy:resource name="Cocoon.java"/>
      </hierarchy:collection>
   </hierarchy:collection>
</hierarchy:hierarchy>

How does it sound?
-- 
Gianugo Rabellino
Pro-netics s.r.l. -  http://www.pro-netics.com
Orixo, the XML business alliance - http://www.orixo.com
     (Now blogging at: http://blogs.cocoondev.org/gianugo/)


Re: Promotion of [XPath]TraversableGenerators to main trunk

Posted by Geoff Howard <co...@leverageweb.com>.
Gianugo Rabellino wrote:
> Guido Casper wrote:
> 
>> Stephan Michels wrote:
>>
>>> At least, we should agree on one name
>>>
>>> SourceHierarchyGenerator -> http://apache.org/cocoon/hierachy/1.0
>>> SourceCollectionGenerator -> http://apache.org/cocoon/collection/1.0
>>> SourceDirectoryGenerator -> http://apache.org/cocoon/directory/1.0
>>>
>>> or DirectoryGenerator.
>>
>>
>>
>> Probably I should shut up and sit down before adding yet another 
>> opinion but
>> FWIW I prefer DirectoryGenerator. It's most user-friendly (immediately
>> understood by everyone) and compatible. 
> 
> 
> I could easily live with it, but the problem is that someone might have 
> extended DirectoryGenerator, and such extensions would not be compatible 
> anymore if we just drop it in favor of the source based one. You don't 
> want this, don't you? :-)

I suggested in the past creating a "name only" extension of this 
generator to make it clearer to the casual observer that it can work 
with simple directories.  Since the name DirectoryGenerator is used and
should be protected wouldn't "SourceDirectoryGenerator" do? 
Alternatively, adding a deprecation note on DirectoryGenerator which 
points to whatever extremely-accurate-but-unclear-to-outsiders name we
want might be all that is needed.

Geoff





Re: Promotion of [XPath]TraversableGenerators to main trunk

Posted by Gianugo Rabellino <gi...@apache.org>.
Guido Casper wrote:
> Stephan Michels wrote:
> 
>>At least, we should agree on one name
>>
>>SourceHierarchyGenerator -> http://apache.org/cocoon/hierachy/1.0
>>SourceCollectionGenerator -> http://apache.org/cocoon/collection/1.0
>>SourceDirectoryGenerator -> http://apache.org/cocoon/directory/1.0
>>
>>or DirectoryGenerator.
> 
> 
> Probably I should shut up and sit down before adding yet another opinion but
> FWIW I prefer DirectoryGenerator. It's most user-friendly (immediately
> understood by everyone) and compatible. 

I could easily live with it, but the problem is that someone might have 
extended DirectoryGenerator, and such extensions would not be compatible 
anymore if we just drop it in favor of the source based one. You don't 
want this, don't you? :-)

Ciao,

-- 
Gianugo Rabellino
Pro-netics s.r.l. -  http://www.pro-netics.com
Orixo, the XML business alliance - http://www.orixo.com
     (Now blogging at: http://blogs.cocoondev.org/gianugo/)


Re: Promotion of [XPath]TraversableGenerators to main trunk

Posted by Gianugo Rabellino <gi...@apache.org>.
Sylvain Wallez wrote:
>> +1, KISS like.
>>
>> DirectoryGenerator and
>> FileGenerator.
>>
>> 99% of the used sources are files.
>>
>> And I don't think backward compatibility is here a must have.
>>
> 
> Yes it is, since some users (of which I am) extended DirectoryGenerator 
> to add their own filtering strategies and additional attributes...
> 

Not to mention the 4-5 Generators we have in the Cocoon codebase which 
are extending DirectoryGenerator...

Ciao,

-- 
Gianugo Rabellino
Pro-netics s.r.l. -  http://www.pro-netics.com
Orixo, the XML business alliance - http://www.orixo.com
     (Now blogging at: http://blogs.cocoondev.org/gianugo/)


Re: Promotion of [XPath]TraversableGenerators to main trunk

Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Stephan Michels wrote:

>+1, KISS like.
>
>DirectoryGenerator and
>FileGenerator.
>
>99% of the used sources are files.
>
>And I don't think backward compatibility is here a must have.
>

Yes it is, since some users (of which I am) extended DirectoryGenerator 
to add their own filtering strategies and additional attributes...

Back to the discussion about protected/private and "officially public" 
APIs...

Sylvain

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



Re: Promotion of [XPath]TraversableGenerators to main trunk

Posted by Stephan Michels <st...@apache.org>.

On Fri, 1 Aug 2003, Guido Casper wrote:

> Stephan Michels wrote:
> > At least, we should agree on one name
> >
> > SourceHierarchyGenerator -> http://apache.org/cocoon/hierachy/1.0
> > SourceCollectionGenerator -> http://apache.org/cocoon/collection/1.0
> > SourceDirectoryGenerator -> http://apache.org/cocoon/directory/1.0
> >
> > or DirectoryGenerator.
>
> Probably I should shut up and sit down before adding yet another opinion but
> FWIW I prefer DirectoryGenerator. It's most user-friendly (immediately
> understood by everyone) and compatible. I can already imagine:
>
> "What the heck is SourceHierarchyGenerator"
> "A DirectoryGenerator for other sources as well"
> :-)
>
> I see no strong reason to rename DirectoryGenerator just because now it
> operates on other sources as well. It is semantically as correct as the
> other.
>
> The next step is renaming FileGenerator? Although this would even make more
> sense. But given that these components will mostly be used for the
> filesystem for a long time to come ...

+1, KISS like.

DirectoryGenerator and
FileGenerator.

99% of the used sources are files.

And I don't think backward compatibility is here a must have.

Stephan.


Re: Promotion of [XPath]TraversableGenerators to main trunk

Posted by Guido Casper <gc...@s-und-n.de>.
Stephan Michels wrote:
> At least, we should agree on one name
>
> SourceHierarchyGenerator -> http://apache.org/cocoon/hierachy/1.0
> SourceCollectionGenerator -> http://apache.org/cocoon/collection/1.0
> SourceDirectoryGenerator -> http://apache.org/cocoon/directory/1.0
>
> or DirectoryGenerator.

Probably I should shut up and sit down before adding yet another opinion but
FWIW I prefer DirectoryGenerator. It's most user-friendly (immediately
understood by everyone) and compatible. I can already imagine:

"What the heck is SourceHierarchyGenerator"
"A DirectoryGenerator for other sources as well"
:-)

I see no strong reason to rename DirectoryGenerator just because now it
operates on other sources as well. It is semantically as correct as the
other.

The next step is renaming FileGenerator? Although this would even make more
sense. But given that these components will mostly be used for the
filesystem for a long time to come ...

But I'm fine with any of these names.

Guido


Re: Promotion of [XPath]TraversableGenerators to main trunk

Posted by Stephan Michels <st...@apache.org>.

On Fri, 1 Aug 2003, Sylvain Wallez wrote:

> Gianugo Rabellino wrote:
>
> > Before the upcoming release, I'd like to promote the
> > TraversableGenerator stuff to the main trunk. There are several things
> > to discuss, though:
> >
> > 1. naming. TraversableGenerator sucks, yes. I guess the best option as
> > of now is SourceHierarchyGenerator, any others?
>
>
> +1 for SourceHierarchyGenerator
>
> > 2. merge Sylvain's stuff (caching, directory filter...). Sylvain, do
> > you think you can take care of that?
>
>
> Sorry, I should have done this before. Will do it today.
>
> > 3. namespace: is http://apache.org/cocoon/collection/1.0 ok?
>
>
> Mmmh... "collection" it a bit too vague IMO. Why not keeping the current
> "directory" namespace ?

At least, we should agree on one name

SourceHierarchyGenerator -> http://apache.org/cocoon/hierachy/1.0
SourceCollectionGenerator -> http://apache.org/cocoon/collection/1.0
SourceDirectoryGenerator -> http://apache.org/cocoon/directory/1.0

or DirectoryGenerator.

My 2cents, Stephan.



Re: Promotion of [XPath]TraversableGenerators to main trunk

Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Gianugo Rabellino wrote:

> Before the upcoming release, I'd like to promote the 
> TraversableGenerator stuff to the main trunk. There are several things 
> to discuss, though:
>
> 1. naming. TraversableGenerator sucks, yes. I guess the best option as 
> of now is SourceHierarchyGenerator, any others? 


+1 for SourceHierarchyGenerator

> 2. merge Sylvain's stuff (caching, directory filter...). Sylvain, do 
> you think you can take care of that? 


Sorry, I should have done this before. Will do it today.

> 3. namespace: is http://apache.org/cocoon/collection/1.0 ok? 


Mmmh... "collection" it a bit too vague IMO. Why not keeping the current 
"directory" namespace ?

> 4. back-compatibility: should we deprecate DirectoryGenerator? Should 
> we provide a stylesheet to convert the output of Traversable to 
> Directory's? 


There's no need to convert if we keep the current namespace. This would 
allow a smooth transition by just changing the class name in <map:generator>

> 5. xpath: I'm starting to wonder whether is OK to have a separate 
> XPathTraversableGenerator or if it would be better having a single 
> SourceHierarchyGenerator with (optional) XPath capabilities. How about 
> it? 


Dunno...

Sylvain

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