You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Carsten Ziegeler <cz...@apache.org> on 2008/12/22 16:29:35 UTC

[RT] Reusable code for xml (dom/sax)

We've built a lot of very useful code for dealing with sax events or dom
 nodes over the past years. As soon as you start doing some xml coding
outside of Cocoon, you really miss this stuff :)
So did I in the past months - unfortunately the code we have right now
is a) hidden and b) has too many dependencies to be really usable as a
nice library. So in my case I ended up copying bits and classes from
Cocoon to my own project. After having done this now for the third
time...I think it's time to do something about it.

In line with the ideas about Cocoon 3, I think it totally makes sense to
have a nice reusable xml lib with zero dependencies. This could/should
also be used as a base for Cocoon 3 (I see some of the famous copied
classes there already :) ) - I'm not sure if we should do something for
2.2, but that's another topic.

So I started a new little project in the whiteboard[3] which contains
some classes from trunk bundled together. I used a new package to not
conflict with the existing classes.
To reduce dependencies I removed all refs to Avalon, some marker
interfaces like XMLConsumer (I think ContentHandler is sufficient) and
removed some methods which came out of the old days of Cocoon. I updated
the code to Java 1.5 and made an OSGi bundle out of the resulting jar.

WDYT?


Carsten

[1] http://svn.apache.org/repos/asf/cocoon/whiteboard/xml-utils/
-- 
Carsten Ziegeler
cziegeler@apache.org

Re: [RT] Reusable code for xml (dom/sax)

Posted by Carsten Ziegeler <cz...@apache.org>.
David Crossley wrote:
> Carsten Ziegeler wrote:
>> Yes, let's start here, see where we end up with and then get the
>> *communities* (xlm, commons, cocoon) together for further discussions.
>> But as I said, as we are shifting away from a monolithic big bang
>> framework to finer grained reusable modules, it might make sense to have
>> this common xml stuff here and maybe use it for "marketing" :)
> 
> That is no joke. It is a very relevant approach.
> 
Yes, I meant this seriously! (maybe I shouldn't have put a smiley next
to it :)...)

Carsten

-- 
Carsten Ziegeler
cziegeler@apache.org

Re: [RT] Reusable code for xml (dom/sax)

Posted by David Crossley <cr...@apache.org>.
Carsten Ziegeler wrote:
> Ralph Goers wrote:
> > My recommendation would be to develop it here first and once it is in a
> > state where it might be usable then we should look at it and figure out
> > what the right thing to do is.  
>
> I think, the stuff we have is already usable :)
> 
> > The problem we are faced with is that
> > the xml project only has the JAXP API and the resolver left and commons
> > doesn't really have anything because XML Commons was always around. I
> > guess the various PMCs should talk about a plan for where this kind of
> > code should reside.
>
> Yes, let's start here, see where we end up with and then get the
> *communities* (xlm, commons, cocoon) together for further discussions.
> But as I said, as we are shifting away from a monolithic big bang
> framework to finer grained reusable modules, it might make sense to have
> this common xml stuff here and maybe use it for "marketing" :)

That is no joke. It is a very relevant approach.

Thanks for sparking this.

-David

Re: [RT] Reusable code for xml (dom/sax)

Posted by Carsten Ziegeler <cz...@apache.org>.
Ralph Goers wrote:
> My recommendation would be to develop it here first and once it is in a
> state where it might be usable then we should look at it and figure out
> what the right thing to do is.  
I think, the stuff we have is already usable :)

> The problem we are faced with is that
> the xml project only has the JAXP API and the resolver left and commons
> doesn't really have anything because XML Commons was always around. I
> guess the various PMCs should talk about a plan for where this kind of
> code should reside.
Yes, let's start here, see where we end up with and then get the
*communities* (xlm, commons, cocoon) together for further discussions.
But as I said, as we are shifting away from a monolithic big bang
framework to finer grained reusable modules, it might make sense to have
this common xml stuff here and maybe use it for "marketing" :)

Carsten
-- 
Carsten Ziegeler
cziegeler@apache.org

Re: [RT] Reusable code for xml (dom/sax)

Posted by Ralph Goers <ra...@dslextreme.com>.
On Dec 22, 2008, at 7:46 AM, Carsten Ziegeler wrote:

