XML for Java Developers G22.3033-002
Session 1 - Main Theme Markup Language Technologies (Part I)
Dr. Jean-Claude Franchitti
New York University Computer Science Department Courant Institute of Mathematical Sciences
1
Agenda
n XML Generics
n Course Logistics, Structure and Objectives
n History of Meta-Markup Languages
n XML Applications: Markup Languages
n XML Information Modeling Applications
n XML-Based Architectures
n XML and Java
n XML Development Tools
n Summary
n Class Project
n Readings
n Assignment #1a 2
XML Generics
n XML means eXtensible Markup Language n XML expresses the structure of information (i.e., document content) separately from its presentation n XSL style sheets are used to convert documents to a presentation format that can be processed by a target presentation device (e.g., HTML in the case of legacy browsers) n Document Type Definitions (DTDs) or XML schemas are used to describe and validate content
3
1 Course Logistics
n Course Web Site
n http://cs.nyu.edu/courses/summer01/G22.3033- 002/index.htm
n http://www.nyu.edu/classes/jcf/g22.3033-002/
n Password: xmljava
n Review syllabus n Textbooks
n XML Development with Java 2
n Professional Java XML
n XML and Java, Developing Web Applications 4
Knowledge Required
n Know how to ftp files, send e-mail, and load URLs into a Web browser
n Reasonable knowledge of HTML
n Be able to write a basic HTML page including links, images, and text using a text editor
n Be able to place a page on a web server
n Advanced Java programming experience
5
Knowledge Not Required
n SGML
n Programming in Perl, or any language other than Java
n Cascading Style Sheets and other HTML advanced features
6
2 Other Useful Knowledge
n Web server configuration and the HTTP protocol n JavaScript n C programming n Database theory (normalization rules) n SGML (basic knowledge) n Some knowledge of international character sets
7
History of Meta-Markup Languages
n SGML (see http://www.w3c.org)
n Complex and expensive
n HTML
n Tim Berners-Lee (Cern), 1990
n Simple replacement to SGML
n Lacked the flexibility and adaptability of XML
n W3C XML working group
n Jon Bosak (Sun), 1996
n SGML strengths + HTML simplicity
8
History of Meta-Markup Languages (continued)
n XML 1.0 Specification
n Tim Bray
n Language simple enough for programmers to implement
n Language not limited to English
n Documents easy for search engine
n CML, Jumbo, MathML
n XLL (1997), CDF (1997), XSL (1997), MSXSL (1998), XML-Data, Mozilla, etc.
9
3 Why XML?
n Domain specific markup language
n Common data format
n Simple, pure Unicode text
n Well-documented
n Data interchange
n Open Financial Exchange (OFX)
n XML non copyrighted
n Support of portable structured text data as most electronic information is text-based
10
Related Technologies n JavaSoft’s Java API for XML parsing (JAXP) n Java bindings to SAX, and DOM APIs n HTML n CSS, CSS2, and CSS3 n XSL
n well formed XML documents n URLs and URIs
n resource v.s. location n Linking (XLL) n Unicode
11
Applications of XML: Markup Languages
n XML helps define sets of rules for forming semantic tags that break documents into parts n XML is a Metamarkup language
n Not a markup language restricted to a fixed set of tags
n Can make up tags as you go along n XML Tags can be documented in a DTD
n i.e., a domain specific syntax and vocabulary (e.g., CML, MathML, etc.)
12
4 HTML Example
- Publisher: O’Reilly
- ISBN: 0-777-88888-9
- Pages: 900
The complete documentation.
13
XML Corresponding Structure
14
XML Enables Semantic/Structured Markup Languages
n XML describes a document’s structure and meaning n XML does not describe the formatting of the elements n Formatting is added through style sheets n XML document only contains tags describing the content (not the appearance) of the document
15
5 XML Information Modeling Applications (Focus on Complex Structured Document Specification) n Custom and Industry specific Markup Languages with own syntax and vocabulary n CML (Chemical Markup Language) n MathML (Mathematical Markup Language) n CML (Channel Definition Format) n Classic Literature n SMIL (Synchronized Multimedia Integration Language n OSD (Open Software Description)
16
XML-Based Architectures n Presentation-Oriented Publishing Frameworks n XML-Based Application Servers n Message-Oriented Middleware Frameworks n Web Services Frameworks
n Peer to Peer (P2P) Computing
n XML-Based eServices Protocols and Architectures
17
XML POP Frameworks (Focus on Content Management and Publishing)
n Requirements:
n XML parser
n XSL processor
n Document repository
n Collection of document DTDs or schema
n Collection of XSL style sheets
n Parsing & processing can be client or server-based
n Samples server-side XML technology:
n Perl & CGI (http://www.perl.com/CPAN)
n Java servlets (http://www.alphaworks.ibm.com , www.apache.org)
n ASPs (http://www.beyondhtml.com/rocket)
18
6 XML POP Packaged Solutions
n Enterprise Information Portal (EIP) toolkits
n e.g., DataChannel’s XML framework n Structured content management and retrieval systems
n e.g.,
n Vignette’s StoryServer
n Gauss Interprise’s VIP’XML-Gateway
n Poet’s Content Management Suite
n Chrystal Software’s Astoria
19
XML MOM Applications
n Component-based modeling
n e.g., XML Metadata Interchange (XMI)
n Enterprise Application Integration
n Business-to-Customer (B2C) Applications
n e.g., e-Commerce
n Business-to-Business (B2B) Applications
n e.g.,
n WebMethods
n Bluestone’s XML-Server,
n eXcelon 2.0
n XMLSolutions’ ExeterXML server 20
Java-enabled XML Technologies n XML provides a universal syntax for Java semantics (behavior)
n Portable, reusable data descriptions in XML
n Portable Java code that makes the data behave in various ways n XML standard extension
n Basic plumbing that translates XML into Java
n parser, namespace support in the parser, simple API for XML (SAX), and document object model (DOM) n XML data binding standard extension
21
7 XML and Java Standards
n XML includes is a family of technologies
n XSL, XML Schema, XML Query, XPath, XPointer, XLink, DOM, RDF, CSS, XSL, XHTML, XML Signature, MathML, SMIL, SVG, etc.
n Review the current state of the XML standards at http://www.w3c.org/XML
n Review the current state of Java Technology and XML (JAXP) standards at http://java.sun.com/XML
n Review the Java binding to DOM 2.0 at http://www.w3.org/TR/2000/REC-DOM-Level-2- Core-20001113/java-binding.zip
22
XML Development Tools
n Read and write XML documents n XML Editors
n e.g., Wattle Software’s XMLWriter, SoftQuad’s Xmetal, Vervet Logic’s XML Pro, eXcelon Stylus, XML Spy n XML well-formedness and/or validation Processors
n e.g., IBM’s XML4J, Apache’s XercesJ, Oracle Parser, Java Project X processor, James Clark’s Expat parser, Microsoft MSXML n XML Browsers
n e.g., IE5
23
Summary
n XML is a metamarkup language
n XML tags describe the structure and semantics of a document’s content (not the format of the content)
n XML addresses SGML’s complexity and HTML’s inadequacies
n Applications of XML for information modeling exist in various domains (chemistry, math, multimedia, etc.)
24
8 Summary (continued)
n XML supports MOM and POP applications
n XML supports the Web Services Infrastructure
n XML and Java complements each other
n Java-enabled XML technology is available in the market today
n Standards for integrating XML and Java are being developed
25
Class Project
n Project Description
n The project will focus on “multi-channel online community platforms”, and will consist of providing custom XML-based services to support the various aspects of a chosen eBusiness application implemented on such platforms (e.g., “community -based shopping”). Examples of useful services to support these platforms may include synchronized multimedia presentation viewing, and “offline” chat capabilities. A sample specification of an online community platform for a virtual university eBusiness application will be provided for illustration purpose.
26
Readings n Readings
n XML Development with Java 2: Chapter 1
n Professional Java XML: Chapter 1
n XML and Java: Chapter 1, Appendix C
n Handouts posted on the course web site
n Explore brief review of XML at XML in 10 points
n Read article at XMLJ2EE
n Review XML 1.0 (Second edition), Namespaces, and the XML activity statement at W3C n Project Frameworks Setup (ongoing)
n Apache’s Web Server, TomCat, and Cocoon 27 n Apache’s Xerces, Xalan
9 Assignment
n Assignment #1a:
n Explore the textbooks’ CDs, and the textbook references to XML tools
n Install and experiment with XML editors. Settle on a tool you feel comfortable using, and come up with a small XML application that demonstrates the use of that tool. Write a short report that uses your sample application to document your findings and recommendations with respect to selection criteria in support of XML editors
28
Next Session: Markup Language Technologies (Part II)
n Current state of the XML standard
n Advanced XML applications
n XML style Specification Languages
29
10