## Xalan-C++ API Documentation

### The Xalan C++ XSLT Processor Version 1.7

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# ElemApplyTemplates Class Reference

`#include <ElemApplyTemplates.hpp>`

Inheritance diagram for ElemApplyTemplates

Collaboration diagram for ElemApplyTemplates:

List of all members.

## Public Types

- typedef ElemForEach ParentType

## Public Methods

- ElemApplyTemplates ( StylesheetConstructionContext& constructionContext, Stylesheet& stylesheetTree, const AttributeListType& atts, int lineNumber, int columnNumber)
    Construct an object corresponding to an "xsl:apply-template" element. More...
- virtual ~ElemApplyTemplates ()
- virtual const XalanDOMString& getElementName () const
    Get a string for the name of the element. More...
- virtual void execute (StylesheetExecutionContext& executionContext) const
    Execute the element's primary function. More...

## Protected Methods

- virtual bool childTypeAllowed (int xslToken) const
    Given an xsl token type, determine whether or not a child of that type is allowed. More...
- virtual void transformChild ( StylesheetExecutionContext& executionContext, const ElemTemplateElement& xslInstruction, const ElemTemplateElement* theTemplate, XalanNode* child) const
    Given an element, find the corresponding template and process the contents. More...
- virtual void selectAndSortChildren ( StylesheetExecutionContext& executionContext, const ElemTemplateElement* theTemplate, NodeSorter* sorter, int selectStackFrameIndex) const
    Perform a query if needed, and call transformChild for each child. More...

## Member Typedef Documentation

typedef ElemForEach ElemApplyTemplates::ParentType

## Constructor & Destructor Documentation

ElemApplyTemplates::ElemApplyTemplates ( | StylesheetConstructionContext & constructionContext,
| Stylesheet & stylesheetTree,
| const AttributeListType & atts,
| int lineNumber,
| int columnNumber )

Construct an object corresponding to an "xsl:apply-template" element.

Parameters:

  constructionContext | context for construction of object
  stylesheetTree | stylesheet containing element
  atts | list of attributes for element
  lineNumber | line number in document
  columnNumber | column number in document

virtual ElemApplyTemplates::~ElemApplyTemplates ( | )`[virtual]`

## Member Function Documentation

virtual bool ElemApplyTemplates::childTypeAllowed ( | int xslToken ) const`[protected, virtual]`

Given an xsl token type, determine whether or not a child of that type is allowed.

This is so derived types can determine whether a particular type of child is allowed for the instance. It is called from appendChildElem().

The default is to allow no types (no children)

Parameters:

  xslToken | The xsl token value of the child.

Returns:
  true if the child is allowed, or false if not.

Reimplemented from ElemTemplateElement.

virtual void ElemApplyTemplates::execute ( | StylesheetExecutionContext & executionContext ) const`[virtual]`

Execute the element's primary function.

Subclasses of this function may recursively execute down the element tree.

Parameters:

  executionContext | The current execution context

Reimplemented from ElemForEach.

virtual const XalanDOMString& ElemApplyTemplates::getElementName ( | ) const`[virtual]`

Get a string for the name of the element.

Useful for debugging purposes, and error reporting.

Returns:
  A string containing the name of the element.

Reimplemented from ElemForEach.

virtual void ElemApplyTemplates::selectAndSortChildren ( | StylesheetExecutionContext & executionContext,
| const ElemTemplateElement * theTemplate,
| NodeSorter * sorter,
| int selectStackFrameIndex ) const`[protected, virtual]`

Perform a query if needed, and call transformChild for each child.

Parameters:

  executionContext | The current execution context
  template | The owning template context.
  sorter | The NodeSorter instance, if any.
  selectStackFrameIndex | stack frame context for executing the select statement

Reimplemented from ElemForEach.

virtual void ElemApplyTemplates::transformChild ( | StylesheetExecutionContext & executionContext,
| const ElemTemplateElement & xslInstruction,
| const ElemTemplateElement * theTemplate,
| XalanNode * child ) const`[protected, virtual]`

Given an element, find the corresponding template and process the contents.

Parameters:

  executionContext | The current execution context
  xslInstruction | The calling element
  template | The template to use if xsl:for-each, or null.
  child | The source context node.

Reimplemented from ElemTemplateElement.

The documentation for this class was generated from the following file:

- ElemApplyTemplates.hpp

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.7 Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.