I want to dynamically assign prefix e.g. either “ns2” or “Saa” or no prefix at all depending on certain condition. It seems that the NamespacePrefixMapper class can not be used anymore. If I define Xmlns prefix in package-info.java, how do I dynamically based on a condition assign prefix ns2 or Saa or blank for that matter?