Atomic values
Atomic values are instances of a simple type according to XML Schema which means, for example, character strings as "Emma Miller" or numbers as, for…
Type conversion
Apart from the constructor for each type, there is a cast as operator which fulfils the same function, namely to generate a value of a certain type from an output…
Operations and functions on sequences of atomic values
A sequence of values of xs:integer type can be generated with the to operator. So, the expression
3 to 7
results in the…
Atomisation
Atomic values actually do not appear in XML documents. Rather, XML documents are presented in the XQuery data model as a tree of nodes. However, for calculating and for many…
Special types in XQuery
As already mentioned, information from XML Schema or the DTD are used in order to assign atomic values which appear in a XML document to the correct type. But what…
Nodes
In the previous sections we have learned how XQuery integrates the simple data types of XML Schema and on the one hand limits them in the use (because list and union types are…
Element nodes
An element node represents an element from XML 1.0. The textual value of an element node results from the concatenation of all text nodes which are descendants of this…
Whitespace in element constructors
The treatment of whitespace in element constructors is controlled by the value of xmlspace from the XQuery prologue. In case it is not explicitly…
The computed element constructor
When using the direct element constructor, element content and attribute values can be computed by expressions; however, the element…
Document nodes
A document node represents a XML document. XQuery has a wider definition of a XML document than the XML specification. Therefore, it is not required that there is exactly…