Presentation is loading. Please wait.

Presentation is loading. Please wait.

ENG 5933 Humanities Computing Introduction to XML <!DOCTYPE TEI.2 PUBLIC "-//TEI P4//DTD Main DTD Driver File//EN" "http://www.tei-c.org/Guidelines/DTD/tei2.dtd"

Similar presentations


Presentation on theme: "ENG 5933 Humanities Computing Introduction to XML <!DOCTYPE TEI.2 PUBLIC "-//TEI P4//DTD Main DTD Driver File//EN" "http://www.tei-c.org/Guidelines/DTD/tei2.dtd""— Presentation transcript:

1 ENG 5933 Humanities Computing Introduction to XML <!DOCTYPE TEI.2 PUBLIC "-//TEI P4//DTD Main DTD Driver File//EN" "http://www.tei-c.org/Guidelines/DTD/tei2.dtd" [ %ISOlat1; %ISOlat2; %ISOnum; %ISOpub; ]>

2 2 What is XML? A meta-language, i.e. a language for creating languages A platform- and application-independent protocol for marking-up structured documents A descriptive mark-up system, i.e. one that describes and categorizes parts of a document An extensible strategy that allows designers to scale the scope of mark- up to match the needs of a project

3 3 Basic XML Components Document, or “instance” DTD, defining the grammar and syntax of the tagging scheme XSLT files for transforming documents Associated external resources such entities or CSS files Associated tools such as XML parser Additional protocols such as XSL-FO, XLinks, XPointers, and Schemas

4 4 Basic Rules of XML The XML declaration must begin the document Every opening must have an accompanying closing All elements must be nested hierarchically Empty tags must end with />, for example, The document must contain exactly one root element that completely contains all other elements All attribute values must be within quotes The characters " < " and " & " are reserved and must be used only to begin tags and entity references respectively The only native XML entity references are &, <, >, &apos;, and "

5 5 XML Good Practice Do not include whitespaces in tag names Do not include reserved XML characters or characters that have special meaning in processing languages like perl Do not start a tag name with a number or a punctuation character Tag names are case-sensitive -- is different from Take care when using characters beyond the core 7-bit ASCII set, for example ë, ß, or £

6 6 Sample XML Document 1: 2: 3: <!DOCTYPE russett SYSTEM “Idaho.dtd”[ 4: 5: 6: 7: ]> 8: 9: My Favorite Tuber Kings 11: Hash Browns 12: &chips; Mashed (see 13: ) 14:


Download ppt "ENG 5933 Humanities Computing Introduction to XML <!DOCTYPE TEI.2 PUBLIC "-//TEI P4//DTD Main DTD Driver File//EN" "http://www.tei-c.org/Guidelines/DTD/tei2.dtd""

Similar presentations


Ads by Google