Full HTML for

Basic foilset Introduction to XML

Given by Lukasz Beca at CPS714 Computational Science Information Track on June 9 99. Foils prepared July 6 99
Outside Index Summary of Material


Motivation and Goals
XML Overview
XML Basic Concepts
Document Type Definition (DTD)
XML Schema
Extensible Style Language (XSL)
Languages Based on XML
XML Tools
Future
XML Resources

Table of Contents for full HTML of Introduction to XML

Denote Foils where Image Critical
Denote Foils where HTML is sufficient

1 CPS714 - Introduction to XML
2 Contents
3 Motivation
4 Goals
5 XML - Overview
6 XML Basic Concepts
7 Elements
8 Attributes
9 Processing Instructions
10 Documents
11 Documents
12 Documents - Example
13 Document Object Model
14 Document Object Model - Example
15 Document Object Model - Example
16 Namespaces
17 Namespaces - Declaration
18 XML Data Islands
19 Document Type Definition
20 Document Type Definition - Example
21 XML Schema
22 XML Schema - Example
23 Extensible Stylesheet Language (XSL)
24 XSL - Example
25 XSL - Style Sheets
26 XSL Patterns
27 XSL Patterns - Example
28 Languages Based on XML
29 SMIL - General Information
30 SMIL - Basic Concepts
31 SMIL - Example Document
32 SMIL - Example
33 XML Tools
34 XML Editor - Example
35 Future
36 Resources

Outside Index Summary of Material



HTML version of Basic Foils prepared July 6 99

Foil 1 CPS714 - Introduction to XML

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Lukasz Beca
beca@npac.syr.edu
3-287 CST
NPAC, Syracuse University

HTML version of Basic Foils prepared July 6 99

Foil 2 Contents

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Motivation and Goals
XML Overview
XML Basic Concepts
Document Type Definition (DTD)
XML Schema
Extensible Style Language (XSL)
Languages Based on XML
XML Tools
Future
XML Resources

HTML version of Basic Foils prepared July 6 99

Foil 3 Motivation

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index

HTML version of Basic Foils prepared July 6 99

Foil 4 Goals

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Better search results
Presenting various views for the same data
Integration of data from different sources
Easy use over the Internet
Easy application development that process documents
Documents readable by humans
Documents easy to create
Interchange of data

HTML version of Basic Foils prepared July 6 99

Foil 5 XML - Overview

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Extensible Markup Language - Subset of Standard Generalized Markup Language (SGML)
Universal format for describing structured data on the Web
Specification developed by World Wide Web Consortium (W3C) supervised by XML Working Group

HTML version of Basic Foils prepared July 6 99

Foil 6 XML Basic Concepts

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Elements
Attributes
Processing Instructions
Documents
Document Object Model
Namespaces
Data Islands

HTML version of Basic Foils prepared July 6 99

Foil 7 Elements

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Format: start tag, end tag, and data
The tags describe the data contained between tags
The data within the tags is the value of the element
<title>The Fish Slapping Dance</title>
<dance>The Fish Slapping Dance</dance>

HTML version of Basic Foils prepared July 6 99

Foil 8 Attributes

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Attributes associate name-value pairs with elements
Attributes may appear only within start-tags and empty-element tags
<size unit="KB"</size>

HTML version of Basic Foils prepared July 6 99

Foil 9 Processing Instructions

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
<?xml-stylesheet type="text/xsl" href="mystyle.xsl"?>
Mechanism for by-passing the normal operation of an XML processor and delivering instructions directly to a process whose responsibility it is to interpret the instruction and act accordingly

HTML version of Basic Foils prepared July 6 99

Foil 10 Documents

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Document is an XML element that can (or not) contain other nested XML elements
<clip>
<title>The Fish Slapping Dance<title>
<authors>Monty Python</authors>
<format>avi</format>
<size unit="KB"</size>
<priceinfo>
<regprice unit="US dollars"ᡇ</regprice>
<ourpriceᡂ</ourprice>
</priceinfo>
</clip>

HTML version of Basic Foils prepared July 6 99

Foil 11 Documents

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Well-formed document: obeys the syntax of XML
Valid documents: a well-formed document that contains a proper document type declaration and obeys the constraints of that declaration

HTML version of Basic Foils prepared July 6 99

