Given by Tom Scavo at CPS616 Web Technologies on Spring 98. Foils prepared April 25 98
Outside Index
Summary of Material
HTML: Limitations and Weaknesses |
Extensible Markup Language (XML), including XSL and XLL |
Dynamic HTML
|
Outside Index Summary of Material
Tom Scavo |
Northeast Parallel Architectures Center |
Syracuse University |
111 College Place |
Syracuse, NY 13244-4100 |
HTML: Limitations and Weaknesses |
Extensible Markup Language (XML), including XSL and XLL |
Dynamic HTML
|
XML Complete, Steven Holzner [McGraw-Hill, 1998, ISBN 0-07-913702-4] |
"XML, Java, and the future of the Web", Jon Bosak, Sun Microsystems, 1997 |
"Weaving a Better Web", S. Mace, U. Flohr, R. Dobson, T. Graham, Byte, March 1998, pp.58-68 |
NPAC's HTML Resources page, http://www.npac.syr.edu/projects/tutorials/HTML/ |
HTML = Hypertext Markup Language
|
HTML 2.0 spec completed in Nov 95 |
HTML+ and HTML 3.0 never released |
HTML 3.2 (Jan 97) added tables, applets, and other capabilities (approx. 70 tags) |
HTML 4.0 spec released in Dec 97 |
HTML is simple and thus easy to learn |
Hyperlinks |
It is relatively easy to write an HTML parser |
Extensibility: HTML does not allow users to define new tags and attributes |
Structure: HTML can not be used to model hierarchical or object-oriented data structures, such as those found in databases |
Validation: HTML does not support data validation or check for document structure |
HTML supports only the simplest links, that is, one-way links to physical web resources |
HTML does little to facilitate indexing, searching, and data interchange |
HTML has weak internationalization |
HTML has no technical typesetting capability |
HTML does a poor job of differentiating between presentation and content |
The logical design of a document (content) should be separate from its visual design (presentation) |
Separation of logical and visual design
|
HTML mixes the logical with the visual |
XML = eXtensible Markup Language |
XML is a subset of Standard Generalized Markup Language, but unlike the latter, XML is specifically designed for the web |
XML is used to define logical document structure |
XML is not backward compatible with HTML, but the two will coexist for awhile |
SGML = Standard Generalized ML |
A SGML document carries with it a grammar called a Document Type Definition (DTD). The DTD defines the tags and the meaning of those tags |
Presentation is governed by a style sheet written in the Document Style Semantics and Specification Language (DSSSL) |
A simple SGML document with embedded DTD: <!DOCTYPE DOCUMENT [ <!ELEMENT DOCUMENT O O (p*,BIGP*)> <!ELEMENT p - O (#PCDATA)> <!ELEMENT BIGP - O (#PCDATA)> ]> <DOCUMENT> <p>Welcome to <BIGP>XML Style! </DOCUMENT> |
Optional |
closing tag |
A corresponding DSSSL style sheet: <!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN"> (root (make simple-page-sequence)) (element p (make paragraph)) (element BIGP (make paragraph font-size: 24pt space-before: 12pt)) |
HTML is a SGML application |
HTML's DTD is fixed (i.e., HTML is non-extensible) and can safely be ignored |
XML is also a SGML application, but since XML is extensible, every XML document must be accompanied by its DTD |
XML offers "80% of the benefits of SGML for 20% of its complexity" |
XML is a compromise between the non-extensible, limited capabilities of HTML and the full power and complexity of SGML |
HTML < XML < SGML |
(CSS) (XSL) (DSSSL) |
XML is a kind of SGML Lite! |
1) XML shall be usable over the Internet |
2) XML shall support a variety of applications |
3) XML shall be compatible with SGML |
4) It shall be easy to write programs that process XML documents |
5) Optional features in XML shall be kept to the absolute minimum, ideally zero |
6) XML documents should be human-legible and reasonably clear |
7) Design of XML should be prepared quickly |
8) 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 |
First draft of XML spec released by W3C in Nov 96 (four other drafts published in 1997) |
The first XML parser (written in Java) released by Microsoft in July 97 |
Microsoft released version 1.8 of its XML parser (which supports XML 1.0) in Jan 98 |
W3C finalized the XML 1.0 spec in Feb 98 |
The key feature of XML is its extensibility |
XML has been designed for
|
XML is system and vendor independent |
XML encourages web developers to concentrate on content via abstract markup |
An XML document with external DTD: <?xml version="1.0"?> <!DOCTYPE greeting SYSTEM "hello.dtd"> <greeting>Hello World!</greeting> |
An XML document with embedded DTD: <?xml version="1.0"?> <!DOCTYPE greeting [ <!ELEMENT greeting (#PCDATA)> ]> <greeting>Hello World!</greeting> |
Document Type Definition (DTD), which defines the tags and their relationships |
Extensible Style Language (XSL) style sheets, which specify the presentation of the document |
Extensible Link Language (XLL), which defines link-handling details |
The DTD specifies the logical structure of the document; it is a formal grammar describing document syntax and semantics |
The DTD does not describe the physical layout of the document; this is left to the style sheets and the scripts |
It is no mean task to write a DTD, so most users will adopt predefined DTDs |
Scenario #1: the server offers the XML document without its DTD, the parser does a syntax check, and the DTD follows if the XML document is "well-formed" |
Scenario #2: the server checks the XML document against its DTD ("validity") before sending the document to the client |
A logical definition of a hyperlink: <LINK> <TITLE>XML Recommendation</TITLE> <URL> http://www.w3.org/TR/REC-xml </URL> <DESCRIPTION> The official XML spec from W3C </DESCRIPTION> </LINK> |
A document may have many such links: <DOCUMENT> <LINKS> <LINK>...</LINK> <LINK>...</LINK> ... </LINKS> </DOCUMENT> |
Now write a DTD for this document: <!ELEMENT DOCUMENT (LINKS)> <!ELEMENT LINKS (LINK)*> <!ELEMENT LINK (TITLE,URL,DESCRIPTION)> <!ELEMENT TITLE (#PCDATA)> <!ELEMENT URL (#PCDATA)> <!ELEMENT DESCRIPTION (#PCDATA)> |
PCDATA stands for "parsed character data" |
Store the DTD in a file (links.dtd) and write an XML document based on this DTD: <?XML version="1.0"?> <!DOCTYPE DOCUMENT SYSTEM "links.dtd"> <DOCUMENT> <LINKS> <LINK>...</LINK> <LINK>...</LINK> ... </LINKS> </DOCUMENT> |
XSL is to XML as Cascading Style Sheets (CSS) are to HTML |
Like a CSS, an XSL style sheet describes the presentation of the XML document |
Advanced layout features of XSL include: rotated text, multiple columns, and independent regions |
Development of XSL lags behind XML |
XML |
source |
XSL |
style |
XSL |
parser |
HTML |
source |
Microsoft has released two XSL processors: 1) a command-line utility that takes an XML document and an XSL style sheet, and gives an HTML document; and 2) an ActiveX control for displaying XML in a browser (namely, IE4.0) |
XLL supports simple links (like HTML) plus:
|
XLL components: XLink and XPointer |
Applications requiring client to mediate between two heterogeneous databases |
Applications that attempt to redistribute processing load from server to client |
Applications requiring client to present multiple views of same web document |
Applications that perform or require detailed, domain-specific search results |
An XML parser (in Java or C++) and an XSL parser are available from Microsoft |
Internet Explorer 4.0 supports XML |
An HTML browser may be retrofitted with an XML plugin or applet, but if XML is to survive, full-fledged XML browsers must be developed |
Coupled with XSL, DOM, and a scripting language, XML provides a powerful alternative to HTML |
Search engines may make better use of XML documents |
Prediction: XML will replace HTML! |
Few browsers support XML at this time, whereas DHTML is here now |
DHTML = Dynamic HTML |
Capabilities of DHTML:
|
It is available now |
It is an extension of HTML and therefore familiar |
It addresses many of HTML's shortcomings |
There is no standard for DHTML (Netscape and Microsoft are pushing their respective implementations for W3C ratification) |
In the long run, XML will most likely replace HTML, so why learn DHTML? |
DHTML consists of the following:
|
The final spec for HTML 4.0 was released by W3C in December 1997 |
There are three flavors:
|
HTML 4.0 has 93 elements (10 deprecated) and 187 attributes (49 deprecated) |
Version 3.2 DTD: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> |
Version 4.0 DTDs: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN" "http://www.w3.org/TR/REC-html40/frameset.dtd"> |
More multimedia options |
Better printing facilities |
Better table support, especially long tables |
Internationalization and accessibility |
Style sheets and scripting languages |
Intrinsic events |
Embedded and linked documents |
A new <BUTTON> tag |
Most JavaScript 1.2 event handlers (except onAbort, onError, and the new window event handlers) are native to HTML 4.0 |
The <SCRIPT> tag is fully supported |
A <NOSCRIPT> tag has been added |
Some elements (tags) of HTML 3.2 have been deprecated in 4.0, including: <FONT>, <BASEFONT>, <CENTER>, <S>, and <U> |
Numerous attributes have been deprecated, including: ALIGN, BACKGROUND, BGCOLOR, LINK, COLOR, and SIZE |
The <APPLET> tag has been deprecated! |
Instead of <APPLET CODE="MyApplet.class" WIDTH=200 HEIGHT=300></APPLET> in HTML 4.0 we write <OBJECT CLASSID="MyApplet.class" CODETYPE="application/java" WIDTH=200 HEIGHT=300></OBJECT> |
The <PARAM> tag is still supported |
Nested objects are allowed |
Cascading Style Sheets (CSS1) allow more precise and consistent layout |
Style sheets permit pages to inherit properties from other pages--in effect, they permit object-oriented document structure |
CSS2 is coming, including aural rendering of web documents (for sight-impaired users, in-car applications, language instruction) |
Flexible placement of style information |
Independence from specific style sheet languages |
Cascading style sheets |
Media dependencies |
Alternate styles |
Performance concerns |
A simple style sheet (in file "myStyle.css"): P.special { color: red; border: solid black; } |
Now put a <LINK> tag in the <HEAD>: <LINK href="myStyle.css" rel="stylesheet" type="text/css"> |
In the <BODY>, type: <P class="special">A special paragraph! |
Read in a style sheet and override a style: <HEAD> <STYLE type="text/css"> @import url(myStyle.css); H1 {text-align: center} </STYLE> </HEAD> |
Color a paragraph (not recommended): <P STYLE="color: green">A green paragraph! |
DOM defines a platform-independent programmatic interface to web documents:
|
Initially, DOM will be bound to ECMAScript |
Current versions of scripting languages:
|
ECMAScript is an ECMA standard (6/97)
|
Differences between Microsoft and Netscape implementations of DHTML:
|
A wysiwyg HTML editor called NetObjects Fusion generates dynamic web pages in "Everywhere HTML" |
By using a combination of HTML, CSS-positioning and JavaScript, pages written in Everywhere HTML work properly on both Internet Explorer 4.0 and Communicator 4.0 (or so it is claimed) |