treebind
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Treebind] Binding arbitrary data


From: Eric van der Vlist
Subject: Re: [Treebind] Binding arbitrary data
Date: Fri, 13 May 2005 13:31:34 +0200

Hi,

On jeu, 2005-05-12 at 17:39 +0200, Eric van der Vlist wrote:

>   
> A simple way to achieve this would be to add a third bind attempt in
> JavaObjectSink :
> 
>      1. It tries to use a "adder method" (typically a method called
>         "addFoo" but that name can be overridden). 
>      2. If that fails it tries to use a "setter method" (typically a
>         method called "setFoo" but that name can be overridden).
>      3. [new] If that fails, it tries to use a "generic adder
>         method" (typically a method called "add" but that name can be
>         overridden). This method has two parameters (a name and the
>         object).

Since this didn't seem to make anyone scream, I have committed a version
that implements this behaviour :

http://savannah.nongnu.org/cgi-bin/viewcvs/treebind/treebind/src/org/treebind/JavaObjectSink.java

(revision v1.2).

The next feature I'll need for accepting these arbitrary data in the
ability to define kind of binding wildcards (similar to xs:any W3X XML
Schema components).

Right now, we can bind XML namespaces to Java packages and for each
element or attribute name in one of these namespaces, TreeBind tries to
bind to the corresponding class in the corresponding package. 

What I am proposing now is to bind all the elements and attributes of a
namespace or a set of namespaces into a specific class.

Any thoughts?

Thanks,

Eric
-- 
Freelance consulting and training.
                                            http://dyomedea.com/english/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------





reply via email to

[Prev in Thread] Current Thread [Next in Thread]