StudentShare
Contact Us
Sign In / Sign Up for FREE
Search
Go to advanced search...
Free

XML-Based Project - Assignment Example

Cite this document
Summary
This document gives an overview of the project work and states the reasons behind the design decisions taken during the course of the project. It also illustrates the importance of XML technologies in various application areas. …
Download full paper File format: .doc, available for editing
GRAB THE BEST PAPER93.1% of users find it useful
XML-Based Project
Read Text Preview

Extract of sample "XML-Based Project"

? XML Based Project Table of Contents Introduction 3 2.Work 3 3.Discussion 3 4.The Material Chosen 3 5.The Document Analysis 4 6.Encoding Scheme 7 7.Style Sheets 9 A.XSL Style Sheets 10 B.CSS Style Sheet 12 8.Use of Encoded Material 13 A.In Electronic Communication 13 B.In Publishing System 14 C.In Commercial Environment 14 D.In Academic Environment 14 9.Conclusion 15 10.Appendix 15 1. Introduction This document gives an overview of the project work and states the reasons behind the design decisions taken during the course of the project. It also illustrates the importance of XML technologies in various application areas. 2. Work Description The aim of the project was to encode a few web documents into their respective XML representations. Thereafter, using the transformation language XSLT, the information from within the XML document was to be extracted and presented differently depicting different scenarios. Oxygen XML Editor was used for the project. 3. Discussion A total of 7 webpages were taken from the Internet for the project. This section presents the reasons that motivated the various decisions that were taken during each stage of the project. 4. The Material Chosen The site is an informational site that lists down the companies falling in different application areas and where jobs can be hunted. The material chosen for the project were taken from the same site so there is a hierarchy in between the different web pages. Furthermore, the content on each page also follows a hierarchal structure that can be translated into relations. This would facilitate the markup language. The selected webpages covered the most commonly used elements of informational sites (i.e. headings, text, links, paragraphs, lists, etc.). This presented an opportunity of learning to encode the different elements into XML. Besides possessing a hierarchal structure of the selected pages, a repeating structure is also present in each page. This facilitates the marking up process. 5. The Document Analysis The first task was to analyze the documents and identify the manner and relation in which the data was presented in them. It was found that one page presented a list of companies categorized into their respective application areas. While the remaining 6 pages presented detail of 6 of these companies. So the relationship between the 7 documents was identified as shown in Figure 1. Figure 1 Tree Structure of Pages Within each of these pages, a pattern was found in the way the information was presented. Within the home page, there were categories, and list of companies in each category. Figure 2 Structure of Home Page In the remaining 6 pages, information regarding a company was presented under the related headings which exhibited a pattern. Some headings were common in all the 6 companies. Figure 3 Common Structure of About Pages Thus, the information from all the 7 pages was united and a tree structure was formed that represented the way portions of information were related to one another by the relationship of root, parent, child and siblings. Figure 4 Unified Tree Structure Once the document tree was identified, the document was marked up accordingly into an XML file (guide.xml) where the leaves of the tree were presented as child elements with no children. Figure shows the tree structure of the XML formed. Figure 5 XML Tree Structure Once the skeleton XML was formed, the data was filled in. 6. Encoding Scheme The next task was to validate the XML against an encoding scheme. This is important as it defines the rulings for the structure of XML that all inputs must adhere to. Any entry made that is not in accordance to the scheme set, makes the XML invalid and it will not remain well-formed. Two options were present to validate the defined XML document against; XML DTD or XML Schema. Although both are standardized (so developers can understand them equally easily) and both the options deliver the same functionality yet there is a difference in their definition. DTD has the lowest definition of data as CDATA (character data) or PCDATA (parser data). XML Schema on the other hand is a highly powerful mean of defining the structure and limitations of XML document. XML Schema is an XML document in itself and has several DTDs in it. The data types supported are much beyond the CDATA and PCDATA. It supports integer, string, byte, floating point, etc. As it is based on object oriented paradigm, it even supports forming complex types as needed in a scenario. So, to summarize, DTD focusses on the shape of the document while XML Schema not only defines the structure of XML but also defines the limitations of values elements can or can’t have. Even though XML Schema seems to be the better choice, for the sake of learning, both the schemas were defined for the XML file in the project. The DTD of the XML file is shown in Figure. Figure 6 DTD (guide.dtd) of the XML File The XML Schema is present by the name guide.xsd in the project folder. 7. Style Sheets Owing to the structure and organization of the pages a two page scenario was chopped out for the site; the ‘Home’ page (index.html) and the ‘About’ page (about.html). Figure 7 The Structure of Website The Home page would contain all the categories along with the associated companies falling into each category. The About page would contain the details of the 6 companies. Links would be provided on the Home page next to the companies with details, so the user can view it. In order to implement the website idea, two types of style sheets were used in the project; XML Style Sheets and a CSS Stylesheet. This section gives a brief description of the purpose of each. A. XSL Style Sheets In order to render two different web pages (from the same XML file i.e. guide.xml), containing two different scenarios of information retrieval, two XML Stylesheets were defined; index.xsl and about.xsl. These XSL transformed the XML file into two html files, index.html and about.html. Once the two stylesheets were defined, the transformation was applied by defining and applying them through the Oxygen’s XSLT Transformation panel. The two scenarios are shown in Figure below. Figure 8 Two Transformation Scenarios [Oxygen] The index.xsl was defined to display all the Companies in their respective areas in the form of a table. There are two columns in the table, one for the Application Area, while the other for the Companies. The 6 companies that have further information available to read of have a hyperlink next to their names. Figure 9 Portion of index.html Clicking on this link takes the user to the second page (about.html) at the location the extra information is given. The about.html is created by traversing all the Employers in the XML that had the ‘About’ element in them. Once found, the relevant Category and Employer’s name along with all the associated headings and related text are displayed. The about information for all the companies is presented on the same about.html page i.e. the page contains the detailed information of the 6 companies from the ones listed on home page (index.html). Each Companies detail is assigned an identifier so the control is taken to the relevant ‘about’ detail when the company’s detail is clicked on the home page (index.html). ‘Go Back’ links are available in the about.html page, that takes a user back to the company that was clicked for details. Anchors have been used to achieve this functionality. All data is generated dynamically. Even the anchors are generated at runtime. Thus if any information is added to the XML file at any time, by merely reapplying the transformation on the updated XML(using the two XSL files) would render the updated HTML pages displaying the new information. This fact alone presents the strength of XML and XSLT. For a website, the XSLs have to be defined only once to deliver a certain interface of the webpage, no matter how often the content of the website is updated. Thus through use of XSL, the presentation is separated from the data portion contained in the XML file. B. CSS Style Sheet The second Stylesheet used was the CSS. In order to format the table and tween the general outlook of headings, text and links, a common CSS (style.css) was used to style both the web pages. The links to this style was added in both the XSL stylesheets, as the HTMLs are formulate and rendered through there. Figure 10 shows the link to style.css in index.xsl. Figure 10 Link to CSS style sheet from within XSL Stylesheet Through use of these stylesheets (CSS and XSL), the general presentation and layout of the webpages can be changed in no time. The final outlook of the web pages can be found in the Appendix section of this report. 8. Use of Encoded Material During the course of the project, it was realized that by encoding the information, it is presented in a standardized format which means that all interpreters following the standard will be able to interpret, understand and retrieve the information. Once the XML Schema is defined for use, the new information is saved in accordance to that i.e. in its simplified form. No thoughts are given to the layout of this information. The XSLT defined can then be used to transform the XML files into the desired HTML form depicting the desired scenario. In this way, using one file for rendering the presentation, a consistency is maintained throughout the presentation of the information. This section highlights how XML technologies find their use in the various application areas. A. In Electronic Communication Most of the messages forwarded within the electronic communication follow a typical information format. Once this format is defined, it is simple to enter information for all new messages accordingly. The XML stylesheets can either reside on the servers or the client systems which can then be used to transform the XML in a manner which is most easy to read and understand for a particular scenario. As the information has become increasingly complex, HTML is not rich enough to cater with all the information needs. So through XML, the data to be communicated is encoded into a non-HTML format and sent over the HTTP. Most of the web APIs and the data feeds are designed to produce and consume XML data i.e. RSS, REST, SOAP, AJAX, ATOM, web-services and even XHTML is a form of XML. Usually the things published on the Internet are a form of XML. B. In Publishing System As data and presentation are separated, the XSLT technology can be used for formatting as well as publishing of XML data for Web, PDF, Postscript, etc. Complex tables, the tables of contents, multi-level headers and footnotes, indexing, comprehensive typography, graphics (raster and vector) and typesetting controls can be encoded and published using the flexibility offered XML, DTD and SXLT. C. In Commercial Environment Since XML represents data in a platform independent manner, it can be understood by any application or language. It can be used by a C program on a UNIX system to interact with a .Net application on a Windows system. XML has become an integral part of Web services that send non-HTML data over the HTTP. Furthermore, having been standardized, it is used by various commercial applications. XML technologies are used for storing and presenting information in formats required by various applications. D. In Academic Environment XML is used to store data for both the data centric purposes (used as a database) as well as document centric purposes (where information in documents is stored in XML and presented differently in different situations). In an academic environment, generally content management systems are used to share information. The content of these systems is saved as XML data. By defining an XML Schema, the required information can simply be inserted in a predefined format, and the pre-built XSLT can render the respective web pages in an instant. The teachers or students are not required to spend hours in designing the outlook of the data. The XSL stylesheets serve the purpose. 9. Conclusion In this project, the use and effectiveness of XML technologies was learnt by a self-implementing approach. During the course of this project, the entire process of encoding information from a document into an XML file and converting it back to a document form was perfromed. All the necessary steps involved in encoding of a document (document analysis, tree structure, XML, Data Type Definition, Schema) and then transforming into the standard output format of XHTML (through use of XSLT) was carried out sequentially. The project served as an important learning experience as it practically demonstrated the wonders of using XML technologies in data storing and presentation. Through use of the two types of stylesheets, it was realized how effective the separation of data and presentation is. XSL is used for styling the XML data while CSS is used for styling of the data in HTML. 10. Appendix This section presents two screenshots of the original web pages. It also contains the screenshots of the web pages rendered through use of XML technologies. Figure 11 Original Page 1 Listing of All the Categories and the Associated Companies Figure 12 Original Page 2 Detail About the Company Deloitte Figure 13 Home Page (index.html) Generated Using index.xsl on XML Document Figure 14 Portion of About Page (about.html) Generated using about.xsl Read More
Cite this document
  • APA
  • MLA
  • CHICAGO
