Markup Languages & XML - BY VISHAL KAMTAM VENKATESH.

Slides:



Advertisements
Similar presentations
XML Document Type Definitions ( DTD ). 1.Introduction to DTD An XML document may have an optional DTD, which defines the document’s grammar. Since the.
Advertisements

ICS-FORTH 1 May 22, 2001 Christos Georgis The extensible markup language: An introduction to XML What is a XML document ? How do we check its validity.
1 CP3024 Lecture 9 XML revisited, XSL, XSLT, XPath, XSL Formatting Objects.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Context-free.
176 Formal Languages and Applications: We know that Pascal programming language is defined in terms of a CFG. All the other programming languages are context-free.
CSE 190: Internet E-Commerce Lecture 17: XML, XSL.
Chapter 3: Formal Translation Models
XML(EXtensible Markup Language). XML XML stands for EXtensible Markup Language. XML is a markup language much like HTML. XML was designed to describe.
1 XML Semistructured Data Extensible Markup Language Document Type Definitions.
4/20/2017.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation Document Type Definition.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 XML Taken from Chapter 7.
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
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.
Document Type Definitions Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
XML - DTD. The building blocks of XML documents Elements, Tags, Attributes, Entities, PCDATA, and CDATA.
Introduction to XML. What is XML? Extensible Markup Language XML Easier-to-use subset of SGML (Standard Generalized Markup Language) XML is a.
XML 1 Enterprise Applications CE00465-M XML. 2 Enterprise Applications CE00465-M XML Overview Extensible Mark-up Language (XML) is a meta-language that.
XML Extensible Markup Language. What is XML? ● meta-markup language ● a language for defining a family of languages ● semantic/structured mark-up language.
XP 1 DECLARING A DTD A DTD can be used to: –Ensure all required elements are present in the document –Prevent undefined elements from being used –Enforce.
These Questions are copied from
Introduction to GAIGS XML Scripting Integrating Algorithm Visualization into Computer Science Education Grand Valley State University June 13-16, 2006.
Processing of structured documents Spring 2002, Part 2 Helena Ahonen-Myka.
1 Tutorial 13 Validating Documents with DTDs Working with Document Type Definitions.
Avoid using attributes? Some of the problems using attributes: Attributes cannot contain multiple values (child elements can) Attributes are not easily.
CSCI 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Context-free.
Winter 2006Keller, Ullman, Cushing18–1 Plan 1.Information integration: important new application that motivates what follows. 2.Semistructured data: a.
XML A web enabled data description language 4/22/2001 By Mark Lawson & Edward Ryan L’Herault.
1 Chapter 10: XML What is XML What is XML Basic Components of XML Basic Components of XML XPath XPath XQuery XQuery.
Utilizing XML in ColdFusion MX by Attila Domokos.
XML - DTD Week 4 Anthony Borquez. What can XML do? provides an application independent way of sharing data. independent groups of people can agree to.
CIS 451: XML DTDs Dr. Ralph D. Westfall February, 2009.
1 Chapter 5 Context-Free Grammars and Languages Cathedral of St. Basil the Blessed, Red Square, Moscow, Russia.
XML Documents Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Elements Attributes Comments PI Document.
CONTEXT FREE GRAMMAR presented by Mahender reddy.
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.
XP 1 Creating an XML Document Developing an XML Document for the Jazz Warehouse XML Tutorial.
17 Apr 2002 XML Syntax: Documents Andy Clark. Basic Document Structure Element tags – Elements have associated attributes Text content Miscellaneous –
CSCI 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Context-free.
Lecture 16 Introduction to XML Boriana Koleva Room: C54
1 Introduction to XML XML stands for Extensible Markup Language. Because it is extensible, XML has been used to create a wide variety of different markup.
Jeff Ullman: Introduction to XML 1 XML Semistructured Data Extensible Markup Language Document Type Definitions.
An Introduction to XML Sandeep Bhattaram
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Understanding How XML Works Ellen Pearlman Eileen Mullin Programming the.
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 Dr Alexiei Dingli XML Technologies DTD. 2 Document Type Definition Defines –the legal building blocks of an XML document –the document structure –The.
Semistructured Data Extensible Markup Language Document Type Definitions Zaki Malik November 04, 2008.
The eXtensible Markup Language (XML). Presentation Outline Part 1: The basics of creating an XML document Part 2: Developing constraints for a well formed.
XML Design Goals 1.XML must be easily usable over the Internet 2.XML must support a wide variety of applications 3.XML must be compatible with SGML 4.It.
Jennifer Widom XML Data Introduction, Well-formed XML.
SNU OOPSLA Lab. Logical structure © copyright 2001 SNU OOPSLA Lab.
Syntax The Structure of a Language. Lexical Structure The structure of the tokens of a programming language The scanner takes a sequence of characters.
225 City Avenue, Suite 106 Bala Cynwyd, PA , phone , fax presents… XML Syntax v2.0.
XML Document Type Definitions and the Document object model.
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 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.
Tutorial 9 Working with XHTML. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Describe the history and theory of XHTML.
Introduction to XML Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
XML Extensible Markup Language
XML Schema – XSLT Week 8 Web site:
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.
eXtensible Markup Language
XML QUESTIONS AND ANSWERS
Web Programming Maymester 2004
XML Data Introduction, Well-formed XML.
CSE591: Data Mining by H. Liu
Presentation transcript:

