Class XmlTextItem
java.lang.Object
com.aquima.interactions.framework.renderer.XmlElement
com.aquima.interactions.framework.renderer.document.XmlDocumentRendererBase
com.aquima.interactions.framework.renderer.document.XmlTextItem
- All Implemented Interfaces:
IElementRenderer
,IXmlElementRenderer
This class converts an ITextItem implementation to an XML node for document xml generation.
For example rendering a text item with a single text node will result in:
<TEXT> <T>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</T> </TEXT>
For example rendering a text item with a style node (with text) will result in:
<STYLE name="bold"> <TEXT> <T>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</T> </TEXT> </STYLE>
For example rendering a text item with a single value node will result in:
<TEXT> <T>van Leuven, J</T> </TEXT>
For example rendering a text item with a multivalue value node will result in:
<TEXT> <T> <VALUES> <VALUE first="true">van Leuven, J</VALUE> <VALUE>Kerpershoek, O</VALUE> <VALUE last="true">van der Meer, F</VALUE> </VALUES> </T> </TEXT>This xml renderer merges text(value)nodes (with the same style), so this structure:
- 1234
- /
- 2
<TEXT> <T>1234/2</T> </TEXT>and NOT:
<TEXT> <T>1234</T> <T>/</T> <T>2</T> </TEXT>
- Since:
- 7.0
- Author:
- Jon van Leuven
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
formatValue
(ISingleValue value, ILanguage language) toXml
(IXmlRendererContext ctx, IElement element) This function allows one to convert an IElement instance to an XML element.Methods inherited from class com.aquima.interactions.framework.renderer.document.XmlDocumentRendererBase
createTagName
Methods inherited from class com.aquima.interactions.framework.renderer.XmlElement
formatKey, getKeyPrefix, setIncludePresentationStyleElements, setKeyPrefix, setOptionalFormat, setOptionalPresentationStyle
-
Constructor Details
-
XmlTextItem
protected XmlTextItem(boolean tagsToUpperCase)
-
-
Method Details
-
toXml
Description copied from interface:IXmlElementRenderer
This function allows one to convert an IElement instance to an XML element. The implementor of this function should only convert the element itself and not it's children as the caller will process these. (Unless ctx.setContinueChildProcessing( false ) has been called)- Parameters:
ctx
- The context which contains some information and control options.element
- The element which should be converted.- Returns:
- an XMLElement class or null indicating this element should not be included in the resulting xml.
-
formatValue
-