Abstract

This chapter introduces XQueryX, and XML syntax for X-Queries. XQueryX is an alternative syntax for the XQuery language, where a query is represented as a well-formed XML document. The XQueryX approach is to represent the parsed query, leaving out BNF steps that are not useful and treating expressions, operators, and literals in a special way. This leads to a relatively compact XML representation of an XQuery that is particularly useful for searching. Given the XQuery language, there are a number of ways to define XML syntax—that is, a way to represent any possible XQuery in XML). Hence, the chapter discusses two possible extremes : a trivial embedding and a fully parsed XQuery, some of the design features of XQueryX, and how the XQueryX spec defines XQueryX. The XQueryX spec notes a couple of other benefits of an XML representation of an XQuery: parser reuse and automatic query generation. The simplest way to represent the XQuery syntax as XML is just to wrap each query in a start tag and an end tag. The XQueryX specification defines XQueryX by providing an XML Schema, which defines the syntax of XQueryX, and a stylesheet, which defines the semantics. The Schema follows the XQuery grammar quite closely. 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 X-Query, as an XML document.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.