Get a type that is a common supertype of two given types
Parameters: t1 - the first item type Parameters: t2 - the second item type Parameters: th - the item type that is a supertype of boththe supplied item types
public static boolean isComparable(int t1, int t2)(Code)
Determine whether two primitive atomic types are comparable
Parameters: t1 - the first type to compared.This must be a primitive atomic type as defined by ItemType.getPrimitiveType Parameters: t2 - the second type to compared.This must be a primitive atomic type as defined by ItemType.getPrimitiveType true if the types are comparable, as defined by the rules of the "eq" operator
Test whether a given type is (some subtype of) node()
Parameters: type - The type to be tested true if the item type is node() or a subtype of node()
isNumericPrimitiveType
public static boolean isNumericPrimitiveType(ItemType t)(Code)
Test whether the supplied type, which must be a primitive type, is one of
the numeric primitive types
Parameters: t - the type being tested true if the type is integer, double, float, decimal, or the abstract type "numeric"
Determine whether a primitive type is ordered. Note that the rules for this differ
between XPath and XML Schema: these are the XPath rules.
Parameters: type - the primitive item type being tested true if the types are potentially comparable. For abstract types (type=ATOMIC)we give the benefit of the doubt and return true.
isPrimitiveType
public static boolean isPrimitiveType(int code)(Code)
Determine whether this type is a primitive type. The primitive types are
the 19 primitive types of XML Schema, plus xs:integer, xdt:dayTimeDuration and xdt:yearMonthDuration;
xdt:untypedAtomic; the 7 node kinds; and all supertypes of these (item(), node(), xdt:anyAtomicType,
xdt:number, ...)
Parameters: code - the item type code to be tested true if the type is considered primitive under the above rules