|
|
|
![]() |
![]() |
![]() |
![]() |
IBM developerWorks : XML : Education - Tutorials![]() | ![]() ![]() ![]() ![]() |
![]() |
![]() | |||||
![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
![]() | ||||
The XML Schema Infoset model's concrete containment
relationships are represented by the following diagram:
In the figure above, most of the relationships are black diamond relationships, which are the containment relationships. These form the basis for the majority of classes within the XML Schema Infoset model. Below is a short description of some of the more interesting relationships from different classes in the above diagram.
XSDSchema
<?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.com/IPO" xmlns:ipo="http://www.example.com/IPO"> <annotation> <documentation> Addresses for International Purchase Order Schema </documentation> </annotation> <complexType name="Address"> ... </complexType> <simpleType name="USState"> ... </simpleType> <element name="order" type="ipo:Address"> <attribute name="order" type="ipo:USState"> ... </schema> In the above code snippet, you can see that the root schema element contains an annotation, complexType, simpleType, element, and attribute. The root XSDSchema object can contain any of the following model objects as children within the concrete tree structure of the XML Schema Infoset model:
XSDModelGroupDefinition
XSDModelGroup
XSDParticle
An XSDParticle contains a single XSDParticleContent, which can be one of the following objects:
XSDComplexTypeDefinition
An XSDComplexTypeDefinition can contain a single attribute wildcard, (0..*) XSDAttributeGroupContent and a single XSDComplexTypeContent. The XSDComplexTypeContent can either be an XSDParticle with an XSDModelGroup or XSDModelGroupDefinition as the particle's content or an XSDSimpleTypeDefinition, which means this complex type has simple content. If the XSDParticle's content is an XSDModelGroupDefinition, it will be a group reference to a global group. |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
![]() |
![]() |
![]() |