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
> 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 > is changed to </foo>
for me preserving comments and the general layout, such as indentation
is much more important than attribute spacing.

as Milos mentioned: how do you decide where to slot new elements, like
dependencies if there weren't any dependencies in the original pom - are
they always appended? do they inherit the surrounding indentation?

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.
>

usually I'm more concerned about getting it working than the *look*, in
fact often what I need is an XML formatting tool that I can apply to our
poms to make them consistent (ie. like formatting code in an IDE)

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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Cheers, Stuart

Reply via email to