Research Background

Research Background

Ibrahim Dweib (Sultan Qaboos University, Oman) and Joan Lu (University of Huddersfield, UK)
DOI: 10.4018/978-1-4666-1975-3.ch014

Abstract

In this chapter, the research background is discussed. This includes XML model, XML query languages, XML schema languages, XML Application Program Interface, XML documents types, XML data storage approaches, relational database model, and the similarities and differences between XML model and relational database model. Finally the chapter summary is given.
Chapter Preview
Top

Xml Model

EXtensible Markup Language (XML), is a W3C Recommendation in 1998 for marking up data” (Bray et al., 2007). It is designed for publishing and exchanging a large scale of digital data over the Internet. It is a Markup language that is used to define the structure of information and its elements’ contents, where HTML is used to define the way in which the elements are displayed on a web page. It can also be considered as an ideal format for server-to-server transfer of structured data (Bansal and Alam, 2001).

The importance of XML documents transformation is largely increased. Moreover different XML models have common requirements and limitations as tools for data management. For rich data to be shared among different groups, all concepts need to be placed into a common frame of reference. XML schemas must be globally standardized among groups, or mapping must be created between all pairs of related data. Parsing and text conversion slows down the access of the data.

A well-formed XML document is one that corresponds to the XML 1.0 (Bray et al., 2007) grammar specified by W3C. It has exactly one root element, which is called document element. Each starting element tag should have a corresponding closing tag. The elements should be nested within one another. The tags and nesting rules allow XML to represent information in a hierarchical manner. Figure ‎1 shows an example for valid XML document.

In recent years, significant development in the XML domain has been achieved. Many languages based upon XML Markup have been designed; XML Schema and XML XQuery have been developed. These standardized technologies augment the data processing abilities of XML. The following sections give a brief description of a variety of XML based languages and technologies.

Figure 1.

An example of XML document

Top

Xml Query Languages

XML query languages are used to enable the user to retrieve data from a single XML document using XPath language, or from multi-documents using XQuery language.

