Appendix B. Built-in Types

This appendix describes all of the types that are built into XQuery via the XML Schema specification. For each type, it describes the set of valid values, as well as notes on comparing and casting values of these types. The types, depicted in Figure B-1, are listed alphabetically in this appendix.

xs:anyAtomicType

The type xs:anyAtomicType is a generic type that encompasses all atomic types, both primitive and derived, including xs:untypedAtomic. No values ever actually have the type xs:anyAtomicType; they always have a more specific type. As such, it does not have a corresponding constructor.

However, this type name can be used as a placeholder for all other atomic types in function signatures and sequence types. For example, the distinct-values function signature specifies that its argument is xs:anyAtomicType. This means that any atomic value of any type can be passed to this function.

This type isn't actually defined in XML Schema 1.0, although it's in the XML Schema namespace for convenience.

Get XQuery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.