Formatting Team Foundation Server Notifications

Use XSL to format event notifications. This transforms the event XML to the formatted notification.

To use XSL formatting, create an .xsl file in the D:\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\Web Services\Services\v1.0\Transforms directory on the application tier. To use template formatting, create a .template file in the same directory. If both files are already in that directory for a given event type, use the template file.

XSL Example

The following is an example of an XSL transform.

<xsl:stylesheet version="1.0" xmlns:xsl="">
    <!-- Normal file content -->
    <xsl:template match="/">
        <title>Visual Studio Checkin Notification</title>
        <h1>Visual Studio Notification</h1>

        <p>One or more object was committed to the version control repository. Additional
            information is available by selecting one of the links below.</p>
        <table cellpadding="3" cellspacing="0">
            <xsl:for-each select="CheckInEvent/Artifacts/Artifact[@artifactType='Changeset']">
                    <td><xsl:apply-templates select="Uri" /></td>
            <table cellpadding="3" cellspacing="0">
                <xsl:for-each select="CheckInEvent/Artifacts/Artifact[@artifactType='VersionedItem']">
                    <tr><td><xsl:apply-templates select="Uri" /></td></tr>
        <p>You are receiving this notification because of a subscription to events affecting
            one or more of the above files and/or changesets. Contact your project
            administrator if you want to stop receiving these notifications.</p>

    <xsl:template match="Uri">
            <xsl:attribute name="HREF">
            <xsl:value-of select="."/> 


See Also


Eventing Service

Eventing Service Architecture

Defining TFS Events

Subscribing to TFS Events

Filtering Team Foundation Server Events

Integrating a Web Service Notification Customer

Integrating with Team Foundation Server Security