Xalan-C++ API Reference  1.12.0
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
xalanc::XalanDocumentPrefixResolver Class Reference

#include <xalanc/DOMSupport/XalanDocumentPrefixResolver.hpp>

Inheritance diagram for xalanc::XalanDocumentPrefixResolver:
[legend]
Collaboration diagram for xalanc::XalanDocumentPrefixResolver:
[legend]

Classes

class  NamespaceNodesTreeWalker
 A utility class to walk the XalanDocument instance and look for attribute nodes that declare namespaces. More...
 

Public Types

typedef AttributeVectorTypeDecl AttributeVectorType
 
typedef XalanMap< const XalanDOMString *, AttributeVectorTypeNamespacesMapType
 

Public Member Functions

 XalanDocumentPrefixResolver (const XalanDocument *theDocument, const XalanDOMString &theURI=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), MemoryManager &theManager XALAN_DEFAULT_MEMMGR)
 Constructor. More...
 
virtual ~XalanDocumentPrefixResolver ()
 
virtual const XalanDOMStringgetNamespaceForPrefix (const XalanDOMString &prefix) const
 Retrieve a namespace corresponding to a prefix. More...
 
virtual const XalanDOMStringgetURI () const
 Retrieve the base URI for the resolver. More...
 
- Public Member Functions inherited from xalanc::PrefixResolver
 PrefixResolver ()
 
 PrefixResolver (const PrefixResolver &)
 
virtual ~PrefixResolver ()
 

Protected Member Functions

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

Detailed Description

Definition at line 60 of file XalanDocumentPrefixResolver.hpp.

Member Typedef Documentation

◆ AttributeVectorType

Definition at line 64 of file XalanDocumentPrefixResolver.hpp.

◆ NamespacesMapType

Definition at line 66 of file XalanDocumentPrefixResolver.hpp.

Constructor & Destructor Documentation

◆ XalanDocumentPrefixResolver()

xalanc::XalanDocumentPrefixResolver::XalanDocumentPrefixResolver ( const XalanDocument theDocument,
const XalanDOMString theURI = XalanDOMString(XalanMemMgrs::getDummyMemMgr()),
MemoryManager &theManager  XALAN_DEFAULT_MEMMGR 
)

Constructor.

Parameters
theDocumentThe XalanDocument instance to use for namespace bindings.
theURIThe base URI for the instance. This is rarely needed, but can be provided if the URI for the XalanDocument instance is known.

◆ ~XalanDocumentPrefixResolver()

virtual xalanc::XalanDocumentPrefixResolver::~XalanDocumentPrefixResolver ( )
virtual

Member Function Documentation

◆ duplicateBinding()

virtual const XalanDOMString* xalanc::XalanDocumentPrefixResolver::duplicateBinding ( const AttributeVectorType theVector) const
protectedvirtual

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
theVectorThe vector associated with the namespace prefix.
Returns
A pointer to a const XalanDOMString containing the desired binding, or NULL.

◆ getNamespaceForPrefix()

virtual const XalanDOMString* xalanc::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
prefixPrefix to resolve
Returns
namespace that prefix resolves to, or null if prefix is not found

Implements xalanc::PrefixResolver.

◆ getURI()

virtual const XalanDOMString& xalanc::XalanDocumentPrefixResolver::getURI ( ) const
virtual

Retrieve the base URI for the resolver.

Returns
URI string

Implements xalanc::PrefixResolver.


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