01: /*
02: * Created on 18-Sep-2006
03: */
04: package uk.org.ponder.rsf.renderer.html;
05:
06: import uk.org.ponder.rsf.renderer.scr.NullRewriteSCR;
07: import uk.org.ponder.rsf.renderer.scr.StaticComponentRenderer;
08: import uk.org.ponder.rsf.template.XMLLump;
09: import uk.org.ponder.xml.XMLWriter;
10:
11: /** Annotates a piece of "head matter" in a multi-file template set that
12: * needs to be "collected" into the HTML <head> of the final
13: * rendered product. This renderer is never used concretely, it is simply
14: * a tag recognised by the template parser, which collects scr names beginning
15: * with the prefix {@link XMLLump#SCR_CONTRIBUTE_PREFIX}.
16: * @author Antranig Basman (amb26@ponder.org.uk)
17: *
18: */
19:
20: public class HeadContributingSCR implements StaticComponentRenderer {
21: public static final String CONTRIBUTE_NAME = "head";
22:
23: public String getName() {
24: return CONTRIBUTE_NAME;
25: }
26:
27: public int render(XMLLump lump, XMLWriter xmlw) {
28: return NullRewriteSCR.instance.render(lump, xmlw);
29: }
30: }
|