Re: POM rewriting with DecentXML

2008-08-05 Thread Aaron Digulla
Quoting Jason van Zyl [EMAIL PROTECTED]: But I think looking at StAX and possibly trying to patch that to be smarter about formatting, if necessary, might be a better route for us. StAX can't preserve whitespace between attributes, between and the element name, whitespace after the last

Re: POM rewriting with DecentXML

2008-08-05 Thread Milos Kleint
how do you deal with newly added content? just overwriting a value for existing elements is relatively easy. I mean if I add a new dependency to the pom file, how do I make sure it's properly indented? That's been the major issue for me now with the jdom modello writer (which I wrote). I don't

Re: POM rewriting with DecentXML

2008-08-05 Thread Stuart McCulloch
2008/8/5 Aaron Digulla [EMAIL PROTECTED] Quoting Jason van Zyl [EMAIL PROTECTED]: But I think looking at StAX and possibly trying to patch that to be smarter about formatting, if necessary, might be a better route for us. StAX can't preserve whitespace between attributes, between and the

Re: POM rewriting with DecentXML

2008-08-05 Thread Jochen Wiedmann
On Tue, Aug 5, 2008 at 9:28 AM, Aaron Digulla [EMAIL PROTECTED] wrote: StAX can't preserve whitespace between attributes, between and the element name, whitespace after the last attribute and the , between / and the end element name. Same goes for all pull parsers. I must admit that I can

Re: POM rewriting with DecentXML

2008-08-05 Thread Aaron Digulla
Quoting Milos Kleint [EMAIL PROTECTED]: how do you deal with newly added content? just overwriting a value for existing elements is relatively easy. I mean if I add a new dependency to the pom file, how do I make sure it's properly indented? That's been the major issue for me now with the jdom

Re: POM rewriting with DecentXML

2008-08-05 Thread Aaron Digulla
Quoting Stuart McCulloch [EMAIL PROTECTED]: StAX can't preserve whitespace between attributes, between and the element name, whitespace after the last attribute and the , between / and the end element name. Same goes for all pull parsers. personally speaking, I don't actually mind if / foo

Re: POM rewriting with DecentXML

2008-08-05 Thread Aaron Digulla
Quoting Jochen Wiedmann [EMAIL PROTECTED]: As for patching it: StAX is a standard API (JSR-173). How big are my chances that the standard API is going to be extended to allow the features I need? No API forbids extending. In Java, APIs are written by paranoid control freaks ;) Just try to

Re: POM rewriting with DecentXML

2008-08-05 Thread Jason van Zyl
On 5-Aug-08, at 12:28 AM, Aaron Digulla wrote: Quoting Jason van Zyl [EMAIL PROTECTED]: But I think looking at StAX and possibly trying to patch that to be smarter about formatting, if necessary, might be a better route for us. StAX can't preserve whitespace between attributes, between

Re: POM rewriting with DecentXML

2008-08-05 Thread Michael McCallum
On Tue, 05 Aug 2008 19:28:47 Aaron Digulla wrote: I mean, there was *no* XML parser which can do 100%   round-tripping before DecentXML. It's just a non-issue for the XML guys. xom using xerces 2.6.7 was supposed to be able to do a complete round trip, have you disproved that? -- Michael

Re: POM rewriting with DecentXML

2008-08-05 Thread Stephen Connolly
On Tue, Aug 5, 2008 at 2:44 PM, Jason van Zyl [EMAIL PROTECTED] wrote: On 5-Aug-08, at 12:28 AM, Aaron Digulla wrote: Quoting Jason van Zyl [EMAIL PROTECTED]: But I think looking at StAX and possibly trying to patch that to be smarter about formatting, if necessary, might be a better

Re: POM rewriting with DecentXML

2008-08-05 Thread Aaron Digulla
Quoting Jason van Zyl [EMAIL PROTECTED]: StAX can't preserve whitespace between attributes, between and the element name, whitespace after the last attribute and the , between / and the end element name. Same goes for all pull parsers. Why not fix StAX? Because StAX is not meant to

Re: POM rewriting with DecentXML

2008-08-05 Thread Stuart McCulloch
2008/8/5 Aaron Digulla [EMAIL PROTECTED] Quoting Stuart McCulloch [EMAIL PROTECTED]: StAX can't preserve whitespace between attributes, between and the element name, whitespace after the last attribute and the , between / and the end element name. Same goes for all pull parsers.

Re: POM rewriting with DecentXML

