Using 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:
<xsl:stylesheet version="1.0" 
Now the desired namespace can be referenced just using a prefix rather than the actual namespace. Therefore, the following two lines are equivalent:
<xsl:variable name="VarNew" select="'Hello'" />
<variable xmlns="" name="VarNew" select="'Hello'" />
Microsoft's XSL transform implementation does not support extension elements at this time. Therefore, methods must be called from within "select" contexts.
<xsl:value-of select="wwexsldoc:Document($VarResult, $VarPath)" />
<xsl:variable name="VarDocumentWrite" select="wwexsldoc:Document($VarResult, $VarPath)" />
Microsoft Extensions
Extension objects that are defined and implemented by Microsoft as part of the .NET XSL transform runtime.
Microsoft implemented additional methods not part of the XSLT 1.1 standard. This work was done prior to the XSLT 2.0 and EXSLT specifications being finalized.
msxsl:node-set(string textualXML):
Converts textual XML into a node set in a new XML document. Most often used to convert intermediate XML back into a working node set for additional processing.
A node set equivalent to the provided textual XML.
Note: The Microsoft XSL transform engine also supports custom extensions defined with script blocks.
Using ePublisher XSLT Extensions
ePublisher implements a variety of extension objects to enable full processing of desired output within the language of XSL. In order to use them in XSL transforms they must be declared.
Here is an example of how to define namespace in you XSL file:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns="urn:WebWorks-Images-Schema"
exclude-result-prefixes="xsl wwlog"

Was this helpful?
Last modified date: 08/16/2017