Home » xml-commons-external-1.4.01-src » javax » xml » validation » [javadoc | source]
javax.xml.validation
abstract public class: TypeInfoProvider [javadoc | source]
java.lang.Object
   javax.xml.validation.TypeInfoProvider
This class provides access to the type information determined by ValidatorHandler .

Some schema languages, such as W3C XML Schema, encourages a validator to report the "type" it assigns to each attribute/element. Those applications who wish to access this type information can invoke methods defined on this "interface" to access such type information.

Implementation of this "interface" can be obtained through the ValidatorHandler#getTypeInfoProvider() method.

Constructor:
 protected TypeInfoProvider() 
Method from javax.xml.validation.TypeInfoProvider Summary:
getAttributeTypeInfo,   getElementTypeInfo,   isIdAttribute,   isSpecified
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.xml.validation.TypeInfoProvider Detail:
 abstract public TypeInfo getAttributeTypeInfo(int index)
 abstract public TypeInfo getElementTypeInfo()
 abstract public boolean isIdAttribute(int index)
    Returns true if the specified attribute is determined to be ID.

    Exactly how an attribute is "determined to be ID" is up to the schema language. In case of W3C XML Schema, this means that the actual type of the attribute is the built-in ID type or its derived type.

    A javax.xml.parsers.DocumentBuilder uses this information to properly implement org.w3c.dom.Attr#isId() .

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

 abstract public boolean isSpecified(int index)
    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.