XSLT File Locations

When you define XSLT files for an XSLT content formatter, you can define multiple files to transform data for different devices and locales. The XSLT content formatter uses a directory structure to locate the correct file for a transform.

When the distributor calls a content formatter, the data sent to the content formatter includes information about the subscriber locale and device type of the notification recipient.

  • The subscriber locale is identified using the set of locale strings supported by Notification Services. For a list of locales, see Subscriber Locale Codes.
  • The device type can be any string, as long as it is used consistently throughout the application. The device type used by the subscription management interface and the content formatter must match.

When you define a content formatter, you specify the name and a base directory for XSLT files. The content formatter appends the locale and device names to the directory path to find the relevant XSLT file. The content formatter searches folders in the following order:

  • XSLTBaseDirectory\SubscriberLocale\DeviceType
  • XSLTBaseDirectory\SubscriberLocale
  • XSLTBaseDirectory\DeviceType
  • XSLTBaseDirectory

If the XSLT file does not exist in this location, the content formatter looks in the relevant subscriber locale folder, then the relevant device folder. If no XSLT file exists in this location, the XSLT content formatter looks in the base directory.

Note

The distributor does not provide the subscriber locale and device in the notification data, so you cannot perform conditional formatting for device and locale within a single XSLT file unless you have other values in the notification data that you can use for these purposes.

Example

In the following example, you provide transformations for the combinations shown.

Recipient information XSLT path

French, Canada, all device types

BaseDirectory\fr-CA\transform.xsl

English, Canada, all device types

BaseDirectory\en-CA\transform.xsl

English, United States, CellPhone device type

BaseDirectory\en-US\CellPhone\transform.xsl

English, United States, all other device types

BaseDirectory\en-US\transform.xsl

All other locales and devices

BaseDirectory\transform.xsl

See Also

Concepts

Creating XSLT Files
Defining the XSLT Content Formatter
Developing a Custom Content Formatter

Other Resources

XSLT Content Formatter
Defining Notification Classes
Defining Notification Services Applications

Help and Information

Getting SQL Server 2005 Assistance