}
public Page parse(SitemeshBuffer sitemeshBuffer) throws IOException {
SitemeshBufferFragment.Builder builder = SitemeshBufferFragment.builder().setBuffer(sitemeshBuffer);
HTMLProcessor processor = new HTMLProcessor(sitemeshBuffer, builder);
processor.addRule(new BasicRule("sitemesh:multipass") {
public void process(Tag tag) {
currentBuffer().delete(tag.getPosition(), tag.getLength());
String id = tag.getAttributeValue("id", true);
if (!page.isPropertySet("_sitemesh.removefrompage." + id)) {
currentBuffer().insert(tag.getPosition(), page.getProperty(id));