Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Design XML schemas for enterprise data

Use W3C XML Schema features to design data formats for production management

Bilal Siddiqui (xml4java@yahoo.co.uk), Consultant, Freelance
Bilal Siddiqui is an electronics engineer, an XML consultant, and the founder of XML4Java.com, a company focused on simplifying e-business. After graduating in 1995 with a degree in electronics engineering from the University of Engineering and Technology, Lahore, he began designing software solutions for industrial control systems. Later, he turned to XML and used his experience of programming in C++ to build Web- and WAP-based XML processing tools, server-side parsing solutions, and service applications. He is a technology evangelist and a frequently published technical author.

Summary:  This tutorial teaches you how to use W3C XML Schema features in different types of enterprise applications. You'll learn when, why, and how to use simple and complex types, regular expressions, unions, lists, and substitution groups while designing data formats for your enterprise applications. You'll also learn how to build multiple file schemas, use external schemas in your XML design, and reuse other schema designers' experience by deploying XML design patterns.

Date:  03 Oct 2006
Level:  Intermediate PDF:  A4 and Letter (220 KB | 51 pages)Get Adobe® Reader®

Activity:  17048 views
Comments:  

Before you start

About this tutorial

This tutorial demonstrates the use of W3C XML Schema features in defining data formats for enterprise applications.

First, you'll learn the major types of enterprise applications and their data-interchange requirements, and why you need to define schema for enterprise XML data. You'll also learn the use of patterns to design high-level business documents and XML structures in enterprise applications. Then, using production data as an example, you will start to design an enterprise XML schema that uses various XML Schema features in enterprise data design. You'll learn:

  • How to define and extend complex types
  • When and how to define abstract complex types and abstract elements
  • How to use regular expressions (string patterns), enumerations, unions, lists, and substitution groups

You'll also learn why and how to develop multiple file schemas, and about using external schemas to design your enterprise data. Finally, you will put the pieces together to design high-level business documents.


Prerequisites

You should be able to write well formed XML 1.0 documents. You should also have a beginner-level understanding of XML schemas. This includes the ability to use simple types in XML schema to build complex types. See Resources for links to material you can read to fulfill these prerequisites.


Should I take this tutorial?

The tutorial will be of value for you if you want to learn when and why to use important features in the XML Schema specification to design production-grade XML schemas for enterprise applications. You can also benefit from this tutorial if you want to learn how to reuse the experience of other schema designers.


Tutorial topics

The remainder of this tutorial is organized in the following sections:

  • Explanation of types of enterprise applications and their requirements for data interchange. This section also explains why you need XML schema in your enterprise applications and introduces the use of XML design patterns.
  • Demonstration of how to build complex types to represent production resources. This section also demonstrates how to group XML elements for substitution.
  • Explanation of using regular expressions, enumerations, unions, lists, and substitution groups.
  • Demonstration of developing a schema that spans multiple files. This section also explains how to use external schemas while you design your own schema.
  • Demonstration of how to build a schema for high-level business documents comprising basic XML structures. This section also demonstrates the use of abstract elements with substitution groups to build an XML template.
  • Wrap-up.


Code samples and installation requirements

A simple Java application named InstanceVerifier is included in the source code download for this tutorial (see Download). You'll use InstanceVerifier to validate XML instance documents against the XML schema you develop in this tutorial. The source code download also includes several XML instance documents to help you understand schema concepts.

InstanceVerifier uses XML schema support that comes with Java Development Kit (JDK) version 1.5. So, you must download and install JDK 1.5 from the Sun Web site to try the schema and instance documents developed in this tutorial (see Resources).

1 of 10 | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=XML
ArticleID=162861
TutorialTitle=Design XML schemas for enterprise data
publish-date=10032006
author1-email=xml4java@yahoo.co.uk
author1-email-cc=dwxed@us.ibm.com