Returns an integer that corresponds to a value from the declared constant SCHEMAUSE values. The use property indicates the type of validation restrictions that are on an attribute. The <attribute> declaration includes the use attribute.
When the value returned for the use property is SCHEMAUSE_PROHIBITED, the value of the ISchemaItem.itemType property of the attribute is SOMITEM_DATATYPE_ANYTYPE. The following table shows the values returned and their descriptions.
| SCHEMAUSE value | Description |
|---|---|
| SCHEMAUSE_OPTIONAL | Attribute is not required to be in the document. |
| SCHEMAUSE_PROHIBITED | Attribute cannot be in the document. |
| SCHEMAUSE_REQUIRED | Attribute is required to be in the document. |
The following is an example of the use attribute in an XML Schema.
<schema>
<element name="someelement">
<attribute name="someattribute" use="prohibited"/>
<attribute name="newattribute" use="required"/>
</element>
</schema>
var conUse = oISchemaAttribute.use;
None.
conUse = oISchemaAttribute.use
None.
HRESULT get_use(SCHEMAUSE* use);
SCHEMAUSE_OPTIONAL
SCHEMAUSE_PROHIBITED
SCHEMAUSE_REQUIRED
use parameter is NULL.To view reference information for Visual Basic or C/C++ only, click the Language Filter button
in the upper-left corner of the page.
Applies to: ISchemaAttribute Interface