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, setAccessible(true) and a smart classloader ...

>> 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 to the Attribute interface? ;)

Aaron, I know you since the early Amiga days quite well and have a
very high opinion of you. So believe me: Such nonsense is way beyond
your abilities. Or do I really need to point out how you can extemd an
API, exposing additional powers, without loosing upwards
compatibility, by extending interfaces or adding methods to
implementations?


> Okay. Look at the last example in the tutorial 
> (http://code.google.com/p/decentxml/wiki/Tutorial).
> If StAX can pass this test case, I'm willing to have a look.

I know how difficult it can be to keep XML syntax from a lot of
experience. Typical areas of trouble are internal DTD (which we
hopefully no longer need to bother with, thanks heaven) and (as you
have pointed out) white space within opening and closing tags. But
that example is almost trivial. I think you are underestimating the
power of SAX, StAX, and friends quite a lot.

Jochen

-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to