| API Docs for SAX and DOM |
| Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages # XSElementDeclaration Class Reference This class describes all properties of a Schema Element Declaration component. More... Inheritance diagram for XSElementDeclaration: [legend] List of all members.
## Public Member Functions
Constructors
| XSElementDeclaration (SchemaElementDecl *const schemaElementDecl, XSTypeDefinition *const typeDefinition, XSElementDeclaration *const substitutionGroupAffiliation, XSAnnotation *const annot, XSNamedMap< XSIDCDefinition > *const identityConstraints, XSModel *const xsModel, XSConstants::SCOPE elemScope=XSConstants::SCOPE_ABSENT, XSComplexTypeDefinition *const enclosingTypeDefinition=0, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
| The default constructor.
Destructor
| ~XSElementDeclaration ()
overridden XSXSObject methods
const XMLCh * | getName ()
| The name of type `NCName` of this declaration as defined in XML Namespaces.
const XMLCh * | getNamespace ()
| The [target namespace] of this object, or `null` if it is unspecified.
XSNamespaceItem * | getNamespaceItem ()
| A namespace schema information item corresponding to the target namespace of the component, if it's globally declared; or null otherwise.
XSElementDeclaration methods
XSTypeDefinition * | getTypeDefinition () const
| [type definition]: either a simple type definition or a complex type definition.
XSConstants::SCOPE | getScope () const
| Optional.
XSComplexTypeDefinition * | getEnclosingCTDefinition () const
| The complex type definition for locally scoped declarations (see `scope`).
XSConstants::VALUE_CONSTRAINT | getConstraintType () const
| [Value constraint]: one of `VC_NONE, VC_DEFAULT, VC_FIXED`.
const XMLCh * | getConstraintValue ()
| [Value constraint]: the actual value with respect to the [type definition].
bool | getNillable () const
| If nillable is true, then an element may also be valid if it carries the namespace qualified attribute with local name `nil` from namespace `http://www.w3.org/2001/XMLSchema-instance` and value `true` (xsi:nil) even if it has no text or element content despite a `content type` which would otherwise require content.
XSNamedMap< XSIDCDefinition > * | getIdentityConstraints ()
| identity-constraint definitions: a set of constraint definitions.
XSElementDeclaration * | getSubstitutionGroupAffiliation () const
| [substitution group affiliation]: optional.
bool | isSubstitutionGroupExclusion (XSConstants::DERIVATION_TYPE exclusion)
| Convenience method.
short | getSubstitutionGroupExclusions () const
| [substitution group exclusions]: the returned value is a bit combination of the subset of { `DERIVATION_EXTENSION, DERIVATION_RESTRICTION`} or `DERIVATION_NONE`.
bool | isDisallowedSubstitution (XSConstants::DERIVATION_TYPE disallowed)
| Convenience method.
short | getDisallowedSubstitutions () const
| [disallowed substitutions]: the returned value is a bit combination of the subset of { `DERIVATION_SUBSTITUTION, DERIVATION_EXTENSION, DERIVATION_RESTRICTION` } corresponding to substitutions disallowed by this `XSElementDeclaration` or `DERIVATION_NONE`.
bool | getAbstract () const
| {abstract} A boolean.
XSAnnotation * | getAnnotation () const
| Optional.
void | setTypeDefinition (XSTypeDefinition *typeDefinition)
## Protected Attributes
short | fDisallowedSubstitutions
short | fSubstitutionGroupExclusions
XSConstants::SCOPE | fScope
SchemaElementDecl * | fSchemaElementDecl
XSTypeDefinition * | fTypeDefinition
XSComplexTypeDefinition * | fEnclosingTypeDefinition
XSElementDeclaration * | fSubstitutionGroupAffiliation
XSAnnotation * | fAnnotation
XSNamedMap< XSIDCDefinition > * | fIdentityConstraints
## Friends
class | XSObjectFactory
## Detailed Description This class describes all properties of a Schema Element Declaration component. This is *always* owned by the validator /parser object from which it is obtained. ## Constructor & Destructor Documentation
XSElementDeclaration::XSElementDeclaration | ( | SchemaElementDecl *const | schemaElementDecl,
|  | XSTypeDefinition *const | typeDefinition,
|  | XSElementDeclaration *const | substitutionGroupAffiliation,
|  | XSAnnotation *const | annot,
|  | XSNamedMap< XSIDCDefinition > *const | identityConstraints,
|  | XSModel *const | xsModel,
|  | XSConstants::SCOPE | elemScope = `XSConstants::SCOPE_ABSENT`,
|  | XSComplexTypeDefinition *const | enclosingTypeDefinition = `0`,
|  | MemoryManager *const | manager = `XMLPlatformUtils::fgMemoryManager`
| ) |
  | The default constructor. Parameters:
  | schemaElementDecl |
  | typeDefinition |
  | substitutionGroupAffiliation |
  | annot |
  | identityConstraints |
  | xsModel |
  | elemScope |
  | enclosingTypeDefinition |
  | manager | The configurable memory manager
XSElementDeclaration::~XSElementDeclaration | ( |  | ) |
## Member Function Documentation
bool XSElementDeclaration::getAbstract | ( |  | ) | const
| {abstract} A boolean.
XSAnnotation * XSElementDeclaration::getAnnotation | ( |  | ) | const
| Optional. Annotation.
XSConstants::VALUE_CONSTRAINT XSElementDeclaration::getConstraintType | ( |  | ) | const
| [Value constraint]: one of `VC_NONE, VC_DEFAULT, VC_FIXED`.
const XMLCh* XSElementDeclaration::getConstraintValue | ( |  | ) |
| [Value constraint]: the actual value with respect to the [type definition].
short XSElementDeclaration::getDisallowedSubstitutions | ( |  | ) | const
| [disallowed substitutions]: the returned value is a bit combination of the subset of { `DERIVATION_SUBSTITUTION, DERIVATION_EXTENSION, DERIVATION_RESTRICTION` } corresponding to substitutions disallowed by this `XSElementDeclaration` or `DERIVATION_NONE`.
XSComplexTypeDefinition * XSElementDeclaration::getEnclosingCTDefinition | ( |  | ) | const
| The complex type definition for locally scoped declarations (see `scope`).
XSNamedMap< XSIDCDefinition > * XSElementDeclaration::getIdentityConstraints | ( |  | ) |
| identity-constraint definitions: a set of constraint definitions.
const XMLCh* XSElementDeclaration::getName | ( |  | ) | `[virtual]`
| The name of type `NCName` of this declaration as defined in XML Namespaces. Reimplemented from XSObject.
const XMLCh* XSElementDeclaration::getNamespace | ( |  | ) | `[virtual]`
| The [target namespace] of this object, or `null` if it is unspecified. Reimplemented from XSObject.
XSNamespaceItem* XSElementDeclaration::getNamespaceItem | ( |  | ) | `[virtual]`
| A namespace schema information item corresponding to the target namespace of the component, if it's globally declared; or null otherwise. Reimplemented from XSObject.
bool XSElementDeclaration::getNillable | ( |  | ) | const
| If nillable is true, then an element may also be valid if it carries the namespace qualified attribute with local name `nil` from namespace `http://www.w3.org/2001/XMLSchema-instance` and value `true` (xsi:nil) even if it has no text or element content despite a `content type` which would otherwise require content.
XSConstants::SCOPE XSElementDeclaration::getScope | ( |  | ) | const
| Optional. One of `SCOPE_GLOBAL`, `SCOPE_LOCAL`, or `SCOPE_ABSENT`. If the scope is local, then the `enclosingCTDefinition` is present.
XSElementDeclaration * XSElementDeclaration::getSubstitutionGroupAffiliation | ( |  | ) | const
| [substitution group affiliation]: optional. A top-level element definition.
short XSElementDeclaration::getSubstitutionGroupExclusions | ( |  | ) | const
| [substitution group exclusions]: the returned value is a bit combination of the subset of { `DERIVATION_EXTENSION, DERIVATION_RESTRICTION`} or `DERIVATION_NONE`.
XSTypeDefinition * XSElementDeclaration::getTypeDefinition | ( |  | ) | const
| [type definition]: either a simple type definition or a complex type definition.
bool XSElementDeclaration::isDisallowedSubstitution | ( | XSConstants::DERIVATION_TYPE | disallowed | ) |
  | Convenience method. Check if `disallowed` is a disallowed substitution for this element declaration. Parameters:
  | disallowed | { `DERIVATION_SUBSTITUTION, DERIVATION_EXTENSION, DERIVATION_RESTRICTION` } or `DERIVATION_NONE`. Represents a block set for the element.
Returns: True if `disallowed` is a part of the substitution group exclusion subset.
bool XSElementDeclaration::isSubstitutionGroupExclusion | ( | XSConstants::DERIVATION_TYPE | exclusion | ) |
  | Convenience method. Check if `exclusion` is a substitution group exclusion for this element declaration. Parameters:
  | exclusion | `DERIVATION_EXTENSION, DERIVATION_RESTRICTION` or `DERIVATION_NONE`. Represents final set for the element.
Returns: True if `exclusion` is a part of the substitution group exclusion subset.
void XSElementDeclaration::setTypeDefinition | ( | XSTypeDefinition * | typeDefinition | ) |
## Friends And Related Function Documentation
friend class XSObjectFactory`[friend]`
## Member Data Documentation
XSAnnotation* XSElementDeclaration::fAnnotation`[protected]`
short XSElementDeclaration::fDisallowedSubstitutions`[protected]`
XSComplexTypeDefinition* XSElementDeclaration::fEnclosingTypeDefinition`[protected]`
XSNamedMap<XSIDCDefinition>* XSElementDeclaration::fIdentityConstraints`[protected]`
SchemaElementDecl* XSElementDeclaration::fSchemaElementDecl`[protected]`
XSConstants::SCOPE XSElementDeclaration::fScope`[protected]`
XSElementDeclaration* XSElementDeclaration::fSubstitutionGroupAffiliation`[protected]`
short XSElementDeclaration::fSubstitutionGroupExclusions`[protected]`
XSTypeDefinition* XSElementDeclaration::fTypeDefinition`[protected]`
The documentation for this class was generated from the following file: XSElementDeclaration.hpp

Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved.