maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milos Kleint" <mkle...@gmail.com>
Subject Re: POM rewriting with DecentXML
Date Tue, 05 Aug 2008 07:42:57 GMT
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 really care if it
screws up attribute spacing, but newly added content needs to fit in.

Milos

On Tue, Aug 5, 2008 at 9:28 AM, Aaron Digulla <digulla@hepe.com> wrote:
> Quoting Jason van Zyl <jason@maven.org>:
>
>> 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 attribute and the ">", between "</"
> and the end element name. Same goes for all pull parsers.
>
> Not sure about CDATA but I guess StAX can't preserve that, either. Lastly,
> StAX is about *reading* XML. DecentXML is about *writing* XML *preserving*
> the original format 100%, no compromises.
>
> 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?
> 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.
>
> Just looking at an XML gives you a visual clue: these guys couldn't care
> less how it *looks* as long as their tools can read it.
>
> As I said: My parser is probably not so useful as a general purpose
> replacement for POM *reading* in general. It ought to be used in the Maven
> artifact plugin and any other code which *writes* POM files.
>
> 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 the limits."
> http://www.pdark.de/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message