Contents

Popular
 Contents

The XML2XML policy allows a user to configure source and target document structures using the Fiorano Mapper and create an XSL used for transforming documents. Alternatively, it allows users to define XSL created using external tools. Documents passed to the component are transformed using the XSL defined.

Xalan (2.7.0) and Saxon (8.4) transformer implementations are bundled within the Fiorano environment for performing transformations.

Icon

To retrieve simple elements from XML, Assign Variables policy along with the XPath option is preferred. 

Configuration

The properties that have to be configured to use the policy are described below.


Figure 1: XML to XML Policy Configuration attributes

Property
Description

Skip Namespaces

Whether or not to skip adding namespace declarations to XML elements while converting.
XSLT Engine

Select the XSL Transformation engine to be used. Below are the available options:

  • Xalan
    Xalan implementation (org.apache.xalan.processor.TransformerFactoryImpl) is used to perform transformations.
  • Saxon
    Saxon implementation (net.sf.saxon.TransformerFactoryImpl) is used to perform transformations.

    Icon

    Saxon implementation does not support custom functions

  • Other
    This option should be used when a custom transformer implementation has to be used. Selecting this option shows property Transformer Factory class which can be used to provide the transformation factory implementation that should be used.
XSL

This is an XML-based style sheet which defines the XSL that is used to transform source data to the desired output.

It is the language for expressing style sheets. An XSL style sheet such as CSS is a file that describes how to display an XML document of a given type.

Example

To retrieve only the body of a message from a SOAP-based web service response, please use the following XSL:

Stripping SOAP envelope

Example

To achieve transformation of a basic XML input using a customized XSL template configured in the policy, please go through the following illustration:

1) Please use the following XSL to specify as template in the policy configuration.

XSL template

 

2) Please use the following XML to feed input to the policy.

XML input

 

3) The expected output of the policy execution is the transformed XML which is as follows:

Transformed XML output
Adaptavist ThemeBuilder EngineAtlassian Confluence