Summary

XQuery is not only a query language, but also a language that can do fairly general processing of XML. It is a strongly typed language that works well with data that may be strongly or weakly typed. Because the types used in XQuery are the same types used in XML and XML Schema, the type system is a better match for the data that is being processed. If the XML is governed only by a DTD or has no schema, the appropriate types are document, element, attribute, node, text node, processing instruction, comment, ID, IDREF, IDREFS, and so on. A strongly typed language that does not support these types tends to get in the way, because it is a poor match for the data being processed, and the language insists on the wrong things. If W3C XML Schema ...

Get XQuery from the Experts: A Guide to the W3C XML Query Language now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.