> Jeremias Maerki wrote:
>> Have you seen Jukka's recent proposal?
>>
>> On Commons Dev:
>> http://markmail.org/message/wlvkqnvfabhad6ca
>> Later on Xerces-J Dev:
>> http://markmail.org/message/i4mzckmqzy2gdwsc
>>
>> There could be some overlap. :-)
>>
> Yes, I've seen the mails :)
>
> Now, while it seems to make sense to have such stuff at a "common"
> place, we suffered actually in the past more from this than it  
> helper us
> (for example the move of general components to excalibur). And I'm not
> sure where such a code is most welcome from the community :)
>
> So I see no problem in Cocoon being the number one address for xml  
> stuff.
>

My recommendation would be to develop it here first and once it is in  
a state where it might be usable then we should look at it and figure  
out what the right thing to do is.  The problem we are faced with is  
that the xml project only has the JAXP API and the resolver left and  
commons doesn't really have anything because XML Commons was always  
around. I guess the various PMCs should talk about a plan for where  
this kind of code should reside.

Ralph


Re: [RT] Reusable code for xml (dom/sax)

Posted by Carsten Ziegeler <cz...@apache.org>.
Jeremias Maerki wrote:
> Have you seen Jukka's recent proposal?
> 
> On Commons Dev:
> http://markmail.org/message/wlvkqnvfabhad6ca
> Later on Xerces-J Dev:
> http://markmail.org/message/i4mzckmqzy2gdwsc
> 
> There could be some overlap. :-)
> 
Yes, I've seen the mails :)

Now, while it seems to make sense to have such stuff at a "common"
place, we suffered actually in the past more from this than it helper us
(for example the move of general components to excalibur). And I'm not
sure where such a code is most welcome from the community :)

So I see no problem in Cocoon being the number one address for xml stuff.

Carsten
-- 
Carsten Ziegeler
cziegeler@apache.org

Re: [RT] Reusable code for xml (dom/sax)

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Have you seen Jukka's recent proposal?

On Commons Dev:
http://markmail.org/message/wlvkqnvfabhad6ca
Later on Xerces-J Dev:
http://markmail.org/message/i4mzckmqzy2gdwsc

There could be some overlap. :-)

On 22.12.2008 16:29:35 Carsten Ziegeler wrote:
> We've built a lot of very useful code for dealing with sax events or dom
>  nodes over the past years. As soon as you start doing some xml coding
> outside of Cocoon, you really miss this stuff :)
> So did I in the past months - unfortunately the code we have right now
> is a) hidden and b) has too many dependencies to be really usable as a
> nice library. So in my case I ended up copying bits and classes from
> Cocoon to my own project. After having done this now for the third
> time...I think it's time to do something about it.
> 
> In line with the ideas about Cocoon 3, I think it totally makes sense to
> have a nice reusable xml lib with zero dependencies. This could/should
> also be used as a base for Cocoon 3 (I see some of the famous copied
> classes there already :) ) - I'm not sure if we should do something for
> 2.2, but that's another topic.
> 
> So I started a new little project in the whiteboard[3] which contains
> some classes from trunk bundled together. I used a new package to not
> conflict with the existing classes.
> To reduce dependencies I removed all refs to Avalon, some marker
> interfaces like XMLConsumer (I think ContentHandler is sufficient) and
> removed some methods which came out of the old days of Cocoon. I updated
> the code to Java 1.5 and made an OSGi bundle out of the resulting jar.
> 
> WDYT?
> 
> 
> Carsten
> 
> [1] http://svn.apache.org/repos/asf/cocoon/whiteboard/xml-utils/
> -- 
> Carsten Ziegeler
> cziegeler@apache.org




Jeremias Maerki


Re: [RT] Reusable code for xml (dom/sax)

Posted by Carsten Ziegeler <cz...@apache.org>.
Reinhard Pötz wrote
> 
> we should move it from whiteboard to cocoon/subprojects (which doesn't
> exist yet but would be a great chance to create it) very soon and
> release it.
> 
Ok, so if noone objects, I'll do the move in the next days.

Carsten

-- 
Carsten Ziegeler
cziegeler@apache.org

Re: [RT] Reusable code for xml (dom/sax)

