A filter of type NameIDFormat adds SAML <md:NameIDFormat> elements to metadata in order to drive software behavior (primarily Name Identifier format selection).
Sequences of string-valued <Format> elements are supplied as filter content. When a child element such as <Entity> or <ConditionRef> or <ConditionScript> evaluates to true, the formats are applied to all the recognized format-supporting roles of the corresponding entities. The filter does not have the capability to limit the roles to which formats will be attached.
The following example is similar, but the specification of the entities to apply the formats to is handled with inline scripts. Obviously these scripts aren't particularly useful but they demonstrate the syntax.