commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Price <epr...@ptc.com>
Subject Re: [digester] setting a default value for a callMethod
Date Mon, 17 Mar 2003 21:51:41 GMT


Simon Kitching wrote:


> Just on a side-note, I am not sure that your XML design is entirely
> sound. To me,
> 
> <foo>1</foo>  means "here is a foo, with value 1".
> <foo/> means "here is a foo, with no value".
> 
> You appear to want to pretend that <foo/> doesn't exist - which doesn't
> seem right to me. If <foo/> has no meaning, then why is it in the input
> at all?

Well, that's a good point.  The only reason I would rather leave it in 
the input is that I am using the XML file as a user-friendly means of 
supplying data to my program.  (Another alternative I had considered was 
a Preferences or Properties file, but I wanted to try Digester after 
hearing how good it is -- and it *is* good.)

Ideally I'd just give my users an empty XML file and say "go ahead and 
fill out the values that apply, but leave the ones that don't alone".

> Regardless of the above digression, I think implementing a custom Rule
> object should solve your problem.

Thanks Simon, I will investigate the Rule classes.



Erik


Mime
View raw message