Returns the immutable TypeInfo
object for the current
element.
The method may only be called by the startElement event
or the endElement event
of the ContentHandler
that the application sets to
the ValidatorHandler
.
When W3C XML Schema validation is being performed, in the
case where an element has a union type, the TypeInfo
returned by a call to getElementTypeInfo()
from the
startElement
event will be the union type. The TypeInfo
returned by a call
from the endElement event will be the actual member type used
to validate the element.
Returns:
An immutable {@link TypeInfo} object that represents the
type of the current element.
Note that the caller can keep references to the obtained
{@link TypeInfo} longer than the callback scope.
Otherwise, this method returns
null if the validator is unable to
determine the type of the current element for some reason
(for example, if the validator is recovering from
an earlier error.)
Throws:
-
IllegalStateException - If this method is called from other {@link org.xml.sax.ContentHandler}
methods.