Skip to content

multivalue extracts

Ryan Newington edited this page Jun 6, 2016 · 2 revisions

mulivalue-extracts

The <multivalue-extracts> element allows further parsing of a multivalued attribute extracted using the object-extract regular expression to be broken down into its individual elements. A common usage of this is splitting a comma separated list of group members into individual values.

The <multivalue-extracts> element is optional, but if it is present, it must contain one or more <multivalue-extract> elements.

syntax

XML Attribute Description Allowed Values
capture-group-name The name of the capture group defined in the object-extract element that contains the values to extract Any valid regular expression capture group name
attribute The name multivalued attribute to insert the extracted values into Any multivalued attribute defined in the MA schema for the specified object class
The inner text of the element should contain the regular expression used to find the values within the string. Standard NET regular expression syntax is used. Capture groups are not required. All matches found in the string will be treated as values to add to the multivalued attribute.

Example

<import-mapping>
    <object-extract><![CDATA[^(?<accountName>.+)?:\*?:(?<gid>.+)?:(?<members>.+)?$]]></object-extract>
    <multivalue-extracts>
        <multivalue-extract capture-group-name="members" attribute="member"><![CDATA[\w\d- ]+]]></multivalue-extract>
    </multivalue-extracts>
</import-mapping>

The example shown takes the capture group members from the object-extract action, and matches each group of word, digit, hyphen, and space characters, and places each match in the member attribute.

Clone this wiki locally