Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Protected Attributes

XalanQName Class Reference

Class to represent a qualified name. More...

#include <XalanQName.hpp>

Inherited by XalanQNameByReference, and XalanQNameByValue.

Collaboration diagram for XalanQName:
Collaboration graph
[legend]

List of all members.

Classes

Public Types

Public Member Functions

Static Public Member Functions

Static Protected Attributes


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.

Definition at line 70 of file XalanQName.hpp.


Member Typedef Documentation

Definition at line 77 of file XalanQName.hpp.

Definition at line 75 of file XalanQName.hpp.


Constructor & Destructor Documentation

XalanQName::XalanQName (  )  [inline, explicit]

Construct an empty XalanQName.

Definition at line 84 of file XalanQName.hpp.

virtual XalanQName::~XalanQName (  )  [inline, virtual]

Definition at line 89 of file XalanQName.hpp.

XalanQName::XalanQName ( const XalanQName  )  [inline]

Definition at line 93 of file XalanQName.hpp.


Member Function Documentation

bool XalanQName::equals ( const XalanQName theRHS  )  const [inline]

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

Definition at line 143 of file XalanQName.hpp.

XalanDOMString& XalanQName::format ( XalanDOMString theString  )  const

Format the QName using the notation "{namespace-uri}local-part" or "local-part" if the namespace URI is empty.

The result is appended to the provided string.

Parameters:
theString The string to format with the
Returns:
A reference to the parameter.
virtual const XalanDOMString& XalanQName::getLocalPart (  )  const [pure virtual]

Retrieve the local part of qualified name.

Returns:
local part string

Implemented in XalanQNameByReference, and XalanQNameByValue.

virtual const XalanDOMString& XalanQName::getNamespace (  )  const [pure virtual]

Retrieve the namespace of qualified name.

Returns:
namespace string

Implemented in XalanQNameByReference, and XalanQNameByValue.

static const XalanDOMString* XalanQName::getNamespaceForPrefix ( const NamespaceVectorType namespaces,
const XalanDOMString prefix 
) [static]

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

Parameters:
namespaces vector of namespaces to search
prefix namespace prefix to find
Returns:
pointer to the string value if found, otherwise null.
static const XalanDOMString* XalanQName::getNamespaceForPrefix ( NamespacesStackType::const_iterator  theBegin,
NamespacesStackType::const_iterator  theEnd,
const XalanDOMChar *  prefix 
) [static]
static const XalanDOMString* XalanQName::getNamespaceForPrefix ( const NamespacesStackType nsStack,
const XalanDOMString prefix 
) [static]

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

Parameters:
nsStack stack of namespace vectors to search
prefix namespace prefix to find
Returns:
pointer to the string value if found, otherwise null.
static const XalanDOMString* XalanQName::getNamespaceForPrefix ( const NamespacesStackType nsStack,
const XalanDOMChar *  prefix 
) [static]
static const XalanDOMString* XalanQName::getNamespaceForPrefix ( NamespacesStackType::const_iterator  theBegin,
NamespacesStackType::const_iterator  theEnd,
const XalanDOMString prefix 
) [static]

Get the namespace for a prefix by searching a range of iterators.

The search is done in reverse, from the end of the range to the beginning.

Parameters:
theBegin The beginning iterator for the range
theBegin The ending iterator for the range
prefix namespace prefix to find
Returns:
pointer to the string value if found, otherwise null.
static const XalanDOMString* XalanQName::getNamespaceForPrefix ( const NamespaceVectorType namespaces,
const XalanDOMChar *  prefix 
) [static]
static const XalanDOMString* XalanQName::getPrefixForNamespace ( NamespacesStackType::const_iterator  theBegin,
NamespacesStackType::const_iterator  theEnd,
const XalanDOMString uri 
) [static]

Get the prefix for a namespace by searching a range of iterators.

The search is done in reverse, from the end of the range to the beginning.

Parameters:
theBegin The beginning iterator for the range to search
theBegin The ending iterator for the range to search
uri URI string for namespace to find
Returns:
pointer to the string value if found, otherwise null.
static const XalanDOMString* XalanQName::getPrefixForNamespace ( const NamespaceVectorType namespaces,
const XalanDOMString uri 
) [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
Returns:
pointer to the string value if found, otherwise null.
static const XalanDOMString* XalanQName::getPrefixForNamespace ( const NamespacesStackType nsStack,
const XalanDOMString uri 
) [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
Returns:
pointer to the string value if found, otherwise null.
size_t XalanQName::hash (  )  const [inline]

Definition at line 163 of file XalanQName.hpp.

bool XalanQName::isEmpty (  )  const [inline]

Whether the qualified name is empty.

Returns:
true if namespace and local part are both empty

Definition at line 130 of file XalanQName.hpp.

bool XalanQName::isValid (  )  const [inline]

Determine if the qualified name is valid.

Returns:
true if the instance is a valid QName, false if not.

Definition at line 119 of file XalanQName.hpp.

static bool XalanQName::isValidNCName ( const XalanDOMChar *  theNCName,
XalanDOMString::size_type  theLength = XalanDOMString::npos 
) [static]

Determine if the string supplied satisfies the grammar for an XML NCName.

Parameters:
theNCName The string to check
theLength The length of the string
Returns:
bool true if the string is a valid NCName, false if not
static bool XalanQName::isValidNCName ( const XalanDOMString theNCName  )  [static]

Determine if the string supplied satisfies the grammar for an XML NCName.

Parameters:
theNCName The string to check
Returns:
bool true if the string is a valid NCName, false if not.
static bool XalanQName::isValidQName ( const XalanDOMString theQName  )  [static]

Determine if the string supplied satisfies the grammar for an XML QName.

Note that this function does not determine if any supplied prefix is bound to a namespace URI

Parameters:
theQName The string to check
Returns:
bool true if the string is a valid QName, false if not
static bool XalanQName::isValidQName ( const XalanDOMChar *  theQName,
XalanDOMString::size_type  theLength = XalanDOMString::npos 
) [static]

Determine if the string supplied satisfies the grammar for an XML QName.

Note that this function does not determine if any supplied prefix is bound to a namespace URI

Parameters:
theQName The string to check
theLength The length of the string
Returns:
bool true if the string is a valid QName, false if not

Member Data Documentation

const XalanDOMString XalanQName::s_emptyString [static, protected]

Definition at line 393 of file XalanQName.hpp.


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++ XSLT Processor Version 1.11
Copyright © 1999-2012 The Apache Software Foundation.
All Rights Reserved.

Apache Logo