Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

XSLT File Locations

SQL Server 2005

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.

ms166399.note(en-US,SQL.90).gifNote:
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.

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.