Defining complexTypes in XML Schemas

In an XML Schema, an element that contains only data is a simpleType. Elements with any other contents are complexTypes. (Attributes are always simpleTypes.) The XML Schema Recommendation does not include any built-in complexTypes. You must define each complexType you need.

In the Diagram view, when you define a complexType as a top-level definition, it is a global declaration. You can specify that any element in the schema is of this complexType. Similarly, in the Tree view, it is a global declaration when you define a complexType as a child of the Schema node.

Tip

 

Define the complexType first. Then when you define an element, Stylus Studio includes your complexType's name in the menu that lists the available types for your new element. You can select the name of the complexType from the menu.

You can also define a complexType in the definition of an element. See Defining Elements That Contain Subelements in XML Schemas.

Stylus Studio takes care of most of the details for you. But as you define a complexType, it is helpful to keep in mind that a complexType node can have only one child node that is a model group modifier. However, this modifier node can have any number of child nodes that are modifiers. In this way, you can specify any number of modifiers in a complexType. Each modifier controls the occurrence of its child nodes. You can specify the same modifier more than once. For example, you might want to specify the sequence modifier, with some child nodes, then the choice modifier with some child nodes, and then the sequence modifier again with other child nodes.

This section discusses the following topics:

Medical Companies That Use Stylus Studio

Medical companies can't solve every ache and pain. That's why when it comes to the struggle of data integration, they turn to Stylus Studio to simplify their pains. Come see which medical companies are injecting Stylus Studio into their work load!

Stylus Studio is a Real Cost-Saver in Novell Implementations

Learn how TriVir, a leading consulting group used Stylus Studio to implement a Novell based solutions using DirXML, eDirectory, and the exteNd suite for their government customers.

XQuery Tutorial

This XQuery Tutorial is about "BUILDING XQUERY BASED WEB SERVICE AGGREGATION AND REPORTING APPLICATIONS".

Oracle XML Tools

Oracle XML tools for working with relational and XML data, including exporting of database tables to XML and importing XML into the Oracle8i, Oracle9i and Oracle10g databases.

Stylus Most Wanted

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.