001 package net.sf.tacos.markup;
002
003 import org.apache.tapestry.IMarkupWriter;
004
005 /**
006 * An {@link org.apache.tapestry.IMarkupWriter} that takes advantage
007 * of Java 1.5 features.
008 *
009 * @author Andreas Andreou
010 */
011 public interface IExtendedMarkupWriter extends IMarkupWriter {
012 /**
013 * Starts an element that will not later be matched with an end() call
014 * ( this is useful for elements that do not need closing tags ) and appends
015 * the given attributes and values.
016 * @see org.apache.tapestry.IMarkupWriter#beginEmpty(String)
017 * @param tag The html tag to generate.
018 * @param attributes An alterating list of attributes and values.
019 * @return
020 */
021 IExtendedMarkupWriter createEmpty(String tag, String... attributes);
022
023 /**
024 * Starts a new element and appends
025 * the given attributes and values.
026 * @see org.apache.tapestry.IMarkupWriter#begin(String)
027 * @param tag
028 * @param attributes
029 * @return
030 */
031 IExtendedMarkupWriter create(String tag, String... attributes);
032 }