sunlabs.brazil.sunlabs

Class SnarfTemplate

public class SnarfTemplate extends Template

Template class for extracting content out of <snarf property=xxx> ... </snarf> pairs. xxx is the name of the property to append the snarfed content to. Defaults to [prepend].snarf. All snarf'ed content is deleted.

Properties:

prepend
The string to prepend all properties with. Defaults to the handler's prefix.
debug
If set, the snarf tags will be replaced by comments.

Version: 2.2

Author: Stephen Uhler

Method Summary
booleaninit(RewriteContext hr)
Get the debug flag and reset page.
voidtag_slash_snarf(RewriteContext hr)
Save the content gathered so far.
voidtag_snarf(RewriteContext hr)
Mark the current location in the document.

Method Detail

init

public boolean init(RewriteContext hr)
Get the debug flag and reset page.

tag_slash_snarf

public void tag_slash_snarf(RewriteContext hr)
Save the content gathered so far.

tag_snarf

public void tag_snarf(RewriteContext hr)
Mark the current location in the document.