Compartilhar via


Configuring Content Formatters

When a subscription rule generates a notification, it inserts raw notification data into the notification table. This data is of interest to the subscriber, but must be converted to readable form before delivery. Content formatting can transform the raw notification data into friendly text that is customized for the destination device and locale.

This topic discusses how content formatting works and how to define content formatters for your application. For information on the standard content formatter, see XSLT Content Formatter. For information about custom content formatters, see Developing a Custom Content Formatter.

Formatting Notifications

After Notification Services generates a batch of notifications, the batch is separated into work items, and the notifications in each work item are delivered using the same delivery channel. The distributor can then pick up work items and make the notifications in them available to the content formatter for the notification class.

The content formatter takes the notifications in a work item and converts the raw data into messages suitable for the end recipient. The content formatter can use the device and locale information to customize the notifications per device and location. For example, if a notification is going to the e-mail of a French-speaking subscriber, the content formatter can turn the raw notification data into an e-mail message containing French text.

The distributor then takes the formatted notification strings, adds delivery protocol headers, and distributes the notifications to the delivery channels.

Defining a Content Formatter

When you define a notification class, you must configure a content formatter for its notifications by specifying the content formatter's class name, assembly name, and arguments.

To configure a content formatter

Class Name

You must provide the name of the class that implements the content formatter.

  • For custom content formatters, the class name must be fully qualified, including any namespace prefix. For more information about namespace naming conventions, see Namespace Naming Guidelines, in the Microsoft MSDN Library.
  • For the standard XSLT content formatter, provide just the name, which is XsltFormatter. For more information about implementing the XSLT content formatter, see XSLT Content Formatter.
To define the class name

Assembly Name

If you are defining a custom content formatter, provide the name of the assembly that contains the content formatter class. The name must include either the fully qualified path or fully qualified assembly name.

If you are defining the XSLT content formatter, omit the assembly name. There is more information about how to do this in the reference topics below.

To define the assembly name

Arguments

Notification Services can pass arguments to content formatters. If your content formatter uses arguments, provide the argument names and values in the content formatter definition.

If you are using a content formatter developed by a third party, the content formatter should come with documentation on the required and optional arguments. Arguments for the XSLT content formatter are listed in the XSLT Content Formatter section.

To define argument names and values

See Also

Concepts

Defining the Notification Schema
Specifying Digest or Multicast Delivery
Specifying the Notification Batch Size
Specifying the Notification Expiration Age
Developing a Custom Content Formatter

Other Resources

XSLT Content Formatter
Defining Notification Classes
Configuring Delivery Protocols
Defining Notification Classes
Defining Notification Services Applications

Help and Information

Getting SQL Server 2005 Assistance