[ Home ] [ Topic Types ] [ Master Index ]

XML Or Java Or Database Interoperability Without Writing SAX Or DOM Or JDBC

Base Name

Base Name (unscoped)
XML Or Java Or Database Interoperability Without Writing SAX Or DOM Or JDBC

Instance of

Occurrences

Paper

../papers/03-06-03/03-06-03.html

Date of Presentation

Wednesday, 22 May

Time of Presentation

11.00

Presentation Level

In-The-Middle

Abstract

Many software developers have experience in extracting data from XML documents and in generating XML documents. The mechanics of doing this involve well-known APIs such as SAX and DOM. Since most corporate/enterprise data resides in relational databases, however, the data extracted from XML documents usually winds up in a relational database. Equally, relational databases are usually the source of data used to populate XML documents. Unfortunately, XML data is hierarchical in nature, often deeply hierarchical. Relational databases, on the other hand, are flat or, where relationships exist between tables, very nearly flat. It is this disparity that has to be reconciled by a developer wishing to achieve XML/database interoperability. By mapping XML schema (i.e. DTD or XML Schema) first to Java classes and then mapping Java classes to database schema, it is possible to bridge the disparity. The intervening Java objects also serve as a convenient point at which Java developers can manipulate and react to the data. For example, data validation and business rules can be applied to data in the familiar form of Java objects rather that in the form of XML or raw SQL. XchainJ Developer is a GUI-based tool that enables XML/Java/database mappings to be expressed easily without scripting or coding of any kind. Mapping-files and Java classes are exported from XchainJ Developer to be used by the XchainJ Processor. The XchainJ Processor performs each of the following transformations with just one API call: XML -) Java Java -) database database -) Java Java -) XML Given the correct input, any of these transformations can be invoked at any time. Although, the general purpose is to achieve: XML -) Java -) database and: database -) Java -) XML, sometimes single transformations alone are useful. The mappings can reflect relationships between tables so that multiple tables can be updated or read with single calls to the XchainJ Processor. In fact, so little code is required that anyone with just a passing acquaintance with Java could easily achieve the desired transformations by adapting sample code. Because XML Schema is especially challenging, the presentation will concentrate mainly on mappings involving XML Schemas. The way that XchainJ Developer deals with 'includes', 'redefines' and 'imports' is of particular interest: the resultant XML Schema is automatically generated and presented in a clear and concise form, thereby avoiding the generally verbose nature of XML Schema. 'Substitution groups' are automatically mapped to derived Java classes (inheritance). The auto-generated mappings are customized to map the Java classes to database tables. The fact the XchainJ Developer acts as a design tool also expedites the development XML/Java/database interoperability software. The XchainJ presentation at XML Europe 2002 will cover the upcoming XchainJ 1.1 release plus XchainJ Forms 1.0 and details of XchainJ 2.0. 'XchainJ Forms Designer' is a GUI-based tool that auto-formats an imported DTD or XML Schema and enables a deesigner to specify additional charateristics such as fonts, colours, custom composition. XSL-T stylesheets are exported for use in generating HTML, XForms and XSLT-FO. A processor generates XML from HTML form data.

Generated from an XML Topic Map with xtm2xhtml. (c) Stefan Mintert