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

#include <xalanc/XSLT/NamespacesHandler.hpp>

Classes

class  Namespace
 
class  NamespaceExtended
 
class  PrefixChecker
 

Public Types

typedef XalanQName::NamespaceVectorType NamespaceVectorType
 
typedef XalanQName::NamespacesStackType NamespacesStackType
 
typedef XalanVector< NamespaceNamespacesVectorType
 
typedef XalanVector< NamespaceExtendedNamespaceExtendedVectorType
 
typedef XalanVector< const XalanDOMString * > XalanDOMStringPointerVectorType
 
typedef XalanMap< const XalanDOMString *, const XalanDOMString * > NamespaceAliasesMapType
 

Public Member Functions

 NamespacesHandler (MemoryManager &theManager)
 Create a default, empty instance. More...
 
 NamespacesHandler (StylesheetConstructionContext &theConstructionContext, const NamespacesHandler &stylesheetNamespacesHandler, const NamespacesStackType &theCurrentNamespaces, const XalanDOMString &theXSLTNamespaceURI)
 Create an instance namespace handler using the current namespaces in effect. More...
 
 ~NamespacesHandler ()
 
void processExcludeResultPrefixes (StylesheetConstructionContext &theConstructionContext, const XalanDOMChar *theValue, const NamespacesStackType &theCurrentNamespaces)
 Process an exclude-result-prefixes attribute. More...
 
void processExtensionElementPrefixes (StylesheetConstructionContext &theConstructionContext, const XalanDOMChar *theValue, const NamespacesStackType &theCurrentNamespaces)
 Process an extension-element-prefixes attribute. More...
 
void postConstruction (StylesheetConstructionContext &theConstructionContext, bool fProcessNamespaceAliases=true, const XalanDOMString &theElementName=XalanDOMString(XalanMemMgrs::getDummyMemMgr()), const NamespacesHandler *parentNamespacesHandler=0, const PrefixChecker *prefixChecker=0)
 Notify the instance that the stylesheet is fully constructed. More...
 
NamespacesHandleroperator= (const NamespacesHandler &theRHS)
 
bool shouldExcludeResultNamespaceNode (const XalanDOMString &theXSLTNamespaceURI, const XalanDOMString &theURI) const
 Determine of a given namespace should be excluded. More...
 
void addExtensionNamespaceURI (StylesheetConstructionContext &theConstructionContext, const XalanDOMString &theURI)
 Add a URI as an extension namespace prefixes. More...
 
const XalanDOMStringgetNamespace (const XalanDOMString &thePrefix) const
 Get the namespace URI for the given prefix. More...
 
const XalanDOMStringgetNamespaceAlias (const XalanDOMString &theStylesheetNamespace) const
 Get the namespace alias URI for the given namespace. More...
 
void setNamespaceAlias (StylesheetConstructionContext &theConstructionContext, const XalanDOMString &theStylesheetNamespace, const XalanDOMString &theResultNamespace)
 Set the namespace alias URI for the given namespace. More...
 
void copyNamespaceAliases (const NamespacesHandler &parentNamespacesHandler)
 Copy the aliases from the given NamespacesHandler. More...
 
void outputResultNamespaces (StylesheetExecutionContext &theExecutionContext, bool supressDefault=false) const
 Output the result tree namespace declarations. More...
 
void clear ()
 Clear out the handler. More...
 
void swap (NamespacesHandler &theOther)
 Swap the contents of this instance with another. More...
 
NamespaceExtendedVectorType::size_type getNamespaceDeclarationsCount () const
 

Detailed Description

Definition at line 52 of file NamespacesHandler.hpp.

Member Typedef Documentation

◆ NamespaceAliasesMapType

Definition at line 202 of file NamespacesHandler.hpp.

◆ NamespaceExtendedVectorType

Definition at line 198 of file NamespacesHandler.hpp.

◆ NamespacesStackType

Definition at line 195 of file NamespacesHandler.hpp.

◆ NamespacesVectorType

Definition at line 197 of file NamespacesHandler.hpp.

◆ NamespaceVectorType

Definition at line 194 of file NamespacesHandler.hpp.

◆ XalanDOMStringPointerVectorType

Definition at line 199 of file NamespacesHandler.hpp.

Constructor & Destructor Documentation

◆ NamespacesHandler() [1/2]

xalanc::NamespacesHandler::NamespacesHandler ( MemoryManager &  theManager)
explicit

Create a default, empty instance.

◆ NamespacesHandler() [2/2]

xalanc::NamespacesHandler::NamespacesHandler ( StylesheetConstructionContext theConstructionContext,
const NamespacesHandler stylesheetNamespacesHandler,
const NamespacesStackType theCurrentNamespaces,
const XalanDOMString theXSLTNamespaceURI 
)

Create an instance namespace handler using the current namespaces in effect.

Parameters
theConstructionContextThe current construction context.
stylesheetNamespacesHandlerThe stylesheet's handler.
theCurrentNamespacesThe stack of active namespace declarations.
theXSLTNamespaceURIThe namespace URI for XSLT.

