I found the sample below in the documentation for the GW Driver, but can't
make it work. How/where do I apply XSLT if using IDM 2 and GW Driver? I
tried a new subscriber ommand Transform policy and chose XSLT (pasted in
XSLT seen at the end) and driver would not start.

From GW Driver documentation
IMPORTANT:When the Visibility GroupWise attribute is explicitly changed by
a style sheet, the corresponding eDirectory attribute must also be updated
by the style sheet. Otherwise, the eDirectory User and the GroupWise
account are not properly synchronized.

For this attribute, eDirectory is considered the authoritative data source.
When the attributes are not synchronized, it is possible that the old value
in eDirectory could be used to incorrectly update the correct value in the
GroupWise account. Updating the corresponding attribute in eDirectory can
prevent this. In the example XSLT code segment below, when an eDirectory
User is disabled, the GroupWise account is disabled and the visibility
attribute is set to 4. This prevents the account from appearing in the
address book. The visibility attribute (50076) is set in GroupWise,
together with the disable. The visibility attribute (NGW: Visibility) is
set in eDirectory using the channel write-back Identity Manager functionality.

<!-- User Disable, Remove Address Book Visibility
When a GroupWise Account is Disabled
remove the account from the address book visibility.
Keep eDirectory and GroupWise object synchronized by
updating the attributes in both systems.
<xsl:template match="modify-attr[@attr-name=’50058’]">
<!-- When Login Disabled is true -->
<xsl:if test="add-value//value[.=’true’]">
<!-- Update the visibility attribute in GroupWise -->
<!-- Copy the <modify> through to update GroupWise -->
<!-- copy everything through -->
<xsl:apply-templates select="@*|node()"/>
<!-- Set the GroupWise visibility attribute (50076) to "4"
so the account does not show in the address book -->
<modify-attr attr-name="50076">
<value type="int">4</value>
<!-- Update the visibility attribute in eDirectory -->
<!-- Send a command to modify "NGW: Visibility" in the
eDirectory User object -->
<xsl:variable name="command">
<modify class-name="User">
<!-- dest-dn and dest-entry-id identify the User
object in eDirectory -->
<xsl:attribute name="dest-dn">
<xsl:value-of select="../@src-dn"/>
<xsl:attribute name="dest-entry-id">
<xsl:value-of select="../@src-entry-id"/>
<!-- Set NGW: Visibility (50076) in eDirectory to
"4" -->
<modify-attr attr-name="NGW: Visibility">
<value type="int">4</value>
<xsl:variable name="result"
select="cmd:execute($srcCommandProcessor, $command)"/>