## Xalan-C++ API Documentation

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

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

# XalanDocumentPrefixResolver Class Reference

`#include <XalanDocumentPrefixResolver.hpp>`

Inheritance diagram for XalanDocumentPrefixResolver

Collaboration diagram for XalanDocumentPrefixResolver:

List of all members.

## Public Types

- typedef std::vector<const
  XalanNode*> AttributeVectorType
- typedef std::map<const XalanDOMString*,
  AttributeVectorType, pointer_less<
  XalanDOMString> > NamespacesMapType

## Public Methods

- XalanDocumentPrefixResolver ( const XalanDocument* theDocument, const XalanDOMString& theURI = XalanDOMString())
    Constructor. More...
- virtual ~XalanDocumentPrefixResolver ()
- virtual const XalanDOMString* getNamespaceForPrefix (const XalanDOMString& prefix) const
    Retrieve a namespace corresponding to a prefix. More...
- virtual const XalanDOMString& getURI () const
    Retrieve the base URI for the resolver. More...

## Protected Methods

- virtual const XalanDOMString* duplicateBinding (const AttributeVectorType& theVector) const
    This function is called when more than one binding exists for a given prefix. More...

## Member Typedef Documentation

typedef std::vector<const XalanNode*> XalanDocumentPrefixResolver::AttributeVectorType

typedef std::map<const XalanDOMString*, AttributeVectorType, pointer_less<XalanDOMString> > XalanDocumentPrefixResolver::NamespacesMapType

## Constructor & Destructor Documentation

XalanDocumentPrefixResolver::XalanDocumentPrefixResolver ( | const XalanDocument * theDocument,
| const XalanDOMString & theURI = XalanDOMString() )

Constructor.

Parameters:

  theDocument | The XalanDocument instance to use for namespace bindings.
  theURI | The base URI for the instance. This is rarely needed, but can be provided if the URI for the XalanDocument instance is known.

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

## Member Function Documentation

const XalanDOMString * XalanDocumentPrefixResolver::duplicateBinding ( | const AttributeVectorType & theVector ) const`[protected, virtual]`

This function is called when more than one binding exists for a given prefix.

The default behavior uses the first binding, but a deriving class can change that behavior by overriding.

Parameters:

  theVector | The vector associated with the namespace prefix.

Returns:
  A pointer to a const XalanDOMString containing the desired binding, or NULL.

virtual const XalanDOMString* XalanDocumentPrefixResolver::getNamespaceForPrefix ( | const XalanDOMString & prefix ) const`[virtual]`

Retrieve a namespace corresponding to a prefix.

This assumes that the PrevixResolver holds its own namespace context, or is a namespace context itself.

Parameters:

  prefix | Prefix to resolve

Returns:
  namespace that prefix resolves to, or null if prefix is not found

Reimplemented from PrefixResolver.

virtual const XalanDOMString& XalanDocumentPrefixResolver::getURI ( | ) const`[virtual]`

Retrieve the base URI for the resolver.

Returns:
  URI string

Reimplemented from PrefixResolver.

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

- XalanDocumentPrefixResolver.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.6 Copyright © 2000, 2001, 2002, 2003 The Apache Software Foundation. All Rights Reserved.