Appendix B. Built-in Types
This appendix describes all 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.
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 atomic values of any type can be passed to this function.
xs:anySimpleType
The type xs:anySimpleType represents the base type of all simple types (atomic, list, and union types) in the type hierarchy. In the context of XQuery, xs:anySimpleType is abstract and is never used directly. For example, it is not possible to cast values to or from this type, or use this type name in a user-defined function signature.
xs:anyType
The type xs:anyType is given to some element nodes without a more specific type. The difference between xs:anyType and xs:untyped is that an element of type xs:anyType may contain other elements that have specific types. Elements of type xs:untyped, on the other hand, always have children that are ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access