The Content Model pane of the Element Types window graphically displays the content models in a schema. It presents the relationships between element types (i.e., parent elements, child elements, etc.) with diagrams and provides additional information about element types, such as their occurrence and sequence within a content model. You can use the Content Model Pane to read your schemas, explore your schemas, or edit them.
XML Authority allows you to view content models for individual element types within schemas. To view a content model, click on the appropriate element in the Element List pane (below the Content Model pane) -- the Content Model pane will be updated to reflect the currently selected element's content model.
The Content Model pane uses a visual vocabulary to represent the often complex element content models. The boxes, containing element type names, data type indicators, and occurrence indicators, are the first part of this vocabulary, and the sequences among them and choices between them are also presented visually.
Element types are displayed as objects (in boxes) within the Content Model pane. An element types content model may be composed of text, other elements, text and elements, data, or none of these (as defined in the element type definition). Each element type object may contain the following icons to indicate its contents, along with the element name:
Text
Element
Data
Figure A. Content Icons
If an element types content model includes other elements (that is, the <-> icon is displayed next to the element name), the child elements may also be displayed in the content model pane. To view an element types children, click once on the parent element type object to expand its "tree". To collapse the "tree" and hide the child elements, click on the parent element type object again. Elements with content models that can be expanded or collapsed will highlight when the mouse cursor passes over them.
Sequence indicator symbols do not appear in the Content Model pane, but they are implied. When XML Authority encounters an element type whose content model is a sequence, it uses right-angle brackets to present the sequence, with elements listed in the order that they must appear. The presentation of an element type named sequence with the content model (seq1, seq2, seq3) is shown below in Figure B.
Figure B. Sequence Content Model
Element types that are separated by the 'or' symbol ('|') in the content model appear to the right of the parent element, after two diagonal branch indicators, in the order they appear in the content model. Figure C shows the representation of an element type named choices with the content model (choice1 | choice2 | choice3).
Figure C. Choice Content Model
Occurrence indicator symbols are used to identify how often an element may or must appear and are shown in the Content Model pane. If occurrence indicators apply to a group of element types, they will have their own box between the parent and child elements, while if they apply to a particular element type, they will appear inside that element type's box as a suffix.
Elements grouped together by parentheses in the content model are listed together in the Content Model pane as child elements. If grouped elements have an occurrence indicator indicated in the content model, the elements are depicted in the Content Model pane as branching off an occurrence indicator symbol. Figure D shows a content model similar to that presented in Figure C, but with the group of choices made optional and repeatable. The multichoice element has the content model (choice1 | choice2 | choice3)*.
Figure D. Optional and Repeatable Choice Content Model
The same presentation is used for similar models using different occurrence indicators. The maybechoice element, with a content model of (choice1 | choice2 | choice3)?, is shown in Figure E.
Figure E. Optional Choice Content Model
If an occurrence indicator applies only to a single element type, it will appear in the box with the element name. Figure F shows a possibilities element whose content model contains all the occurrence indicators: (seq1 , choice1? , choice2+ , choice3* )
Figure F. Occurrence Indicators for individual elements.
Mixed declarations, which always offer a choice of elements that are both optional and repeatable, will look like the mixed element type shown below. Note that the mixed element may contain both text and elements.
Figure G. Mixed declarations contain repeatable choices of elements as well as text.
SOX developers will see a slightly different picture if they use the 'extends' capabilities of SOX, as shown in Figure H below.
Figure H - Element List pane for SOX content
The content that the child element inherits from parent is indicated in gray; if the child element had additional appended content of its own, that content would appear in the same color as regular elements.
The Content Model pane also provides navigation to the specifics about a particular element type that appears in a content model. To immediately scroll to an element's type definition in the list of elements, while browsing the element in the Content Model pane, right-click on the element. A context-sensitive menu (shown in Figure I) will appear with an option near the bottom to "Go to elementname". Click on this option, and the selected element will immediately be made active in the list of element type definitions.
XML Authority lets you edit your content models using the content model pane. The right mouse button, which will bring up a context-sensitive menu, is the key to this process. Right-clicking on an element type's icon will bring up a menu, shown in Figure I, that allows you to change the element's content model, visit its element type declaration information, or modify attributes associated with the element type.
Figure I. Context-sensitive menus let you edit your element type.
The first set of choices let you choose a content model or data type for your element. Your choice here will be reflected in the element list pane below, modifying the checkboxes and Content Model/Data Type column. If you select a content model of Mixed Text and Elements... or Elements Only..., the Content Model Editor dialog box shown below in Figure J will appear.
Figure J. The Content Model Editor will let you specify content models from the content model pane.
If you'd prefer to specify a data type for the element, you can select Data and choose an option from the menu, as shown below in Figure K.
Figure K. The Data submenu will let you choose a data type for your elements.
The Goto Element Type option will, as noted above, make the element you've selected into the element currently being edited in the element list pane and make it visible. The last option, Goto Attributes, gives you quick access to all of the attribute types declared for a particular element, as shown below in Figure L.
Figure L. You can jump to the attribute types pane by selecting an attribute from the context-sensitive menu.
After XML Authority takes you to the attribute type, you can edit it and make changes. Select Element Types from the View Menu to return to editing elements.
Copyright 2000 Extensibility, Inc.
Suite 250, 200 Franklin Street, Chapel Hill, North Carolina 27516