commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@btopenworld.com>
Subject Re: [lang] Interpolation
Date Sat, 28 Aug 2004 08:53:33 GMT
On Sat, 2004-08-28 at 11:42, Gary Gregory wrote:
> > Since Interpolation is so close in intent to MessageFormat, I seems less
> > confusing to Java (as opposed to Perl) people to use a
> > MessageFormat-like name. For example MappedMessageFormat is not bad.
> > [1] http://java.sun.com/j2se/1.3/docs/api/java/text/MessageFormat.html

From: "Simon Kitching" <simon@ecnetwork.co.nz>
> I just wanted to note that commons-digester has an implementation of
> this sort of thing in o.a.c.digester.substitution.MultiVariableExpander
>
> It has the additional feature that multiple maps can be used; eg
>  "A ${var} and #{another} and an env{PATH} variable too."
>
> Variables of form ${...} are looked up in an associated map, which
> is different from the map for #{...} variables, which is different
> again from env{...} variables, etc. The user can define any sequence of
> chars as a "marker" string, and then specifies a map associated with
> that marker string. When a marker string is found preceding a brace pair
> "{varname}" the associated map is used.

+1. Both of these are excellent ideas, and would make the [lang] version
really usable.

Potentially, we could use the digester version to start from. (In new
commons style, there would be copy-paste with reference to original, not
dependency)

Stephen


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message