Posted by Reinhard Pötz <re...@apache.org>.
Carsten Ziegeler wrote:
> We've built a lot of very useful code for dealing with sax events or dom
>  nodes over the past years. As soon as you start doing some xml coding
> outside of Cocoon, you really miss this stuff :)
> So did I in the past months - unfortunately the code we have right now
> is a) hidden and b) has too many dependencies to be really usable as a
> nice library. So in my case I ended up copying bits and classes from
> Cocoon to my own project. After having done this now for the third
> time...I think it's time to do something about it.
> 
> In line with the ideas about Cocoon 3, I think it totally makes sense to
> have a nice reusable xml lib with zero dependencies. This could/should
> also be used as a base for Cocoon 3 (I see some of the famous copied
> classes there already :) ) 

yes, Grek has already mentioned that I copied those classes and should
have created a common module instead. But I haven't had enough free
cycles for this.

It's good to see you working on it now.

- I'm not sure if we should do something for
> 2.2, but that's another topic.
> 
> So I started a new little project in the whiteboard[3] which contains
> some classes from trunk bundled together. I used a new package to not
> conflict with the existing classes.

+1

> To reduce dependencies I removed all refs to Avalon, some marker
> interfaces like XMLConsumer (I think ContentHandler is sufficient) and
> removed some methods which came out of the old days of Cocoon. I updated
> the code to Java 1.5 and made an OSGi bundle out of the resulting jar.

> WDYT?

we should move it from whiteboard to cocoon/subprojects (which doesn't
exist yet but would be a great chance to create it) very soon and
release it.

-- 
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                  reinhard@apache.org
________________________________________________________________________

Re: [RT] Reusable code for xml (dom/sax)

Posted by David Crossley <cr...@apache.org>.
Simone Tripodi wrote:
> 
> So, IMHO your idea is nice; unfortunately, not being a Committer or
> PMC Member, I can't express my +1 :P

We are not voting anyway but if we were then all developers,
whether a committer or not, have always been encouraged to
vote. It is just that in the final analysis, only the PMC
votes count if it is a close race.

-David

Re: [RT] Reusable code for xml (dom/sax)

Posted by Simone Tripodi <si...@gmail.com>.
Hi Carsten,
I totally agree with you, I thought - more or less - the same when I
coded the XInclude Patch[1] for Cocoon 3, I had to strip off all
Avalon dependencies and porting the code to new Java 5 provided
features, especially for the XPath part.

So, IMHO your idea is nice; unfortunately, not being a Committer or
PMC Member, I can't express my +1 :P

Best regards,
Simone Tripodi

[1] https://issues.apache.org/jira/browse/COCOON3-3

2008/12/22 Carsten Ziegeler <cz...@apache.org>:
> We've built a lot of very useful code for dealing with sax events or dom
>  nodes over the past years. As soon as you start doing some xml coding
> outside of Cocoon, you really miss this stuff :)
> So did I in the past months - unfortunately the code we have right now
> is a) hidden and b) has too many dependencies to be really usable as a
> nice library. So in my case I ended up copying bits and classes from
> Cocoon to my own project. After having done this now for the third
> time...I think it's time to do something about it.
>
> In line with the ideas about Cocoon 3, I think it totally makes sense to
> have a nice reusable xml lib with zero dependencies. This could/should
> also be used as a base for Cocoon 3 (I see some of the famous copied
> classes there already :) ) - I'm not sure if we should do something for
> 2.2, but that's another topic.
>
> So I started a new little project in the whiteboard[3] which contains
> some classes from trunk bundled together. I used a new package to not
> conflict with the existing classes.
> To reduce dependencies I removed all refs to Avalon, some marker
> interfaces like XMLConsumer (I think ContentHandler is sufficient) and
> removed some methods which came out of the old days of Cocoon. I updated
> the code to Java 1.5 and made an OSGi bundle out of the resulting jar.
>
> WDYT?
>
>
> Carsten
>
> [1] http://svn.apache.org/repos/asf/cocoon/whiteboard/xml-utils/
> --
> Carsten Ziegeler
> cziegeler@apache.org
>



-- 
My LinkedIn profile: http://www.linkedin.com/in/simonetripodi
My GoogleCode profile: http://code.google.com/u/simone.tripodi/
My Picasa: http://picasaweb.google.com/simone.tripodi/
My Tube: http://www.youtube.com/user/stripodi
My Del.icio.us: http://del.icio.us/simone.tripodi