Chapter 12

XQueryX

12.1 Introduction

XQueryX is an alternative syntax for the XQuery language, where a query is represented as a well-formed XML document (as opposed to just a string of characters). There is a mindset in the XML world that says, “XML is a good way of representing stuff, and therefore all stuff should be represented as XML.” For example, one of the advantages of XML Schema over DTDs is that an XML Schema is an XML document, while a DTD is not. This turns out to be a very practical way to go about things – it really is useful to be able to treat an XML Schema, or an XQuery, as an XML document. It means you can:

• Validate it against an XML Schema (an XML Schema can be validated against the Schema for Schemas,1 and an XQueryX ...

Get Querying XML now with O’Reilly online learning.

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