Extensible Markup Language: a Tutorial

Extensible Markup Language: a Tutorial

View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Librarians' Digital Library Workshop on Digital Libraries: Theory and Practice March,, 2003 DRTC, Bangalore Paper: O eXtensible Markup Language: A Tutorial Aditya Tripathi Indian Statistical Institute Documentation Research & Training Centre Bangalore- 560 059 email: [email protected] email: [email protected] Abstract SGML (Standard Generalized Markup Language) is mother of all the markup languages. eXtensible Markup Language (XML) is a derivative of SGML. In the Internet arena Hypertext Markup Language (HTML) is found to be unsuitable particularly when it comes to attach semantics to the data. That is why XML was developed. XML is still not a completely matured technology and more and more specifications are coming up. Currently XML version 1.0 is released by W3C. This paper is written to give an overview about the designing of a XML based solution for library science professionals. Paper: O Aditya Tripathi “If you use the original World Wide Web program, you never see a URL or have to deal with HTML. You're presented with the raw information. You then input more information. So you are linking information to information--like using a word processor. That was a surprise to me --that people were prepared to painstakingly write HTML.” --Tim Berners-Lee Tim Berners-Lee had vision about the easy access to the data all round the world, when he first proposed about the WWW. Since then Internet has gone a long way, from text-based browser to the present completely GUI (Graphical User Interface) browser. The representation of information has also changed. We saw the development of HTML in 1980s and then its various versions in 1990s, then came the era of XML (Extensible Markup Language). This change also supports the vision of Lee though he would have never dreamt about the development of such system for the web content development. But finally it was he who had the vision about the use of semantic Internet because there is lot of information available over Internet & finding information has become as difficult as finding gold coin in a garbage heap. That is why the domain specific information interchange systems are thought of and it is there XML comes into picture. 1. FROM SGML TO XML The markup languages that carry the instruction for text processing are known as ‘Procedural Markup’. The idea of markup was to format a particular kind of document. But later on it was felt that markup languages can be used for system to system information interchange also. This was first realized by Charles Goldfarb, Ed Mosher and Ray Lorie when they were working with legal documents. They designed the first markup language known as GML (Generalized Markup Language) based on the following observation: Ø The document processing programs needed to support a common document format. Ø The common format needed to be specific to their domain - for example legal documents. Ø To achieve a high a degree of reliability, the document format would have to follow specific rules. For example, take an example of memorandum, To: Bishwanath Dutta CC: Bibhuti Bhushan Sahoo From: Aditya Tripathi Date: 27.01,2003 Subject: Appointment order ------------------------------------------------------------------------------------------------------------ We are extremely happy to inform you that you are selected as the coordinator of Knowledge management team. If we look into this document we find that there are six fields in this document. Ø Who the document is intended for (the To: field) Ø Who has been sent a copy of document (the CC: field) Ø Who sent the document (the From: field) Ø The date of document written (the Date: field) Ø The subject of document (the Subject: field) Ø The document body eXtemsible Markup Language: A Tutorial Paper: O So, if we make a fixed structure of this document then whoever writes the document has to write it in the same structure. Thus if we try to port the information from one system to another it will not be a problem as the structure of document is always same. The definition of the structure of document is known as ‘DTD (Document Type Definition)’. Once GML was designed, Goldfarb fine tuned his work and propos ed the SGML (Standardized Markup Language) which was further approved by ISO (International Organization for Standardization) in 1986. SGML was not a language itself but it was a meta language to develop other markup languages. HTML (Hypertext Markup Language) is a derivative of SGML. HTML is more like a formatting language. Thus it is difficult to pull out what kind of data is stored inside a HTML document. Once this difficulty was understood, the need for domain specific tags was felt, for information interchange, which is not possible with HTML. Hence the XML was developed. It is always said that XML is more near to SGML when compared to HTML. 2. WHAT IS XML? According to the abstract from the XML Specification version 1: “The extensible Markup Language (XML) is a subset of SGML that is completely described in this document. Its goal is to enable generic SGML to be served, received, and processed on the Web in the way that is now possible with HTML. XML has been designed for ease of implementation and for interoperability with both SGML and HTML.” · XML stands for EXtensible Markup Language. · XML is a markup language much like HTML. · XML was designed to describe data. · XML tags are not predefined in XML. You must define your own tags. · XML uses a DTD (Document Type Definition) to describe the data. · XML with a DTD is designed to be self-descriptive. XML is still under development, & the following goals are kept in mind while developing the specification for XML. 1. XML shall be straightforwardly usable over the Internet. 2. XML shall be compatible with SGML. 3. It shall be easy to write programs which process XML. 4. The processors could read the XML document easily. 5. XML document should be human-legible and reasonably clear. 6. The XML design should be prepared quickly. 7. The design of XML should be formal and concise. 8. XML document shall be easy to create. 9. Terseness in XML is of minimum importance. 2.1. How XML is Different from HTML? 1. XML was designed to carry data. 2. XML is not a replacement for HTML. 3. XML was de signed to describe data and to focus on what data is. HTML was designed to display data and to focus on how data looks. 4. HTML is about displaying information. XML is about describing information. 3. WHAT CAN BE DONE WITH XML? Paper: O Aditya Tripathi 3.1. XML does not DO Anything XML was not designed to DO anything. Maybe it is a little hard to understand, XML was not made to DO anything. XML is created as a way to structure, store and send information. To look into more detail let us write our first XML documents book.xml: <?xml version="1.0" encoding="UTF -8" ?> - <book> <title >Application of expert systems in libraries and information centres</title > - <author> <f_name>Anne</f_name> <l_name>Morris</l_name> </author> <edition>1st Edition</edition> <place>London</place> <publisher>Bowker-Saur</publisher> <physical_desc>241 p.</physical_desc> </book> The example shows the structure of a document which describes a book, titled ‘Application of expert systems in libraries and information centres’. The book will have a title, author, edition, place, publisher, physical description elements. Author will be further divided into first name (f_name) and last name (l_name). Inside these tags the actual data is stored. If one browses the document in the browser, data will appear embedded in the tag without having any kind of formatting (Figure 1). Fig.1 eXtemsible Markup Language: A Tutorial Paper: O 3.2. Define Your Own Tags In the above mentioned example, <book> tag is defined by the person who is describing the document. Thus one can see that XML provides the facility to define your own tags. It is contrary to HTML where the tags are predefined. So the XML provides the facility to create domain specific tag set which facilitates the information interchange within a specific domain. For example, NewsML is developed for information interchange among the news agencies like Reuter and others. 3.3. XML is Not a Replacement for HTML It is important to understand that XML is not a replacement for HTML. In future, it is most likely that XML will be used to describe the data, while HTML will be used to format and display the same data, using CSS (Cascading Stylesheets) or XSL (eXtensible Style -sheet Language). 3.4. XML is Used to Exchange Data With XML, data can be exchanged between incompatible systems. In the real world, computer systems and databases contain data in incompatible formats. One of the most time -consuming challenges for developers has been to exchange data between such systems over the Internet. Converting the data to XML can greatly reduce this complexity and create data that can be read by many different types of applications. 3.5. XML can be Used to Share Data With XML, plain text files can be used to share data. Since XML data is stored in plain text format, XML provides a software as well as hardware-independent way of sharing data. This makes it much easier to create data that different applications can work with. It also makes it easier to expand or upgrade a system to new operating systems, servers, applications, and new browsers. 3.6. XML can Make Data More Useful With XML, your data is available to more users.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    14 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us