Namespace Example
Microsoft® Provisioning Framework (MPF) uses namespaces to associate providers and procedures with the Configuration Database. The following example shows a namespace named New Namespace that has one procedure, New Request.
<namespace name="New Namespace" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <procedure name="New Request" type="write" access="public"> <execute namespace="Test Namespace" procedure="Write Request"> <forEach name="organization" root="data" path="organizations/organization"/> <before source="organization" destination="executeData"> <xsl:template match="organization[@type='primary']"> <primaryOrg> <xsl:value-of select="@name"/> </primaryOrg> </xsl:template> <xsl:template match="organization[@type='secondary']"> <secondaryOrg> <xsl:value-of select="@name"/> </secondaryOrg> </xsl:template> </before> <after source="executeData" destination="data" destinationPath="orgSignup" mode="merge"/> </execute> </procedure> </namespace>In the procedure definition:
- The execute node calls Write Request, a procedure belonging to the namespace for the Test Namespace provider.
- The forEach, before, and after nodes define the XSL transformation. The forEach node restricts the range of the search to the request's /data/organizations/organization nodes. The xsl nodes in before select the values for the name attribute from the source (namely, organization nodes of type "primary" and "secondary") and pass them to the destination (the Write Request executeData node). Because this operation supplies data to Write Request, it occurs before Write Request is executed. The after node retrieves the name values from the Write Request executeData node and merges them into the /data/orgSignup of the response.
See Also
Developing Custom Namespaces, Registering Namespaces in MPF, XML Schema for Namespaces
Top of Page
) 1999-2002 Microsoft Corporation. All rights reserved.