<b>XPath Language</b></div><p>XPath stands for the XML Path Language(Berglund et al., 2007). It is used for retrieving parts of a single XML document by using a path notation, like those used in URLs. Every XPath expression evaluates to one of four basic types:</p><ul class="xmlReaderUl"><li><i>• </i><p>Node-set (An unordered list of nodes)</p></li><li><i>• </i><p>Boolean</p></li><li><i>• </i><p>Number (floating-point number)</p></li><li><i>• </i><p>String (a sequence of UCS characters)</p></li></ul><p>An XPath location can be either a relative or an absolute location in an XML document. It can deal with seven node types:</p><ul class="xmlReaderUl"><li><i>• </i><p>Root node</p></li><li><i>• </i><p>Element nodes</p></li><li><i>• </i><p>Attribute nodes</p></li><li><i>• </i><p>Namespace nodes</p></li><li><i>• </i><p>Processing instruction nodes</p></li><li><i>• </i><p>Text nodes</p></li><li><i>• </i><p>Comment nodes</p></li></ul><p>The amount of nodes matched by an XPath location can be restricted further by specifying additional requirements for a match like comparison operators, functions or predefined variables. XPath supports equality operators and helper functions operating on the four basic types (i.e. node-set, Boolean, number and string), for instance substring extraction, summation of the values in a node-set or the number of nodes in a node-set to name a few. Table ‎1 shows an example of some XPath expressions to retrieve data from the XML document in Figure ‎1.</p><i>Table 1. </i><div class="xmlReaderFig"><div class="xmlReaderTitle4">Example of some XPath expressions </div></div><div class="xmlReaderTableContainer"><table border="1" cellpadding="4" cellspacing="1" class="xmlReaderTable"><colgroup><col width="21.83%" /><col width="78.17%" /><tr><td valign="top" align="left">./author</td><td valign="top" align="left">All <author> elements within the current context. Note that this is equivalent to the expression in the next row.</td></tr><tr><td valign="top" align="left">author</td><td valign="top" align="left">All <author> elements within the current context.</td></tr><tr><td valign="top" align="left">/books</td><td valign="top" align="left">The document element (<books>) of this document.</td></tr><tr><td valign="top" align="left">//author</td><td valign="top" align="left">All <author> elements in the document.</td></tr><tr><td valign="top" align="left">book/ISBN</td><td valign="top" align="left">All <ISBN> elements that are children of a <book> element.</td></tr><tr><td valign="top" align="left">books//name</td><td valign="top" align="left">All <name> elements one or more levels deep in the <books> element (arbitrary descendants). Note that this is different from the expression in the next row.</td></tr><tr><td valign="top" align="left">books/*/name</td><td valign="top" align="left">All <name> elements that are grandchildren of <books> elements.</td></tr><tr><td valign="top" align="left">author[1]</td><td valign="top" align="left">The first <author> element in the current context node.</td></tr><tr><td valign="top" align="left">book/*</td><td valign="top" align="left">All elements that are the children of <book> elements.</td></tr><tr><td valign="top" align="left">book[@price &lt “60.0”]</td><td valign="top" align="left">All <book> elements where price attribute is less than “60.0”.</td></tr><tr><td valign="top" align="left">ancestor::name[parent::book][1]</td><td valign="top" align="left">The nearest <name> ancestor in the current context and this <name> element is a child of a <book> element.</td></tr></colgroup></table></div></div><div class="preview-footer"><a href="javascript:__doPostBack('ctl00$cphFeatured$lnkAddToCart','')">Purchase this chapter to continue reading all 14 pages ></a></div></div><div id="table-of-contents"><h2>Complete Chapter List</h2><div class="search-contents"><span class="text"> Search this Book: </span><span class="text-box-container"><input id="txtKeywords" type="text" maxlength="50" onkeypress="return SearchBookFulltextHandleEnter(event, 64884);" placeholder="Full text search terms" title="Full text search terms" class="full-text-search-box" /></span><div class="inline-block search-contents-xs-full-width"><span class="search"><span class="search-button" onclick="RemoveSpecialCharacters();SearchBookFulltext(64884);"></span></span><span class="reset"><span onclick="RemoveSpecialCharacters();SearchBookFulltextReset();" class="link-gray-s">Reset</span></span></div></div><div id="searchResults"></div><div id="full-toc"></div><div id="loading-toc" class="text-align-center"><div class="loading-icon-lg"></div></div><script type="text/javascript"> $(document).ready(function () { var bookId = 64884; var titleId = 69137; var subjectId = 5; var compactView = 'True'; var onDemandDiscountDisplayPrice = ''; var onDemandDisplayPrice = '$37.50'; var chapterCount = 31; if (chapterCount !== 0) { GetBookToc(bookId, titleId, subjectId, compactView, onDemandDiscountDisplayPrice, onDemandDisplayPrice); } else { GetBookTocFromSubmissionSystem(bookId, titleId, subjectId, compactView, onDemandDiscountDisplayPrice, onDemandDisplayPrice); } }); </script></div></div></div></div><script type="text/javascript"> MenuAdjust(); $(window).on('resize orientationChange', function (event) { MenuAdjust(); }); </script><footer class="footer"><div class="container"><div class="row"><div class="top-margin"><div class="col-md-6"><div class="footer-header"> Learn More </div><div class="text"><a href="/about/" class="footer-link">About IGI Global</a> | <a href="/about/partnerships/" class="footer-link">Partnerships</a> | <a href="/contact/" class="footer-link">Contact</a> | <a href="/about/staff/job-opportunities/" class="footer-link">Careers</a> | <a href="/faq/" class="footer-link">FAQ</a> | <a href="/about/staff/" class="footer-link">Management Team</a></div><div class="footer-header header-margin-top"> Resources For </div><div class="text"><a href="/librarians/" class="footerlink">Librarians</a> | <a href="/publish/" class="footerlink">Authors/Editors</a> | <a href="/distributors/" class="footerlink">Distributors</a> | <a href="/course-adoption/" class="footerlink">Instructors</a> | <a href="/about/rights-permissions/translation-rights/" class="footerlink">Translators</a> | <a href="https://www.econtentpro.com/partners/referrer/2eeff007-a17a-e611-80c4-0cc47a0d221d?url=/copyediting" class="footerlink" target="_blank">Copy Editing Services</a></div><div class="footer-header header-margin-top"> Media Center </div><div class="text"><a href="/symposium/" class="footer-link">Webinars</a> | <a href="/newsroom/" class="footer-link">Blogs</a> | <a href="/catalogs/" class="footer-link">Catalogs</a> | <a href="/newsletters/" class="footer-link">Newsletters</a></div><div class="footer-header header-margin-top"> Policies </div><div class="text"><a href="/about/rights-permissions/privacy-policy/" class="footer-link">Privacy Policy</a> | <a href="/about/rights-permissions/content-reuse/" class="footer-link">Fair Use Policy</a> | <a href="/about/rights-permissions/ethics-malpractice/" class="footer-link">Ethics and Malpractice</a></div></div><div class="col-md-6 td-r"><div class="td-r-t"><div class="footer-rightside-container"><div class="left"><div style="margin-bottom: 1em;"><a href="http://www.facebook.com/pages/IGI-Global/138206739534176?ref=sgm" target="_blank"><span class="fb"></span></a> <a href="http://twitter.com/igiglobal" target="_blank"><span class="tw"></span></a></div><div><a href="http://www.world-forgotten-children.org" target="_blank"><img src="/images/proud-supporter-of-wfcf-07282015.png" alt="World Forgotten Children's Foundation" title="Proud Supporter of the World Forgotten Children's Foundation" width="157" height="52" /></a></div></div><div class="right"><div class="conference-badges-container"><a class="conference-badge" href="http://www.bookexpoamerica.com" target="_blank"><img src="/Images/Conferences/bea-2018.png" width="250" height="124"></a></div></div></div></div><div class="text">Copyright © 1988-2018, IGI Global - All Rights Reserved</div></div></div></div></div></footer><div class="aspNetHidden"><input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="679D6B48" /><input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="Yi5VLh2wI3GYQDW5xOHW3VafgAMpIIA/o3bpkt7ec7txYI9BrVqafHRASDDjqtQ8gaC/R2A4hjR12DHIHnIJUtfMQy89i+yQiYdH4cIrTbqDKVpBfqOhmWJupcSXor6RfE95W61RtD6imhlUOEqP0sQuE8+4Eh4SrIVh97//fNCW8GgtYcEXHw1hLvdl1LntWZobQPapdFB7i/KQ3jDIRdcjxpXk3+89jR38CvhuKBd0PnWsv/ngZYNxx5mcxoxYPP+BGNObcsWvMOKE25T7mjtILv04NcS5abp23E/6Y74SosAPWPAMg5WQS9w8i4o/QmwHKd4jpVH1bFAvx6uvTZraTTS7RkVczkPkK6hyqYJWCmprjznPmrRV7EPILJN8SalrOmJwByG6o/Rd1XCpXrfghEngoozAsVA7/W7WtjHBXJKB" /></div></form></body></html>