Cover page images (keys)

XML Lecture (Week 2 & 3)

2007-03-06 & 2007-03-13

Tyng-Ruey Chuang, <>

Institute of Information Science
Academia Sinica, Taipei, Taiwan

The Design Goals for XML

  1. XML shall be straightforwardly usable over the Internet.

  2. XML shall support a wide variety of applications.

  3. XML shall be compatible with SGML.

  4. It shall be easy to write programs which process XML documents.

  5. The number of optional features in XML is to be kept to the absolute minimum, ideally zero.

  6. XML documents should be human-legible and reasonably clear.

  7. The XML design should be prepared quickly.

  8. The design of XML shall be formal and concise.

  9. XML documents shall be easy to create.

  10. Terseness in XML markup is of minimal importance.

Extensible Markup Language (XML) 1.0 (Fourth Edition)


Markup takes the form of:

Entity References and Character References

(General) Entity References (for example):

(Numeric) Character References (for example):

More Markup

Comments (for example):

<!-- declarations for <head> & <body> --> 

CDATA section delimiters (for example):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
             "" [
	<!ATTLIST polygon
		circumference CDATA #IMPLIED>
<svg width="100" height="100" viewBox="0 0 100 100" xmlns="">
		<style type="text/css"><![CDATA[
		polygon { fill: green;    stroke: black;  stroke-width: 1}
  <polygon id="_10001001" points="10,10 10,90 90,90 90,10" area="6400" circumference="320"/>

Processing Instruction (for example):

<?xml-stylesheet href="person.css" type="text/css"?>

Document Type Declarations

A valid document includes a document type declaration that identifies the DTD (Document Type Definition) that the document satisfies. A DTD contains or points to the following kinds of markup declarations.

Attribute-List Declaration

Attribute-List Declaration (Cont.)

External/Internal DTDs

Namespace in XML