TypeInfo
interface represents a type referenced from
Element
or Attr
nodes, specified in the schemas
associated with the document. The type is a pair of a namespace URI and
name properties, and depends on the document's schema.
If the document's schema is an XML DTD [XML 1.0], the values are computed as follows:
Attr
node, typeNamespace
is
"http://www.w3.org/TR/REC-xml"
and typeName
represents the [attribute type] property in the [XML Information Set]
. If there is no declaration for the attribute, typeNamespace
and typeName
are null
.
Element
node, typeNamespace
and typeName
are null
.
If the document's schema is an XML Schema [XML Schema Part 1] , the values are computed as follows using the post-schema-validation infoset contributions (also called PSVI contributions):
null
.
Note: At the time of writing, the XML Schema specification does not require exposing the declared type. Thus, DOM implementations might choose not to provide type information if validity is not valid.
Note: Other schema languages are outside the scope of the W3C
and therefore should define how to represent their type systems using
TypeInfo
.
See also the Document Object Model (DOM) Level 3 Core Specification.
DOM
- Level 3Field Summary | ||
---|---|---|
public static final int | DERIVATION_RESTRICTION | If the document's schema is an XML Schema [XML Schema Part 1]
, this constant represents the derivation by
restriction if complex types are involved, or a
restriction if simple types are involved.
The reference type definition is derived by restriction from the other type definition if the other type definition is the same as the reference type definition, or if the other type definition can be reached recursively following the {base type definition} property from the reference type definition, and all the derivation methods involved are restriction. |
public static final int | DERIVATION_EXTENSION | If the document's schema is an XML Schema [XML Schema Part 1]
, this constant represents the derivation by
extension.
The reference type definition is derived by extension from the other type definition if the other type definition can be reached recursively following the {base type definition} property from the reference type definition, and at least one of the derivation methods involved is an extension. |
public static final int | DERIVATION_UNION | If the document's schema is an XML Schema [XML Schema Part 1]
, this constant represents the
union if simple types are involved.
The reference type definition is derived by union from the other type definition if there exists two type definitions T1 and T2 such as the reference type definition is derived from T1 by DERIVATION_RESTRICTION or
DERIVATION_EXTENSION , T2 is derived from the other type
definition by DERIVATION_RESTRICTION , T1 has {variety} union, and one of the {member type definitions} is T2. Note that T1 could be
the same as the reference type definition, and T2 could be the same
as the other type definition. |
public static final int | DERIVATION_LIST | If the document's schema is an XML Schema [XML Schema Part 1]
, this constant represents the list.
The reference type definition is derived by list from the other type definition if there exists two type definitions T1 and T2 such as the reference type definition is derived from T1 by DERIVATION_RESTRICTION or
DERIVATION_EXTENSION , T2 is derived from the other type
definition by DERIVATION_RESTRICTION , T1 has {variety} list, and T2 is the {item type definition}. Note that T1 could be the same as
the reference type definition, and T2 could be the same as the other
type definition. |
Method from org.w3c.dom.TypeInfo Summary: |
---|
getTypeName, getTypeNamespace, isDerivedFrom |
Method from org.w3c.dom.TypeInfo Detail: |
---|
null if unknown. |
null if the element does not have
declaration or if no namespace information is available. |
TypeInfo on which the method
is being called, and the other type definition, i.e. the one passed
as parameters. |