Foil 12 Documents - Example

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
The example shows plain XML document displayed in Internet Explorer 5.0
URL:
http://msdn.microsoft.com/xml/samples/transform-viewer/auction1.xml

HTML version of Basic Foils prepared July 6 99

Foil 13 Document Object Model

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Programming API for XML documents
Describes logical structure of document and the way a document is accessed and manipulated
Defines naming convention for document components
Enables straightforward access to the document components
Implemented by the tools that enable manipulation of XML documents

HTML version of Basic Foils prepared July 6 99

Foil 14 Document Object Model - Example

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index

HTML version of Basic Foils prepared July 6 99

Foil 15 Document Object Model - Example

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
root = doc.getDocumentElement();
//print tag name
System.out.println(root.getTagName());
//get first child element of the root
docElem = (Node) root.getFirstChild();
//print tag name
System.out.println(docElem.getTagName());
//print element type
System.out.println(docElem.getNodeType());
//print node value
docElem1 = (Text) docElem.getFirstChild();
System.out.println(docElem1.getNodeValue());

HTML version of Basic Foils prepared July 6 99

Foil 16 Namespaces

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Collection of related XML elements and attributes identified by a URI reference
Mechanism for solving elements and attributes name conflicts
<title>The Fish Slapping Dance</title>
<title>Mr</title>
<ClipInfo:title>The Fish Slapping Dance</title>
<PersonInfo:title>Mr</title>

HTML version of Basic Foils prepared July 6 99

Foil 17 Namespaces - Declaration

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Default declaration
<clip xmlns="urn:Clip.org:ClipInfo">
<title></title>
</clip>
Explicit declaration
<cl:clip xmlns:cl="urn:Clip.org:ClipInfo"
xmlns:money="urn:Finance:Money">
<cl:title>The Fish Slapping Dance</cl:title>
<cl:price money:currency="US dollar"ᡆ.76</cl:price>
</cl:clip>

HTML version of Basic Foils prepared July 6 99

Foil 18 XML Data Islands

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
XML code embedded in an HTML page
Enables integration of XML with HTML page (XML data can be accessed by scripts)
Contains well-formed XML document within <XML> </XML> tags
<XML ID="clipXML">
<clip>
<title>The Fish Slapping Dance</title>
<size unit="KB"</size>
</clip>
</XML>
clipXML.documentElement.childNodes.item(0).text

HTML version of Basic Foils prepared July 6 99

Foil 19 Document Type Definition

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Grammar for tag language
Defines the rules governing the relations between elements and attributes
Used for:
  • XML document validation
  • Describing grammar for other users
Association with XML document:
<!DOCTYPE clip SYSTEM "clipdef.dtd">

HTML version of Basic Foils prepared July 6 99

