Class AdvancedMessageFormat

java.lang.Object
org.apache.fop.util.text.AdvancedMessageFormat

public class AdvancedMessageFormat extends Object
Formats messages based on a template and with a set of named parameters. This is similar to MessageFormat but uses named parameters and supports conditional sub-groups.

Example:

Missing field "{fieldName}"[ at location: {location}]!

  • Curly brackets ("{}") are used for fields.
  • Square brackets ("[]") are used to delimit conditional sub-groups. A sub-group is conditional when all fields inside the sub-group have a null value. In the case, everything between the brackets is skipped.