(“XML-Based Project Assignment Example | Topics and Well Written Essays - 3000 words”, n.d.)
Retrieved from https://studentshare.org/logic-programming/1398495-xml-based-project
(XML-Based Project Assignment Example | Topics and Well Written Essays - 3000 Words)
https://studentshare.org/logic-programming/1398495-xml-based-project.
“XML-Based Project Assignment Example | Topics and Well Written Essays - 3000 Words”, n.d. https://studentshare.org/logic-programming/1398495-xml-based-project.
  • Cited: 0 times

CHECK THESE SAMPLES OF XML-Based Project

Statisitcs results

The study involved two groups, witnesses and non-witnesses.... The hypotheses that apply in the analysis of variance are: The mean value for the guilt rating for witnesses was… On the other hand, the mean guilt rating was 4.... 317 with a standard deviation of 1.... 6862 and a standard error for the mean of 0....
2 Pages (500 words) Statistics Project

A comparison of prices of football premier league tickets

I expect premier league clubs playing in UEFA champions league competition to be more expensive to watch than those which did not qualify for the champions league competition in England.... This is because most of these clubs sign expensive players and also the players earn a lot… For example Yaya Toure who plays for Mancheter City, earns $20 million per year ( Forbes) and Wyne Rooney who plays for Manchester United earns £300,000 a week making him one of the best paid football players (Rose, 2014). On the other hand, football clubs which In addition, most of their players have been signed at a relatively cheaper price....
4 Pages (1000 words) Statistics Project