2008-08-05 Thread Aaron Digulla
Quoting Stephen Connolly [EMAIL PROTECTED]: You can fix StAX, we know the authors. Even if you added an extension property that turned on better whitespace handling that would be fine. I'm not keen on pulling in another XML parser to be honest. +1000... *sigh* Okay. Look at the last example

Re: POM rewriting with DecentXML

2008-08-05 Thread Aaron Digulla
Quoting Michael McCallum [EMAIL PROTECTED]: On Tue, 05 Aug 2008 19:28:47 Aaron Digulla wrote: I mean, there was *no* XML parser which can do 100%   round-tripping before DecentXML. It's just a non-issue for the XML guys. xom using xerces 2.6.7 was supposed to be able to do a complete round

Re: POM rewriting with DecentXML

2008-08-05 Thread Stuart McCulloch
2008/8/5 Aaron Digulla [EMAIL PROTECTED] Sorry. I've written code with about any XML parser out there and none of them would even get close to what DecentXML can do. In DecentXML, there are no private fields or methods. Everything is meant to be extended or reused. It's meant to be useful

Re: POM rewriting with DecentXML

2008-08-05 Thread Stuart McCulloch
2008/8/5 Aaron Digulla [EMAIL PROTECTED] Quoting Jason van Zyl [EMAIL PROTECTED]: Why not fix StAX? Because StAX is not meant to do this. I need to keep the original XML source somewhere to be able to recreate anything you might have done. That includes entities (and how you entered them

Re: POM rewriting with DecentXML

2008-08-05 Thread Jochen Wiedmann
On Tue, Aug 5, 2008 at 2:40 PM, Aaron Digulla [EMAIL PROTECTED] wrote: No API forbids extending. In Java, APIs are written by paranoid control freaks ;) Just try to add a line number to org.jdom.Element... It *ought* to be possible ... maybe with a little bit of reflection,

Re: POM rewriting with DecentXML

2008-08-05 Thread Aaron Digulla
Stuart McCulloch schrieb: For example, the first version of the m2eclipse POM editor would remove all comments after Add dependency. That's not cool. Those comments contained references to web pages and explanations why some stuff was set up oddly. yeah, I hate it when an editor zaps all

Re: POM rewriting with DecentXML

2008-08-05 Thread Aaron Digulla
Stuart McCulloch schrieb: Sorry. I've written code with about any XML parser out there and none of them would even get close to what DecentXML can do. In DecentXML, there are no private fields or methods. Everything is meant to be extended or reused. It's meant to be useful instead of

Re: POM rewriting with DecentXML

2008-08-05 Thread Aaron Digulla
Stuart McCulloch schrieb: Why not fix StAX? Because StAX is not meant to do this. I need to keep the original XML source somewhere to be able to recreate anything you might have done. That includes entities (and how you entered them originally) and all kind of weird stuff that every XML

Re: POM rewriting with DecentXML

2008-08-05 Thread Aaron Digulla
Jochen Wiedmann schrieb: particular mode, one could supply and accept additional events. In the case of white space around attributes, you could offer an extension of the Attribute interface that informs about whitespace to the left and to the right. That's great. Can I also add new getters

Re: POM rewriting with DecentXML

2008-08-05 Thread Stephen Connolly
Aaron, speaking for myself, it's more the aggressive tone of your replies that's getting in the way. I agree that SAX and DOM are stinking piles of crap and completely unsuited to round-tripping preserving human formatting. However I still think StAX has the potential to be made to do

Re: POM rewriting with DecentXML

2008-08-01 Thread Jason van Zyl
Aaron, I talked to Dan who knows how the StAX framework does it's parsing and he says that it was fairly good whitespace control. We are using StaX in the work that Shane has done and maybe you could evaluate if this is just another framework that doesn't preserve formatting and maybe

Re: POM rewriting with DecentXML

2008-07-31 Thread Aaron Digulla
Michael McCallum schrieb: there is already http://www.xom.nu/ that is worth considering... its goal is correctness and roundtripability ;-)... its mature and stable... i have used it and been very happy xom doesn't preserve whitespace in elements (no XML parser besides DecentXML can do

Re: POM rewriting with DecentXML

2008-07-30 Thread Aaron Digulla
Quoting Brett Porter [EMAIL PROTECTED]: I've got some code ready for you to try: http://www.pdark.de/decentxml-1.0-SNAPSHOT-src.tar.gz wrong list? :) I've seen three Maven plugins which use their own code to manipulate POM and other XML files in projects, so I guess this is the right list

