commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@btopenworld.com>
Subject Re: [betwixt] bug: output is in reverse order of input...
Date Sat, 15 Jun 2002 12:28:44 GMT
Just a thought...could the Comparator class be used to do the sorting? Why
write your own if one exists?

Stephen

----- Original Message -----
From: "robert burrell donkin" <robertdonkin@mac.com>
To: "Jakarta Commons Developers List" <commons-dev@jakarta.apache.org>
Sent: Saturday, June 15, 2002 11:40 AM
Subject: Re: [betwixt] bug: output is in reverse order of input...


> in terms of default orderings, though i can only think really of one
> implementation (alphabetic) it's probably better design to use an
> interface and give users the choice.
>
> it might not solve jon's problem, though.
>
> users should be able to set the order of the elements by creating .betwixt
> files or XMLBeanInfo classes. the bit that's going to be tricky about
> taking an order from the xml comes from preserving this functionality
> whilst also allowing the element order to be dynamically determined by the
> order in which they are read from the xml.
>
> anyway, i think that better default ordering is something that betwixt
> should be able to do. i'd think that the best approach would be to create
> a general system (probably along the lines you suggest) and then see
> (later) if we can use it for dynamic reordering (if we have to). if you
> want to see what you come up with, i'll keep out of your way.
>
> - robert
>
> On Saturday, June 15, 2002, at 10:37 AM, Martin van den Bemt wrote:
>
> > I was thinking more in the way of solving this issue by creating a
> > couple of XMLOrdering objects, which can be used in a similar way as the
> > NameMapper. I didn't write a use case yet for it, so it's just a mind
> > spin, but this can give the flexibility for people to choose how they
> > want to order it.. (or even write there own ordering).
> >
> > Mvgr,
> > Martin
> >
> > On Sat, 2002-06-15 at 10:40, robert burrell donkin wrote:
> >>
> >> On Thursday, June 13, 2002, at 09:27 PM, Jon Scott Stevens wrote:
> >>
> >>> on 6/13/02 11:24 AM, "robert burrell donkin" <robertdonkin@mac.com>
> >>> wrote:
> >>>
> >>>> am i right in assuming that ordering the element automatically from
> >>>> the
> >>>> parsing would only work if the same XMLIntrospector instance is used
> >>>> to
> >>>> read and write?
> >>>
> >>> That is the case right now for me anyway...
> >>
> >> so this is a possible solution.
> >>
> >> it's probably do-able but will be tricky to write and may have
> >> unfortunate
> >> side effects.
> >>
> >>
> >> i was thinking that maybe we should have betwixt order elements by
> >> default
> >> in alphabetic order. at least that way it's obviously deterministic
> >> (since
> >> bean introspection doesn't seem to be) and people who have control of
> >> their own DTDs know how to write them so that they are compatible with
> >> betwixt's defaults.
> >>
> >> i don't know if this would solve your problem...
> >>
> >> - robert
> >>
> >>
> >> --
> >> To unsubscribe, e-mail:
<mailto:commons-dev-unsubscribe@jakarta.apache.
> >> org>
> >> For additional commands, e-mail:
<mailto:commons-dev-help@jakarta.apache.
> >> org>
> >>
> >>
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
<mailto:commons-dev-unsubscribe@jakarta.apache.
> > org>
> > For additional commands, e-mail:
<mailto:commons-dev-help@jakarta.apache.
> > org>
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:commons-dev-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message