ect 360 introduction to the class prof. robin burke ect 360 fall 2004
TRANSCRIPT
![Page 1: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/1.jpg)
ECT 360Introduction to the Class
Prof. Robin Burke
ECT 360
Fall 2004
![Page 2: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/2.jpg)
Outline
Introductions Course and Syllabus XML XHTML Homework #1
![Page 3: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/3.jpg)
Introductions
Student information sheet
![Page 4: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/4.jpg)
Administrativa
Contacting me CS&T 453 x 25910 [email protected]
Questions Try the course discussion forum Automatically mailed to all students I will also post announcements here
Course web site http://josquin.cs.depaul.edu/~rburke/
courses/f04/ect360/
![Page 5: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/5.jpg)
About Me
3rd year at CTI PhD in AI, 1993 Research
AI applications in E-Commerce"smart catalogs"
Taught web development since 1996 What I hope to get out of teaching this
class
![Page 6: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/6.jpg)
Course
Introduction to XML concentrate on XML's uses for the web many other uses!
Three parts XML standard XML validation XML transformations Some DOM programming
![Page 7: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/7.jpg)
Course cont'd
Seven homework assignments Midterm project Final project Allocation
Homework – 40%Midterm project – 30%Final project – 30%
![Page 8: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/8.jpg)
Midterm project
Instead of a midterm 10/6 Two-person teams Choose an XML language and report on it Possibilities
SVG, VoiceML, XSL-FO, MathML, SMIL, SOAP, WSDL, UDDI, BPEL4WS, XBRL
anything else you think interesting
![Page 9: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/9.jpg)
Midterm project
Proposal Due next week 9/15 Email message with the following
Name / email address for each partner1st/2nd/3rd choice for XML application
![Page 10: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/10.jpg)
Grading
Three Components Knowledge
Does the work display correct technical knowledge? Reasoning
Does the work indicate good problem-solving skills? Communication
Written work: Is the answer well-written English? Code: Does the answer display good coding /
documentation style
![Page 11: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/11.jpg)
Grading, cont'd
A = Excellent work Thorough knowledge of the subject matter Well-considered and creative solutions Well-written answers Employment of impeccable coding style
B = Very good work Complete knowledge of the subject matter No major errors of reasoning in problem solutions Competent written answers Readable coding style
C = Average work Some gaps in knowledge of subject matter Some errors or omissions in problem solving Written answers may contain grammatical and other errors Coding may be stylistically awkward
D = Below average work Substantial gaps in knowledge of subject matter. Problem solving incomplete or incorrect Poor English in written answers Ineffective coding style
![Page 12: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/12.jpg)
Resources
TextCarey, P. New Perspectives on XML
(Comprehensive). Thomson Learning Tools
XML Spy• 4.3 included with book
XML Spy Enterprise 2004• available in 7th floor lab
![Page 13: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/13.jpg)
Discussion enhancement
Card distribution
![Page 14: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/14.jpg)
XML
eXtensible Markup Language Misnomer
Not a languageTechnology for creating languages
![Page 15: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/15.jpg)
XML
Looks a little bit like HTML But with a wide variety of tag names Reason
HTML and XML have a common ancestor• SGML
Developed for entry and management of very large documents
Why do we need XML?
![Page 16: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/16.jpg)
Web publishing with HTML
Develop content Determine how content should be displayed
on pages Encode content in HTML Content available to users Problem
what happens when content changes• design decisions must be rethought
what happens when design changes• HTML must be rewritten
designer and author must work closely
![Page 17: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/17.jpg)
Web publishing with XML
Develop XML application for content Develop content Content encoded in XML Design pages Write stylesheet to render pages in
HTML Content available to users
![Page 18: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/18.jpg)
Benefits
If design changes, only stylesheet is affected
Different pages / displays can be generated from the same content
Designer and author need not interact
![Page 19: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/19.jpg)
Big picture
Modularity is a good thing decoupling of data's structure from its use in
a particular application lowers effort of repurposing data
Modularity requires standards non-application specific data representation
• not in the interest of any application vendor
XML is the language in which such standards can be expressed
![Page 20: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/20.jpg)
XML applications
Purpose-specific languages that conform to the XML standard
Many are standardized In-house languages easy to develop XML is becoming the default choice
for data storage formatMS Office 2003
![Page 21: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/21.jpg)
Example: Syllabus
<syllabus xmlns="http://josquin.cs.depaul.edu/~rburke/namespaces/syllabus"><course> <course-number>ECT 360</course-number> <course-title>Introduction to XML</course-title> <prereqs>
<note>One quarter of programming</note> <and> <or> <course-number>CSC 211</course-number> <course-number>CSC 261</course-number> <equivalent/> </or> <course-number>IT 130</course-number> </and></prereqs>
</course>... see full example ...
![Page 22: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/22.jpg)
Note
Structure determined by needs of application
Other design choices could be madeseparate components of course
numbertext for prerequisites
![Page 23: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/23.jpg)
Note
Mixed content Use of external namespaces Entities Internal referencing
![Page 24: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/24.jpg)
The rules of XML
Documents consist of elements, attributes and content (and a few other things)
Elements are set off by tags in angle brackets start tag for element foo <syllabus> end tag for element foo </syllabus>
Anything in between the start tag and end tag is element content
Attributes are additional data associated with an element indicated by name/value pairs inside the start tag
• <hwk ref="hwk2">
![Page 25: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/25.jpg)
More rules
Comments enclosed by special character sequence <!-- -->
Document prolog before the first element contains declarations typically
• declare that it is xml• declare the relevant document type
Processing instructions information that the XML parser doesn't use passed along to the application Special tag <?
![Page 26: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/26.jpg)
Entities
Special characters Certain characters part of the language Need a way to indicate these
• < <
Entities can be defined as part of a document type useful for inserting standard text ©right; might insert a standard copyright
notice
![Page 27: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/27.jpg)
Document tree
Document is just one form of XML More useful for computation
Tree representation
![Page 28: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/28.jpg)
XML Tree
syllabus
course-number
course-title
courseoffering,
etc.
TEXT"Introduction
to XML"
TEXT"ECT 360"
prereqs
note course-number
and
or
course-number
course-number
TEXT
“One quarter of programming”
TEXT"CSC 211"
TEXT"CSC 261"
equivalent
TEXT"IT 130"
description
TEXT"This course
is..."
![Page 29: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/29.jpg)
Tree
Nodeselementstext nodes
Attribute lists
![Page 30: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/30.jpg)
Paths
A path traverses the tree XPath provide syntax for tree traversal Example
/section[2]/meeting[1]/day/
![Page 31: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/31.jpg)
Transformation
XML transformations change the XML treeaddingdeletingchanging contents
![Page 32: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/32.jpg)
Well-formed vs valid
A well-formed document is one that obeys the syntactic rules it can be parsed <foo bar="2"><baz>thud</baz>&zap;</foo>
well-formed document A valid document has been validated
against some standard what is the entity zap? is baz a legal subelement for foo? unknown without a definition for foo
![Page 33: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/33.jpg)
XML Validation
Validation is the process of checking an XML document against a standard
Different languages for defining such standardsDTD – document type definitionXML SchemaRELAX NGothers
![Page 34: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/34.jpg)
Document type
The document type specifies the legal structure of the XML documentorder, contents of elementslegal attributes and default valuesetc.
Designing a document type means deciding what data will be stored and how
![Page 35: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/35.jpg)
HTML
HTML is not XML-compliant XML is case-sensitive
HTML is not XML requires quotes around attributes
HTML optional XML requires end tags
Optional in some cases for HTML XML requires /> syntax for empty elements
HTML does not
![Page 36: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/36.jpg)
XHTML
Latest HTML standard Makes HTML XML-conformant Different flavors
Transitional• allows style information as part of the document
(align attribute) Frameset
• allows frames Strict
• no frames, no style attributes• assumes use of a stylesheet for rendering
![Page 37: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/37.jpg)
Benefits of XHTML
XMLdecouples data from application
XHTMLdecouples content from stylefor web documents
![Page 38: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/38.jpg)
Modularity = More pieces
HTMLdocument
Web browser
XMLdata
XHTMLdocument
Web browser
XSLTstylesheet
CSSstylesheet
![Page 39: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/39.jpg)
More pieces = More flexibility
XMLdata
PDFdocument
XSL-FOstylesheet
XMLdata
SVGgraphics
XSLTstylesheet
![Page 40: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/40.jpg)
Converting to XHTML
No sloppiness tags must nest end tags everywhere quotes on attribute values remove deprecated elements / attributes
• replace with style XML-specific
/> for empty elements• like img
declarations• xml• doctype• namespace
lowercase
![Page 41: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/41.jpg)
Example
HTML XHTML conversion Validation
on-line validator
![Page 42: ECT 360 Introduction to the Class Prof. Robin Burke ECT 360 Fall 2004](https://reader035.vdocuments.mx/reader035/viewer/2022070413/5697bfcf1a28abf838caa200/html5/thumbnails/42.jpg)
Assignment #1
Convert a file to XHTML Use the online-validator or XML Spy Due
before class time next weeksubmit to COL