Method IsDeclared
IsDeclared(Int32)
Returns false unless the attribute was declared in the DTD. This helps distinguish two kinds of attributes that SAX reports as CDATA: ones that were declared (and hence are usually valid), and those that were not (and which are never valid).
Declaration
bool IsDeclared(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The attribute index (zero-based). |
Returns
Type | Description |
---|---|
System.Boolean | true if the attribute was declared in the DTD, false otherwise. |
IsDeclared(String)
Returns false unless the attribute was declared in the DTD. This helps distinguish two kinds of attributes that SAX reports as CDATA: ones that were declared (and hence are usually valid), and those that were not (and which are never valid).
Declaration
bool IsDeclared(string qName)
Parameters
Type | Name | Description |
---|---|---|
System.String | qName | The XML qualified (prefixed) name. |
Returns
Type | Description |
---|---|
System.Boolean | true if the attribute was declared in the DTD, false otherwise. |
IsDeclared(String, String)
Returns false unless the attribute was declared in the DTD. This helps distinguish two kinds of attributes that SAX reports as CDATA: ones that were declared (and hence are usually valid), and those that were not (and which are never valid).
Declaration
bool IsDeclared(string uri, string localName)
Parameters
Type | Name | Description |
---|---|---|
System.String | uri | The Namespace URI, or the empty string if the name has no Namespace URI. |
System.String | localName | The attribute's local name. |
Returns
Type | Description |
---|---|
System.Boolean | true if the attribute was declared in the DTD, false otherwise. |
Remarks
Remember that since DTDs do not "understand" namespaces, the namespace URI associated with an attribute may not have come from the DTD.The declaration will have applied to the attribute's qName