Package net.sf.saxon.type
This package contains classes that implement the XPath 2.0 and 3.1 type system. It contains that part of the functionality relevant to a non-schema-aware implementation: that is, the overall structure of the type system, together with representations of the built-in types.
The hierarchy of schema types is represented by the interfaces
SchemaType
, ComplexType
, SimpleType
,
ListType
, and AtomicType
. (Union types never arise
in non-schema-aware processing). There are concrete classes representing
built-in types such as AnyType
, BuiltInAtomicType
,
and BuiltInListType
: the corresponding classes for user-defined
types are in the com.saxonica.schema
package.
The class SequenceType
ought logically to be in this package
but is actually in net.sf.saxon.value
. A sequence type contains
an ItemType
which may be an AtomicType
or a
NodeTest
: NodeTests are found in the package net.sf.saxon.pattern
.
The logic for performing type checking is partly in the singleton class
Type
(which also contains many useful constants), and partly in
the class TypeChecker
found in package net.sf.saxon.expr
.
-
ClassDescriptionA set of constants enumerating the possible relationships between one type and anotherAn AlphaCode is a compact, context-independent string representation of a SequenceTypeThis class represents the type of an external object returned by an extension function, or supplied as an external variable/parameter.An ItemType representing the type function(*).The item type function(*) when it is preceded by one or more annotation assertionsAn implementation of ItemType that matches any item (node or atomic value)This class has a singleton instance which represents the XML Schema built-in type xs:anySimpleTypeThis class has a singleton instance which represents the XML Schema built-in type xs:anyType, also known as the urtype.Interface for atomic types (these are either built-in atomic types or user-defined atomic types).This class represents a built-in atomic type, which may be either a primitive type (such as xs:decimal or xs:anyURI) or a derived type (such as xs:ID or xs:dayTimeDuration).This class is used to implement the built-in list types NMTOKENS, ENTITIES, IDREFS.This non-instantiable class acts as a register of Schema objects containing all the built-in types: that is, the types defined in the "xs" namespace.This marker interface represents a type that can be used as the target of a cast or castable operation, that is, an atomic type, list type, or plain union typeA complex type as defined in XML Schema: either a user-defined complex type, or xs:anyType, or xs:untyped.The different varieties of complex typesThis is a marker interface used as the result of methods that convert or cast values from one type to another.A converter implements conversions from one atomic type to another - that is, it implements the casting rules for a (source type, destination type) pair.Converts base64 to hexBinaryConverts a boolean to a decimalConverts a boolean to a doubleConverts a boolean to an xs:floatConverts a boolean to an integerConverts a dateTime to a dateConverts a dateTime to a gDayConverts a dateTime to a gMonthConverts a dateTime to a gMonthDayConverts a dateTime to a gYearConverts a dateTime to a gYearMonthConverts a dateTime to a timeConverts a date to a dateTimeConverts a decimal to an integer.Convers a double to a decimalConverts a double to an integerConverter that checks that a value belonging to a supertype is a valid instance of a subtype, and returns an instance of the subtypeConverts a duration to a dayTimeDurationConverts a duration to a yearMonthDurationConverts a float to a decimalConverts a float to an integerConverts hexBinary to base64BinaryConverter that does nothing - it returns the input unchangedConverts an integer to a decimalConverts Notation to QNameConverts a numeric value to a booleanConverts any numeric value to a decimalConverts any numeric value to a double.Converts any numeric value to xs:floatConverts any numeric value to an integer.Converter that implements the promotion rules from xs:string to xs:anyURIConverter that implements the promotion rules to a required type of xs:doubleConverter that implements the promotion rules to a required type of xs:floatConverter that implements the promotion rules from xs:string to xs:anyURIConverter that implements the promotion rules from xs:anyURI to xs:stringConverts QName to NotationConverts any value to a stringConverts any value to untyped atomicConverter that operates in two phases, via an intermediate typeSpecialisation for converters that always succeedConverter that does nothing except change the type annotation of the value.Proposed extension for XPath 4.0: an enumeration type is a way of defining a subtype of xs:string, with a defined set of permitted values, without recourse to a schema or schema-awareness.This class has a singleton instance which represents the XML Schema 1.1 built-in type xs:error.This class represents the type of an external object returned by an extension function, or supplied as an external variable/parameter.An ItemType representing the type of a function item (subclasses are used for maps and arrays)Atomic types are the intersection of XPath item types and XSD simple types, and use multiple inheritance to inherit methods representing the characteristics of both these kinds.ItemType is an interface that allows testing of whether an Item conforms to an expected type.Extension of the ItemType interface implemented by some item types, to provide a cache of SequenceType objects based on this item type, with different occurrence indicators.This class represents the type of an external Java object returned by an extension function, or supplied as an external variable/parameter.Interface representing a simple type of variety ListA class that represents a union type declared locally, for example using the (Saxon-extension) item-type syntax union(a,b,c), or internally in Java code.This exception occurs when an attempt is made to dereference a reference from one schema component to another, if the target of the reference cannot be found.Singleton class representing the class xs:numeric as defined in XPath 3.1: a union type whose members are xs:double, xs:decimal, and xs:floatThe different varieties of open content for complex typesA "plain type" is either an atomic type, or a union type that (a) imposes no restrictions other than those imposed by its member types, and (b) has exclusively plain types as its member typesThis is a marker interface that represents any "schema component" as defined in the XML Schema specification.This is a marker interface that acts as a surrogate for an object representing a global element or attribute declaration.An exception that identifies an error in reading, parsing, or validating a schema.SchemaType is an interface implemented by all schema types: simple and complex types, built-in and user-defined types.Internal indicator representing progress in validating components of a schemaThis interface represents a simple type, which may be a built-in simple type, or a user-defined simple type.An instance of this class represents a specific function item type, for example function(xs:int) as xs:booleanA
Converter
that accepts a string as input.Converts string to anyURIConverts string to base64Converts a string to a booleanConverts a string to a dateConverts a string to a dateTimeConverts a string to a dateTimeStampConverts a string to a dayTimeDurationConverts a string to an xs:decimalConverts from xs;string to a user-defined type derived from a built-in subtype of xs:stringConverts a string to a durationConverts a string to xs:floatConverts a string to a gDayConverts a string to a gMonthConverts a string to a gMonthDayConverts a string to a gYearConverts a string to a gYearMonthConverts a string to hexBinaryConverts a string to an integerConverts a string to a built-in subtype of integerConverts from xs:string to xs:languageConverts from xs:string to xs:NameConverts from xs:string to xs:NCName, xs:ID, xs:IDREF, or xs:ENTITYConverts from xs:string to xs:NMTOKENConverter from string to a derived type (derived from a type other than xs:string), where the derived type needs to retain the original string for validating against lexical facets such as pattern.Converts from xs:string to xs:normalizedStringConverts String to NOTATIONConverts String to QNameConverts from xs:string or xs:untypedAtomic to xs:StringConverts from xs:string to a user-defined type derived directly from xs:stringConverts a string to a timeConverts from xs:string to xs:tokenConverter from string to plain union typesConverts from xs:string or xs:untypedAtomic to xs:untypedAtomicConverts a string to a yearMonthDurationThis class converts a string to an xs:double according to the rules in XML Schema 1.0This class contains static information about types and methods for constructing type codes.This class exists to provide answers to questions about the type hierarchy.Interface representing a union type.This class has a singleton instance which represents the complex type xdt:untyped, used for elements that have not been validated.A UType is a union of primitive (atomic, node, or function) item types.This exception indicates a failure when validating an instance against a type defined in a schema.This exception indicates a failure when validating an instance against a type defined in a schema.This class represents a collection of parameter values for use in schema validation; it defines values for the parameters declared using the saxon:param XSD extension.