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
OnDemand PDF Download:
No Current Special Offers


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

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


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><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 = 0; var compactView = 'True'; var onDemandDiscountDisplayPrice = ''; var onDemandDisplayPrice = '$37.50'; var chapterCount = 31; var isbn = 9781466619753; var bookClassificationId = 0; if (chapterCount !== 0) { GetBookToc(bookId, titleId, isbn, subjectId, compactView, onDemandDiscountDisplayPrice, onDemandDisplayPrice); } else { GetBookTocFromSubmissionSystem(bookId, titleId, isbn, subjectId, compactView, onDemandDiscountDisplayPrice, onDemandDisplayPrice, bookClassificationId); } }); </script></div></div></div></div><script type="text/javascript"> MenuAdjust(); $(window).on('resize orientationChange', function (event) { MenuAdjust(); }); //Shopping cart - Adding item and displaying banner, signup, etc. var userAuthenticated = "false"; function setAddToCartOnClick(sender) { var lblTitle = document.getElementById('h1Title'); var coverImage = $("#imgCover"); var tdpid = sender.getAttribute('tdpid'); AddShoppingCartSessionItemDynamic(tdpid, sender.getAttribute("a"), null, 1, lblTitle.innerText, coverImage.attr('src'), coverImage.attr('alt'), userAuthenticated); } </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="/about/memberships/cope/" class="footer-link">COPE Membership</a> | <a href="/contact/" class="footer-link">Contact</a> | <a href="/about/staff/job-opportunities/" class="footer-link">Job Opportunities</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="/editorial-service-partners/" class="footerlink" target="_blank" rel="noopener">Author 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="/cookies-agreement/" class="footer-link">Cookie & Tracking Notice</a> | <a href="/about/rights-permissions/content-reuse/" class="footer-link">Fair Use Policy</a> | <a href="/accessibility/" class="footer-link">Accessibility</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><a href="" target="_blank" rel="noopener" aria-label="Facebook"><span class="fb"></span></a>  <a href="" target="_blank" rel="noopener" aria-label="Twitter"><span class="tw"></span></a>  <a href="" target="_blank" rel="noopener" aria-label="LinkedIn"><span class="linkedin"></span></a></div><div><a href="" target="_blank" rel="noopener"><img src="" alt="World Forgotten Children's Foundation" title="Proud Supporter of the World Forgotten Children's Foundation" width="157" height="52" /></a></div><div class="margin-top-5"><a href="" target="_blank" rel="noopener"><img src="" alt="Committee on Publication Ethics (COPE)" title="Committee on Publication Ethics (COPE)" /></a></div></div><div class="right"></div></div></div><div class="text copyright-text">Copyright © 1988-2022, 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="niwjTPhzDb39S4pG72ldixLiECJleE9nwhs3YTH9KyBIPp8+/f9qrgLbKizhDyA/dwKEaLhfJpXrb8gWGeXZ4AO69dHgOxbwC0FZSR81XSCXlabsvE1a/set4Yv5ArCGyWlC/R0mB2SLF+k9/QHEp3dkQ62s2PZ71h6HULjP30riXap6lHM/gHPg1U4EszHOVhFo76jyT6biK/CJnPQWPeAOOrUqD28Es00TByopPgQBaa4h973apFZ5rG45fInw7JyIkHYTqbBSdi8NqJA9r7r+DcLDQCL7ubjRjtPR0dgGO+8AhFMyRMj9NiXyuQSMR3Cu0ERrlvdFzY6rECvpHIQAwsm3qSu0M4+Bt2OO9T9w3eD2b1MF7z3TuXyg/D1dQ41GitTDDF19lp9H3l3giWu6rkk=" /></div></form></body></html>