*
Quick Links Quick Links
Home
Download
JavaDocs
Feature Request
Report a Bug
Contact / Get Help
SourceForge
Patents Statement
*
What's New What's New
To: 07/Oct/2006
*
* Version 0.2 available. See release notes for details.
* Enhancements to the XML Handler, Code Handler and Link Handler handlers.
*
Manual Manual
Release Notes
Using hoglet
Tags
Tag Handlers
Core Tag Handlers
 - Text Handler
 - Code Handler
 - Link Handler
 - JavaDoc Handler
 - XML Handler
 - Table Row Handler
XML Configured Processor
Tools
*
Text HandlerText Handler
The text handler will take the content of the tag and replace it in a template.

The handler is implemented by the TextHandler class and initialized via the XML Configured Processor.

The template should be called: wrapper. It should contain a value: [[VALUE]], this value will be replaced with the content of the tag.

Example:
[com]cvs checkout hoglet[com]
Becomes:
> cvs checkout hoglet
 
Handler Options
The handler does not use any options.
 
Option Replacement
The init element can, optionally, contain one or more replace elements. These elements should be used to define replacements of options (assigned to the tag) within the content of the tag, after the content has been placed within the wrapper.

For instance using the following hoglet tag:
[page My Page Title]
Some text.
[page]
And then defining the handler with:
<init>
  <replace option="1"
           value="[TITLE]" />

  <templates>
    <wrapper><[CDATA[<html><head><title>[TITLE]</title></head><body>[VALUE]</body></html>]]></wrapper>
  </templates>
</init>
When the tag content is produced the [TITLE] value will be replaced with option 1 defined for the page tag, in this case: My Page Title.
 
XML Initialization
The init element should contain a templates element, which in turn should contain a wrapper element containing the template to use.

Example:
<init>
      <templates>
        <wrapper><[CDATA[<div class="command">&gt; [[VALUE]]</div>]]></wrapper>
      </templates>
    </init>
*