Re: SAXGenerator - URLGenerator

2009-12-21 Thread Reinhard Pötz
Joerg Heinicke wrote:
 On 14.12.2009 09:33, Reinhard Pötz wrote:
 
 On Sun, Dec 13, 2009 at 3:59 PM, Joerg
 Heinickejoerg.heini...@gmx.de  wrote:
 
 A long time ago I argued for renaming the FileGenerator to XMLGenerator
 since the generators are usually named after the input they accept
 (Midi,
 HTML, Directory, JSP, JXTemplate, etc.). I'm not sure SAXGenerator
 reflects
 that exactly but it's good enough I guess.

 I agree that we should have one consistent naming scheme and since we
 usually use the input type, we shouldn't change it for this case.

 I see two solutions in order to get a consistent naming of our
 components:

 a) We rename SAXGenerator AND StAXGenerator to XMLGenerator

 or

 b) We add the SAX prefix to all pipeline components.

 I'm in favor of a) because SAX or StAX is already part of the package
 name and looking at the implemented interfaces makes it clear what
 underlying event mechanism is used.
 
 I agree with your reasoning.

Thanks! Since none objected, I've just committed the changes. The
SAXGenerator/FileGenerator is called XMLGenerator and I also renamed the
StAXGenerator and StAXSerializer to XMLGenerator and XMLSerializer.

-- 
Reinhard Pötz   Managing Director, {Indoqa} GmbH
 http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member  reinh...@apache.org



Re: SAXGenerator - URLGenerator

2009-12-15 Thread Joerg Heinicke

On 14.12.2009 09:33, Reinhard Pötz wrote:


On Sun, Dec 13, 2009 at 3:59 PM, Joerg Heinickejoerg.heini...@gmx.de  wrote:



A long time ago I argued for renaming the FileGenerator to XMLGenerator
since the generators are usually named after the input they accept (Midi,
HTML, Directory, JSP, JXTemplate, etc.). I'm not sure SAXGenerator reflects
that exactly but it's good enough I guess.


I agree that we should have one consistent naming scheme and since we
usually use the input type, we shouldn't change it for this case.

I see two solutions in order to get a consistent naming of our components:

a) We rename SAXGenerator AND StAXGenerator to XMLGenerator

or

b) We add the SAX prefix to all pipeline components.

I'm in favor of a) because SAX or StAX is already part of the package
name and looking at the implemented interfaces makes it clear what
underlying event mechanism is used.


I agree with your reasoning.

Regards,
Joerg


Re: SAXGenerator - URLGenerator

2009-12-14 Thread Reinhard Pötz
Simone Tripodi wrote:
 Hi all,
 I'd follow the Joerg suggestion since it reminded me the Neko HTML
 Generator included in the optional module that has the behavior
 similar to the old FileGenerator that takes an URL in input and
 transforms HTML in XHTML.
 
 At that point I'd suggest to have an AbstractGenerator that manipulate
 an URL stream, than having different specialization, like:
 *) SAXGenerator
 *) NekoGenerator
 *) Anyhing else?
 
 How does it sound?
 Simo
 
 On Sun, Dec 13, 2009 at 3:59 PM, Joerg Heinicke joerg.heini...@gmx.de wrote:
 On 13.12.2009 14:44, Reinhard Pötz wrote:
 Long time ago (I think when the StAX module was added) we discussed to
 have a SAXGenerator which is mainly useful when the pipeline API is
 used. It has constructors for File, InputStream, String and Node. See

 http://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/SAXGenerator.java

 I also renamed FileGenerator to URLGenerator because this better
 reflects what it really does.

 But thinking more about this it would also make sense to merge the
 URLGenerator into the SAXGenerator.

 WDYT?
 A long time ago I argued for renaming the FileGenerator to XMLGenerator
 since the generators are usually named after the input they accept (Midi,
 HTML, Directory, JSP, JXTemplate, etc.). I'm not sure SAXGenerator reflects
 that exactly but it's good enough I guess.

I agree that we should have one consistent naming scheme and since we
usually use the input type, we shouldn't change it for this case.

I see two solutions in order to get a consistent naming of our components:

a) We rename SAXGenerator AND StAXGenerator to XMLGenerator

or

b) We add the SAX prefix to all pipeline components.

I'm in favor of a) because SAX or StAX is already part of the package
name and looking at the implemented interfaces makes it clear what
underlying event mechanism is used.

-- 
Reinhard Pötz   Managing Director, {Indoqa} GmbH
 http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member  reinh...@apache.org



Re: SAXGenerator - URLGenerator

2009-12-14 Thread Simone Tripodi
Hi Reinhard,
I agree with you for solution a) for the same reason you explained,
there's no need to prefix classes since we can use packages for it.
Best regards,
Simone

