DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36397>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36397





------- Additional Comments From [EMAIL PROTECTED]  2005-08-29 02:41 -------
I put this together quickly, just to make it work, but if you think it is worth
integrating in the codebase I can polish it accordingly. 

%else or %elseif without %if would cause properties until %end to be ignored, as
if there was an %if at the top of the file. The parsing code is stateless right
now, if we want to validate the structure I could keep a stack with the active
directives.

I'll take care to define the constants for the directives and disable reloading
during parsing.

Do you think it's more consistent to have the conditions as ${prop}=val as
opposed to assuming that lhs is a prop: prop=val?

Also, one shorcoming of this implementation is that the directives can only
access properties from the current file. Would there be any elegant manner to
use properties from another object? To me the ideal usage scenario is to have
one big property file (myproduct.properties) with conditional directives which
is hidden from the user (kept in some jar) and then provide the properties from
the directives in a customization file or as system properties. Coming back to
my original example, this would be something like postgres.profile and 
jndi.profile

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

Reply via email to