001    package echopoint.template;
002    
003    /* 
004     * This file is part of the Echo Point Project.  This project is a collection
005     * of Components that have extended the Echo Web Application Framework.
006     *
007     * Version: MPL 1.1/GPL 2.0/LGPL 2.1
008     *
009     * The contents of this file are subject to the Mozilla Public License Version
010     * 1.1 (the "License"); you may not use this file except in compliance with
011     * the License. You may obtain a copy of the License at
012     * http://www.mozilla.org/MPL/
013     *
014     * Software distributed under the License is distributed on an "AS IS" basis,
015     * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
016     * for the specific language governing rights and limitations under the
017     * License.
018     *
019     * Alternatively, the contents of this file may be used under the terms of
020     * either the GNU General Public License Version 2 or later (the "GPL"), or
021     * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
022     * in which case the provisions of the GPL or the LGPL are applicable instead
023     * of those above. If you wish to allow use of your version of this file only
024     * under the terms of either the GPL or the LGPL, and not to allow others to
025     * use your version of this file under the terms of the MPL, indicate your
026     * decision by deleting the provisions above and replace them with the notice
027     * and other provisions required by the GPL or the LGPL. If you do not delete
028     * the provisions above, a recipient may use your version of this file under
029     * the terms of any one of the MPL, the GPL or the LGPL.
030     */
031    
032    /**
033     * <code>TemplateCompilerHints</code> is used to indicate to the underlying
034     * templating compiler mechanism information about how it should compile the
035     * templaet data.
036     * <p>
037     * Most of the <code>TemplateCompilerHints</code> properties are really aimed
038     * as JAXP XML parser implementations but you can provide generic values via the
039     * getAttribute() mechanism.
040     * 
041     */
042    public interface TemplateCompilerHints {
043    
044            /**
045             * @return Indicates whether or not the factory is configured to produce
046             *         parsers which converts CDATA nodes to Text nodes and appends it
047             *         to the adjacent (if any) Text node.
048             */
049            public boolean isCoalescing();
050    
051            /**
052             * @return Indicates whether or not to use XHTML parsers which expand entity
053             *         reference nodes.
054             */
055            public boolean isExpandEntityReferences();
056    
057            /**
058             * @return Indicates whether or not to use XHTML parsers which ignores
059             *         comments.
060             */
061            public boolean isIgnoringComments();
062    
063            /**
064             * @return Indicates whether or not to use XHTML parsers which ignore
065             *         ignorable whitespace in element content.
066             */
067            public boolean isIgnoringElementContentWhitespace();
068    
069            /**
070             * @return Indicates whether or not to use XHTML parsers which are namespace
071             *         aware.
072             */
073            public boolean isNamespaceAware();
074    
075            /**
076             * @return Indicates whether or not to use XHTML parsers which validate the
077             *         XHTML content during parse.
078             */
079            public boolean isValidating();
080    
081            /**
082             * @return Allows the system to retrieve all the specific attributes to be
083             *         set into the underlying XHTML parser implementation. if there are
084             *         no attributes is should return a String[0] array as oppsoed to null.
085             */
086            public String[] getAttributeNames();
087    
088            /**
089             * Allows the system to retrieve specific attributes on the underlying XHTML
090             * parser implementation by attribute name. The name should have been
091             * provided in the <code>getAttributeNames()</code> method.
092             * 
093             * @param attributeName -
094             *            the name of the specific attribute
095             * @return the value for that attribute name
096             */
097            public Object getAttributeValue(String attributeName);
098    }