On Mon, Dec 14, 2009 at 9:33 AM, Reinhard Pötz reinh...@apache.org wrote:
 Simone Tripodi wrote:
 Hi all,
 I'd follow the Joerg suggestion since it reminded me the Neko HTML
 Generator included in the optional module that has the behavior
 similar to the old FileGenerator that takes an URL in input and
 transforms HTML in XHTML.

 At that point I'd suggest to have an AbstractGenerator that manipulate
 an URL stream, than having different specialization, like:
 *) SAXGenerator
 *) NekoGenerator
 *) Anyhing else?

 How does it sound?
 Simo

 On Sun, Dec 13, 2009 at 3:59 PM, Joerg Heinicke joerg.heini...@gmx.de 
 wrote:
 On 13.12.2009 14:44, Reinhard Pötz wrote:
 Long time ago (I think when the StAX module was added) we discussed to
 have a SAXGenerator which is mainly useful when the pipeline API is
 used. It has constructors for File, InputStream, String and Node. See

 http://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/SAXGenerator.java

 I also renamed FileGenerator to URLGenerator because this better
 reflects what it really does.

 But thinking more about this it would also make sense to merge the
 URLGenerator into the SAXGenerator.

 WDYT?
 A long time ago I argued for renaming the FileGenerator to XMLGenerator
 since the generators are usually named after the input they accept (Midi,
 HTML, Directory, JSP, JXTemplate, etc.). I'm not sure SAXGenerator reflects
 that exactly but it's good enough I guess.

 I agree that we should have one consistent naming scheme and since we
 usually use the input type, we shouldn't change it for this case.

 I see two solutions in order to get a consistent naming of our components:

 a) We rename SAXGenerator AND StAXGenerator to XMLGenerator

 or

 b) We add the SAX prefix to all pipeline components.

 I'm in favor of a) because SAX or StAX is already part of the package
 name and looking at the implemented interfaces makes it clear what
 underlying event mechanism is used.

 --
 Reinhard Pötz                           Managing Director, {Indoqa} GmbH
                         http://www.indoqa.com/en/people/reinhard.poetz/

 Member of the Apache Software Foundation
 Apache Cocoon Committer, PMC member                  reinh...@apache.org
 




-- 
http://www.google.com/profiles/simone.tripodi


SAXGenerator - URLGenerator

2009-12-13 Thread Reinhard Pötz

Long time ago (I think when the StAX module was added) we discussed to
have a SAXGenerator which is mainly useful when the pipeline API is
used. It has constructors for File, InputStream, String and Node. See
http://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/SAXGenerator.java

I also renamed FileGenerator to URLGenerator because this better
reflects what it really does.

But thinking more about this it would also make sense to merge the
URLGenerator into the SAXGenerator.

WDYT?

BTW, these changes are transparent at sitemap level because the
generator type 'file' is still supported and now points to the
URLGenerator. Additionally I also added a shorthand 'url'.

-- 
Reinhard Pötz   Managing Director, {Indoqa} GmbH
 http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member  reinh...@apache.org



Re: SAXGenerator - URLGenerator

2009-12-13 Thread Simone Tripodi
Hi Reinhard,
it makes a lot of sense - at least for me - since their internal
behaviors are exactly the same.
Have a nice sunday,
Simo

On Sun, Dec 13, 2009 at 2:44 PM, Reinhard Pötz reinh...@apache.org wrote:

 Long time ago (I think when the StAX module was added) we discussed to
 have a SAXGenerator which is mainly useful when the pipeline API is
 used. It has constructors for File, InputStream, String and Node. See
 http://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/SAXGenerator.java

 I also renamed FileGenerator to URLGenerator because this better
 reflects what it really does.

 But thinking more about this it would also make sense to merge the
 URLGenerator into the SAXGenerator.

 WDYT?

 BTW, these changes are transparent at sitemap level because the
 generator type 'file' is still supported and now points to the
 URLGenerator. Additionally I also added a shorthand 'url'.

 --
 Reinhard Pötz                           Managing Director, {Indoqa} GmbH
                         http://www.indoqa.com/en/people/reinhard.poetz/

 Member of the Apache Software Foundation
 Apache Cocoon Committer, PMC member                  reinh...@apache.org
 




-- 
http://www.google.com/profiles/simone.tripodi


Re: SAXGenerator - URLGenerator

2009-12-13 Thread Joerg Heinicke

On 13.12.2009 14:44, Reinhard Pötz wrote:

Long time ago (I think when the StAX module was added) we discussed to
have a SAXGenerator which is mainly useful when the pipeline API is
used. It has constructors for File, InputStream, String and Node. See
http://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/SAXGenerator.java

I also renamed FileGenerator to URLGenerator because this better
reflects what it really does.

But thinking more about this it would also make sense to merge the
URLGenerator into the SAXGenerator.

WDYT?


A long time ago I argued for renaming the FileGenerator to XMLGenerator 
since the generators are usually named after the input they accept 
(Midi, HTML, Directory, JSP, JXTemplate, etc.). I'm not sure 
SAXGenerator reflects that exactly but it's good enough I guess.


Joerg


Re: SAXGenerator - URLGenerator

2009-12-13 Thread Simone Tripodi
Hi all,
I'd follow the Joerg suggestion since it reminded me the Neko HTML
Generator included in the optional module that has the behavior
similar to the old FileGenerator that takes an URL in input and
transforms HTML in XHTML.

At that point I'd suggest to have an AbstractGenerator that manipulate
an URL stream, than having different specialization, like:
*) SAXGenerator
*) NekoGenerator
*) Anyhing else?

How does it sound?
Simo

On Sun, Dec 13, 2009 at 3:59 PM, Joerg Heinicke joerg.heini...@gmx.de wrote:
 On 13.12.2009 14:44, Reinhard Pötz wrote:

 Long time ago (I think when the StAX module was added) we discussed to
 have a SAXGenerator which is mainly useful when the pipeline API is
 used. It has constructors for File, InputStream, String and Node. See

 http://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/SAXGenerator.java

 I also renamed FileGenerator to URLGenerator because this better
 reflects what it really does.

 But thinking more about this it would also make sense to merge the
 URLGenerator into the SAXGenerator.

 WDYT?

 A long time ago I argued for renaming the FileGenerator to XMLGenerator
 since the generators are usually named after the input they accept (Midi,
 HTML, Directory, JSP, JXTemplate, etc.). I'm not sure SAXGenerator reflects
 that exactly but it's good enough I guess.

 Joerg




-- 
http://www.google.com/profiles/simone.tripodi