Skip to main content

TransformXml

Description

Applies the provided XSLT file to the FlowFile XML payload. A new FlowFile is created with transformed content and is routed to the 'success' relationship. If the XSL transform fails, the original FlowFile is routed to the 'failure' relationship

Tags

transform, xml, xslt

Properties

In the list below required Properties are shown with an asterisk (*). Other properties are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
XSLT file nameXSLT file nameProvides the name (including full path) of the XSLT file to apply to the FlowFile XML content.One of the 'XSLT file name' and 'XSLT Lookup' properties must be defined.

Supports Expression Language, using FlowFile attributes and Environment variables.
XSLT Lookupxslt-controllerController Service:
StringLookupService

Implementations:
DistributedMapCacheLookupService
ElasticSearchStringLookupService
PropertiesFileLookupService
SimpleCsvFileLookupService
SimpleDatabaseLookupService
SimpleKeyValueLookupService
SimpleScriptedLookupService
XMLFileLookupService
Controller lookup used to store XSLT definitions. One of the 'XSLT file name' and 'XSLT Lookup' properties must be defined. WARNING: note that the lookup controller service should not be used to store large XSLT files.
XSLT Lookup keyxslt-controller-keyKey used to retrieve the XSLT definition from the XSLT lookup controller. This property must be set when using the XSLT controller property.

Supports Expression Language, using FlowFile attributes and Environment variables.
Indent *indent-outputtrue
  • true
  • false
Whether or not to indent the output.
Secure processing *secure-processingtrue
  • true
  • false
Whether or not to mitigate various XML-related attacks like XXE (XML External Entity) attacks.
Cache size *cache-size10Maximum number of stylesheets to cache. Zero disables the cache.
Cache TTL after last access *cache-ttl-after-last-access60 secsThe cache TTL (time-to-live) or how long to keep stylesheets in the cache after last access.

Dynamic Properties

NameValueDescription
An XSLT transform parameter nameAn XSLT transform parameter valueThese XSLT parameters are passed to the transformer

Supports Expression Language: Yes, evaluated using FlowFile Attributes and Environment variables.

Relationships

NameDescription
failureIf a FlowFile fails processing for any reason (for example, the FlowFile is not valid XML), it will be routed to this relationship
successThe FlowFile with transformed content will be routed to this relationship

Reads Attributes

This processor does not read attributes.

Writes Attributes

This processor does not write attributes.

State Management

This component does not store state.

Restricted

This component is not restricted.

Input Requirement

This component requires an incoming relationship.

System Resource Considerations

This component does not specify system resource considerations.

See Also