3.12 Modifying or Preventing Synchronization of Specified Items by Using an XSLT Filter

If you are familiar with XSLT, you can configure the GroupWise Sync Agent to modify or drop specified items. The sample filter below drops items that contain a specified subtype or that have a subject equal to a specified string. With a little XSLT knowledge, you can modify this sample filter to meet your needs.

  1. Create the following directory:

    /var/lib/datasync/groupwise/filter
    
  2. Copy the following sample filter into a text editor:

    <?xml version='1.0' encoding='utf-8'?>
    
    <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/
                                                                  Transform'>
    
    <xsl:variable name="subtype" select="//*[local-name()='subType']"/>
    <xsl:variable name="subject" select="//*[local-name()='subject']"/>
    <xsl:template match="node()|@*">
      <xsl:if test="not(contains($subtype, 'SearchText') or 
                    contains($subtype, 'SearchText') or 
                    ($subject = 'put_the_subject_here'))">
        <xsl:copy>
          <xsl:apply-templates select="node()|@*"/>
        </xsl:copy>
      </xsl:if>
    </xsl:template>
    
    </xsl:stylesheet>
    

    This sample file is available in the following location:

    /opt/novell/datasync/syncengine/connectors/groupwise/filter/
                                                         sourceCustomExample.xslt
    
  3. Save the text file as sourceCustomSample.xslt in the new groupwise/filter directory that you created in Step 1.

  4. Modify the file to identify the items that you want the GroupWise Sync Agent to drop.

  5. Save the sourceCustomSample.xslt file, then exit the text editor.

  6. When you are ready to put the new filter into effect, rename sourceCustomSample.xslt to sourceCustom.xslt, then restart the GroupWise Sync Agent.

  7. (Conditional) If you need to remove the new filter, rename the sourceCustom.xslt file to a different name, then restart the GroupWise Sync Agent.