Class DefaultFragmentTransformer

java.lang.Object
com.atlassian.confluence.content.render.xhtml.transformers.DefaultFragmentTransformer
All Implemented Interfaces:
MigrationAware, FragmentTransformer

public class DefaultFragmentTransformer extends Object implements FragmentTransformer, MigrationAware

This can be thought of as the top-level Transformer since it includes the behaviour of writing out any events that have no specific handling configured.

There are two ways of causing transformation:

  1. Configure a List of ElementTransformer which will transform individual elements read.
  2. Configure a List of FragmentTransformer which will take well formed fragments of XML and transform them.
These two mechanisms can be combined.

Note that in both FragmentTransformer and ElementTransformer the order of the configured transformers is the order they are applied. All ElementTransformer are applied before FragmentTransformer.

If you prefer to scope the application of ElementTransformer to a particular fragment of XML then instead of configuring them here in the DefaultFragmentTransformer you should instead use an ElementTransformingFragmentTransformer which will scope the Element transformations to a particular fragment of XML.