Markup Languages & XML - BY VISHAL KAMTAM VENKATESH

What are markup languages??  Language that uses tags to define elements within a document.  It is human-readable.  The two most popular markup languages are HTML and XML.

What is HTML?  HTML-Hyper text Markup Language.  HTML is comprised of “elements” and “tags”  Begins with and ends with  Elements (tags) are nested one inside another: Tags have attributes:  HTML describes structure using two main sections: and

Example HTML code: Hello World Hello World

Output:

How they work?

Representation of HTML as Parse Tree Hello World

Representation in CFG  HTML can be described by classes of text  Text is any string of characters literally interpreted (i.e. there are no tags, user-text)  Char is any single character legal in HTML tags.Blanks included  Element is  Text or  A pair of matching tags and the document between them, or  Unmatched tag followed by a document  Doc is sequences of elements  ListItem is the tag followed by a document followed by  List is a sequence of zero or more list items

HTML Grammar Char a | A | … Text ε | Char Text Doc ε | Element Doc Element Text | Doc | Doc | List ListItem Doc List ε | ListItem | List

HTML Example popular markup languages HTML XML The text can be viewed as : popular markup languages 1. HTML 2. XML

Extensible Mark-up languages (XML)

 XML has user defined tags whereas HTML has predefined tags.  designed to describe data, not to display data. eg: ” 12 Maple Street ” 12 Maple Street  In most web applications, XML is used to describe data, while HTML is used to format and display the data.

Example XML Mary likes John.

PARSE TREE

PRODUCTION RULES → → Mary|John → believes → likes

XML’s DTD  The DTD lets us define our own grammar  Context-free grammar notation, also using regular expressions  Form of DTD:  Element definition:

Element Description  Element descriptions are regular expressions  Basis  Other element names  #PCDATA, for any TEXT without tags  Operators  | for union , for concatenation  * zero or more occurrences of  ? for zero or one occurrence of  + for one or more occurrences of

Example DTD-1 <!DOCTYPE PcSpecifications [ ]>

Pc Specs XML Document 4560 $2295 Intel Pentium 4Ghz 8192 Maxtor Diamond 2000Gb 32x …..

DTD and Production Rules  DTD: Production Rule: PROCESSOR  MANF MODEL SPEED  DTD: <!ELEMENT DISK (HARDDISK|CD|DVD) Production Rule: Disk  HARDDISK|CD|DVD  DTD:

 Production Rule: PC  AB A  Model Price Processor Ram B  Disk+  Last production is illegal.we introduce C B  CB|C C  Disk  We can rewrite above expression PC  Model Price Processor Ram B B  Disk B|Disk

Example DTD-2  <!DOCTYPE SENTENCES [ }>

Production Rules (SENTENCE)  (NOUN-PHRASE)(VERB-PHRASE) (NOUN-PHRASE)  (CMPLX-NOUN)|(CMPLX-NOUN)(PREP-PHRASE) (VERB-PHRASE)  (CMPLX-VERB)|(CMPLX-VERB)(PREP-PHRASE) (PREP-PHRASE)  (PREP)(CMPLX-NOUN) (CMPLX-NOUN)  (ARTICLE)(NOUN) (ARTICLE)  A|THE (NOUN)  BOY|GIRL|FLOWER (VERB)  TOUCHES|LIKES|SEES (PREP)  WITH

CONCLUSION  DTD for both XML and CFG describe languages with certain rules and restrictions, and thereby declare what’s legal and what’s not in a given language.  An XML document is considered valid if it’s well formed and has been validated against a DTD.  A string is a valid string in a given Context-free language if the Context-free grammar for that language can generate it.

Reference Links:    

THANKYOU!!!!!!