
This manual is an introduction to LEIF's XML binding feature set. It assumes you are already familiar with basic C++ programming, object-oriented design practices, and XML. Basic familiarity with XML Schema is recommended. To view the XML Schema Primer, go to http://www.w3.org/TR/xmlschema-0/.
This Development Guide provides an overview of LEIF's XML binding capabilities and instructions on using the code generator and generated classes.
Chapter 2 introduces the concepts behind XML binding. The chapter explains XML data binding in general and presents the data binding implementation that LEIF uses. The chapter also discusses internationalization and validation.
Chapter 3 describes the basic Purchase Order example, provided with this release. This example illustrates the basics of how to build and use the LEIF-generated code.
Chapter 4 also uses the Purchase Order example, but with support for qualified namespaces. Qualified namespaces create considerable differences in the XML document, but results in few changes in the generated code.
Chapter 5 uses the SOAP schema to illustrate how LEIF handles the any element, as well as elements with arbitrary content, such as content that contains XML elements. This example also illustrates how you can use a customized mapping to resolve naming collisions between types and elements defined in the global scope.
Chapter 6 uses the complexContent example to illustrate how LEIF handles complexContent by extension and restriction. This example also demonstrates the use of the XML Schema include feature and substitutability of types.
Chapter 7 presents code samples for performing more advanced tasks with LEIF. The chapter includes advice on designing schemas for extensibility, customizing marshaling behavior through the external marshaling feature, customizing data formatting, and working with large documents.
Chapter 8 describes the logic used by the XML binding code, mapping from XML Schema features to the generated code.
The XML Binding Library Reference Guide provides reference documentation for the non-generated classes on which LEIF depends.
The documentation for the LEIF uses typographic conventions and pathname conventions similar to other Rogue Wave documentation. These conventions are summarized in the following tables:
| Conventions | Purpose | Example |
Courier | Function names, code, directories, file names, examples, operating system commands. | LEIF::Date.getOrderDate() out.println("<head>"); |
italic | variables in code Conventional uses, such as new terms and titles. | set PATH=<JRE_location>\bin;%PATH% Complex types are used to describe elements... Reference Guide |
bold italic | Class names, unnumbered subheadings, and emphasis. | |
bold | Conventional uses, such as emphasis. Commands from an interface. | You should always read the manual. Click the OK button |
... (or vertical ellipses) | Indicates part of the code is missing from an example. |
foo(){ . . . //Something
} //happens
|
| Convention | Purpose | Example |
installdir | The location where LEIF was installed. | c:\RogueWave\LEIF |
\ | The Windows delimiter in a path name. If you use UNIX, replace \ with /. | For installdir\docs\html, a UNIX user enters installdir/docs/html. |
LEIF Library class names and types all begin with the namespace qualification LEIF::. Rogue Wave SourcePro C++ classes typically begin with the prefix RW. Template parameter values for templatized classes appear in angle brackets < > like this: std::vector<T>. Formal template parameters appear in text only when they are important to the discussion, so you may occasionally see this: std::vector<T>, but generally it is simply std::vector.
All member function names start with a lower case letter, but subsequent words are capitalized. All global function names start with the lowercase letters rw. In most class and function names, words are fully spelled out, not abbreviated. Here are some examples:
A LEIF Library class name | |
A SourcePro C++ class name | |
getName() | A function name |
In our manuals, we sometimes refer to an instance of a class by an English name; for example, the "writer class" instead of "LEIF::XmlWriter class." We do this for readability when the meaning should be clear from context. If there is possible ambiguity, however, we use the actual class name.
Throughout the documentation, references to self mean *this.
©2003-2005 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.