Well-formed and Valid XML Documents

Slides:



Advertisements
Similar presentations
Introduction to the Logical Structure of XML Documents Web Engineering, SS 2007 Tomáš Pitner, Michael Derntl.
Advertisements

XML Namespaces Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
© De Montfort University, XML – a meta language Howell Istance and Peter Norris School of Computing De Montfort University.
XML 6.3 DTD 6. XML and DTDs A DTD (Document Type Definition) describes the structure of one or more XML documents. Specifically, a DTD describes:  Elements.
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.
XHTML 16-Apr-17.
XML Language Family Detailed Examples Most information contained in these slide comes from: These slides are intended.
CS 898N – Advanced World Wide Web Technologies Lecture 21: XML Chin-Chih Chang
17-Jun-15 XHTML 2 What is XHTML? XHTML stands for Extensible Hypertext Markup Language XHTML is aimed to replace HTML.
F DIGITAL MEDIA: COMMUNICATION AND DESIGN INTRODUCTION TO XML AND XHTML.
XML Introduction What is XML –XML is the eXtensible Markup Language –Became a W3C Recommendation in 1998 –Tag-based syntax, like HTML –You get to make.
The Information School at the University of Washington LIS 549 U/TU: Intro to Content Management Fall 2003 * Bob Boiko * MSIM Associate Chair XML Schemas.
Document Type Definitions. XML and DTDs A DTD (Document Type Definition) describes the structure of one or more XML documents. Specifically, a DTD describes:
Jennifer Widom XML Data DTDs, IDs & IDREFs. Jennifer Widom DTDs, IDs & IDREFs “Well-Formed” XML Adheres to basic structural requirements Single root element.
1 Advanced Topics XML and Databases. 2 XML u Overview u Structure of XML Data –XML Document Type Definition DTD –Namespaces –XML Schema u Query and Transformation.
XML Basics Hope Greenberg Center for Teaching & Learning.
Copyright © 2003 Pearson Education, Inc. Slide 2-1 Created by Cheryl M. Hughes, Harvard University Extension School — Cambridge, MA The Web Wizard’s Guide.
Copyright © 2003 Pearson Education, Inc. Slide 3-1 Created by Cheryl M. Hughes, Harvard University Extension School — Cambridge, MA The Web Wizard’s Guide.
 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,
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.
August Chapter 2 - Markup and Core Concepts Learning XML by Erik T. Ray Slides were developed by Jack Davis College of Information Science and Technology.
1 XHTML محمد احمدی نیا 2 Of 19 HTML vs XHTML  XHTML is a stricter and cleaner version of HTML.  by combining the strengths of HTML.
XML Syntax - Writing XML and Designing DTD's
XML (2) DTD Sungchul Hong.
Session IV Chapter 9 – XML Schemas
SENG 422 Lab 5 An Introduction to XML Time: ELW B220 from (4:00 - 6:50) every Tuesday TA: Philip Baback Alipour Ph.D. Candidate in Electrical, Computer.
Avoid using attributes? Some of the problems using attributes: Attributes cannot contain multiple values (child elements can) Attributes are not easily.
1 Chapter 10: XML What is XML What is XML Basic Components of XML Basic Components of XML XPath XPath XQuery XQuery.
XSLT Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Softsmith Infotech XML. Softsmith Infotech XML EXtensible Markup Language XML is a markup language much like HTML Designed to carry data, not to display.
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
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.
1 Credits Prepared by: Rajendra P. Srivastava Ernst & Young Professor University of Kansas Sponsored by: Ernst & Young, LLP (August 2005) XBRL Module Part.
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/11 ITApplications XML Module Session 3: Document Type Definition (DTD) Part 1.
XML for Text Markup An introduction to XML markup.
INFSY 547: WEB-Based Technologies Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
SAX2 and DOM2 Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.2.
ENG 5933 Humanities Computing Introduction to XML
XSD: XML Schema Language Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
1 Internal DTD External DTD. 2 Internal DTD ]> Tove Jani Reminder Don't forget me this weekend.
XML DTD. XML Validation XML with correct syntax is "Well Formed" XML. XML validated against a DTD is "Valid" XML.
Unit 3 — Advanced Internet Technologies Lesson 10 — Introduction to XHTML.
Introduction to XML Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Copyrighted material John Tullis 3/18/2016 page 1 04/29/00 XML Part 4 John Tullis DePaul Instructor
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.
CITA 330 Section 2 DTD. Defining XML Dialects “Well-formedness” is the minimal requirement for an XML document; all XML parsers can check it Any useful.
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.
XML Technologies DTD.
What is XHTML? XHTML stands for Extensible Hypertext Markup Language
Unit 4 Representing Web Data: XML
Session III Chapter 6 – Creating DTDs
Chapter 7 Representing Web Data: XML
XHTML
Web Programming Maymester 2004
XML Data Introduction, Well-formed XML.
XML Data DTDs, IDs & IDREFs.
XML and Web Services (II/2546)
XHTML 7-May-19.
Session II Chapter 6 – Creating DTDs
XHTML 29-May-19.
Allyson Falkner Spokane County ISD
XML IST 421.
XML and Web Services (II/2546)
Presentation transcript:

Well-formed and Valid XML Documents 168493 XML and Web Services (II/2546) Well-formed and Valid XML Documents Kanda Runapongsa (krunapon@kku.ac.th) Dept. of Computer Engineering Khon Kaen University Dept. of Computer Engineering, Khon Kaen U.

168493: XML and Web Services (II/2546) Well-formed & Valid Well-formed XML documents are the XML documents that obey XML syntax Valid XML documents are the XML documents that follow the rules of the schema of XML documents Well-formed XML documents do not need to be valid 168493: XML and Web Services (II/2546)

Well-formed XML Documents 168493 XML and Web Services (II/2546) Well-formed XML Documents Must have XML Declaration Must have the root element Elements must have a closing tag Elements must be properly nested Element name of the end-tag must match with that of the start-tag <b><i>text is bold and italic</b></i> Not <b><i>text is bold and italic</b></i> 168493: XML and Web Services (II/2546) Dept. of Computer Engineering, Khon Kaen U.

Well-formed XML Documents (Cont.) Attribute values must always be quoted Element and attribute names cannot be started with xml (for both uppercase and lowercase) Special characters (< and &) cannot be used in text as they are used in markup 168493: XML and Web Services (II/2546)

Some Rules for Checking “Valid” The value of attribute of ID type must be unique between all values of all ID attributes The value of IDREF attribute must match the value of some ID attribute in the document The value of IDREFS attribute can contain several references to elements with ID attribute separated with whitespaces. 168493: XML and Web Services (II/2546)

168493: XML and Web Services (II/2546) Examples DTD: <!ELEMENT AAA (#PCDATA)> <!ATTLIST AAA id ID #REQUIRED> <!ELEMENT BBB (#PCDATA)> <!ATTLIST BBB ref IDREF #REQUIRED> XML: <AAA id=“1”>Hello</AAA> <BBB ref=“1”>Hi</BBB> 168493: XML and Web Services (II/2546)