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 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.
>>
>>
> Why not fix StAX?
>
>  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.
>>
>>
> Yes, but your preservation tactics and impetus for doing this is predicated
> on having *read* something first.
>
>  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.
>>
>>
> We could get you into StaX in five minutes if you wanted to patch it.
>
>  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.
>>
>>
> Dan, he uses StAX (but knows Tatu who wrote it) and said if it isn't
> possible now it would be easy to fix.
>
>  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.
>>
>>
> If we've read in the model using the tools that we currently use which
> knows about everything about the whitespace, and then manipulate the model
> in memory how exactly would we integrate your writer?
>
> 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...


>
>
>  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]
>>
>>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder,  Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
>
> the course of true love never did run smooth ...
>
>  -- Shakespeare
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to