Saxon.Api

 

 

Saxon.Api

Class XdmAtomicType


public class XdmAtomicType
extends XdmItemType

An instance of class XdmAtomicType represents a specific atomic type, for example xs:double, xs:integer, or xs:anyAtomicType. This may be either a built-in atomic type or a type defined in a user-written schema.

To get an XdmAtomicType instance representing a built-in atomic type, use one of the predefined instances of the subclass XdmBuiltInAtomicType. To get an XdmAtomicType instance representing a user-defined atomic type (defined in a schema), use the method GetAtomicType defined on the SchemaManager class.

Field Summary

static XdmAtomicType ANY_URI

ItemType representing the primitive type xs:anyURI

static XdmAtomicType BASE64_BINARY

ItemType representing the primitive type xs:base64Binary

static XdmAtomicType BOOLEAN

ItemType representing the primitive type xs:boolean

static XdmAtomicType BYTE

ItemType representing the built-in (but non-primitive) type xs:byte

static XdmAtomicType DATE

ItemType representing the primitive type xs:date

static XdmAtomicType DATE_TIME

ItemType representing the primitive type xs:dateTime

static XdmAtomicType DATE_TIME_STAMP

ItemType representing the built-in (but non-primitive) type xs:dateTimeStamp (introduced in XSD 1.1)

static XdmAtomicType DAY_TIME_DURATION

ItemType representing the built-in (but non-primitive) type xs:dayTimeDuration

static XdmAtomicType DECIMAL

ItemType representing the primitive type xs:decimal

static XdmAtomicType DOUBLE

ItemType representing the primitive type xs:double

static XdmAtomicType DURATION

ItemType representing the primitive type xs:duration

static XdmAtomicType ENTITY

ItemType representing the built-in (but non-primitive) type xs:ENTITY

static XdmAtomicType FLOAT

ItemType representing the primitive type xs:float

static XdmAtomicType G_DAY

ItemType representing the primitive type xs:gDay

static XdmAtomicType G_MONTH

ItemType representing the primitive type xs:gMonth

static XdmAtomicType G_MONTH_DAY

ItemType representing the primitive type xs:gMonthDay

static XdmAtomicType G_YEAR

ItemType representing the primitive type xs:gYear

static XdmAtomicType G_YEAR_MONTH

ItemType representing the primitive type xs:gYearMonth

static XdmAtomicType HEX_BINARY

ItemType representing the primitive type xs:hexBinary

static XdmAtomicType ID

ItemType representing the built-in (but non-primitive) type xs:ID

static XdmAtomicType IDREF

ItemType representing the built-in (but non-primitive) type xs:IDREF

static XdmAtomicType Instance

Instance object of the XdmAtomicType class

static XdmAtomicType INT

ItemType representing the built-in (but non-primitive) type xs:int

static XdmAtomicType INTEGER

ItemType representing the built-in (but non-primitive) type xs:integer

static XdmAtomicType LANGUAGE

ItemType representing the built-in (but non-primitive) type xs:language

static XdmAtomicType LONG

ItemType representing the built-in (but non-primitive) type xs:long

static XdmAtomicType NAME

ItemType representing the built-in (but non-primitive) type xs:Name

static XdmAtomicType NCNAME

ItemType representing the built-in (but non-primitive) type xs:NCName

static XdmAtomicType NEGATIVE_INTEGER

ItemType representing the built-in (but non-primitive) type xs:negativeInteger

static XdmAtomicType NMTOKEN

ItemType representing the built-in (but non-primitive) type xs:NMTOKEN

static XdmAtomicType NON_NEGATIVE_INTEGER

ItemType representing the built-in (but non-primitive) type xs:nonNegativeInteger

static XdmAtomicType NON_POSITIVE_INTEGER

static XdmAtomicType NORMALIZED_STRING

ItemType representing the built-in (but non-primitive) type xs:normalizedString

static XdmAtomicType NOTATION

ItemType representing the primitive type xs:NOTATION

static XdmAtomicType POSITIVE_INTEGER

ItemType representing the built-in (but non-primitive) type xs:positiveInteger

static XdmAtomicType QNAME

ItemType representing the primitive type xs:QName

static XdmAtomicType SHORT

ItemType representing the built-in (but non-primitive) type xs:short

static XdmAtomicType STRING

ItemType representing the primitive type xs:string

static XdmAtomicType TIME

ItemType representing the primitive type xs:time

static XdmAtomicType TOKEN

ItemType representing the built-in (but non-primitive) type xs:token

static XdmAtomicType UNSIGNED_BYTE

ItemType representing the built-in (but non-primitive) type xs:unsignedByte

static XdmAtomicType UNSIGNED_INT

ItemType representing the built-in (but non-primitive) type xs:unsignedInt

static XdmAtomicType UNSIGNED_LONG

ItemType representing the built-in (but non-primitive) type xs:unsignedLong

static XdmAtomicType UNSIGNED_SHORT

ItemType representing the built-in (but non-primitive) type xs:unsignedShort

static XdmAtomicType UNTYPED_ATOMIC

ItemType representing the XPath-defined type xs:untypedAtomic

static XdmAtomicType YEAR_MONTH_DURATION

ItemType representing the built-in (but non-primitive) type xs:yearMonthDuration

 

Property Summary

 QName Name

The name of the atomic type, or null if the type is anonymous.

 

Method Summary

static XdmAtomicType BuiltInAtomicType(QName name)

Get an XdmAtomicType object representing a built-in atomic type with a given name.

 bool Matches(XdmItem item)

Determine whether this item type matches a given item

 bool Subsumes(XdmItemType other)

Determine whether this ItemType subsumes another ItemType. Specifically A.Sumsumes(B) is true if every value that matches the ItemType B also matches the ItemType A.

 

Field Detail

ANY_URI

public static XdmAtomicType ANY_URI

ItemType representing the primitive type xs:anyURI

BASE64_BINARY

public static XdmAtomicType BASE64_BINARY

ItemType representing the primitive type xs:base64Binary

BOOLEAN

public static XdmAtomicType BOOLEAN

ItemType representing the primitive type xs:boolean

BYTE

public static XdmAtomicType BYTE

ItemType representing the built-in (but non-primitive) type xs:byte

DATE

public static XdmAtomicType DATE

ItemType representing the primitive type xs:date

DATE_TIME

public static XdmAtomicType DATE_TIME

ItemType representing the primitive type xs:dateTime

DATE_TIME_STAMP

public static XdmAtomicType DATE_TIME_STAMP

ItemType representing the built-in (but non-primitive) type xs:dateTimeStamp (introduced in XSD 1.1)

DAY_TIME_DURATION

public static XdmAtomicType DAY_TIME_DURATION

ItemType representing the built-in (but non-primitive) type xs:dayTimeDuration

DECIMAL

public static XdmAtomicType DECIMAL

ItemType representing the primitive type xs:decimal

DOUBLE

public static XdmAtomicType DOUBLE

ItemType representing the primitive type xs:double

DURATION

public static XdmAtomicType DURATION

ItemType representing the primitive type xs:duration

ENTITY

public static XdmAtomicType ENTITY

ItemType representing the built-in (but non-primitive) type xs:ENTITY

FLOAT

public static XdmAtomicType FLOAT

ItemType representing the primitive type xs:float

G_DAY

public static XdmAtomicType G_DAY

ItemType representing the primitive type xs:gDay

G_MONTH

public static XdmAtomicType G_MONTH

ItemType representing the primitive type xs:gMonth

G_MONTH_DAY

public static XdmAtomicType G_MONTH_DAY

ItemType representing the primitive type xs:gMonthDay

G_YEAR

public static XdmAtomicType G_YEAR

ItemType representing the primitive type xs:gYear

G_YEAR_MONTH

public static XdmAtomicType G_YEAR_MONTH

ItemType representing the primitive type xs:gYearMonth

HEX_BINARY

public static XdmAtomicType HEX_BINARY

ItemType representing the primitive type xs:hexBinary

ID

public static XdmAtomicType ID

ItemType representing the built-in (but non-primitive) type xs:ID

IDREF

public static XdmAtomicType IDREF

ItemType representing the built-in (but non-primitive) type xs:IDREF

Instance

public static XdmAtomicType Instance

Instance object of the XdmAtomicType class

INT

public static XdmAtomicType INT

ItemType representing the built-in (but non-primitive) type xs:int

INTEGER

public static XdmAtomicType INTEGER

ItemType representing the built-in (but non-primitive) type xs:integer

LANGUAGE

public static XdmAtomicType LANGUAGE

ItemType representing the built-in (but non-primitive) type xs:language

LONG

public static XdmAtomicType LONG

ItemType representing the built-in (but non-primitive) type xs:long

NAME

public static XdmAtomicType NAME

ItemType representing the built-in (but non-primitive) type xs:Name

NCNAME

public static XdmAtomicType NCNAME

ItemType representing the built-in (but non-primitive) type xs:NCName

NEGATIVE_INTEGER

public static XdmAtomicType NEGATIVE_INTEGER

ItemType representing the built-in (but non-primitive) type xs:negativeInteger

NMTOKEN

public static XdmAtomicType NMTOKEN

ItemType representing the built-in (but non-primitive) type xs:NMTOKEN

NON_NEGATIVE_INTEGER

public static XdmAtomicType NON_NEGATIVE_INTEGER

ItemType representing the built-in (but non-primitive) type xs:nonNegativeInteger

NON_POSITIVE_INTEGER

public static XdmAtomicType NON_POSITIVE_INTEGER

NORMALIZED_STRING

public static XdmAtomicType NORMALIZED_STRING

ItemType representing the built-in (but non-primitive) type xs:normalizedString

NOTATION

public static XdmAtomicType NOTATION

ItemType representing the primitive type xs:NOTATION

POSITIVE_INTEGER

public static XdmAtomicType POSITIVE_INTEGER

ItemType representing the built-in (but non-primitive) type xs:positiveInteger

QNAME

public static XdmAtomicType QNAME

ItemType representing the primitive type xs:QName

SHORT

public static XdmAtomicType SHORT

ItemType representing the built-in (but non-primitive) type xs:short

STRING

public static XdmAtomicType STRING

ItemType representing the primitive type xs:string

TIME

public static XdmAtomicType TIME

ItemType representing the primitive type xs:time

TOKEN

public static XdmAtomicType TOKEN

ItemType representing the built-in (but non-primitive) type xs:token

UNSIGNED_BYTE

public static XdmAtomicType UNSIGNED_BYTE

ItemType representing the built-in (but non-primitive) type xs:unsignedByte

UNSIGNED_INT

public static XdmAtomicType UNSIGNED_INT

ItemType representing the built-in (but non-primitive) type xs:unsignedInt

UNSIGNED_LONG

public static XdmAtomicType UNSIGNED_LONG

ItemType representing the built-in (but non-primitive) type xs:unsignedLong

UNSIGNED_SHORT

public static XdmAtomicType UNSIGNED_SHORT

ItemType representing the built-in (but non-primitive) type xs:unsignedShort

UNTYPED_ATOMIC

public static XdmAtomicType UNTYPED_ATOMIC

ItemType representing the XPath-defined type xs:untypedAtomic

YEAR_MONTH_DURATION

public static XdmAtomicType YEAR_MONTH_DURATION

ItemType representing the built-in (but non-primitive) type xs:yearMonthDuration

Property Detail

Name

public QName Name {get; }

The name of the atomic type, or null if the type is anonymous.

Method Detail

BuiltInAtomicType

public static XdmAtomicType BuiltInAtomicType(QName name)

Get an XdmAtomicType object representing a built-in atomic type with a given name.

Parameters:

name - The name of the required built-in atomic type

Returns:

An XdmAtomicType object representing the built-in atomic type with the supplied name. Returns null if there is no built-in atomic type with this name. It is undefined whether two requests for the same built-in type will return the same object.

Matches

public override bool Matches(XdmItem item)

Determine whether this item type matches a given item

Parameters:

item - the item to be tested against this item type

Returns:

true if the item matches this item type, false if it does not match

Subsumes

public override bool Subsumes(XdmItemType other)

Determine whether this ItemType subsumes another ItemType. Specifically A.Sumsumes(B) is true if every value that matches the ItemType B also matches the ItemType A.

Parameters:

other - the other ItemType

Returns:

true if this ItemType subsumes the other ItemType. This includes the case where A and B represent the same ItemType.