Representation and Markup

Slides:



Advertisements
Similar presentations
CSCI N241: Fundamentals of Web Design Copyright ©2004 Department of Computer & Information Science Introducing XHTML: Module B: HTML to XHTML.
Advertisements

1. Content – Collective term for all text, images, videos, etc. that you want to deliver to your audience. 2. Structure – How the content is placed on.
XHTML 16-Apr-17.
XML: New or Old? XML was not an extention of HTML That already existed! SGML (ISO 8879) XML was a simplification of SGML  80 / 20 rule  (80% of the features.
26-Jun-15 XML. 2 HTML and XML, I XML stands for eXtensible Markup Language HTML is used to mark up text so it can be displayed to users XML is used to.
Upgrading to XHTML DECO 3001 Tutorial 1 – Part 1 Presented by Ji Soo Yoon 19 February 2004 Slides adopted from
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
Introducing HTML & XHTML:. Goals  Understand hyperlinking  Understand how tags are formed and used.  Understand HTML as a markup language  Understand.
Computer Sciences Department
Basics of HTML Shashanka Rao. Learning Objectives 1. HTML Overview 2. Head, Body, Title and Meta Elements 3.Heading, Paragraph Elements and Special Characters.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 XML Taken from Chapter 7.
CREATED BY ChanoknanChinnanon PanissaraUsanachote
 XHTML is aimed to replace HTML  XHTML is almost identical to HTML 4.01  XHTML is a stricter and cleaner version of HTML  XHTML is HTML defined as.
XML: Overview MIS 181.9: Service Oriented Architecture 2 nd Semester,
XML and friends Part 1 - XML and DTD ELAG 2001 workshop 8 Jan Erik Kofoed © BIBSYS Library Automation.
XML CPSC 315 – Programming Studio Fall 2008 Project 3, Lecture 1.
XP 1 CREATING AN XML DOCUMENT. XP 2 INTRODUCING XML XML stands for Extensible Markup Language. A markup language specifies the structure and content of.
1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel
1 © Netskills Quality Internet Training, University of Newcastle Introducing XML © Netskills, Quality Internet Training University.
CS134 Web Design & Development Creating a Basic Web Page Mehmud Abliz.
XML 1 Enterprise Applications CE00465-M XML. 2 Enterprise Applications CE00465-M XML Overview Extensible Mark-up Language (XML) is a meta-language that.
1 XHTML محمد احمدی نیا 2 Of 19 HTML vs XHTML  XHTML is a stricter and cleaner version of HTML.  by combining the strengths of HTML.
XML Extensible Markup Language. What is XML? ● meta-markup language ● a language for defining a family of languages ● semantic/structured mark-up language.
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
What is XML?  XML stands for EXtensible Markup Language  XML is a markup language much like HTML  XML was designed to carry data, not to display data.
FIGIS’ML Hands-on training - © FAO/FIGIS An introduction to XML Objectives : –what is XML? –XML and HTML –XML documents structure well-formedness.
 XML is designed to describe data and to focus on what data is. HTML is designed to display data and to focus on how data looks.  XML is created to structure,
1 Chapter 10: XML What is XML What is XML Basic Components of XML Basic Components of XML XPath XPath XQuery XQuery.
E0262 – MIS – Multimedia Storage Techniques XML (Extensible Markup Language  XML is a markup language for creating documents containing structured information.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
CP3024 Lecture 9 XML: Extensible Markup Language.
XML Documents Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Elements Attributes Comments PI Document.
Introduction to XML This presentation covers introductory features of XML. What XML is and what it is not? What does it do? Put different related technologies.
XML Instructor: Charles Moen CSCI/CINF XML  Extensible Markup Language  A set of rules that allow you to create your own markup language  Designed.
17 Apr 2002 XML Syntax: Documents Andy Clark. Basic Document Structure Element tags – Elements have associated attributes Text content Miscellaneous –
Lecture 16 Introduction to XML Boriana Koleva Room: C54
XML Introduction. What is XML? XML stands for eXtensible Markup Language XML stands for eXtensible Markup Language XML is a markup language much like.
1 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel
Introduction to DTD A Document Type Definition (DTD) defines the legal building blocks of an XML document. It defines the document structure with a list.
XML CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
XML DTD. XML Validation XML with correct syntax is "Well Formed" XML. XML validated against a DTD is "Valid" XML.
XP Tutorial 9New Perspectives on HTML and XHTML, Comprehensive 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
CIS 228 The Internet 9/20/11 XHTML 1.0. “Quirks” Mode Today, all browsers support standards Compliant pages are displayed similarly There are multiple.
XML Introduction to XML Extensible Markup Language.
XML Notes taken from w3schools. What is XML? XML stands for EXtensible Markup Language. XML was designed to store and transport data. XML was designed.
HTML is about making documents. Simple Code for Simple Layout My Document This is an example HTML document First paragraph Second paragraph This is the.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 1 Using HTML to Create Web Pages.
Extensible Markup Language (XML) Pat Morin COMP 2405.
XML intro. What is XML? XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to carry data, not to display.
XML BASICS and more…. What is XML? In common:  XML is a standard, simple, self-describing way of encoding both text and data so that content can be processed.
Pertemuan 1 Desain web Pertemuan 1
Unit 4 Representing Web Data: XML
CIS 228 The Internet 9/20/11 XHTML 1.0.
Introduction to XML History Concepts Well-formed XML
Introduction to HTML 5.
WEBSITE DESIGN Chp 1
CSCE 315 – Programming Studio Spring 2013
Chapter 7 Representing Web Data: XML
Creating an XML Document
Introducing HTML & XHTML:
Web Programming Maymester 2004
Structuring Content in a Web Document
Introduction to HTML 5.
Pertemuan 1 Desain web Pertemuan 1
CSE591: Data Mining by H. Liu
محمد احمدی نیا XHTML محمد احمدی نیا
Allyson Falkner Spokane County ISD
Creating Web Documents
Presentation transcript:

Representation and Markup COMP3220 Web Infrastructure COMP6218 Web Architecture Dr Nicholas Gibbins – nmg@ecs.soton.ac.uk 2017-2018

today’s BBC weather forecast for Southampton Representation URI identifies http://www.bbc.co.uk/weather/2637487 Resource yields on dereference today’s BBC weather forecast for Southampton Representation Metadata: Content-Type: text/html Data: <html> <head> <title>BBC Weather – Southampton</title> ... </html> represents

Hypertext Markup Language

What is HTML? The data format for Web pages A markup language for structured documents A platform for Web application development All of the above In this lecture, we’ll concentrate on #2

Which HTML? HTML Tags HTML+ HTML 2.0 HTML 3.0 HTML 3.2 HTML 4 XHTML XHTML 2 HTML 5 HTML 5.1 HTML 5.1 2nd ed. Evolution of features – overview of HTML 5 in next lecture

HTML source <!DOCTYPE html> <html>  <head>   <title>My Document</title>  </head>  <body>   <h1>This is an example HTML document</h1>   <ol>    <li>First paragraph</li>    <li>Second paragraph</li>   </ol>   <p>This is the first paragraph. <i>It doesn't really say very much.</i> Now is the time for all good men to come to the aid of the party.</p>   <p>This is the second paragraph. The quick brown fox jumped over the lazy dog.</p>  </body> </html>

HTML markup basics Tags that structure a document as a hierarchy of elements <p> ... </p> Attributes that modify elements <a href=“...”>...</a> Entity references that represent series of characters R&D

Element structure html head title body h1 ol li p i

Evolution of HTML Initially a language for encoding simple document semantics <h1>Things to See in London</h1> <p>The <i>Millennium Dome</i> is great.</p>

Evolution of HTML Subsequently extended to allow more design precision and visual effects <h1><center>Things to See in London</center></h1> <p><font size=“3” text=“#FF0000”>The <i>Millennium Dome</i> is <blink>great</blink>.</font></p>

Evolution of HTML Separation of semantics from presentation using stylesheets <h1>Things to See in London</h1> <p>The <em>Millennium Dome</em> is great.</p> Large font, bold, red Normal font, 1cm indent Italic font

Evolution of HTML At what point does it become better to move from document semantics to domain-specific markup? <day>Things to See in London</day> <see>The <place>Millennium Dome</place> is great.</see>

eXtensible Markup Language

The eXtensible Markup Language A general purpose markup language A markup language for defining domain-specific markup languages A W3C-defined subset of the Standard Generalized Markup Language

The eXtensible Markup Language Used as the basis for a number of Web data formats: Scalable Vector Graphics Resource Description Framework Synchronised Multimedia Integration Language Simple Object Access Protocol eXtensible Stylesheet Language Transformations (but not HTML5)

XML source <?xml version="1.0"?> <!DOCTYPE booklist SYSTEM "books.dtd"> <booklist> <books> <item cat="S"> <title>I, Robot</title> <author>Asimov, Isaac</author> <price>5.95</price> <quantity>3</quantity> </item> <item cat=”C"> <title>Persuasion</title> <author>Austen, Jane</author> <price>6.95</price> <quantity>2</quantity> </item> </books> </booklist>

XML components XML declaration Document type declaration (doctype) Elements Attributes Entities Processing Instructions Document type definition (DTD)

XML Declaration Indicates to a document processor that a document is written in XML <?xml version="1.0"?>

Document Type Declaration (DOCTYPE) Indicates the type of a document to a document processor Refers to a Document Type Definition (DTD) <!DOCTYPE booklist SYSTEM "books.dtd">

Elements Surrounded by start tags and end tags <books> … </books> Empty element tag for elements with no contents <hr/> Case sensitive names <books> != <Books> != <BOOKS>

Elements Element content may be: Data <foo>Just text data</foo> Mixed <foo>Text and <bar>element</bar> data</foo> Element-only <foo><image/></foo>

Attributes Provide extra information about elements <p class=“warning”>Danger, Will Robinson!</p> Attribute names and values are case-sensitive Values must be quoted with ‘ or “

XML entities Named entities Character entities Left angle bracket < < Right angle bracket > > Ampersand & & Apostrophe ‘ &apos; Double quote “ " Character entities Used for Unicode é é

Document Type Definition (DTD) A formal definition of the grammar for an XML document type What elements and attributes exist What elements can exist inside other elements (the content model) <!DOCTYPE booklist [ <!ELEMENT booklist (books)> <!ELEMENT books (item)*> <!ELEMENT item (title, author, price, quantity)> <!ATTLIST item cat CDATA #REQUIRED> <!ELEMENT title (#PCDATA)> <!ELEMENT author (#PCDATA)> <!ELEMENT price (#PCDATA)> <!ELEMENT quantity (#PCDATA)> ]>

Well-Formedness versus Validity An XML document is well-formed if it obeys the syntax rules in the XML spec: Single root element Elements are correctly nested (no overlapping) Tag names contain only legal characters Start and end tag names have matching capitalisation (to name but a few of the rules)

Well-Formedness versus Validity An XML document is valid if: It contains a reference to a DTD It only contains elements and attributes that are defined in that DTD Its use of those elements and attributes follows the grammar rules in the DTD All valid XML documents are well-formed Not all well-formed XML documents are valid

Other Schema Languages Document Type Definitions have expressive limitations Cannot specify the range of values taken by attributes Cannot specify the range of non-markup element content Two main competitors: XML Schema RELAX NG XML Schema – W3C standard Regular Language for XML Next Generation – ISO standard

Tools https://www.flickr.com/photos/44456430@N04/6814917044/

Tools W3C Validator https://validator.w3.org/

Next Lecture: HTML5