There is no need to do this in XSLT it is much easier in Policy, and
easier to trace, and can be done in the Command transform or Output
transform, depending on whether the attributes are in your filter or not.


On 7/3/2012 11:26 PM, ayeungied wrote:
>
> I the coding of the update-sv-attribue also
>
> <xsl:template name="update-sv-attribute">
> <xslaram name="cn"/>
> <xslaram name="mailou"/>
> <xslaram name="attr"/>
> <xslaram name="value"/>
> <xsl:if test="string-length($cn) > 0 and string-length($mailou) > 0
> and string-length($attr) > 0">
> <xsl:value-of select="concat('dn: CN=', string($cn), ',OU=',
> string($mailou), ',', $ObjContainer, $crlf)"/>
> <xsl:value-of select="concat('changetype: modify', $crlf)"/>
> <xsl:choose>
> <xsl:when test="string-length($value) > 0">
> <!-- replace with the new value -->
> <xsl:value-of select="concat('replace: ', $attr, $crlf)"/>
> <xsl:value-of select="concat($attr, ': ', $value, $crlf)"/>
> </xsl:when>
> <xsltherwise>
> <!-- remove the attribute -->
> <xsl:value-of select="concat('replace: ', $attr, $crlf)"/>
> </xsltherwise>
> </xsl:choose>
> <xsl:value-of select="'-'"/>
> <xsl:value-of select="$crlf"/>
> <xsl:value-of select="$crlf"/>
> </xsl:if>
> </xsl:template>
>
> The coding cannot be inserted to the rule set directly, would anyone
> can point me to the right direction?
>
> Thanks & Regards,
>
> Agnes
>
>