XML for Java Developers G22.3033-002

Session 4 - Main Theme XML Information Modeling (Part II)

Dr. Jean-Claude Franchitti

New York University Computer Science Department Courant Institute of Mathematical Sciences

1

Agenda

n Summary of Previous Session n XML-Based Software Development n Business Engineering Methodology n XML Metadata Management n XML Linking/Pointer Language n XML Data Binding n Industry Specific Markup Languages n Assignment 2a+2b (due next week)

2

Summary of Previous Session

n XML Physical Entities n Logical Structure of XML Documents n XML Document Navigation n Java APIs n Custom Markup Languages n Readings n Assignment #1b (due: 1 week) n Assignment #2a+2b (due: 2 weeks)

3

1 XML-Based Software Development

n Business Engineering Methodology

n Language + Process + Tools

n e.g., Rational Unified Process (RUD)

n XML Application Development Infrastructure

n Metadata Management (e.g., XMI)

n XML APIs (e.g., JAXP, JAXB)

n XML Tools (e.g., XML Editors, XML Parsers)

n XML Applications:

n Application(s) of XML

n XML-based applications/services

n MOM & POP

n Other Services

n Application Infrastructure Frameworks 4

Business Engineering Methodology

n Business Model/Architecture

n Use Case View/Model

n Application Model/Architecture

n Logical and Process View/Models

n Content, Data, and Process Model (e.g., OIM’s knowledge management, and database/datawarehousing models)

n Application Infrastructure Model/Architecture

n Implementation View

n Component Model (e.g., OIM’s component and object model)

n Technology Model/Architecture

n Deployment View/Model

n See Session 4 Sub-Topic 1, and Sub-Topic 2 presentations

n See Session 4 Handout on “Business and Application Architecture Engineering” 5

XML Metadata Management n Issue: UML may not provides enough modeling views and enough expressive power in each view to represent a complete application n Possible Solutions:

n Extend UML

n See OIM’s Analysis and Design Model

n Use Different Modeling Languages:

n See Session 3 handout on “XML Information Modeling” (uses different models such as UML, XML, and ORM)

n Use a Meta-Model: MOF and XMI

n See Session 3 handouts on “UML, MOF, and XMI” and

“OMG’s XML Metadata Interchange Format (XMI)” 6

2 XML Linking/Pointer Language n XLink

n Allows elements to be inserted into XML documents in order to create and describe links between resources

n See Article at http://www.simonstl.com/articles/xlink/ n XML Base

n Equivalent of HTML BASE functionality generically in XML documents by defining an XML attribute named :base n Xpointer

n Language used as a fragment identifier for any URI -reference that locates a resource of Internet media type text/xml or application/xml

n Based on XPath n See Tools at http://www.xmlsoftware.com/xlink/ 7

XLink Example

n Current List of Students

8

XPointer Example n ]> Polonius crossing downstageFare you well, my lord. To Ros. You go to seek Lord Hamlet? There he is. n id(a27).child(2,DIRECTION) Selects the second "DIRECTION" element (whose content is " To Ros.") n id(a27).child(2,#text) Selects the second text region , "Fare you well, my lord." (The line break between the SPEAKER and DIRECTION 9 elements is the first text region.)

3 XML Base Example

n Virtual Library

See what's new!

Check out the hot picks of the day!

  1. Hot Pick #1
  2. Hot Pick #2
  3. Hot Pick #3

n "what's new" resolves to the URI "http://somewhere.org/new.xml" \

n "Hot Pick #1" resolves to the URI "http://somewhere.org/hotpicks/pick1.xml"

n "Hot Pick #2" resolves to the URI "http://somewhere.org/hotpicks/pick2.xml" 10 n "Hot Pick #3" resolves to the URI "http://somewhere.org/hotpicks/pick3.xml"

XML Data Binding n Aims to automatically generate substantial portions of the Java platform code that processes XML data n A Sun project, codenamed “Adelard” n See JSR-31 XML Data Binding Specification n see http://java.sun.com/xml/jaxp-1.0.1/docs/binding/DataBinding.html

11

Industry Specific Markup Languages (see http://www.oasis-open.org/cover/xml.html#contentsApps )

n Ontology Interchange Language (OIL)

n OMG Common Warehouse MetaData Interchange (CWMI)

n OMG Model Driven Architecture (MDA)

n Open Financial Exchange (OFX)

n Straight Through Processing Markup Language (STPML)

n Electronic Commerce Modeling Language (ECML)

n OASIS Business Transactions Technical Committee (OASISBT)

n BizTalk Framework (BizTalk)

n Commerce XML (cXML)

n RosettaNet (RosettaNet)

n Business Process Modeling Language (BPML) 12

4 Readings n Readings

n XML Development with Java 2: Chapter 4

n Professional Java XML: Chapters 5, 6, 9, and 10

n XML and Java: Chapter 2

n Handouts posted on the course web site

n Review XPath 1.0, XLink, XPointer, XML Base, XML Infoset, XML Inclusion W3C Recs n Project Frameworks Setup (ongoing)

n Apache’s Web Server, TomCat/JRun, and Cocoon

n Apache’s Xerces, Xalan, Saxon

n Antenna House XML Formatter, Apache’s FOP, X-smiles

n Visibroker 4.5, WebLogic 6.1

n POSE & KVM (See Session 3 handout) 13

Assignment

n Assignment #2a:

n This part of the project focuses on the application business model discovery using XML information modeling technology. The discovery process should adhere to the following steps: (a) Documenting the information structure, (b) Representing the information structure in XML form, (c) Defining XML DTDs and/or Schemas

n More specific project related information, and extra credit assignments will be provided during the session

14

Assignment (continued)

n Assignment #2b:

n This part of the project relies on the business model discovery process suggested in assignment #2a, and should demonstrate the use of UML use cases to support the development of XML DTDs and/or Schemas

n Deliverables:

n XML DTDs and/or Schemas (partial)

n XMI Model (partial)

n Use Objects by Design xmi-to-html. style sheet and Cocoon framework to present the resulting model

n Develop the model using Rational Rose or Java, and the XMI toolkit 15

5 Next Session: XML Information Processing (Part I) n (DOM) n Simple API for XML (SAX) n XML Parsers

16

6