XML for Java Developers G22.3033-002
Session 2 - Main Theme Markup Language Technologies (Part II)
Dr. Jean-Claude Franchitti
New York University Computer Science Department Courant Institute of Mathematical Sciences
1
Agenda Summary of Previous Session / Review New Syllabus
XML Applications vs. Applications of XML!?
History and Current State of XML Standards
Advanced Applications of XML
XML’s eXtensible Style Language (XSL)
Character Encodings and Text Processing
XML and DBMSs
Course Approach ...
XML Application Development
XML References and Class Project
Readings
Assignment #1a (due today - reminder?) 2 Assignment #1b (due next week)
1 Summary of Previous Session
XML Generics
Course Logistics, Structure and Objectives
History of Meta-Markup Languages
XML Applications: Markup Languages
XML Information Modeling Applications
XML-Based Architectures
XML and Java
XML Development Tools (XML, DTD and Schema Editors)
Summary
Class Project
Readings
Assignment #1a 3
Old History
Formatting Markups
Rendition notations (e.g., LaTeX, TeX, RTF, MIF)
Compatible with standard text editors
Processed into presentations (printout, or electronic display)
WYSIWYG
What You See Is “ALL” You Get
Meta-Markup Language
GML (Goldfarb, Mosher, Lorie - IBM 1969)
Generalized (i.e., indep. of systems, devices, applications)
Markups (i.e., information related to struct. & content
Language (i.e., methodology with formal syntax)
Validation capabilities (1974) 4
2 SGML
SGML (1978 - 10/15/86)
Used by DoD for Continuous Acquisition and Lifecycle Support (CALS)
http://www.oasis-open.org/cover/general.html
SGML DTD or Schema ]> 5
SGML Markup
6
3 W3C and HTML
Tim Berners-Lee (CERN, 1989)
W3 Hypertext System
W3 uses HTML
Founder of W3C in 1994
HTML
Based on SGML, no DTD support)
W3C
HTML (http://www.w3.org/TR/html401/)
CSS + weakly extensible HTML
XML
XHTML (http://www.w3.org/TR/xhtml1) 7
XML
DTD ]>
XML is different from SGML
Names are case sensitive
Non empty elements must have a start and end tag
DTD or Schema not required 8
4 Current State of XML Standards http://www.w3.org/XML, www.w3.org/XML/Activity.html, www.w3schools.com/xml
eXtensible Markup Language (XML) 1.0 (2nd Edition) - 10/06/00)
Namespaces in XML - 01/14/99
URIs: http://www.w3.org/Addressing/
XML Schema Part 0: Primer - 05/02/01
XML Schema Part 1: Structures - 05/02/01
XML Schema Part 2: Datatypes - 05/02/01
XML Path Language (XPath) Version 1.0 - 11/16/99
Working Draft of Version 2 - 05/02/03
Associating Stylesheets with XML Documents - 06/29/99
Use “xml:stylesheet” element in the XML document prolog
XSL Transformations (XSLT) Version 1.0 - 11/16/99
Working Draft of Version 2 -05/02/03 9 Extensible Stylesheet Language (XSL) Version 2.0 – 10/15/01
Current State of XML Standards (continued)
Canonical XML Version 1.0 - 03/15/01 Document Object Model (DOM) Level 2 - 11/13/00 Core, Views, Events, Style, Traversal & Range Web Content Accessibility Guidelines 1.0 - 05/05/99 Resource Description Framework (RDF) - 02/22/99 See http://www.w3.org/TR/ for Additional Specifications Core, XSL, Query, Linking, Schema Microsoft Validator:
http://msdn.microsoft.com/downloads/samples/Internet/xml/xml_validator/sample.asp W3C Schema Validator (3/30/03) http://www.w3.org/2001/03/webdata/xsv
10
5 Advanced Applications of XML
Ancestors: SGML with Annex K, HyTime, DSSS
Alternatives: HTML 4.01, CSS
HTML-Based
XHTML 1.0, XForms 1.0
POP-Based
e.g., XHTML, CML, MathML, SMIL, SVG, P3P, RDF, WML
MOM-Based
e.g., ebXML, RosettaNet, cXML, fpML, FIXML
Web Services-Based
Protocols (SOAP, WSDL, UDDI) 11 Services & Facilities (XAML – Transaction Authority ML)
Logical Structure of XML Documents: Namespaces 1.0
• Namespaces: provides a simple method to qualify element and attribute names used in XML documents by associating them with namespaces identified by URIs – Example:
12
6 eXtensible Style Language (XSL)
“Descendant” of SGML’s DSSSL & DSSSL-O
CSS 1, 2, 3 …
http://www.w3.org/Style/CSS/
XSLT (tree transformation)
XPath (accessing, pointing to, and matching)
XSL-FO (formatting objects)
XSLT Processors
Stylus Studio XSL development environment
IBM XSL Editor
Saxon and Xalan XSLT processors
XSL-FO Processors
Antenna House
fop 13
XSL Processing
http://www.w3.org/Style/XSL/
Processing Alternatives:
HTML + CSS -> Presentation
XML + CSS -> Presentation
XML + XSLT -> XSL-FO -> Presentation
XML + XSLT -> XML/HTML + CSS -> Presentation
Client or Server Processing ?
See Session 2 handout on IE5+’s implementation
Examples
See Session 2 Sub-Topic 1 Presentation: Beginning XML
See Session 2 handouts on XSL Tree Transformation Language
See Session 2 handout on Cascading Stylesheets 14 See Session 2 handout on Styling Documents Using XSL
7 Character Encodings & Text Processing
ASCII, ISO 8859, and Unicode
http://www.bbsinc.com/iso8859.html
http://www.oasis-open.org/cover/unicode-xml.html
www.unicode.org
http://www.oasis-open.org/cover/unicode-xml.html
http://home.att.net/~jameskass • Using Unicode characters in XML/HTML – U+ (4 digit min) hex number (e.g., "U+1234”) – Specify as: "ሴ" or "".
White space processing ?! (wanted vs. unwanted) 15
XML & DBMSs Comparison
Both separate data from rendition/presentation info
Similar languages
DBMSs: Forms and Reporting, DDL, DQL, DCL
XML: XSL, XQL, and processing instructions
No DML in XML
XML is paired with a scripting or programming language
Validation capabilities
DBMSs: datatyping, relationship constraints
XML: data type validity and semantic consistency checks
XML can handle data too complex for some databases
XML interchangeable form of data vs. multidatabases 16
8 Course Approach ...
IBM XML Certification Test 140 IBM Certified Developer – XML and Related Technologies http://www-4.ibm.com/software/ad/certify/obj140.html (old) http://www-1.ibm.com/certify/tests/obj141.shtml (latest) Proficiency Objectives – Architecture Implications on XML Design – Information Modeling – XML Processing – XML Rendering –XML Query – Implementation Testing and Tuning
17
XML Application Development
Applications of XML: Markup Languages
XML Applications Using Core XML Technologies
POP (Java is “optional”)
Web Content Programming
Web Application Development
Web-Enabled Enterprise Application Development
MOM
EDI v.s. IEC/B2B
EAI Applications
e.g., ERP, SCM, CRM integration
B2Bi, BPM, LE, and EII Applications
Application Configuration
Architectural Patterns requiring new XML protocols
SOAs, P2P, Grid Computing, Brick by Brick Computing, etc. 18
9 XML POP Application Development
Java “Independent” Component Models
JSP Custom Tags
XML/XSLT
XML/Servlet Frameworks (e.g., Cocoon)
XML/Servlet Filters
XML/JavaScript
XML Data Bindings
Java Intensive Component Models
JSP/Java
JSP/JavaBeans
Applets/Java Web Start
Servlets
Java Server Faces
Java Applications (Including Thick Clients) 19
XML MOM Application Development
Java “Independent” Component Models
Scripting Languages
Non J2EE Platforms (e.g., CORBA 3 & .Net) and PLs
Web Services Platforms
Sun Open Net Environment (ONE)
HP NetAction
Oracle Dynamic Services
IBM WebSphere Platform
Microsoft .NET
Java Intensive Component Models
EJBs
JSP/JavaBeans
Applets/Java Web Start
Servlets
Java Applications 20
10 XML References
Information – www.learnthenet.com/english/index.html – http://www.xml.com – http://www.xml.org – http://www.xmlu.com – http://www.ucc.ie/xml – http://www.oasis-open.org/cover – http://msdn.microsoft.com/xml – http://xml.about.com
Software – http://xml.apache.org – http://www.alphaworks.ibm.com/ – http://www.microsoft.com/xml – http://technet.oracle.com/tech/xml – http://java.sun.com/xml – http://www.xmlsoftware.com – http://www.xmlcenter.com/tools/ 21
Class Project
Project Description
The project will consist of providing custom XML-based services to support the various aspects of your own selected portable application. The application can be targeted to end-users (B2C), businesses (B2B), developers (toolkit). As an example, you could implement and XML- based training studio supporting VoiceXML, and application-sharing capabilities.
Sample applications used in the past fell in the category of “multi- channel online community platforms”, and included applications such as “community-based shopping”. In that context, examples of useful XML-based services to support these platforms may include synchronized multimedia presentation viewing, and “offline” chat capabilities. A sample specification of the online community platform for a virtual university eBusiness application that was used in the past for this course will be provided for illustration purpose. 22
11 Generic Architecture Blueprint + Architecture Design Methodology + Mgmt
XML Applications (logic) Logical View Implementation View Applications of XML (structured content/object data, style information) Use Case XML Application Services Use Case View (logic) View
XML Application Infrastructure (logic) Process View Deployment View Technology Infrastructure (hardware platforms)
Management
Applications XML of Applications XML Processing Structure Application Rendering and Technology Content Infrastructure Querying
Additional Style Services 23
Sample Conceptual Architecture Diagram (e.g., virtual classroom environment)
Presentation Enabling Q&A Enabling (posting, querying, locating, viewing) (questions capture, integration, viewing) SMIL XML Authoring Authoring XLF SMIL Tool Tool XLF Processing/Rendering
JSP Engine / SMIL Viewer XML POP Framework (processing, rendering) (processing, rendering)
Web Community Avatar-Based Chat Platform
Web-Based Infrastructure (lightweight client machines, server platforms)
Legend
XML Application (logic ) Applications of XML (content/style) XML Application Services (logic )
3rd Party Tool XML Application Infrastructure (logic) Technology Infrastructure (OS and hardware)
24
12 Structured Applications Design Tips Reuse: should focus on Domain Models/System Family Architectures
Applications should separate the various information elements (i.e., content, logic, style, and architecture/handling schemes)
Various content formats: presentation, message, storage, etc.
Application architecture supports:
Web Enabling (WE), XML Enabling (XE), Data Enabling (DE), Enterprise System Assurance Enabling (ESAE)
Various application support services to support:
Interactions with users via content (content + logic) - WE
Encoding of user requests as secure (portable) messages (content generation) - XE/ESAE
Processing of user requests via logic (content + logic) - XE
Rendering of content via logic using style (content + style + logic) - WE/XE
Querying information via logic (content + logic) - XE/DE 25 Interactions with back office via content (content + logic) - XE/ESAE
Readings
Readings
XML and Java: Chapter 1, Appendices A, B, and C
Processing XML with Java: Chapter 1, Appendix C
Developing Java Web Services: Chapters 1 and 2
Handouts posted on the course web site
Review Xpath 1.0, XSLT 2.0, XSL 1.0 W3C Recs
Project Frameworks Setup (ongoing)
Apache’s Web Server, TomCat, and Cocoon
Apache’s Xerces, Xalan
26
13 Assignment
Assignment #1b:
Review the class project description, and the virtual university sample eBusiness application specification
Come up with your own variant of an XML-based portable application
Specify a set of services that would need to be provided to support your portable application
27
Assignment (continued)
Assignment #1b (continued):
Provide a written specification of your overall framework (i.e., platform and services), and propose a staged development approach that would demonstrate the use of XML to support the modern approach at building comprehensive business applications suggested in this course. Your proposed approach should include the use of XML Markup Language technologies, XML information modeling, XML information processing, XML information rendering, XML information retrieval, XML-Based frameworks and other services, and XML application implementation and testing methodologies
and tools 28
14 Next Session: XML Information Modeling (Part I)
XML Physical Entities
Logical Structure of XML Documents
XML Document Navigation
Custom Markup Languages
29
15