## org.codehaus.groovy.grails.web.pages
Class SitemeshPreprocessor

    java.lang.Object
      org.codehaus.groovy.grails.web.pages.SitemeshPreprocessor

    public class SitemeshPreprocessor

extends Object

This class is used to add GSP Sitemesh integration directly to compiled GSP. head, meta, title, body and content tags are replaced with <sitemesh:capture*>...</sitemesh:capture*> taglibs The taglib is used to capture the content of each tag. This prevents the need to parse the content output like Sitemesh normally does.

Author:
  Lari Hotari, Sagire Software Oy

Field Summary
`(package private) Pattern` `bodyPattern`
`(package private) Pattern` `contentPattern`
`(package private) Pattern` `headPattern`
`(package private) Pattern` `metaPattern`
`(package private) Pattern` `parameterPattern`
`(package private) Pattern` `titlePattern`
`static String` `XML_CLOSING_FOR_EMPTY_TAG_ATTRIBUTE_NAME`

Constructor Summary
`SitemeshPreprocessor()`

Method Summary
`(package private) StringBuffer` `addBodyCapturing(StringBuffer sb)`
`(package private) StringBuffer` `addContentCapturing(StringBuffer sb)`
`String` `addGspSitemeshCapturing(String gspSource)`
`(package private) StringBuffer` `addHeadCapturing(String gspSource)`
`(package private) String` `addMetaCapturing(String headContent)`
`(package private) String` `addTitleCapturing(String headContent)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### parameterPattern

    Pattern parameterPattern

### metaPattern

    Pattern metaPattern

### titlePattern

    Pattern titlePattern

### headPattern

    Pattern headPattern

### bodyPattern

    Pattern bodyPattern

### contentPattern

    Pattern contentPattern

### XML_CLOSING_FOR_EMPTY_TAG_ATTRIBUTE_NAME

    public static final String XML_CLOSING_FOR_EMPTY_TAG_ATTRIBUTE_NAME

See Also:
  Constant Field Values

Constructor Detail

### SitemeshPreprocessor

    public SitemeshPreprocessor()

Method Detail

### addGspSitemeshCapturing

    public String addGspSitemeshCapturing(String gspSource)

### addHeadCapturing

    StringBuffer addHeadCapturing(String gspSource)

### addMetaCapturing

    String addMetaCapturing(String headContent)

### addTitleCapturing

    String addTitleCapturing(String headContent)

### addBodyCapturing

    StringBuffer addBodyCapturing(StringBuffer sb)

### addContentCapturing

    StringBuffer addContentCapturing(StringBuffer sb)

Copyright (c) 2005-2009 The Grails project