com.atlassian.confluence.content.render.xhtml
Interface ElementTransformer

All Known Implementing Classes:
TableStyleRemovingElementTransformer, TableStylingElementTransformer

public interface ElementTransformer

An interface implemented by an object that will handle a StartElement or EndElement and transform it in some manner.

Implementors should note that if the transform changes the name of the StartElement then it is also responsible for transforming the name of the EndElement to ensure the XmlEventReader contract is maintained.

You should also note that a ElementTransformingXmlEventReader instance making use of this ElementTransformer could well end up wrapping itself multiple times so you should write ElementTransformer's to only apply their transform if necessary.

Since:
4.0
See Also:
ElementTransformingXmlEventReader

Method Summary
 Set<QName> getHandledElementNames()
           
 EndElement transform(EndElement element)
           
 StartElement transform(StartElement element)
           
 

Method Detail

getHandledElementNames

Set<QName> getHandledElementNames()
Returns:
the set of QNames that this transformer will handle.

transform

StartElement transform(StartElement element)
Parameters:
element - the StartElement to be transformed
Returns:
a transformed version of the StartElement supplied.

transform

EndElement transform(EndElement element)
Parameters:
element - ther EndElement to be transformed.
Returns:
a transformed version of the EndElement supplied.


Copyright © 2003-2013 Atlassian. All Rights Reserved.