Download Delve® SOA Fast-Prototyping Toolkit (Beta 1.0)
| Tutorials - How To Define an XML-Schema Data Type |
Page 1 of 5 |
The XML-Schema specification provides a means of defining hierarchical data types. In this lesson, we’ll take a look at how to create and use these types in Tectonic.
XML-Schema defines two broad classes of types, those that are “simple” and those that are “complex.” The difference is pretty simple—simple type instances consist of single attribute or element, while complex type instances may consist of many elements, one of which sits at the “root.” In Tectonic, all complex type definitions start with the keyword “type,” followed by the name of the type being defined.

In this example, we define a type called “office-suite” with members “address,” “num-employees,” “employer,” “num-offices,” and “has-conference-room.”
A “write” statement can be used to display the XML-Schema XML defining any type. |