## Xalan-C++ API Documentation

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

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

# XalanQName 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 <XalanQName.hpp>`

Inheritance diagram for XalanQName:

[legend]
Collaboration diagram for XalanQName:

[legend]
List of all members.

## Public Types

- typedef XalanDeque<NameSpace,
  ConstructWithMemoryManagerTraits<
  NameSpace> > NamespaceVectorType
- typedef XalanDeque<NamespaceVectorType,
  ConstructWithMemoryManagerTraits<
  NamespaceVectorType> > NamespacesStackType

## Public Methods

- XalanQName ()
    Construct an empty XalanQName. More...
- virtual ~XalanQName ()
- virtual const XalanDOMString& getLocalPart () const=0
    Retrieve the local part of qualified name. More...
- virtual const XalanDOMString& getNamespace () const=0
    Retrieve the namespace of qualified name. More...
- bool isValid () const
    Determine if the qualified name is valid. More...
- bool isEmpty () const
    Whether the qualified name is empty. More...
- bool equals (const XalanQName &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. More...
- XalanDOMString::size_type hash () const

## Static Public Methods

- const XalanDOMString* getNamespaceForPrefix (const NamespaceVectorType &namespaces, const XalanDOMString &prefix)
    Get the namespace for a prefix by searching a vector of namespaces. More...
- const XalanDOMString* getNamespaceForPrefix (const NamespacesStackType &nsStack, const XalanDOMString &prefix)
    Get the namespace for a prefix by searching a stack of namespace vectors. More...
- const XalanDOMString* getNamespaceForPrefix (const NamespacesStackType &nsStack, const XalanDOMChar *prefix)
- const XalanDOMString* getNamespaceForPrefix (NamespacesStackType::const_iterator theBegin, NamespacesStackType::const_iterator theEnd, const XalanDOMString &prefix)
    Get the namespace for a prefix by searching a range of iterators. More...
- const XalanDOMString* getPrefixForNamespace (const NamespaceVectorType &namespaces, const XalanDOMString &uri)
    Get the prefix for a namespace by searching a vector of namespaces. More...
- const XalanDOMString* getNamespaceForPrefix (const NamespaceVectorType &namespaces, const XalanDOMChar *prefix)
- const XalanDOMString* getPrefixForNamespace (const NamespacesStackType &nsStack, const XalanDOMString &uri)
    Get the prefix for a namespace by searching a stack of namespace vectors. More...
- const XalanDOMString* getPrefixForNamespace (NamespacesStackType::const_iterator theBegin, NamespacesStackType::const_iterator theEnd, const XalanDOMString &uri)
    Get the prefix for a namespace by searching a range of iterators. More...
- const XalanDOMString* getNamespaceForPrefix (NamespacesStackType::const_iterator theBegin, NamespacesStackType::const_iterator theEnd, const XalanDOMChar *prefix)
- bool isValidNCName (const XalanDOMString &theNCName)
    Determine if the string supplied satisfies the grammar for an XML NCName. More...
- bool isValidNCName (const XalanDOMChar *theNCName, XalanDOMString::size_type theLength=XalanDOMString::npos)
    Determine if the string supplied satisfies the grammar for an XML NCName. More...
- bool isValidQName (const XalanDOMString &theQName)
    Determine if the string supplied satisfies the grammar for an XML QName. More...
- bool isValidQName (const XalanDOMChar *theQName, XalanDOMString::size_type theLength=XalanDOMString::npos)
    Determine if the string supplied satisfies the grammar for an XML QName. More...

## Static Protected Attributes

- const XalanDOMString s_emptyString

## 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 XalanDeque< NameSpace, ConstructWithMemoryManagerTraits< NameSpace > > XalanQName::NamespaceVectorType<NameSpace, ConstructWithMemoryManagerTraits<NameSpace> >

typedef XalanDeque< NamespaceVectorType, ConstructWithMemoryManagerTraits< NamespaceVectorType > > XalanQName::NamespacesStackType<NamespaceVectorType, ConstructWithMemoryManagerTraits<NamespaceVectorType> >

## Constructor & Destructor Documentation

XalanQName::XalanQName ( | )`[explicit]`

| Construct an empty XalanQName.

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

## Member Function Documentation

bool XalanQName::equals ( | const XalanQName & 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 & XalanQName::getLocalPart ( | ) const`[pure virtual]`

| Retrieve the local part of qualified name. Returns: local part string Reimplemented in XalanQNameByReference, and XalanQNameByValue.

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

| Retrieve the namespace of qualified name. Returns: namespace string Reimplemented in XalanQNameByReference, and XalanQNameByValue.

const XalanDOMString * XalanQName::getNamespaceForPrefix ( | NamespacesStackType::const_iterator theBegin,
| NamespacesStackType::const_iterator theEnd,
| const XalanDOMChar * prefix )`[static]`

const XalanDOMString * XalanQName::getNamespaceForPrefix ( | const NamespaceVectorType & namespaces,
| const XalanDOMChar * prefix )`[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.

const XalanDOMString * XalanQName::getNamespaceForPrefix ( | const NamespacesStackType & nsStack,
| const XalanDOMChar * prefix )`[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.

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.

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.

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.

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.

XalanDOMString::size_type XalanQName::hash ( | ) const

bool XalanQName::isEmpty ( | ) const

| Whether the qualified name is empty. Returns: true if namespace and local part are both empty

bool XalanQName::isValid ( | ) const

| Determine if the qualified name is valid. Returns: true if the instance is a valid QName, false if not.

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

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.

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

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

## Member Data Documentation

const XalanDOMString XalanQName::s_emptyString`[static, protected]`

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

- XalanQName.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.10 Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.