Class XslTemplateProvider

XSL Driven Template Provider.

Inheritance
System.Object
XslTemplateProvider
Namespace: Mediachase.Commerce.Engine.Template.Providers
Assembly: Mediachase.Commerce.dll
Version: 10.8.0
Syntax
public class XslTemplateProvider : TemplateProvider

Constructors

XslTemplateProvider()

Declaration
public XslTemplateProvider()

Properties

ApplicationName

Gets or sets the name of the application.

Declaration
public override string ApplicationName { get; set; }
Property Value
Type Description
System.String

The name of the application.

Overrides

TemplateSource

Gets or sets the template source. The source should be of type c:\mysite\templates{0}{1}.xsl where {0} will be either replaced with specific language or default and {1} will be replace with a template name specified.

Declaration
public string TemplateSource { get; set; }
Property Value
Type Description
System.String

The template source.

Methods

Initialize(String, NameValueCollection)

Initializes the provider.

Declaration
public override void Initialize(string name, NameValueCollection config)
Parameters
Type Name Description
System.String name

The friendly name of the provider.

System.Collections.Specialized.NameValueCollection config

A collection of the name/value pairs representing the provider-specific attributes specified in the configuration for this provider.

Exceptions
Type Condition
System.ArgumentNullException

The name of the provider is null.

System.InvalidOperationException

An attempt is made to call System.Configuration.Provider.ProviderBase.Initialize(System.String,System.Collections.Specialized.NameValueCollection) on a provider after the provider has already been initialized.

System.ArgumentException

The name of the provider has a length of zero.

Process(String, CultureInfo, IDictionary)

Processes the specified template with a context provided.

Declaration
public override string Process(string template, CultureInfo culture, IDictionary context)
Parameters
Type Name Description
System.String template

The template.

System.Globalization.CultureInfo culture

The culture.

System.Collections.IDictionary context

The context.

Returns
Type Description
System.String

The processed template with context embedded.

Overrides