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  

QName Class Reference

Class to represent a qualified name: "The name of an internal XSLT object, specifically a named template (see [7 Named Templates]), a mode (see [6.7 Modes]), an attribute set (see [8.1.4 Named Attribute Sets]), a key (see [14.2 Keys]), a locale (see [14.3 Number Formatting]), a variable or a parameter (see [12 Variables and Parameters]) is specified as a QName. More...

#include <QName.hpp>

List of all members.

Public Types

Public Methods

Static Public Methods


Detailed Description

Class to represent a qualified name: "The name of an internal XSLT object, specifically a named template (see [7 Named Templates]), a mode (see [6.7 Modes]), an attribute set (see [8.1.4 Named Attribute Sets]), a key (see [14.2 Keys]), a locale (see [14.3 Number Formatting]), a variable or a parameter (see [12 Variables and Parameters]) is specified as a QName.

If it has a prefix, then the prefix is expanded into a URI reference using the namespace declarations in effect on the attribute in which the name occurs. The expanded name consisting of the local part of the name and the possibly null URI reference is used as the name of the object. The default namespace is not used for unprefixed names."


Member Typedef Documentation

typedef std::vector<NameSpace> QName::NamespaceVectorType

typedef std::vector<NamespaceVectorType> QName::NamespacesStackType


Constructor & Destructor Documentation

QName::QName ( const XalanDOMString & qname = XalanDOMString(),
const XalanDOMString & theLocalPart = XalanDOMString())

Construct a QName, with the supplied namespace and local part.

Parameters:
theNamespace   namespace string
theLocalPart   local part string

QName::QName ( const XalanDOMString & qname,
const NamespacesStackType & namespaces)

Construct a QName from a string, resolving the prefix using the given namespace vector stack.

The default namespace is not resolved.

Parameters:
qname   QName string
namespaces   namespace vector stack to use

QName::QName ( const XalanDOMString & qname,
const XalanElement * namespaceContext,
const XPathEnvSupport & envSupport,
const XPathSupport & support)

Construct a QName from a string, resolving the prefix using the given namespace context.

The default namespace is not resolved.

Parameters:
qname   QName string
namespaceContext   context object for namespace resolution
envSupport   XPath environment support class instance
support   XPath support class instance

QName::QName ( const XalanDOMString & qname,
const PrefixResolver & theResolver)

Construct a QName from a string, resolving the prefix using the given prefix resolver.

The default namespace is not resolved.

Parameters:
qname   QName string
theResolver   prefix resolver to use

QName::~QName ()


Member Function Documentation

bool QName::equals ( const QName & theRHS) const

Override equals and agree that we're equal if the passed object is a string and it matches the name of the arg.

Parameters:
theRHS   namespace to compare
Returns:
true if namespace and local part are both empty

const XalanDOMString & QName::getLocalPart () const

Retrieve the local part of qualified name.

Returns:
local part string

const XalanDOMString & QName::getNamespace () const

Retrieve the namespace of qualified name.

Returns:
namespace string

const XalanDOMString & QName::getNamespaceForPrefix ( const NamespacesStackType & nsStack,
const XalanDOMString & prefix,
bool reverse = true) [static]

Get the namespace from a prefix by searching a stack of namespace vectors.

Parameters:
nsStack   stack of namespace vectors to search
prefix   namespace prefix to find
reverse   true to search vector from last to first, default true

const XalanDOMString & QName::getNamespaceForPrefix ( const NamespaceVectorType & namespaces,
const XalanDOMString & prefix,
bool reverse = true) [static]

Get the namespace from a prefix by searching a vector of namespaces.

Parameters:
namespaces   vector of namespaces to search
prefix   namespace prefix to find
reverse   true to search vector from last to first, default true

const XalanDOMString & QName::getPrefixForNamespace ( const NamespacesStackType & nsStack,
const XalanDOMString & uri,
bool reverse = true) [static]

Get the prefix for a namespace by searching a stack of namespace vectors.

Parameters:
nsStack   stack of namespace vectors to search
uri   URI string for namespace to find
reverse   true to search vector from last to first, default true

const XalanDOMString & QName::getPrefixForNamespace ( const NamespaceVectorType & namespaces,
const XalanDOMString & uri,
bool reverse = true) [static]

Get the prefix for a namespace by searching a vector of namespaces.

Parameters:
namespaces   vector of namespaces to search
uri   URI string for namespace to find
reverse   true to search vector from last to first, default true

bool QName::isEmpty () const

Whether the qualified name is empty.

Returns:
true if namespace and local part are both empty

bool QName::operator== ( const QName & theRHS) const

Override equals and agree that we're equal if the passed object is a string and it matches the name of the arg.

Parameters:
theRHS   namespace to compare
Returns:
true if namespace and local part are both empty

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.