5.4 Using the Parameters that Identity Manager Passes

The Metadirectory engine passes the policy style sheets the following parameters that the style sheet can use.

When you create a new stylesheet in iManager or Designer, it is pre-populated with a stylesheet that contains the declarations for these parameters.

When using the query and command parameters with the schema mapping policies, input transformation policies, and output transformation policies. The following limitations apply:

Query Processors

Use of the query processors depends on the Novell® XSLT implementation of extension functions. To make a query, you need to declare a namespace for the XdsQueryProcessor interface. This is done by adding the following to the <xsl:stylesheet> or <xsl:transform> element of the style sheet.


When you create a new stylesheet in iManager or Designer, it is pre-populated with the namespace declaration. For more information about query processors see Class XdsQueryProcessor

The following example uses one of the query processors (the extra long lines are wrapped and do not begin with a <):

<!-- Query object name queries NDS for the passed object name -->

<xsl:template name="query-object-name">
   <xsl:param name="object-name"/>

<!-- build an xds query as a result tree fragment -->
   <xsl:variable name="query">
               <search-class class-name="{ancestor-or-self:

<!-- NOTE: depends on CN being the naming attribute -->
               <search-attr attr-name="CN">
                   <value><xsl:value-of select="$object-name"/
<!-- put an empty read attribute in so that we don’t get -->
<!-- the whole object back                               -->

<!-- query NDS -->
<xsl:variable name="result" select="query:query($destQuery

<!-- return an empty or non-empty result tree fragment -->
<!-- depending on result of query                      -->
   <xsl:value-of select="$result//instance"/>

Here is another example.

<?xml version="1.0"?>
<xsl:param name="srcCommandProcessor"/>

<xsl:template match="node()|@*">
          		<xsl:apply-templates select="@*|node()"/>

<xsl:template match="add">
          		<xsl:apply-templates select="@*|node()"/>

	<!-- on a user add, add Engineering department to the source object -->
	<xsl:variable name="dummy">
     		<modify class-name="{@class-name} "dest-dn="{@src-dn}">
          			<xsl-copy-of select="association"/>
          			<modify-attr attr-name="OU">
                    					<value type="string">Engineering</value>
     	<xsl:variable name="dummy2"
         select="cmd:execute($srcCommandProcessor, $dummy)"/>