Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Markup Languages January 31, 2002.

Similar presentations


Presentation on theme: "Introduction to Markup Languages January 31, 2002."— Presentation transcript:

1 Introduction to Markup Languages January 31, 2002

2 Introduction to Markup A markup language is essentially a set of rules used for the encoding of texts. It specifies what markup is allowed, what markup is required, how markup is to be distinguished from text, and what the markup means. You can think of it as text added to data to express information about the data—making it, essentially, a metalanguage. Markup documents, thus, contains content as well as information concerning that content.

3 Types of Markup SGML (1986) –General, flexible, and powerful –Used primarily, but not exclusively, by the publishing industry HTML (1990) –Easy to learn, easy to use, inflexible –Used primarily on the Web and Internet XML (1999, 2000) –Like SGML, but less flexible; easy to use and highly portable –Used increasingly by business, government, and on the Net (often invisibly)

4 Intro to Markup… cont’d Historically, the word markup has been used to describe annotation or other marks within a text telling printers how it should be printed or laid out. Today, markup is more familiar as the computer- based encoding of texts that ‘defines’ or results in a specific interpretation of a text. The markup augments or alters the text so as to direct the reader’s interpretation.

5 Presentation vs. Structure Through the us of tags, markup is commonly used to determine how a text is represented. –e.g., bold, italicized, or using a specific font This is the markup common to HTML, which is more or less constructed purely for presentation. In HTML, markup says very little, if anything, about the purpose or role of the text. –e.g., an tag creates a heading, but does not explain the operation or function of the heading

6 Pres. vs. Struct…. cont’d However, markup is capable of much more. Namely, it can express both presentation and structure. SGML and XML both take advantage of markup’s ability to define the structure and function of “units” within a text. –e.g., think about the way a book is laid out. Presentation markup will give us font sizes and formatting. Structural markup, on the other hand, defines chapters, headings, paragraphs, etc. It provides the document with structure.

7 Pres. vs. Struct…. cont’d SGML was built around this structural or ‘procedural’ philosophy, and so is distinctly different from HTML. XML, on the other hand, has taken what is best from both SGML and HTML to create a markup language that describes both how a text should look and its structure. An XML document describes both how the text is used and how it should be presented.

8 Presentation Markup Most of us are familiar with how presentation markup works. In HTML, for example, we understand that using the … tags will result in text being properly displayed as bold in our web browsers. Even where HTML does provide some guide to structure, such as the or paragraph tag, it is really most concerned with formatting the content, not describing the function of the text that follows.

9 Structural Markup Structural markups defines and categorize parts of a text, explaining the function of each unit of text. This definition and categorization plays a large role in making structural markup portable. The structural markup can be used by any number of applications, and those applications can use the markup in any number of different ways.

10 Formatting Structural Markup Formatting is usually applied to structural markup through the use of an external document (such as a Cascading Style Sheet), which contains specifications for how individual textual units should be represented. As different style sheets can be applied to the same structural markup, the resulting document can be formatted in countless ways. –E.g. one set of formatting rules for printing, one for the web, one for e-mail, one for Braille, and another for wireless devices.

11 Data Independence Perhaps the most important feature of structural markup (and certainly one of the reasons why XML has become so popular) is that it makes content entirely transportable from one hardware or software environment to another without alteration or the loss of information. In structural markup, data is essentially independent; in that, it can move from one application to another.

12 XML and Markup Both SGML and XML are not—strictly speaking— markup languages; rather, they are “meta-languages” that allow users to define their own markup languages for specific application. XML is capable of defining an infinite number of new markup languages. When using XML, you will define your own language (i.e., your own tags, your own formatting rules, etc.) to be applied to your project.

13 XML and Markup… cont’d XML does provide some rules and steps for validation that ensure that valid XML can be ‘parsed’ by any parsing application. So, even the most specific markup language—such as one you might create for a single manuscript—can be read and used by any XML parser. These rules ensure that the data remains independent of any single application, platform, or company’s commercial intent.

14 XML and Markup… cont’d Currently the W3C is the international organization assuring that the XML standard is updated and maintained. They play an important role in the development of XML markup as XML is only as good as its ability as a medium of exchange. Without consensus on XML standards, its usefulness and, particularly, its portability would diminish greatly.

15 XML and Markup… cont’d The main benefits of XML markup are: –Portability: data is independent –Presentation & Structure: XML takes the best from SGML and HTML –Repurposing: data can be shifted from one application to another, have multiple purposes –Logical Structure: XML markup is as easy to use and design for as it is flexible—it is attractive for both creators and end-users.

16 XML and Markup… cont’d Also of real benefit to users is the fact that the XML vocabulary and grammar is very similar to that of HTML, making the process of learning to use XML much easier for those who have an understanding of HTML tags. To this end, in this class we will use HTML as a springboard to learn XML.

17 Any Questions?


Download ppt "Introduction to Markup Languages January 31, 2002."

Similar presentations


Ads by Google