Download presentation
Presentation is loading. Please wait.
Published byJoan Goodman Modified over 9 years ago
2
ICS-FORTH 1 May 22, 2001 Christos Georgis The extensible markup language: An introduction to XML What is a XML document ? How do we check its validity ? How do we display its content ?
3
ICS-FORTH 2 May 22, 2001 Christos Georgis What Is XML ? XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to describe data XML tags are not predefined in XML: you must define your own tags XML uses a DTD (Document Type Definition) to describe the data XML with a DTD is designed to be self describing XML uses a CSS (Cascading Style Sheets) to display information
4
ICS-FORTH 3 May 22, 2001 Christos Georgis Vincent van Gogh 1853 Holland 1890 France The Starry Night 1889 Oil on Canvas 29 36 1/4 Museum of Modern Art, NewYork An Example XML Document element content xml-declaration end-tag start-tag root element
5
ICS-FORTH 4 May 22, 2001 Christos Georgis Vincent van Gogh 1853 Holland 1890 France The Starry Night 1889 Oil on Canvas 29 36 1/4 Museum of Modern Art, NewYork An Example XML Document attribute nameattribute value
6
ICS-FORTH 5 May 22, 2001 Christos Georgis “Well Formed” vs “Valid” XML Documents XML (document) with correct syntax is Well Formed XML All XML elements must have a closing tag XML tags are case sensitive All XML elements must be properly nested All XML documents must have a root tag Attribute values must always be quoted XML (document) validated against a DTD is Valid XML A DTD defines the legal elements of an XML document Vincent van Gogh 1853 Holland ………
7
ICS-FORTH 6 May 22, 2001 Christos Georgis An Example XML DTD Declaring zero or more occurrences of the same element (*) Declaring zero or one occurrences of the same element (?) GROUP: element with children (sequences) Elements with only character data
8
ICS-FORTH 7 May 22, 2001 Christos Georgis XML DTD Building Blocks Elements Elements are the main building blocks of both XML and HTML documents Tags are used to markup elements (e.g. … ) Elements are nested and may define a specific sequence Attributes Attributes provide extra information about elements (other than their content and type) Attributes are always placed inside the starting tag of an element Attributes always come in name/value pairs ( e.g. 36 1/4 ) May be applied to one specific instance of a given element Entities Entities are variables used to define common text
9
ICS-FORTH 8 May 22, 2001 Christos Georgis XML DTD Elements
10
ICS-FORTH 9 May 22, 2001 Christos Georgis XML DTD Attributes and Entities
11
ICS-FORTH 10 May 22, 2001 Christos Georgis Viewing XML Documents with IE 5.0
12
ICS-FORTH 11 May 22, 2001 Christos Georgis Displaying XML with CSS
13
ICS-FORTH 12 May 22, 2001 Christos Georgis What is CSS ? CSS stands for Cascading Style Sheets Styles define how to display HTML/XML elements Styles are normally stored in Style Sheets Styles were added to HTML 4.0 to solve a problem External Style Sheets can save you a lot of work External Style Sheets are stored in CSS files Multiple style definitions will cascade into on cascading order
14
ICS-FORTH 13 May 22, 2001 Christos Georgis CSS Syntax Use of External Style Sheets Grouping Basic syntax artifact, artist, artwork, name, title { font-family: Arial; font-size: 16pt; display: block; } title { font-family: Palatino; font-size: 16pt; font-weight: bold; text-align: center; color: #6699CC; }...
15
ICS-FORTH 14 May 22, 2001 Christos Georgis CSS Display Properties Background properties (color, image, position) Text properties (color, alignment, direction, letter-spacing) Font properties (family, size, style, weight) Border properties (color, style, width) Margin properties Padding properties Classification properties (visibility, inline, block) Pseudo-elements (:before, :after)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.