Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 CS 502: Computing Methods for Digital Libraries Lecture 6 DTDs.

Similar presentations


Presentation on theme: "1 CS 502: Computing Methods for Digital Libraries Lecture 6 DTDs."— Presentation transcript:

1 1 CS 502: Computing Methods for Digital Libraries Lecture 6 DTDs

2 2 Markup and Style Sheets style sheet rendering software document content and structure formatted document

3 3 Computer Systems for Markup and Style Sheets style sheet rendering software document with XML markup formatted document DTD Client Server(s)

4 4 Document with XML Markup (Metadata) Digital Libraries and the Problem of Purpose David M. Levy Corporation for National Research Initiatives January 2000 article Continued on next slide

5 5 Continued from previous slide 10.1045/january2000-levy http://www.dlib.org/dlib/january00/01levy.html English Continued on next slide Document with XML Markup (Metadata) - 2

6 6 Document with XML Markup (Metadata) - 3 Continued from previous slide D-Lib Magazine 1082-9873 6 1 Copyright (c) David M. Levy

7 7 The D-Lib Magazine DTD - 1 Continued on next slide

8 8 The D-Lib Magazine DTD - 2 Continued on next slide

9 9 The D-Lib Magazine DTD - 3 <!ATTLIST date date-type CDATA #FIXED "publication"> <!ATTLIST type resource-type CDATA #FIXED "work"> Continued on next slide

10 10 The D-Lib Magazine DTD - 4 <!ATTLIST identifier uri-type (DOI | URL) #REQUIRED>

11 11 The D-Lib Magazine DTD - 5 <!ATTLIST relation rel-type CDATA #FIXED "InSerial"> Continued on next slide

12 12 The D-Lib Magazine DTD - 6

13 13 Constructing a DTD: Grammar Every DTD has a grammar that defines: entities elements The grammar is expressed as a set of rules that can be processed automatically.

14 14 Constructing a DTD: Parameters A parameter entity is a shorthand notation, e.g., Example. Given the following declarations: The replacement text for the entity "book" is: La Peste: Camus, © 1947 Éditions Gallimard.

15 15 An Example (DTD for XHTML) Objective: Design a markup specification that is (a) Correct XML (b) Similar to HTML, so that users of HTML can learn it easily existing HTML documents can be converted (c) Has features that permit long-term growth in the web

16 16 Some Assumptions Full Unicode and UTF-8 support All tags are structural no,, etc Empty tags defined as necessary e.g.,, Enforce syntax rules e.g., correct nesting

17 17 A Minimal Document <!DOCTYPE xhtml PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> Virtual Library Moved to vlib.org.

18 18 Constructing a DTD: Entities

19 19 Constructing a DTD: Entities Latin-1 characters <!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent"> Special characters <!ENTITY % HTMLspecial PUBLIC "-//W3C//ENTITIES Special for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent"> Symbols <!ENTITY % HTMLsymbol PUBLIC "-//W3C//ENTITIES Symbols for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">

20 20 The Full Example (XHTML) http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd The full DTD is:


Download ppt "1 CS 502: Computing Methods for Digital Libraries Lecture 6 DTDs."

Similar presentations


Ads by Google