attributeDecl Method

 

Receives/reports an attribute type declaration. Only the first declaration for an attribute is reported.

Visual Basic Implementation Syntax

Sub attributeDecl(strElementName As String, strAttributeName As String,_   
strType As String, strValueDefault As String, strValue As String)  

Parameters

strElementName
The name of the associated element.

strAttributeName
The name of the attribute.

strType
A string representing the attribute type.

strValueDefault
A string representing the attribute default ("#IMPLIED", "#REQUIRED", or "#FIXED"), or Null (if none of these applies).

strValue
A string representing the default value of the attribute, or Null (if there is none).

Return Values

If failed, the DeclHandler raises a trappable error.

C/C++ Syntax

HRESULT attributeDecl(  
   [in] const wchar_t * pwchElementName,  
   [in] int cchElementName,  
   [in] const wchar_t * pwchAttributeName,  
   [in] int cchAttributeName,  
   [in] const wchar_t * pwchType,  
   [in] int cchType,  
   [in] const wchar_t * pwchValueDefault,  
   [in] int cchValueDefault,  
   [in] const wchar_t * pwchValue,  
   [in] int cchValue);  

Remarks

The attribute type is one of these three choices:

  • One of the following strings: "CDATA", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", or "ENTITIES".

  • A parenthesized token group with the separator "|" and all white space removed.

  • The word "NOTATION", followed by a space, followed by a parenthesized token group with all white space removed.

Any parameter entities in the attribute value are expanded. General entities are not expanded.

Parameters

pwchElementName[in]
The name of the associated element.

cchElementName[in]
The length of the element name string.

pwchAttributeName [in]
The name of the attribute.

cchAttributeName [in]
The length of the attribute name string.

pwchType [in]
A string representing the attribute type.

cchType [in]
The length of the attribute type string.

pwchValueDefault [in]
A string representing the attribute default ("#IMPLIED", "#REQUIRED" or "#FIXED"), or Null (if none of these apply).

cchValueDefault [in]
The length of the default string of the attribute.

pwchValue [in]
A string representing the default value of the attribute, or Null (if there is none).

cchValue [in]
The length of the default value string of the attribute.

Return Values

S_OK
The value returned if no errors are reported.

E_FAIL
The value returned if the parse operation should be aborted.

Versioning

Implemented in: MSXML 3.0 and later

Applies to

ISAXDeclHandler Interface