Page 87 - Building Digital Libraries
P. 87

CHAPTER 5


                                                   XQuery

                                                   XQuery represents an attempt to build a general-purpose query language for
                                                   XML documents. In some ways, it is analogous to SQL (Structured Query
                                                   Language) when dealing with databases. XQuery is an attempt to create a
                                                   query structure that is independent of the surface XML schema.  So how
                                                                                                            7
                                                   is it different from XPath? As noted above, XPath functions by treating an
                                                   XML document as a tree, where each XML tag represents a branch on the
                                                   tree. XPath statements navigate these trees by calling or processing specific
                                                   branches, and the attributes that make up a specific tag. XQuery essentially
                                                   works to solve the same problem (extracting and parsing XML data), but
                                                   attempts to do so by using a structured query language rather than as part of
                                                   an XML tree. As a result, XQuery has developed with its own set of functions
                                                   and methods that can be used to act upon extracted XML data, providing a
                                                   very SQL-like experience when processing XML documents. In many cases,
                                                   the choice of XPath or XQuery comes down to a matter of personal taste, as
                                                   well as support within the tools being used to process XML data. Some users
                                                   will like the more structured processing language found in XQuery, while
                                                   other users more familiar with the traditional HTML DOM (Document
                                                   Object Model) element-processing approach will likely prefer using XPath
                                                   processing. In either case, XPath and XQuery offer users the ability to pro-
                                                   cess XML documents using the approach that best fits their learning style.



                                                   XPointer

                                                   XPointer is a methodology for dealing with XML fragments.  XPointer
                                                                                                          8
                                                   is a technology that is utilized in conjunction with XPath within XSLT
                                                   documents.




                                                   XML Schema
                                                   XML Schemas represent an attempt to create a methodology for defining
                                                   XML tag structures for automated processing.  The use of XML Schemas
                                                                                            9
                                                   is currently part of an ongoing debate regarding how to best structure and
                                                   define XML documents. XML documents currently can be defined using
                                                   a number of methodologies, and at present, the W3C and the Dublin Core
                                                   organization are taking a close look at XML Schema and how this technol-
                                                   ogy can be used to generate application profiles to allow for the automated
                                                   processing of XML documents. At this point in time, a truly automated
                                                   solution for XML documents still remains an elusive goal.
                                                      At the top of the tree in figure 5.1, we find SGML (Standardized General
                                                   Markup Language). SGML represents the genesis of current-day markup
                                                   languages. Ironically, SGML was initially conceived by Ed Mosher, Ray
                                                   Lorie, and Charles Goldfarb in 1969, the same year that the Library of Con-
                                                   gress originally released the first MARC specification. Originally, Mosher,
                                                   Lorie, and Goldfarb set out to develop a markup language that could be
            72
   82   83   84   85   86   87   88   89   90   91   92