Share via


TypeInfoProvider.IsSpecified(Int32) Method

Definition

Returns false if the attribute was added by the validator.

[Android.Runtime.Register("isSpecified", "(I)Z", "GetIsSpecified_IHandler")]
public abstract bool IsSpecified (int index);
[<Android.Runtime.Register("isSpecified", "(I)Z", "GetIsSpecified_IHandler")>]
abstract member IsSpecified : int -> bool

Parameters

index
Int32

The index of the attribute. The same index for the org.xml.sax.Attributes object passed to the startElement callback.

Returns

true if the attribute was present before the validator processes input. false if the attribute was added by the validator.

Attributes

Exceptions

If the index is invalid.

If this method is called from other IContentHandler methods.

Remarks

Returns false if the attribute was added by the validator.

This method provides information necessary for a javax.xml.parsers.DocumentBuilder to determine what the DOM tree should return from the org.w3c.dom.Attr#getSpecified() method.

The method may only be called by the startElement event of the org.xml.sax.ContentHandler that the application sets to the ValidatorHandler.

A general guideline for validators is to return true if the attribute was originally present in the pipeline, and false if it was added by the validator.

Java documentation for javax.xml.validation.TypeInfoProvider.isSpecified(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to