Package net.sf.saxon.type
This package contains classes that implement the XPath 2.0 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
.
Michael H. Kay
Saxonica Limited
9 February 2005
-
Interface Summary Interface Description AtomicType Interface for atomic types (these are either built-in atomic types or user-defined atomic types).ComplexType A complex type as defined in XML Schema: either a user-defined complex type, or xs:anyType, or xs:untyped.ConversionResult This is a marker interface used as the result methods that convert or cast values from one type to another.FunctionItemType Higher-order functions in XPath 3.0 introduce a third kind of Item, namely a Function Item.ISchemaCompiler Marker interface: the only instance of this class is the SchemaCompiler object in Saxon-EEItemType ItemType is an interface that allows testing of whether an Item conforms to an expected type.ListType Interface representing a simple type of variety ListPlainType A "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 typesSchemaComponent This is a marker interface that represents any "schema component" as defined in the XML Schema specification.SchemaComponentVisitor Interface for a general purpose visitor object used to process schema componentsSchemaDeclaration This is a marker interface that acts as a surrogate for an object representing a global element or attribute declaration.SchemaType SchemaType is an interface implemented by all schema types: simple and complex types, built-in and user-defined types.SimpleType This interface represents a simple type, which may be a built-in simple type, or a user-defined simple type. -
Class Summary Class Description AnyFunctionType An ItemType representing the type function().AnyItemType An implementation of ItemType that matches any item (node or atomic value)AnySimpleType This class has a singleton instance which represents the XML Schema built-in type xs:anySimpleTypeAnyType This class has a singleton instance which represents the XML Schema built-in type xs:anyType, also known as the urtype.BuiltInAtomicType 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).BuiltInListType This class is used to implement the built-in list types NMTOKENS, ENTITIES, IDREFS.BuiltInType 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.Converter A converter implements conversions from one atomic type to another - that is, it implements the casting rules for a (source type, destination type) pair.Converter.Base64BinaryToHexBinary Converts base64 to hexBinaryConverter.BooleanToDecimal Converts a boolean to a decimalConverter.BooleanToDouble Converts a boolean to a doubleConverter.BooleanToFloat Converts a boolean to an xs:floatConverter.BooleanToInteger Converts a boolean to an integerConverter.DateTimeToDate Converts a dateTime to a dateConverter.DateTimeToGDay Converts a dateTime to a gDayConverter.DateTimeToGMonth Converts a dateTime to a gMonthConverter.DateTimeToGMonthDay Converts a dateTime to a gMonthDayConverter.DateTimeToGYear Converts a dateTime to a gYearConverter.DateTimeToGYearMonth Converts a dateTime to a gYearMonthConverter.DateTimeToTime Converts a dateTime to a timeConverter.DateToDateTime Converts a date to a dateTimeConverter.DecimalToInteger Converts a decimal to an integer.Converter.DoubleToDecimal Convers a double to a decimalConverter.DoubleToInteger Converts a double to an integerConverter.DownCastingConverter Converter that does nothing except change the type annotation of the value.Converter.DurationToDayTimeDuration Converts a duration to a dayTimeDurationConverter.DurationToYearMonthDuration Converts a duration to a yearMonthDurationConverter.FloatToDecimal Converts a float to a decimalConverter.FloatToInteger Converts a float to an integerConverter.HexBinaryToBase64Binary Converts hexBinary to base64BinaryConverter.IntegerToDecimal Converts an integer to a decimalConverter.NotationToQName Converts Notation to QNameConverter.NumericToBoolean Converts a numeric value to a booleanConverter.NumericToDecimal Converts any numeric value to a decimalConverter.NumericToDouble Converts any numeric value to a double.Converter.NumericToFloat Converts any numeric value to xs:floatConverter.NumericToInteger Converts any numeric value to an integer.Converter.PromoterToDouble Converter that implements the promotion rules to a required type of xs:doubleConverter.PromoterToFloat Converter that implements the promotion rules to a required type of xs:floatConverter.QNameToNotation Converts QName to NotationConverter.StringToBase64BinaryConverter Converts string to base64Converter.ToStringConverter Converts any value to a stringConverter.ToUntypedAtomicConverter Converts any value to untyped atomicConverter.TwoPhaseConverter Converter that operates in two phases, via an intermediate typeConverter.UpCastingConverter Converter that does nothing except change the type annotation of the value.ErrorType This class has a singleton instance which represents the XML Schema 1.1 built-in type xs:errorExternalObjectType This class represents the type of an external Java object returned by an extension function, or supplied as an external variable/parameter.StringConverter AConverter
that accepts a string as input.StringConverter.IdentityConverter Converter that does nothing - it returns the input unchangedStringConverter.StringToAnyURI Converts string to anyURIStringConverter.StringToBoolean Converts a string to a booleanStringConverter.StringToDate Converts a string to a dateStringConverter.StringToDateTime Converts a string to a dateTimeStringConverter.StringToDayTimeDuration Converts a string to a dayTimeDurationStringConverter.StringToDecimal Converts a string to an xs:decimalStringConverter.StringToDerivedStringSubtype Converts from xs;string to a user-defined type derived from a built-in subtype of xs:stringStringConverter.StringToDouble Converts a string to a double.StringConverter.StringToDuration Converts a string to a durationStringConverter.StringToExternalObjectType StringConverter.StringToFloat Converts a string to xs:floatStringConverter.StringToGDayConverter Converts a string to a gDayStringConverter.StringToGMonth Converts a string to a gMonthStringConverter.StringToGMonthDay Converts a string to a gMonthDayStringConverter.StringToGYear Converts a string to a gYearStringConverter.StringToGYearMonth Converts a string to a gYearMonthStringConverter.StringToHexBinary Converts a string to hexBinaryStringConverter.StringToInteger Converts a string to an integerStringConverter.StringToIntegerSubtype Converts a string to a built-in subtype of integerStringConverter.StringToLanguage Converts from xs:string to xs:languageStringConverter.StringToName Converts from xs:string to xs:NameStringConverter.StringToNCName Converts from xs:string to xs:NCName, xs:ID, xs:IDREF, or xs:ENTITYStringConverter.StringToNMTOKEN Converts from xs:string to xs:NMTOKENStringConverter.StringToNonStringDerivedType Converter 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.StringConverter.StringToNormalizedString Converts from xs:string to xs:normalizedStringStringConverter.StringToNotation Converts String to NOTATIONStringConverter.StringToQName Converts String to QNameStringConverter.StringToString Converts from xs:string or xs:untypedAtomic to xs:StringStringConverter.StringToStringSubtype Converts from xs;string to a user-defined type derived directly from xs:stringStringConverter.StringToTime Converts a string to a timeStringConverter.StringToToken Converts from xs:string to xs:tokenStringConverter.StringToUnionConverter Converter from string to plain union typesStringConverter.StringToUntypedAtomic Converts from xs:string or xs:untypedAtomic to xs:untypedAtomicStringConverter.StringToYearMonthDuration Converts a string to a yearMonthDurationStringToDouble This class converts a string to an xs:double according to the rules in XML Schema 1.0Type This class contains static information about types and methods for constructing type codes.TypeHierarchy This class exists to provide answers to questions about the type hierarchy.Untyped This class has a singleton instance which represents the complex type xdt:untyped, used for elements that have not been validated.ValidationFailure This exception indicates a failure when validating an instance against a type defined in a schema. -
Exception Summary Exception Description SchemaException An exception that identifies an error in reading, parsing, or validating a schema.UnresolvedReferenceException 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.ValidationException This exception indicates a failure when validating an instance against a type defined in a schema.