Class EditorXhtmlTransformer
- java.lang.Object
-
- com.atlassian.confluence.content.render.xhtml.editor.EditorXhtmlTransformer
-
- All Implemented Interfaces:
Transformer
public class EditorXhtmlTransformer extends Object implements Transformer
Transformer editor formatted XHTML to storage format XHTML. Note that the editor cannot be relied on to provide valid XHTML and therefore you will need to run the editor data through some kind of cleaner such as theHtmlToXmlConverter
to ensure that this transformer is handling XHTML.
-
-
Constructor Summary
Constructors Constructor Description EditorXhtmlTransformer(XmlEventReaderFactory xmlEventReaderFactory, FragmentTransformer defaultFragmentTransformer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
transform(Reader editorFormatXml, ConversionContext conversionContext)
Begin consuming events from the supplied Reader, ignore all elements until the body is encountered, at which point the fragment transformation begins.
-
-
-
Constructor Detail
-
EditorXhtmlTransformer
public EditorXhtmlTransformer(XmlEventReaderFactory xmlEventReaderFactory, FragmentTransformer defaultFragmentTransformer)
-
-
Method Detail
-
transform
public String transform(Reader editorFormatXml, ConversionContext conversionContext) throws XhtmlException
Begin consuming events from the supplied Reader, ignore all elements until the body is encountered, at which point the fragment transformation begins.- Specified by:
transform
in interfaceTransformer
- Returns:
- Throws:
XhtmlParsingException
- if there is an error parsing the supplied editorFormat XHTML.XhtmlException
- for all other transform errors.
-
-