Timothy Larson wrote:

--- Sylvain Wallez <[EMAIL PROTECTED]> wrote:


Hehe, thinking before coding is often a good thing ;-)



Actually I coded it a few weeks ago and only started thinking when I considered committing the code =:)



Well, at least you think before committing ;-P


Why don't you do it the way it's done in the <wb:value> binding? For binding to an XML document, it is possible to specify a convertor, that can be totally different from the one that will be used to display the value to the user. Note that this converter is optional, and if not present, the default converter for the datatype is used.



Sounds good, something like this?
<wd:default>
<wd:convertor datatype="" type="">
<!-- bla bla bla/ -->
</wd:convertor>
<wd:value>Put default value to be converted here</wd:value>
</wd:default>
This still leaves the question of how to figure out the locale of the definition file.



Mmmh... We must have a way to define it somehow. Should it be defined on each <wd:default>, or on some enclosing element like the <wd:form> itself?


Or can't we simply use the xml:lang attribute, meaning we crawl up the XML elements starting at <wd:convertor> until we find this attribute?

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




Reply via email to