Extension Objects

The WebWorks ePublisher engine uses XML, XSL, and XPath as the foundation for all processing. While extremely powerful, XSL has many shortcomings when used to perform system level scripting tasks. Operations such as working with files and advanced string operations are not included in the standard XSL language.

XSL does provide a generic extension mechanism to add new features to the base language. WebWorks ePublisher provides a standard set of extension objects which enable XSL to generate all required formats.

General XSL Extensions

XSL extensions live in a specific namespace. Users can define their own prefix to associate with a given namespace, but in general sticking with a consistent naming convention makes life easier.

For example, the XSL namespace is:

To define a prefix for it, one adds an XSL namespace declaration to your XSL stylesheet:

Now the desired namespace can be referenced just using a prefix rather than the actual namespace. Therefore, the following two lines are equivalent:

Microsoft's XSL transform implementation does not support extension elements at this time. Therefore, methods must be called from within "select" contexts.

Microsoft Extensions

Extension objects that are defined and implemented by Microsoft as part of the .NET XSL transform runtime.

ePublisher Extensions

ePublisher implements a variety of extension objects to enable full processing of desired output within the language of XSL.

NOTE: Optional parameters are shown in italic.

Custom Extensions

The Microsoft XSL transform engine also supports custom extensions defined with script blocks.

DevCenter/Documentation/ExtensionObjects (last edited 2010-08-23 19:07:37 by BenAllums)