Bruno Dumon dijo:
The convertors in Woody are for translating between string and object representations.
It has been proposed before to add some casting methods to the
datatypes, for example:
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=106776875918689&w=2
Thanks Bruno for your answer.
I saw the mail yesterday. Thanks for the link. Now, I am willing to do that, but need your help.
The receipt of this:
1- As Sylvain suggested I will add 2 new methods to the Datatype interface.
2-Add this methods in o.a.c.woody.binding.ValueJXPathBinding
I had a deeper look at JXPath, and this doesn't seem to be so easy, as JXPath doesn't provide us a way to know the type of the data that has to be set.
Furthermore, JXPath relies on an internal type conversion mechanism in TypeUtils, which can be extended with a TypeConverter. But this TypeUtils accepts only one TypeConverter, which is stored in a static variable !!
Sylvain
-- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects } Orixo, the opensource XML business alliance - http://www.orixo.com
