Introduction to DTDs. Introduction We learned how to structure information using XML Learned XML grammar Learned the rules for XML encoding We learned.

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

What is XML? a meta language that allows you to create and format your own document markups a method for putting structured data into a text file; these.
Document Type Definitions and Schemata We have seen several ways of using XML to markup a poem, but we could invent a host of other possible approaches.
CS 898N – Advanced World Wide Web Technologies Lecture 21: XML Chin-Chih Chang
XHTML1 Building Document Structure. XHTML2 Objectives In this chapter, you will: Learn how to create Extensible Hypertext Markup Language (XHTML) documents.
Document Type Definitions
XML e X tensible M arkup L anguage 1/23.
1 XML: Document Type Definitions 2 Road Map  Introduction to DTDs  What’s a DTD?  Why are they important?  What will we cover?  Our First DTD 
Lecture 14 XML Validation. a simple element containing text attribute; attributes provide additional information about an element and consist of a name.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic XML.
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.
Sistemi basati su conoscenza XML Prof. M.T. PAZIENZA a.a
Document Type Definitions. XML and DTDs A DTD (Document Type Definition) describes the structure of one or more XML documents. Specifically, a DTD describes:
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
Jennifer Widom XML Data XML Schema. Jennifer Widom XML Schema “Valid” XML Adheres to basic structural requirements  Also adheres to content-specific.
Introduction to XML This material is based heavily on the tutorial by the same name at
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Creating Document Type Definitions (DTDs) Ellen Pearlman Eileen Mullin.
Introducing HTML & XHTML:. Goals  Understand hyperlinking  Understand how tags are formed and used.  Understand HTML as a markup language  Understand.
Copyright © 2003 Pearson Education, Inc. Slide 2-1 Created by Cheryl M. Hughes, Harvard University Extension School — Cambridge, MA The Web Wizard’s Guide.
XP New Perspectives on XML Tutorial 4 1 XML Schema Tutorial – Carey ISBN Working with Namespaces and Schemas.
XP New Perspectives on XML Tutorial 3 1 DTD Tutorial – Carey ISBN
Lecture 15 XML Validation. a simple element containing text attribute; attributes provide additional information about an element and consist of a name.
EAD: A Technical Introduction Julie Hardesty, Metadata Analyst June 3, 2014.
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
Why XML ? Problems with HTML HTML design - HTML is intended for presentation of information as Web pages. - HTML contains a fixed set of markup tags. This.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Schemas Ellen Pearlman Eileen Mullin Programming the Web Using XML.
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.
XHTML1 Building Document Structure Chapter 2. XHTML2 Objectives In this chapter, you will: Learn how to create Extensible Hypertext Markup Language (XHTML)
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.
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
TEXT ENCODING INITIATIVE (TEI) Inf 384C Block II, Module C.
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.
WHAT THE HELL IS XML?. What the Hell is XML? What the hell is XML?  Markup Language  Derived from SGML (Standardized General Markup Language)  Describes.
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.
Session IV Chapter 9 – XML Schemas
Chapter 27 The World Wide Web and XML. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-2 Topics in this Chapter The Web and the Internet.
1 Tutorial 13 Validating Documents with DTDs Working with Document Type Definitions.
XML A web enabled data description language 4/22/2001 By Mark Lawson & Edward Ryan L’Herault.
XML – An Introduction Structured Data Mark-up James McCartney CSCE 590, Cluster and Grid Computing.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
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 –
XML : a brief introduction Managing networks : understanding new technologies, Birmingham, 13 September 2001 Pete Johnston UKOLN, University of Bath Bath,
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.
XML Introduction. What is XML? XML stands for eXtensible Markup Language XML stands for eXtensible Markup Language XML is a markup language much like.
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 for Text Markup An introduction to XML markup.
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.
XML Introduction. Markup Language A markup language must specify What markup is allowed What markup is required How markup is to be distinguished from.
INFSY 547: WEB-Based Technologies Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.2.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
Web Technologies Lecture 4 XML and XHTML. XML Extensible Markup Language Set of rules for encoding a document in a format readable – By humans, and –
Structured Documents - XML and FrameMaker 7 Asit Pant.
Representing data with XML SE-2030 Dr. Mark L. Hornick 1.
Document Type Definition (DTD) Eugenia Fernandez IUPUI.
XML Validation. a simple element containing text attribute; attributes provide additional information about an element and consist of a name value pair;
C Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Introduction to XML Standards.
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 derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,
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.
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.
Yaşar Tonta & Orçun Madran [yasartonta, Hacettepe University
Eugenia Fernandez IUPUI
Web Programming Maymester 2004
XML Data DTDs, IDs & IDREFs.
Introduction to DTDs.
Presentation transcript:

Introduction to DTDs

Introduction We learned how to structure information using XML Learned XML grammar Learned the rules for XML encoding We learned how to make our own tags We can make well-formed XML now How can we systematize how our XML documents are created?

Building XML Documents We need blueprints or schema to design our XML documents DTDs are like blueprints for XML DTDs give us a plan for how to build XML DTDs is a technology that allows us to build XML documents that won't “fall down”

Document Type Definitions Document Type Definitions or DTDs will allow us to control how we mark up our XML documents They are a blueprint or schema for how to design an XML document Most importantly, it allows us to design our own markup languages

Document Type Definitions Document Type Definitions allows you to constrain and control the content of your XML documents Dictates what will appear in your documents Controls what, where, and how many instances of a certain XML tags may appear

DTD can do many things A grammar like language Specifies: – Elements – Attributes – Nesting – Ordering – Number of occurrences (cardinality)

Document Type Definitions DTD can be declared within the XML document, but are most often written as a separate document DTDs allow organizations a way to develop an agreed upon language and information structures For our assignments, we will use internal DTDs

Disadvantages of DTDs DTDs are older XML technology, and have certain limitations They lack some flexibility Not written using XML syntax, they are NOT XML No data typing (can’t limit to string or integer ) Limited ability to dictate structure of doc No support for namespaces

Advantages of DTDs Compact and easy to use Can be defined within the XML document Can define entities Widely accepted and supported by most parsers DTDs are mature technology

DTDs Enable Standards enforce how XML is written DTD itself is a standard that communities can rely on The library, archives, museum, and literature communities all have DTDs that regulate how their XML is created

MARC to MARC XML Roy TennantHenriette Avram -Mark up standards have been around long before XML came along -MARC became a national standard in 1971 (NOT XML!) -In mid 1990s a DTD was developed to move MARC to XML -Eventually, the Standard was moved to XML Schema

Organizations and Communities May Exchange Data

All kinds of data exchange Keyhole Markup Language (KML) used by Google Earth Really Simple Syndication (RSS) used for publishing blog updates Election Markup Language (EML) BeerXML used for beer recipes

Access to Libraries and Archives

XML & DTDs Information Standards DTDs allow us to develop information standards We will use EAD for our Final Project DTD and XML Schema allow standards to talk to each other

Validation Using the process known as Validation, various communities can ensure that their XML complies with a standard data format Ensures consistency in the XML we create and share Goldberg talks about Validation in Chapter 8 Validation is the method for verifying whether or not your XML document has followed a given DTD’s rules correctly

Validation Invalid XML

Quick DTD notes DTDs are not really XML, so your editor will not display them in an XML like fashion Don’t confuse them with Doctype Declarations, sound similar but not the same. They are fading in popularity, but are still used widely We use DTDs exclusively for our final project

Limitations of DTDs Non-XML syntax -Although DTDs do have the angled bracket syntax (for example, ), this is quite different from the basic XML syntax. We cannot use multiple DTDs to validate one XML document. We can include only one DTD reference inside an XML document. Although parameter entities make things slightly more flexible, their syntax is quite cryptic. No DOM (Document Object Model) support