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.

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:

Web Service Testing Tools

The Stylus Studio Web Service Tester allows you to easily locate, build references to, and test Web services for XML applications based on WSDL, SOAP, and UDDI standard Web service technologies.

XQuery Tools Support for TigerLogic XDMS

Stylus Studio's integration with the TigerLogic XDMS XQuery processor, allowing you to execute advanced XQuery expressions directly against any TigerLogic XDMS instance.

Berkeley DB XML and Stylus Studio

Develop XML applications for Berkeley DBXML with Stylus Studio integrated tools support for SleepyCat Software's DBXML. Open, Query and Save XML to and from Berkeley DB XML directly from within the Stylus Studio XML IDE.

XML Reports

Build beautiful XML reports from Relational, XML and Legacy Data. You XML report can be rendered in PDF or HTML using XSLT, XQuery or XSL:FO.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member