Re: POM rewriting with DecentXML

2008-07-30 Thread Aaron Digulla
Quoting John Casey [EMAIL PROTECTED]: I've got some code ready for you to try: http://www.pdark.de/decentxml-1.0-SNAPSHOT-src.tar.gz wrong list? :) still, sounds cool. Are you parking this at SF or Codehaus or anywhere like that? :-) Currently, I'm hosting that on my own server; this was a

Re: POM rewriting with DecentXML

2008-07-30 Thread Brett Porter
On 30/07/2008, at 4:52 PM, Aaron Digulla wrote: Quoting Brett Porter [EMAIL PROTECTED]: I've got some code ready for you to try: http://www.pdark.de/decentxml-1.0-SNAPSHOT-src.tar.gz wrong list? :) I've seen three Maven plugins which use their own code to manipulate POM and other XML

Re: POM rewriting with DecentXML

2008-07-30 Thread Stephen Connolly
On Wed, Jul 30, 2008 at 8:00 AM, Brett Porter [EMAIL PROTECTED] wrote: On 30/07/2008, at 4:52 PM, Aaron Digulla wrote: Quoting Brett Porter [EMAIL PROTECTED]: I've got some code ready for you to try: http://www.pdark.de/decentxml-1.0-SNAPSHOT-src.tar.gz wrong list? :) I've seen

Re: POM rewriting with DecentXML

2008-07-30 Thread Stephen Connolly
On Wed, Jul 30, 2008 at 8:33 AM, Stephen Connolly [EMAIL PROTECTED] wrote: On Wed, Jul 30, 2008 at 8:00 AM, Brett Porter [EMAIL PROTECTED] wrote: On 30/07/2008, at 4:52 PM, Aaron Digulla wrote: Quoting Brett Porter [EMAIL PROTECTED]: I've got some code ready for you to try:

Re: POM rewriting with DecentXML

2008-07-30 Thread Jason van Zyl
There are a couple that are decent. XMLBeans does a good job of not completely mutilating the XML, and the code that's been created for m2eclipse using EMF is pretty good as well. Netbeans is still using some JDOM based code that is not bad either. The JDOM code is so-so and is used in a

Re: POM rewriting with DecentXML

2008-07-30 Thread Aaron Digulla
Jason van Zyl schrieb: It's official: I'm through with the W3C and the stupid XML parsers which came in it's wake. To allow to write XML filters and editors which don't ruin the layout, I've started my own XML parser project DecentXML. There are a couple that are decent. XMLBeans does a good

Re: POM rewriting with DecentXML

2008-07-30 Thread Aaron Digulla
Hi, I've finished all the main features and released version 1.0 of DecentXML on Google Code: http://code.google.com/p/decentxml/ Regards, -- Aaron Optimizer Digulla a.k.a. Philmann Dark It's not the universe that's limited, it's our imagination. Follow me and I'll show you something beyond

Re: POM rewriting with DecentXML

2008-07-30 Thread Michael McCallum
there is already http://www.xom.nu/ that is worth considering... its goal is correctness and roundtripability ;-)... its mature and stable... i have used it and been very happy On Wed, 30 Jul 2008 19:34:53 Stephen Connolly wrote: On Wed, Jul 30, 2008 at 8:33 AM, Stephen Connolly [EMAIL

POM rewriting with DecentXML

2008-07-29 Thread Aaron Digulla
Hi guys, It's official: I'm through with the W3C and the stupid XML parsers which came in it's wake. To allow to write XML filters and editors which don't ruin the layout, I've started my own XML parser project DecentXML. The main goals are to provide a library to manipulate exiting (small) XML

Re: POM rewriting with DecentXML

2008-07-29 Thread Brett Porter
wrong list? :) On 30/07/2008, at 6:21 AM, Aaron Digulla wrote: Hi guys, It's official: I'm through with the W3C and the stupid XML parsers which came in it's wake. To allow to write XML filters and editors which don't ruin the layout, I've started my own XML parser project DecentXML.

Re: POM rewriting with DecentXML

2008-07-29 Thread John Casey
still, sounds cool. Are you parking this at SF or Codehaus or anywhere like that? :-) -j Brett Porter wrote: wrong list? :) On 30/07/2008, at 6:21 AM, Aaron Digulla wrote: Hi guys, It's official: I'm through with the W3C and the stupid XML parsers which came in it's wake. To allow to