|
Home > Online Product Documentation > Table of Contents > Defining complexTypes That Contain Only Attributes Defining complexTypes That Contain Only AttributesAn XML Schema allows you to create groups of attributes. This makes it easy to create a complexType that contains only attributes. The first step is to create an attributeGroup. You can then create a complexType and add a reference to the attributeGroup to the complexType. Diagram ViewTo define a complex type that contains only attributes:
1. Right-click the
schema node
2. In the shortcut menu, select
Add >
AttributeGroup.
Alternatives: This operation is also available from the
XMLSchema >
Diagram >
Add > AttributeGroup menu and from the
Add button
The new attributeGroup is added to the XML Schema. It is displayed in the diagram and in the text pane (if you have it open). The properties for the new attributeGroup are displayed in the Properties window.
3. Right-click the new attributeGroup.
4. In the shortcut menu that appears, select
Add >
Attribute.
The new attribute is added to the attributeGroup.
5. Make sure the new attribute is selected. In the
Properties window, click the
Data Type field.
6. Enter or select the type of the attribute.
8. Create a complexType as described in
Defining complexTypes That Contain Elements and Attributes - Diagram View.
9. Drag the attributeGroup to the complexType.
Tree ViewTo define a complex type that contains only attributes:
1. Click the
Schema node.
2. In the left tool bar, click
New Attribute Group
3. Enter a name for the attributeGroup.
4. In the left tool bar, click
New Attribute Definition
5. Enter a name for the new attribute. Stylus Studio displays a scrollable, pop-up menu that lists the built-in simpleTypes and any previously defined simpleTypes.
6. Double-click the type of the new attribute.
7. For each additional attribute you want to add to the group, click the name of the attributeGroup in the
Tree view, and repeat
step 4 through
step 6.
8. Click the Schema node.
9. In the left tool bar, click
New complexType
10. Type a name for the new complexType and press Enter.
11. In the left tool bar, click
New Reference to Attribute Group
12. Double-click the attributeGroup that you want this complexType to contain.
|
HTML Tidy
HTML Tidy is a program for turning HTML into something that can be parsed as XML, unlocking their data for use in XSLT and XQuery programs. Learn how to use HTML Tidy in Stylus Studio now.
Educational Institutions That Use Stylus Studio
Education is the most powerful tool one can have. That's why these top education providers reach for Stylus Studio to educate their students and professors as well. See which education providers have the most powerful XML IDE in their classrooms!
Investments and Financial Companies That Use Stylus Studio
Stylus Studio provides XML tools & components to leading investment and financial companies! See which top investment and financial companies are banking on Stylus Studio 2006 to simplify their dollars and cents.
XSL-List Blog
XSL-List is a discussion forum on the Extensible Stylesheet Language (XSL), covering the XSL specification, XSL processors, tools, user questions, trends and more. Bookmark this RSS or ATOM feed now!