Share via


Provisioning Schema::before

Element that encapsulates an XSL transformation (insert, merge, replace, or move) that a provisioning engine performs before an execution step in a provisioning procedure. This element is part of the provisioning schema of Microsoft Provisioning Framework (MPF).

Note

Source and destination elements can belong to different namespaces. However, after the transformation, the source element will still belong to the source namespace. If the destination element specifies a namespace but the source element does not, the transformed source element will have an empty xmlns attribute ().

Arguments

Input Argument Description

allowNullTransform

Optional. Boolean that specifies what happens if the XSL transformation returns an XML string that does not contain a valid XML element. If set to 0 (default), the provisioning engine returns an error. If set to 1, the engine returns a null value. In this case, the destination node is not updated, and execution proceeds.

destination

Required. Destination node for the transformed data, expressed as one of the following values:

destinationPath

Optional. XPath for the destination node where the transformed node is to be inserted, merged, or replaced.

ifNull

Optional. Enumeration that specifies what happens if the source node specified by attributes source and sourcePath is not present.

  • "fail" (default): Returns a failure.

  • "ignore": Treats the source node as optional.

  • "skip": Skips execution for the current iteration of the loop.

mode

Optional. Enumeration that specifies the action to perform on transformed XML:

  • "insert" (default): Inserts a new node under the target node.

  • "merge": Merges the contents of the new node with the contents of the target node.

  • "replace": Replaces the target node with the new node.

  • "move": Passes content into the transformation by reference rather than by value. This setting offers the best performance and automatically removes the source XML node (identified by the source and sourcePath attributes) from the source tree. Be careful not to use this setting in situations where the source node is needed for other operations.

source

Required. Destination node for the transformed data, expressed as one of the following values:

sourcePath

Optional. XPath for the source node to transform relative to the value of the source attribute.

Remarks

No remarks.

Sample Code

Example XML Request

<request xmlns:xsl="https://www.w3.org/1999/XSL/Transform"> 
  <data> 
    <organizations> 
      <organization name="OrgA" type="primary"/> 
      <organization name="OrgB" type="secondary"/> 
      <organization name="OrgC" type="secondary"/> 
    </organizations> 
  </data> 
  <procedure> 
    <execute namespace="New Namespace" procedure="New Request"> 
      <before source="data" destination="executeData" mode="merge"/> 
      <after source="executeData" destination="data" mode="merge"/> 
    </execute> 
  </procedure> 
</request>

Applies To

Provisioning Schema; Provisioning Schema::execute; Provisioning Schema::queue; Provisioning Schema::transform

See also

Tasks

Provisioning Schema::execute
Provisioning Schema::queue
Provisioning Schema::transform
Provisioning Schema::data
Provisioning Schema::context
Provisioning Schema::procedureData
Provisioning Schema::executeData
Provisioning Schema::forEach