What Is XQueryX?

XQueryX is a variation on the XQuery XML document querying tool that is written in XML. The trouble is that all the complexity programmed into tools such as Saxon and Oracle XML DB has to be contained within the XML document structure of an XQueryX query. It can get very nasty. The coding of XQueryX queries is not complicated but when compared with the simplicity of XQuery, using XQueryX is not really worth the aggravation.

Without an example XQueryX query, XQueryX XML document construction requires explicit definition for all data, metadata, and programming constructs. So when including a for loop, as for an XQuery for loop, you have to code the for loop, the variable definitions, and the parameters passed in and out of the for loop. In this respect, XQueryX almost goes into the realm of tokenized programmingperhaps a little like writing a C programming language syntax compiler. Thats too much for XML, and asking too much of developers. It is nice to do everything in one language (in this case), but in the case of queries, XQueryX appears impractical and perhaps even a little overzealous in its application of ensuring the globalized use of XML.

The downside to XQuery is that it is not written in XML. This is not really a problem in itself, except that in tandem with all other XML bits and pieces you have looked at in this book (excepting Oracle and SQL Server), everything else is written in XML. The beauty of a lot of the XML specifications from the W3C is that they are all written in the same language (XML). That XML coding is platform independent and vendor independent. And XML is very easy to code. My perspective is that if an XML project is beginning to look like it is getting too complex, then you may be overextending the capabilities of XML.

Why is XQuery not written in XML? Probably because XQueryX (the XML- constructed version of XQuery) is far too complex and thus unwieldy and awkward to use. Why use the something that is over-complicated when there are easy-to-use, intuitive tools such as Saxon and Oracle XML DB available?

This chapter has expanded on XPath from the previous chapter, examining use of XPath expressions in XQuery commands. XQuery commands are used to submit data queries to XML documents, and sometimes XMLType data types in relational databases. The next chapter examines more specific areas of XML functionality including XLink, XPointer, XForms, and XML-FO.



Beginning XML Databases
Beginning XML Databases (Wrox Beginning Guides)
ISBN: 0471791202
EAN: 2147483647
Year: 2006
Pages: 183
Authors: Gavin Powell

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net