public interface TagHandlerBase
Modifier and Type | Method and Description |
---|---|
String |
doEndTag(Tag tag,
StringBuffer tagBody,
TransformContext context,
OutputDocument target)
Called whenever an ending Tag that is associated with the handler is encountered in TCDL content.
|
int |
doStartTag(Tag tag,
StringBuffer tagBody,
TransformContext context,
OutputDocument target)
Called whenever as starting Tag that is associated with the handler is encountered in TCDL content.
|
boolean |
requiresCodeBlock(TransformContext context,
OutputDocument target,
Tag tag)
This method is called right before doStartTag and its return value indicates
if the engine must wrap the result of doEndTag inside a code block.
|
int doStartTag(Tag tag, StringBuffer tagBody, TransformContext context, OutputDocument target) throws TCDLTransformerException
It is possible to prepend data to the tagContents using the [tagBody] buffer. The tagBody StringBuffer collects the content occurring (or generated by nested tags) between the start and closing tag.
tag
- The fully initialized tagtagBody
- Buffer that will be used by the framework to write tag content to.context
- TransformContext offering access to context attributestarget
- OutputDocument for setting supporting information to build the final documentTCDLTransformerException
- On problems transforming the TCDL.TCDLTransformerException
String doEndTag(Tag tag, StringBuffer tagBody, TransformContext context, OutputDocument target) throws TCDLTransformerException
Note that the Tag [tag] parameter will have all attributes set of the start tag (in fact it is the start tag), so all information of the tag is at your disposal.
tag
- The fully initialized tagtagBody
- Buffer that will be used by the framework to write tag content to.context
- TransformContext offering access to context attributestarget
- OutputDocument for setting supporting information to build the final documentTCDLTransformerException
- On problems transforming the TCDL.TCDLTransformerException
boolean requiresCodeBlock(TransformContext context, OutputDocument target, Tag tag)
The start [tag] is passed, so the handler may use attribute values to decide upon it's result
context
- TransformContext offering access to context attributestarget
- OutputDocument for setting supporting information to build the final documenttag
- The fully initialized tagCopyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries