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 AnyUri

ItemType representing the primitive type xs:anyURI

static XdmAtomicType Base64Binary

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 DateTime

ItemType representing the primitive type xs:dateTime

static XdmAtomicType DateTimeStamp

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

static XdmAtomicType DayTimeDuration

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 GDay

ItemType representing the primitive type xs:gDay

static XdmAtomicType GMonth

ItemType representing the primitive type xs:gMonth

static XdmAtomicType GMonthDay

ItemType representing the primitive type xs:gMonthDay

static XdmAtomicType GYear

ItemType representing the primitive type xs:gYear

static XdmAtomicType GYearMonth

ItemType representing the primitive type xs:gYearMonth

static XdmAtomicType HexBinary

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 NegativeInteger

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 NonNegativeInteger

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

static XdmAtomicType NonPositiveInteger

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

static XdmAtomicType NormalizedString

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

static XdmAtomicType Notation

ItemType representing the primitive type xs:NOTATION

static XdmAtomicType PositiveInteger

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 UnsignedByte

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

static XdmAtomicType UnsignedInt

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

static XdmAtomicType UnsignedLong

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

static XdmAtomicType UnsignedShort

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

static XdmAtomicType UntypedAtomic

ItemType representing the XPath-defined type xs:untypedAtomic

static XdmAtomicType YearMonthDuration

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

 

Property Summary

 QName TypeName

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.

 string ToString ()

Returns the name of this atomic type, as an EQName

 

Field Detail

AnyUri

public static readonly XdmAtomicType AnyUri

ItemType representing the primitive type xs:anyURI

Base64Binary

public static readonly XdmAtomicType Base64Binary

ItemType representing the primitive type xs:base64Binary

Boolean

public static readonly XdmAtomicType Boolean

ItemType representing the primitive type xs:boolean

Byte

public static readonly XdmAtomicType Byte

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

Date

public static readonly XdmAtomicType Date

ItemType representing the primitive type xs:date

DateTime

public static readonly XdmAtomicType DateTime

ItemType representing the primitive type xs:dateTime

DateTimeStamp

public static readonly XdmAtomicType DateTimeStamp

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

DayTimeDuration

public static readonly XdmAtomicType DayTimeDuration

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

Decimal

public static readonly XdmAtomicType Decimal

ItemType representing the primitive type xs:decimal

Double

public static readonly XdmAtomicType Double

ItemType representing the primitive type xs:double

Duration

public static readonly XdmAtomicType Duration

ItemType representing the primitive type xs:duration

Entity

public static readonly XdmAtomicType Entity

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

Float

public static readonly XdmAtomicType Float

ItemType representing the primitive type xs:float

GDay

public static readonly XdmAtomicType GDay

ItemType representing the primitive type xs:gDay

GMonth

public static readonly XdmAtomicType GMonth

ItemType representing the primitive type xs:gMonth

GMonthDay

public static readonly XdmAtomicType GMonthDay

ItemType representing the primitive type xs:gMonthDay

GYear

public static readonly XdmAtomicType GYear

ItemType representing the primitive type xs:gYear

GYearMonth

public static readonly XdmAtomicType GYearMonth

ItemType representing the primitive type xs:gYearMonth

HexBinary

public static readonly XdmAtomicType HexBinary

ItemType representing the primitive type xs:hexBinary

Id

public static readonly XdmAtomicType Id

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

IdRef

public static readonly XdmAtomicType IdRef

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

Instance

public static readonly XdmAtomicType Instance

Instance object of the XdmAtomicType class

Int

public static readonly XdmAtomicType Int

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

Integer

public static readonly XdmAtomicType Integer

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

Language

public static readonly XdmAtomicType Language

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

Long

public static readonly XdmAtomicType Long

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

Name

public static readonly XdmAtomicType Name

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

NCName

public static readonly XdmAtomicType NCName

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

NegativeInteger

public static readonly XdmAtomicType NegativeInteger

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

NMToken

public static readonly XdmAtomicType NMToken

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

NonNegativeInteger

public static readonly XdmAtomicType NonNegativeInteger

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

NonPositiveInteger

public static readonly XdmAtomicType NonPositiveInteger

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

NormalizedString

public static readonly XdmAtomicType NormalizedString

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

Notation

public static readonly XdmAtomicType Notation

ItemType representing the primitive type xs:NOTATION

PositiveInteger

public static readonly XdmAtomicType PositiveInteger

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

QName

public static readonly XdmAtomicType QName

ItemType representing the primitive type xs:QName

Short

public static readonly XdmAtomicType Short

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

String

public static readonly XdmAtomicType String

ItemType representing the primitive type xs:string

Time

public static readonly XdmAtomicType Time

ItemType representing the primitive type xs:time

Token

public static readonly XdmAtomicType Token

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

UnsignedByte

public static readonly XdmAtomicType UnsignedByte

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

UnsignedInt

public static readonly XdmAtomicType UnsignedInt

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

UnsignedLong

public static readonly XdmAtomicType UnsignedLong

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

UnsignedShort

public static readonly XdmAtomicType UnsignedShort

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

UntypedAtomic

public static readonly XdmAtomicType UntypedAtomic

ItemType representing the XPath-defined type xs:untypedAtomic

YearMonthDuration

public static readonly XdmAtomicType YearMonthDuration

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

Property Detail

TypeName

public QName TypeName {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.

ToString

public override string ToString()

Returns the name of this atomic type, as an EQName

Returns:

For example, "Q{http://www.w3.org/2001/XMLSchema}string" for the xs:string data type