Xerces-C++ 3.2.5

List of all members
DOMTypeInfo Class Referenceabstract

The `DOMTypeInfo` interface represent a type used by `DOMElement` or `DOMAttr` nodes, specified in the schemas associated with the document. More...

`#include <xercesc/dom/DOMTypeInfo.hpp>`

## Public Member Functions
Destructor
virtual | ~DOMTypeInfo ()
| Destructor.

## Protected Member Functions
Hidden constructors
| DOMTypeInfo ()

## Public Contants
enum | DerivationMethods { DERIVATION_RESTRICTION = 0x001 , DERIVATION_EXTENSION = 0x002 , DERIVATION_UNION = 0x004 , DERIVATION_LIST = 0x008 }
| These are the available values for the derivationMethod parameter used by the method `DOMTypeInfo::isDerivedFrom()`. More...
virtual const XMLCh * | getTypeName () const =0
| Returns The name of a type declared for the associated `DOMElement` or `DOMAttr`, or null if unknown.
virtual const XMLCh * | getTypeNamespace () const =0
| The namespace of the type declared for the associated `DOMElement` or `DOMAttr` or null if the `DOMElement` does not have declaration or if no namespace information is available.
virtual bool | isDerivedFrom (const XMLCh *typeNamespaceArg, const XMLCh *typeNameArg, DerivationMethods derivationMethod) const =0
| This method returns if there is a derivation between the reference type definition, i.e.

## Detailed Description

The `DOMTypeInfo` interface represent a type used by `DOMElement` or `DOMAttr` nodes, specified in the schemas associated with the document.

The type is a pair of a namespace URI and name properties, and depends on the document's schema.

## Member Enumeration Documentation

## ◆ DerivationMethods

enum DOMTypeInfo::DerivationMethods

These are the available values for the derivationMethod parameter used by the method `DOMTypeInfo::isDerivedFrom()`.

It is a set of possible types of derivation, and the values represent bit positions. If a bit in the derivationMethod parameter is set to 1, the corresponding type of derivation will be taken into account when evaluating the derivation between the reference type definition and the other type definition. When using the isDerivedFrom method, combining all of them in the derivationMethod parameter is equivalent to invoking the method for each of them separately and combining the results with the OR boolean function. This specification only defines the type of derivation for XML Schema.

In addition to the types of derivation listed below, please note that:

- any type derives from xsd:anyType.
- any simple type derives from xsd:anySimpleType by restriction.
- any complex type does not derive from xsd:anySimpleType by restriction.

`DERIVATION_EXTENSION:` If the document's schema is an XML Schema [XML Schema Part 1], this constant represents the derivation by extension. The reference type definition is derived by extension from the other type definition if the other type definition can be reached recursively following the {base type definition} property from the reference type definition, and at least one of the derivation methods involved is an extension.

`DERIVATION_LIST:` If the document's schema is an XML Schema [XML Schema Part 1], this constant represents the list. The reference type definition is derived by list from the other type definition if there exists two type definitions T1 and T2 such as the reference type definition is derived from T1 by DERIVATION_RESTRICTION or DERIVATION_EXTENSION, T2 is derived from the other type definition by DERIVATION_RESTRICTION, T1 has {variety} list, and T2 is the {item type definition}. Note that T1 could be the same as the reference type definition, and T2 could be the same as the other type definition.

`DERIVATION_RESTRICTION:` If the document's schema is an XML Schema [XML Schema Part 1], this constant represents the derivation by restriction if complex types are involved, or a restriction if simple types are involved. The reference type definition is derived by restriction from the other type definition if the other type definition is the same as the reference type definition, or if the other type definition can be reached recursively following the {base type definition} property from the reference type definition, and all the derivation methods involved are restriction.

`DERIVATION_UNION:` If the document's schema is an XML Schema [XML Schema Part 1], this constant represents the union if simple types are involved. The reference type definition is derived by union from the other type definition if there exists two type definitions T1 and T2 such as the reference type definition is derived from T1 by DERIVATION_RESTRICTION or DERIVATION_EXTENSION, T2 is derived from the other type definition by DERIVATION_RESTRICTION, T1 has {variety} union, and one of the {member type definitions} is T2. Note that T1 could be the same as the reference type definition, and T2 could be the same as the other type definition.

Since
  DOM Level 3

Enumerator
DERIVATION_RESTRICTION |
DERIVATION_EXTENSION |
DERIVATION_UNION |
DERIVATION_LIST |

## Constructor & Destructor Documentation

## ◆ DOMTypeInfo()

DOMTypeInfo::DOMTypeInfo | ( |  | ) |
| protected

## ◆ ~DOMTypeInfo()

virtual DOMTypeInfo::~DOMTypeInfo | ( |  | ) |
| virtual

Destructor.

## Member Function Documentation

## ◆ getTypeName()

virtual const XMLCh * DOMTypeInfo::getTypeName | ( |  | ) | const
| pure virtual

Returns The name of a type declared for the associated `DOMElement` or `DOMAttr`, or null if unknown.

Returns
  The name of a type declared for the associated `DOMElement` or `DOMAttribute`, or null if unknown.

Since
  DOM level 3

## ◆ getTypeNamespace()

virtual const XMLCh * DOMTypeInfo::getTypeNamespace | ( |  | ) | const
| pure virtual

The namespace of the type declared for the associated `DOMElement` or `DOMAttr` or null if the `DOMElement` does not have declaration or if no namespace information is available.

Returns
  The namespace of the type declared for the associated `DOMElement` or `DOMAttr` or null if the `DOMElement` does not have declaration or if no namespace information is available.

Since
  DOM level 3

## ◆ isDerivedFrom()

virtual bool DOMTypeInfo::isDerivedFrom | ( | const XMLCh * | typeNamespaceArg,
|  | const XMLCh * | typeNameArg,
|  | DerivationMethods | derivationMethod
| ) |  | const
| pure virtual

This method returns if there is a derivation between the reference type definition, i.e.

the DOMTypeInfo on which the method is being called, and the other type definition, i.e. the one passed as parameters.

Parameters

  typeNamespaceArg | The namespace of the other type definition.
  typeNameArg | The name of the other type definition.
  derivationMethod | The type of derivation and conditions applied between two types, as described in the list of constants provided in this interface.

Returns
  If the document's schema is a DTD or no schema is associated with the document, this method will always return false. If the document's schema is an XML Schema, the method will true if the reference type definition is derived from the other type definition according to the derivation parameter. If the value of the parameter is 0 (no bit is set to 1 for the derivationMethod parameter), the method will return true if the other type definition can be reached by recursing any combination of {base type definition}, {item type definition}, or {member type definitions} from the reference type definition.

Since
  DOM level 3

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

- DOMTypeInfo.hpp