xs:unsignedShort

Construct an unsignedShort value from an item value.

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:


Syntax

xs:unsignedShort(item $value) => unsignedShort

Description

This is a constructor function that takes an item value as argument and returns a value of type xs:unsignedShort. If the argument is a literal, then the literal must be a valid lexical form of its type.

As specified in the respective section of the W3C recommendation XML Schema Part 2: Datatypes, a value of type xs:unsignedShort represents an integer value derived from xs:unsignedInt. The lexical representation is the set of unsigned numerical values in the range from 0 to 65535.

Argument

$value

item value

Example

  • The following queries construct valid values of type xs:unsignedShort:

    xs:unsignedShort(65535)
    xs:unsignedShort(-0)
  • The following queries do not construct valid values of type xs:unsignedInt:

    xs:unsignedShort(65536)
    xs:unsignedShort(-223)