Foil 20 Document Type Definition - Example

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
<!DOCTYPE clip [
<!ELEMENT clip (title,size)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT size (#PCDATA)>
<!ATTLIST size unit CDATA #REQUIRED>
]>

HTML version of Basic Foils prepared July 6 99

Foil 21 XML Schema

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Provides nearly the same functionality as Document Type Definition
Uses XML syntax
Schema authors can add their own elements and attributes to XML Schema documents
Enables element and attribute typing and assigning default values
Association with XML document:
<clip xmlns="x-schema:clipSchema.xml">

HTML version of Basic Foils prepared July 6 99

Foil 22 XML Schema - Example

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
<Schema xmlns="urn:schemas-npac-edu:clip-data"
xmlns:dt="urn:schemas-microsoft-com:datatypes">
<AttributeType name="unit" dt:type="string" required="yes"/>
<ElementType name="title" content="textOnly"
dt:type="string"/>
<ElementType name="size" content="textOnly" dt:type="int">
<attribute type="unit"/>
</ElementType>
<ElementType name="clip" content="eltOnly">
<element type="title"/>
<element type="size"/>
</ElementType>
</Schema>

HTML version of Basic Foils prepared July 6 99

Foil 23 Extensible Stylesheet Language (XSL)

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Enables display of XML by transforming XML into structure suitable for display, for example HTML
XSL transformations can be executed on the server to provide HTML documents for older browsers
Provides mechanisms for transformation of XML data from one schema to another
Enables converting XML documents through querying, sorting, and filtering
Association with XML document:
<?xml-stylesheet type="text/xsl"href="mystyle.xsl"?>

HTML version of Basic Foils prepared July 6 99

Foil 24 XSL - Example

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
The example illustrates how the XSL document is applied to XML document and displayed in the Web browser
The example must be viewed using Internet Explorer 5.0
URL:
http://msdn.microsoft.com/xml/samples/transform-viewer/transform-viewer.htm

HTML version of Basic Foils prepared July 6 99

Foil 25 XSL - Style Sheets

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Contain a template of the desired result structure
Identify data in the source document to insert into the template
Example: Fragments of XSL document define how elements of XML document should be transformed into HTML document

HTML version of Basic Foils prepared July 6 99

Foil 26 XSL Patterns

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Simple query language for identifying nodes in an XML document
Identify nodes depending on:
  • type, name, and values
  • relationship of the node to other nodes in the document
  • clip
  • clip/title
  • clip/*
  • clip/priceinfo/regprice

HTML version of Basic Foils prepared July 6 99

Foil 27 XSL Patterns - Example

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
The example shows how the parts of the XML document can be identified using XSL patterns
The example must be displayed in Internet Explorer 5.0
URL:
http://msdn.microsoft.com/xml/samples/authors/author-patterns.htm

HTML version of Basic Foils prepared July 6 99

Foil 28 Languages Based on XML

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Resource Description Framework (RDF) standard for metadata exchange, enables better content searching on the Web
Synchronized Multimedia Integration Language (SMIL) enables simple authoring of TV-like multimedia presentations such as training courses on the Web
Scalable Vector Graphics (SVG) - a language for describing two-dimensional graphics in XML

HTML version of Basic Foils prepared July 6 99

Foil 29 SMIL - General Information

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Synchronized Multimedia Integration Language - allows integrating a set of multimedia objects into a synchronized multimedia presentation
SMIL provides mechanisms for
  • description of temporal behavior of the presentation
  • description of layout of the presentation on the screen
  • association of hyperlinks with media objects

HTML version of Basic Foils prepared July 6 99

Foil 30 SMIL - Basic Concepts

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Layout: the layout of the visual clips can be defined, the clips can be assigned to the predefined separate regions
Clip playback: the clips can be played from various sources and in different modes
Clip temporal dependency: the clips can be played in parallel or sequential manner
Hyperlinks: a clip can be connected to another clip or presentation

HTML version of Basic Foils prepared July 6 99

Foil 31 SMIL - Example Document

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
<smil>
<head>
<layout>
<root-layout background-color="blue" width="200" height="300"/>
<region id="videoregion" top="10" left="10" width="180" height="180"/>
</layout>
</head>
<body>
<par repeat="3">
<video src="video.rm" region="videoregion"/>
<audio src="audio.rm"/>
</par>
</body>
</smil>

HTML version of Basic Foils prepared July 6 99

Foil 32 SMIL - Example

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
The example shows a presentation created using SMIL
The presentation is displayed using RealPlayer from RealNetworks
The file with presentation is available from:
http://www10.real.com/devzone/library/creating/smil/production.html

HTML version of Basic Foils prepared July 6 99

Foil 33 XML Tools

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Parsers, used for accessing, analyzing and transforming XML documents (Sun, Microsoft, IBM)
  • Validating parsers
  • Non-validating parsers
Editors, used for creating XML content (Microsoft, IBM)
Java APIs for XML (Sun)

HTML version of Basic Foils prepared July 6 99

Foil 34 XML Editor - Example

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
The example demonstrates abilities of XML Notepad
The XML Notepad is available from:
http://msdn.microsoft.com/xml/notepad/download.asp

HTML version of Basic Foils prepared July 6 99

Foil 35 Future

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
Completion of XML-related specifications:
  • Extensible Linking Language (XLL)
  • Extensible Stylesheet Language (XSL)
  • Resource Description Framework (RDF)
XML as a standard format for data storage and Internet delivery
Proliferation of XML-based languages for various industry and research domains

HTML version of Basic Foils prepared July 6 99

Foil 36 Resources

From Introduction to XML CPS714 Computational Science Information Track -- June 9 99. *
Full HTML Index
InternetExplorer 5.0 and XML/XSL tutorials:
http://msdn.microsoft.com/xml/
Specifications:
http://www.w3.org
More tutorials and informations for developers:
http://www.zdnet.com/devhead/filters/xml/
http://www.xml.com
Resources at NPAC:
http://www.npac.syr.edu/projects/tutorials/XML/

© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Tue Jul 6 1999