Xalan-C++ API Documentation

The Xalan-C++ XSL Transformer Version 1.0

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

KeyTable Class Reference

Table of element keys, keyed by document node. More...

#include <KeyTable.hpp>

Collaboration diagram for KeyTable:

List of all members.

Public Types

Public Methods


Detailed Description

Table of element keys, keyed by document node.

An instance of this class is keyed by a Document node that should be matched with the root of the current context. It contains a table of name mappings to tables that contain mappings of identifier values to nodes.


Member Typedef Documentation

typedef std::vector<KeyDeclaration> KeyTable::KeyDeclarationVectorType

typedef std::map<XalanDOMString, NodeListMapType> KeyTable::KeysMapType

typedef std::map<XalanDOMString, MutableNodeRefList> KeyTable::NodeListMapType


Constructor & Destructor Documentation

KeyTable::KeyTable ( XalanNode * doc,
XalanNode * startNode,
const PrefixResolver & resolver,
const KeyDeclarationVectorType & keyDeclarations,
StylesheetExecutionContext & executionContext)

Build a keys table.

Parameters:
doc   owner document key (normally the same as startNode)
startNode   node to start iterating from to build the keys index
nscontext   stylesheet's namespace context
keyDeclarations   stylesheet's xsl:key declarations
executionContext   current execution context

virtual KeyTable::~KeyTable () [virtual]


Member Function Documentation

const XalanNode * KeyTable::getDocKey () const

Retrieve the document key.

This table should only be used with contexts whose Document root matches this key.

Returns:
Node for document

const NodeRefListBase & KeyTable::getNodeSetByKey ( const XalanDOMString & name,
const XalanDOMString & ref) const

Given a valid element key, return the corresponding node list.

If the name was not declared with xsl:key, this will return null, the identifier is not found, it will return an empty node set, otherwise it will return a nodeset of nodes.

Parameters:
name   name of the key, which must match the 'name' attribute on xsl:key
ref   value that must match the value found by the 'match' attribute on xsl:key
Returns:
pointer to nodeset for key

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

Interpreting class diagrams

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

Xalan-C++ XSL Transformer Version 1.0
Copyright © 2000 The Apache Software Foundation. All Rights Reserved.