Introduction to DTDs.

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

XML Schema Heewon Lee. Contents 1. Introduction 2. Concepts 3. Example 4. Conclusion.
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
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 
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
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 3 1 DTD Tutorial – Carey ISBN
EAD: A Technical Introduction Julie Hardesty, Metadata Analyst June 3, 2014.
SDPL 2002Notes 2: Document Instances and Grammars1 2.5 XML Schemas n A quick introduction to XML Schema –W3C Recommendation, May 2, 2001: »XML Schema Part.
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.
1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel
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.
TEXT ENCODING INITIATIVE (TEI) Inf 384C Block II, Module C.
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.
Session IV Chapter 9 – XML Schemas
XML – An Introduction Structured Data Mark-up James McCartney CSCE 590, Cluster and Grid Computing.
XML 2nd EDITION Tutorial 1 Creating An Xml 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.
17 Apr 2002 XML Syntax: Documents Andy Clark. Basic Document Structure Element tags – Elements have associated attributes Text content Miscellaneous –
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.
Sheet 1XML Technology in E-Commerce 2001Lecture 2 XML Technology in E-Commerce Lecture 2 Logical and Physical Structure, Validity, DTD, XML Schema.
XML Introduction. Markup Language A markup language must specify What markup is allowed What markup is required How markup is to be distinguished from.
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.
Introduction to DTDs. Introduction We learned how to structure information using XML Learned XML grammar Learned the rules for XML encoding We learned.
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.
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.
X M L Extensible Markup Language It is a cross platform tool or a language to achieve data transfer between the cross platform. Note  1.XML is not a replacement.
Updated :02 Hong Kong University of Science & Technology Library Workshop on XML-Based Library Applications 1. What is XML?
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.
Unit 4 Representing Web Data: XML
The Object-Oriented Thought Process Chapter 11
X M L Extensible Markup Language
Yaşar Tonta & Orçun Madran [yasartonta, Hacettepe University
XML QUESTIONS AND ANSWERS
Eugenia Fernandez IUPUI
Chapter 7 Representing Web Data: XML
Introducing HTML & XHTML:
Web Programming Maymester 2004
XML Data DTDs, IDs & IDREFs.
XML Introduction By Hongming Yu Feb 6th, 2002.
New Perspectives on XML
CSE591: Data Mining by H. Liu
Allyson Falkner Spokane County ISD
Review of XML IST 421 Spring 2004 Lecture 5.
Presentation transcript:

Introduction to DTDs

Introduction We learned: how to make our own tags how to structure information using the rules and grammar of XML what “well-formed”/legal XML 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” -We need blueprints or schema to design our XML documents -DTDs are like blueprints for XML -DTDs give us a plan for how an 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 Similar to “data dictionaries” as with database technologies

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 -Why use this? -If your documents are being used by other people and organizations, you need to consider what agreed upon rules are you going to follow. -DTDs allow us to develop Mark-Up languages as we’ve discussed before. It allows you the ability to dictate what type of content is allowable in you XML documents

DTD can do many things It can specify the document “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 external 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 Henriette Avram Roy Tennant -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 MARCXML -Eventually, the Standard was moved to XML Schema -Mark up standards have been around long before XML came along -MARC became a national standard in 1971. -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 -DTDs ensure consistency of XML data shared between different organizations. You can use a DTD to validate that the XML documents you receive from others are in the proper format before using them.

All kinds of data exchange Encoded Archival Description (EAD), used by archivists MARC XML, used by librarians Keyhole Markup Language (KML) used by Google Earth Really Simple Syndication (RSS) used for publishing blog updates Election Markup Language (EML)

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

Limitations of DTDs Non-XML syntax -Although DTDs do have the angled bracket syntax (for example, <!ELEMENT …>), 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