◆ ~NamespacesHandler()

xalanc::NamespacesHandler::~NamespacesHandler ( )

Member Function Documentation

◆ addExtensionNamespaceURI()

void xalanc::NamespacesHandler::addExtensionNamespaceURI ( StylesheetConstructionContext theConstructionContext,
const XalanDOMString theURI 
)

Add a URI as an extension namespace prefixes.

Parameters
theConstructionContextThe current construction context.
theURIThe namespace URI.

◆ clear()

void xalanc::NamespacesHandler::clear ( )

Clear out the handler.

◆ copyNamespaceAliases()

void xalanc::NamespacesHandler::copyNamespaceAliases ( const NamespacesHandler parentNamespacesHandler)

Copy the aliases from the given NamespacesHandler.

Parameters
parentNamespacesHandlerThe parent handler.

◆ getNamespace()

const XalanDOMString* xalanc::NamespacesHandler::getNamespace ( const XalanDOMString thePrefix) const

Get the namespace URI for the given prefix.

Parameters
thePrefixThe namespace prefix.
Returns
The namespace URI

◆ getNamespaceAlias()

const XalanDOMString* xalanc::NamespacesHandler::getNamespaceAlias ( const XalanDOMString theStylesheetNamespace) const

Get the namespace alias URI for the given namespace.

Parameters
theStylesheetNamespaceThe namespace as declared in the stylesheet.
Returns
The namespace alias URI

◆ getNamespaceDeclarationsCount()

NamespaceExtendedVectorType::size_type xalanc::NamespacesHandler::getNamespaceDeclarationsCount ( ) const
inline

Definition at line 362 of file NamespacesHandler.hpp.

◆ operator=()

NamespacesHandler& xalanc::NamespacesHandler::operator= ( const NamespacesHandler theRHS)

◆ outputResultNamespaces()

void xalanc::NamespacesHandler::outputResultNamespaces ( StylesheetExecutionContext theExecutionContext,
bool  supressDefault = false 
) const

Output the result tree namespace declarations.

Parameters
theExecutionContextThe current execution context.
supressDefaultIf true, any default namespace declaration will not be output.

◆ postConstruction()

void xalanc::NamespacesHandler::postConstruction ( StylesheetConstructionContext theConstructionContext,
bool  fProcessNamespaceAliases = true,
const XalanDOMString theElementName = XalanDOMString(XalanMemMgrs::getDummyMemMgr()),
const NamespacesHandler parentNamespacesHandler = 0,
const PrefixChecker prefixChecker = 0 
)

Notify the instance that the stylesheet is fully constructed.

Parameters
theConstructionContextThe current construction context.
fProcessNamespaceAliasesIf true, process any namespace aliases
theElementNameThe name of the owning element.
parentNamespacesHandlerThe parent handler, if any.
prefixCheckerA pointer to a PrefixChecker instance to use, if any.

◆ processExcludeResultPrefixes()

void xalanc::NamespacesHandler::processExcludeResultPrefixes ( StylesheetConstructionContext theConstructionContext,
const XalanDOMChar *  theValue,
const NamespacesStackType theCurrentNamespaces 
)

Process an exclude-result-prefixes attribute.

Parameters
theConstructionContextThe current construction context.
theValueThe attribute's value.
theCurrentNamespacesThe stack of active namespace declarations.

◆ processExtensionElementPrefixes()

void xalanc::NamespacesHandler::processExtensionElementPrefixes ( StylesheetConstructionContext theConstructionContext,
const XalanDOMChar *  theValue,
const NamespacesStackType theCurrentNamespaces 
)

Process an extension-element-prefixes attribute.

Parameters
theConstructionContextThe current construction context.
theValueThe attribute's value.
theCurrentNamespacesThe stack of active namespace declarations.

◆ setNamespaceAlias()

void xalanc::NamespacesHandler::setNamespaceAlias ( StylesheetConstructionContext theConstructionContext,
const XalanDOMString theStylesheetNamespace,
const XalanDOMString theResultNamespace 
)

Set the namespace alias URI for the given namespace.

Parameters
theConstructionContextThe current construction context.
theStylesheetNamespaceThe namespace as declared in the stylesheet.
theResultNamespaceThe namespace as it should appear in the result tree.

◆ shouldExcludeResultNamespaceNode()

bool xalanc::NamespacesHandler::shouldExcludeResultNamespaceNode ( const XalanDOMString theXSLTNamespaceURI,
const XalanDOMString theURI 
) const

Determine of a given namespace should be excluded.

Parameters
theXSLTNamespaceURIThe namespace URI for XSLT.
theURIThe namespace URI.
Returns
true of the namespace should be excluded, false if not.

◆ swap()

void xalanc::NamespacesHandler::swap ( NamespacesHandler theOther)

Swap the contents of this instance with another.

Parameters
theOtherThe other instance.

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