STA project report:How to increase the win rate of league of legends in rank

Additionally, there are multiple types of statistics gathered for every player.... Such data may include points, rebounds, assists, steals, and turnovers for each game.... hellip; League of legends is fast paced and competitive online game.... Additionally, it is a real-time strategy that comes with role-playing game elements whereby there are two teams of ten champions each with a unique design and play style game Players need to take enemy base down to win....
6 Pages (1500 words) Statistics Project

The Determinants of Household Poverty in the USA - 1980

This type of analysis also provides the basis for obtaining a predictive model that can be used to project future poverty... For the following analysis, the four factors/ determinants of poverty include family size, urbanization, unemployment rates and median household… Accordingly, they are the independent variables....
8 Pages (2000 words) Statistics Project

Impact of Consumption and Investment on the GDP in Qatar 1990-2013

Considering the growth aspect that each country is faced with, one needs to understand the different approaches that each country employs in the management of their affairs leading to better economic performance.... The economic performance of any economy is rated through the study… The GDP depends entirely on the different economic activities that the countries engage in that will range from production activities, importation aspects, the development of different services within the borders and exportation aspect....
6 Pages (1500 words) Statistics Project

Project Data Provided on Blackboard by the Instructor

This project is aimed at providing information and analysis about the enrolment trend in a Private College for the 41 years period from the year 1965 to 2005 (both inclusive).... It shows how the trend changed during these 41 years and it also shows the year wise enrolment as well… Suitable graphs are also given along with stem and leaf diagram for the data....
4 Pages (1000 words) Statistics Project

A Comparison among SRSWOR, Stratified SR-SWOR, Single Stage Cluster Sampling, and Two-Stage Sampling

hellip; The project in this paper evaluated clear sample performances of proportion and point estimator and how they relate to normal theory variance and confidence intervals on the mean and proportion of a population by using Simple Random Sample Without Replacement.... The tool that was used in this project was the R Program for Simulation....
7 Pages (1750 words) Statistics Project

Public Attitudes to the Impending 56th USA Presidential Election

The "Questions Based on Published Findings from a Poll NYC Times Conducted to Investigate Attitudes to the Impending 56th US Presidential" paper examines the critical assessment of the data collection procedure and of the published newspaper article.... hellip; Based on the article published by the New York Times, it can be found that 52 percent of the probable voters would vote for Obama and 39 percent will be voting for Mr....
6 Pages (1500 words) Statistics Project
sponsored ads
We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.
Contact Us