Поделиться через


ISchemaParticle Interface

 

[This feature was only implemented for MSXML 6.0.]

Retrieves cardinality information about the item. The two attributes that represent cardinality are minOccurs and maxOccurs. These attributes indicate the number of times that an item can occur in a document. You obtain a collection of ISchemaParticle objects by using the particles property of the ISchemaModelGroup interface.

Properties

maxOccurs Retrieves the maximum number of times this schema item can occur in the current context. Zero is returned if the item cannot occur. Unbounded (-1) is returned if there is no limit to the number of occurrences.
minOccurs Retrieves the minimum number of times this schema item can occur in the current context. Zero is returned if the item is optional.

JScript Syntax

var oParticles = oModelGroup.particles;  

Visual Basic Syntax

Set oParticles = oModelGroup.particles  

C/C++ Syntax

HRESULT particles(ISchemaItemCollection** particles);  

Remarks

The interfaces ISchemaAny, ISchemaElement, and ISchemaModelGroup are derived from the ISchemaParticle interface. This inheritance provides access to the minOccurs and maxOccurs properties for each of the derived interfaces.

The anyAttribute property of the interfaces ISchemaComplexType and ISchemaAttributeGroup returns an SchemaAny object. The inherited properties minOccurs and maxOccurs are not supported for the ISchemaAny interface when it represents an <anyAttribute> element. Therefore, the return values will always be minOccurs = 0 and maxOccurs = -1 (unbounded).

Requirements

Implementation: msxml6.dll, msxml6.lib

Header and LIB files: msxml6.h, msxml6.lib, msxml6.idl

Inheritance: Inherits from the ISchemaItem interface.

Versioning

Implemented in: MSXML 6.0

See Also

ISchemaModelGroup Interface
SOM Reference