Skip to main content
Version: 4.17.1

XSLT component

The XLST component enables you to apply transformations to XML data with XSLT files.

XSLT (Extensible Stylesheet Language Transformations) is a language used to transform XML data into various (data) formats. This process, often called 'mapping', involves converting a source XML into a target format. XSLT relies on XPath to select elements and predefined functions to dynamically transform the source XML into a new output.

The output formats include:

  • XML
  • HTML
  • CSV
  • SQL queries
  • Plain text
  • Other data formats like JSON

The XLST component supports XSLT 2.0 files that use XPath 2.0 and uses the SaxParser library.

tip

We recommend MapForce to create XSLT files when your output format is an XML. It has a drag and drop interface that generates an XSLT file for you. Read more about Creating XSLT's with MapForce.

Using MapForce for XSLT

Not all XSLT functions that are available in MapForce are compatible with our XSLT component. Read more about Unsupported XSLT.

Configuration

The XSLT component has the following basic configuration options:

Upload method

Configure how you want to load your XSLT file into the component.

Options

  • XSLT File (default)
  • URL

XSLT File

Upload an XSLT file. The uploaded XSLT file is embedded in the flow version after you save and install it.

note
tip

Using XSLT File ensures that your XSLT files are versioned together with your flow versions.

URL

Specify a URL where your XSLT file can be located.

note
updates xslt at URL

Updates to the XSLT file at the URL location will not take effect until a flow is reinstalled, because it is compiled and cached during flow installation.

Compile XSLT

Use the Compile XSLT button to validate whether the XSLT file can be accessed and it, including its functions, is valid.

External references

Any external references within the XSLT file must use absolute URLs accessible by Dovetail to ensure these resources can be located.

<!-- Avoid this -->
<xsl:with-param name="file" select="'./code.xml'" as="item()"/>

<!-- Use this instead -->
<xsl:with-param name="file" select="'https://this.example.com/xslt/code.xml'" as="item()"/>

Unsupported XSLT

Not all XSLT functions or constructors supported by MapForce are compatible with this component. If you encounter an undefined error while compiling, it might indicate the use of an unsupported function or constructor.

Known unsupported functions:

  • auto-number
  • xslx-to-date

Known unsupported constructors:

  • xs:int, use xs:integer instead
Last update on Nov 18, 2024