g22 3033 002 c21.prn...2 4 old history n formatting markups n rendition notations (e.g., latex, tex,...

9
1 1 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 2 Agenda n Summary of Previous Session n Errata: <pages> tag, XML 2.0, XML Applications !? n History and Current State of XML Standards n Advanced Applications of XML n XML’s eXtensible Style Language (XSL) n Character Encodings and Text Processing n XML and DBMSs n Course Approach ... n XML Application Development n XML References and Class Project n Readings n Assignment #1a (reminder?) n Assignment #1b (1 week) 3 Summary of Previous Session 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

Upload: others

Post on 03-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: g22 3033 002 c21.prn...2 4 Old History n Formatting Markups n Rendition notations (e.g., LaTeX, TeX, RTF, MIF) n Compatible with standard text editors n Processed into presentations

1

1

XML for Java Developers G22.3033-002

Session 2 - Main ThemeMarkup Language Technologies (Part II)

Dr. Jean-Claude Franchitti

New York UniversityComputer Science Department

Courant Institute of Mathematical Sciences

2

Agendan Summary of Previous Session

n Errata: <pages> tag, XML 2.0, XML Applications !?

n History and Current State of XML Standards

n Advanced Applications of XML

n XML’s eXtensible Style Language (XSL)

n Character Encodings and Text Processing

n XML and DBMSs

n Course Approach ...

n XML Application Development

n XML References and Class Project

n Readings

n Assignment #1a (reminder?)

n Assignment #1b (1 week)

3

Summary of Previous Sessionn 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

Page 2: g22 3033 002 c21.prn...2 4 Old History n Formatting Markups n Rendition notations (e.g., LaTeX, TeX, RTF, MIF) n Compatible with standard text editors n Processed into presentations

2

4

Old Historyn Formatting Markups

n Rendition notations (e.g., LaTeX, TeX, RTF, MIF)

n Compatible with standard text editors

n Processed into presentations (printout, or electronic display)

n WYSIWYG

n What You See Is “ALL” You Get

n Meta-Markup Language

n GML (Goldfarb, Mosher, Lorie - IBM 1969)

n Generalized (i.e., indep. of systems, devices, applications)

n Markups (i.e., information related to struct. & content

n Language (i.e., methodology with formal syntax)

n Validation capabilities (1974)

5

SGML

n SGML (1978 - 10/15/86)

n Used by DoD for Continuous Acquisition and Lifecycle

Support (CALS)

n http://www.oasis -open.org/cover/general.html

n SGML DTD or Schema<!DOCTYPE tutorials [<!ELEMENT tutorials – (tutorial+)><!ELEMENT tutorial – (title, intro, chap+)><!ELEMENT title – O (#PCDATA)><!ELEMENT intro – O (para+)><!ELEMENT chap – O (title, para+)><!ELEMENT para – O (#PCDATA)>]>

6

SGML Markup

<tutorials><tutorial><title>XML TUTORIAL<intro><para>Required first paragraph of intro.<para>Optional second paragraph of intro.</intro><chap><title>CHAPTER 1<para>Required first paragraph of first chapter.<chap><title>CHAPTER 2<para>Required first paragraph of optional 2nd chapter.</tutorial</tutorials>

Page 3: g22 3033 002 c21.prn...2 4 Old History n Formatting Markups n Rendition notations (e.g., LaTeX, TeX, RTF, MIF) n Compatible with standard text editors n Processed into presentations

3

7

W3C and HTML

n Tim Berners-Lee (CERN, 1989)

n W3 Hypertext System

n W3 uses HTML

n Founder of W3C in 1994

n HTML

n Based on SGML, no DTD support)

n W3C

n HTML (http://www.w3.org/TR/html4)

n CSS + weakly extensible HTML

n XML

n XHTML (http://www.w3.org/TR/xhtml1)

8

XML

n DTD<!DOCTYPE TUTORIALS [<!ELEMENT tutorials (tutorial+)><!ELEMENT tutorial (title, intro, chap+)>

<!ELEMENT title (#PCDATA)><!ELEMENT intro (para+)><!ELEMENT chap (title, para+)><!ELEMENT para (#PCDATA)>]>

n XML is different from SGML

n Names are case sensitive

n Non empty elements must have a start and end tag

n DTD or Schema not required

9

Current State of XML Standardshttp://www.w3.org/XML, www.w3.org/XML/Activity.html, www.w3schools.com/xml

n eXtensible Markup Language (XML) 1.0 (2nd Edition) - 10/06/00)

n Namespaces in XML - 01/14/99

n URIs: http://www.w3.org/Addressing/

n XML Schema Part 0: Primer - 05/02/01

n XML Schema Part 1: Structures - 05/02/01n XML Schema Part 2: Datatypes - 05/02/01

n XML Path Language (XPath) Version 1.0 - 11/16/99n Associating Stylesheets with XML Documents - 06/29/99

n Use “xml:stylesheet” element in the XML document prolog

n XSL Transformations (XSLT) Version 1.0 - 11/16/99n Extensible Stylesheet Language (XSL) Version 1.0 (candidate rec.)

Page 4: g22 3033 002 c21.prn...2 4 Old History n Formatting Markups n Rendition notations (e.g., LaTeX, TeX, RTF, MIF) n Compatible with standard text editors n Processed into presentations

4

10

Current State of XML Standards(continued)

n Canonical XML Version 1.0 - 03/19/01n Document Object Model (DOM) Level 2 - 11/13/00

n Core, Views, Events, Style, Traversal & Range

n Web Content Accessibility Guidelines 1.0 - 05/05/99n Resource Description Framework (RDF) - 02/22/99

n Microsoft Validator:n http://msdn.microsoft.com/downloads/samples/Internet/xml/xml_validator/sample.asp

n W3C Schema Validatorn http://www.w3.org/2001/03/webdata/xsv

11

Advanced Applications of XMLn Ancestors: SGML with Annex K, HyTime, DSSS

n Alternatives: HTML 4.01, CSS

n HTML-Basedn XHTML 1.0, XForms 1.0

n POP -Basedn e.g., XHTML, CML, MathML, SMIL, SVG, P3P, RDF, WML

n MOM-Basedn e.g., ebXML, RosettaNet, cXML, fpML, FIXML

n Web Services-Basedn Protocols (SOAP, WSDL, UDDI)

n Services & Facilities (XAML)

12

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: <price> is borrowed from the “edi” schema

<?xml version=“1.0”?>

<order:x

xmlns:order=‘http://ecommerce.org/order’>xmlns:edi=‘http://ecommerce.org/edi’>

<edi:price>14.95</edi:price>

</order:x>

• See http://www.w3.org/TR/1999/REC-xml-names-19990114/

Page 5: g22 3033 002 c21.prn...2 4 Old History n Formatting Markups n Rendition notations (e.g., LaTeX, TeX, RTF, MIF) n Compatible with standard text editors n Processed into presentations

5

13

eXtensible Style Language (XSL)n DSSSL & DSSSL-On CSS 1, 2, 3 …

n http://www.w3.org/Style/CSS/

n XSLTn XPath

n XSL-FOn XSLT Processors

n Stylus Studio XSL development environmentn IBM XSL Editorn Saxon and Xalan XSLT processors

n XSL-FO Processorsn Antenna Housen fop

14

XSL Processingn http://www.w3.org/Style/XSL/n Processing Alternatives:

n HTML + CSS -> Presentation

n XML + CSS -> Presentationn XML + XSLT -> XSL-FO -> Presentation

n XML + XSLT -> XML/HTML + CSS -> Presentation

n Client or Server Processing ?n See Session 2 handout on IE5’s implementation

n Examplesn See Session 2 Sub-Topic 1 Presentation: Beginning XMLn See Session 2 handouts on XSL Tree Transformation Language n See Session 2 handout on Cascading Stylesheetsn See Session 2 handout on Styling Documents Using XSL

15

Character Encodings & Text Processing

n ASCII, ISO 8859, and Unicoden http://www.bbsinc.com/iso8859.htmln http://www.oasis -open.org/cover/unicode-xml.html

n www.unicode.orgn http://www.oasis -open.org/cover/unicode-xml.html

n http://home.att.net/~jameskass

• Using Unicode characters in XML/HTML– U+ (4 digit min) hex number (e.g., "U+1234”)– Specify as: "&#x1234;" or "&#x10FFFD;".

n White space processing ?!

Page 6: g22 3033 002 c21.prn...2 4 Old History n Formatting Markups n Rendition notations (e.g., LaTeX, TeX, RTF, MIF) n Compatible with standard text editors n Processed into presentations

6

16

XML & DBMSs Comparisonn Both separate data from rendition/presentation infon Similar languages

n DBMSs: Forms and Reporting, DDL, DQL, DCL

n XML: XSL, XQL, and processing instructions

n No DML in XMLn XML is paired with a scripting or programming language

n Validation capabilitiesn DBMSs: datatyping, relationship constraints

n XML: data type validity and semantic consistency checks

n XML can handle data too complex for some databasesn XML interchangeable form of data vs. multidatabases

17

Course Approach ...n IBM XML Certification Test 140

n http://www-4.ibm.com/software/ad/certify/obj140.html

n Proficiency Objectives– Information Modeling– XML Processing– XML Rendering– XML Query– Architecture Design– Implementation Testing

18

XML Application Developmentn Applications of XML: Markup Languagesn XML Applications Today

n POP (Java becoming optional)n Web Content Programming

n Web Application Developmentn Web-Enabled Enterprise Application Development

n MOMn EDI v.s. IEC/B2Bn EAI Applications

n e.g., ERP, SCM, CRM integration

n XML Applications Tomorrown MOM & POP become Web Services

Page 7: g22 3033 002 c21.prn...2 4 Old History n Formatting Markups n Rendition notations (e.g., LaTeX, TeX, RTF, MIF) n Compatible with standard text editors n Processed into presentations

7

19

XML POP Application Developmentn Java Independent Component Models

n JSP Custom Tags n XML/XSLT

n XML/Servlet Frameworks (e.g., Cocoon)n XML/Servlet Filters

n XML/JavaScriptn XML Data Bindings

n Java Intensive Component Modelsn JSP/Java

n JSP/JavaBeansn Applets/JWS

n Servlets

20

XML MOM Application Developmentn Java Independent Component Models

n Scripting Languages

n Non J2EE Platforms (e.g., CORBA 3 & DNA) and PLsn Web Services Platforms

n Sun Open Net Environment (ONE)

n HP NetActionn Oracle Dynamic Servicesn IBM WebSphere Platformn Microsoft .NET

n Java Intensive Component Modelsn EJBs

n JSP/JavaBeansn Applets/JWS

n Servlets

21

XML Referencesn 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

n Software– http://xml.apache.org– http://www.alphaworks.ibm.com/tech/xml

– 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/

Page 8: g22 3033 002 c21.prn...2 4 Old History n Formatting Markups n Rendition notations (e.g., LaTeX, TeX, RTF, MIF) n Compatible with standard text editors n Processed into presentations

8

22

Class Project

n Project Descriptionn 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.

n A sample community platform for online discussions: www.onchat.com

23

Readingsn Readings

n XML Development with Java 2: Chapters 1, 4, and 5

n Professional Java XML: Chapters 1, 7, 8, App. A & G

n XML and Java: Chapter 1, App. C & E

n Handouts posted on the course web site

n Review Xpath 1.0, XSLT 1.0, XSL 1.0 W3C Recs

n Project Frameworks Setup (ongoing)n Apache’s Web Server, TomCat, and Cocoon

n Apache’s Xerces, Xalan

24

Assignment

n Assignment #1b:n Review the class project description, and the virtual university

sample eBusiness application specificationn Come up with your own variant of a an eBusiness application

that would benefit from being implemented on top of a “multi -channel online community platform”

n Specify a set of services or facilities that would need to be

provided on top of an online community platform to support your specific eBusiness application

Page 9: g22 3033 002 c21.prn...2 4 Old History n Formatting Markups n Rendition notations (e.g., LaTeX, TeX, RTF, MIF) n Compatible with standard text editors n Processed into presentations

9

25

Assignment (continued)

n Assignment #1b (continued):n 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 XML application implementation and testing methodologies and tools

26

Next Session:XML Information Modeling (Part I)

n XML Physical Entitiesn Logical Structure of XML Documentsn XML Document Navigationn Custom Markup Languages