Xslt2 Wyam.Xslt2

Transforms input documents using a supplied XSLT 2 template. Unlike the Xslt module, this one uses a library to support XSLT 2 and therefore needs to be included as a package.
This module uses Saxon with default settings. For more information see the Saxonica website.

Package

This module exists in the Wyam.Xslt2 package which is not part of the core distribution. Add the following preprocessor directive to your configuration file to use it:
#n Wyam.Xslt2
Alternativly, you can add all modules at once with the following preprocessor directive:
#n Wyam.All

Usage

  • Xslt2(DocumentConfig xsltPath)

    Transforms input documents using a specified XSLT file from the file system as provided by a delegate. This allows you to use different XSLT files depending on the input document.

    • xsltPath

      A delegate that should return a Wyam.Common.IO.FilePath with the XSLT file to use.

  • Xslt2(FilePath xsltPath)

    Transforms input documents using a specified XSLT file from the file system.

    • xsltPath

      The path of the XSLT file to use.

  • Xslt2(params IModule[] modules)

    Transforms input documents using the output content from the specified modules. The modules are executed for each input document with the current document as the input to the specified modules.

    • modules

      Modules that should output a single document containing the XSLT template in it's content.

GitHub