## org.apache.xalan.xslt
Class TemplateList

    java.lang.Object
      |
      +--org.apache.xalan.xslt.TemplateList

public class TemplateList
extends java.lang.Object
implements java.io.Serializable

**For advanced use only** Encapsulates a template list, and helps locate individual templates.

See Also:
  Serialized Form

Method Summary
`ElemTemplate` `findTemplate(XSLTEngineImpl transformContext, org.w3c.dom.Node sourceTree, org.w3c.dom.Node targetNode, QName mode, boolean useImports)` **For advanced use only** Given a target element, find the template that best matches in the given XSL document, according to the rules specified in the xsl draft.
`ElemTemplateElement` `getFirstTemplate()` **For advanced use only** Get the first template of the template children.
`boolean` `getIsWrapperless()` **For advanced use only** Get if the stylesheet is without an xsl:stylesheet and xsl:template wrapper.
`java.util.Hashtable` `getNamedTemplates()` **For advanced use only** Get table of named Templates.
`Stylesheet` `getStylesheet()` **For advanced use only** Get the stylesheet owner of the list.
`ElemTemplate` `getWrapperlessTemplate()` **For advanced use only** Get the manufactured template if there is no wrapper.
`void` `setFirstTemplate(ElemTemplateElement v)` **For advanced use only** Set the first template of the template children.
`void` `setNamedTemplates(java.util.Hashtable v)` **For advanced use only** Set table of named Templates.

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

Method Detail

### getStylesheet

    public Stylesheet getStylesheet()

  **For advanced use only** Get the stylesheet owner of the list.

### getFirstTemplate

    public ElemTemplateElement getFirstTemplate()

  **For advanced use only** Get the first template of the template children.

### setFirstTemplate

    public void setFirstTemplate(ElemTemplateElement v)

  **For advanced use only** Set the first template of the template children.

### getIsWrapperless

    public boolean getIsWrapperless()

  **For advanced use only** Get if the stylesheet is without an xsl:stylesheet and xsl:template wrapper.

### getWrapperlessTemplate

    public ElemTemplate getWrapperlessTemplate()

  **For advanced use only** Get the manufactured template if there is no wrapper. and xsl:template wrapper.

### getNamedTemplates

    public java.util.Hashtable getNamedTemplates()

  **For advanced use only** Get table of named Templates. These are keyed on string macro names, and holding values that are template elements in the XSL DOM tree.

### setNamedTemplates

    public void setNamedTemplates(java.util.Hashtable v)

  **For advanced use only** Set table of named Templates. These are keyed on string macro names, and holding values that are template elements in the XSL DOM tree.

### findTemplate

    public ElemTemplate findTemplate(XSLTEngineImpl transformContext,
                                     org.w3c.dom.Node sourceTree,
                                     org.w3c.dom.Node targetNode,
                                     QName mode,
                                     boolean useImports)
                              throws org.xml.sax.SAXException

  **For advanced use only** Given a target element, find the template that best matches in the given XSL document, according to the rules specified in the xsl draft.
  Parameters:
    `stylesheetTree` - Where the XSL rules are to be found.
    `sourceTree` - Where the targetElem is to be found.
    `targetElem` - The element that needs a rule.
    `mode` - A string indicating the display mode.
    `useImports` - means that this is an xsl:apply-imports commend.
  Returns:
    Rule that best matches targetElem.
  Throws:
    XSLProcessorException - thrown if the active ProblemListener and XMLParserLiaison decide the error condition is severe enough to halt processing.

Copyright © 2000 Apache XML Project. All Rights Reserved.