Home >Online Product Documentation >Table of Contents >Options - General - Editor Sense:X
Options - General - Editor Sense:X
You use this page of the Options dialog box to control settings for Sense:X, the Stylus Studio context-sensitive edit control. Most Sense:X features require that an XML Schema be associated with the XML document you are editing.
Fields
Sense:X
Sense:X enabled
Click the check box to determine whether Sense:X completion is enabled. If this is not checked, Stylus Studio does not display pop-up menus that list the possible elements or attributes that you can create at particular locations.
Automatically insert attribute value
Click the check box to determine whether Stylus Studio automatically inserts attribute values. Stylus Studio uses this setting when you choose an attribute from the Sense:X list. When this is checked, Stylus Studio inserts attribute_name="
. When this is not checked, Stylus Studio inserts attribute_name
.
Auto-close open tag when typing '</'
As soon as you type </, Stylus Studio completes the tag with the nearest previous open tag name.
Add closing tag when creating new tag
As soon as you type a new tag, Stylus Studio inserts its closing tag. For example, if you type <newtag>, Stylus Studio immediately inserts </newtag>
.
Dropdown Delay
Specify how long Stylus Studio waits before it displays drop-down lists.
XML Generations
In addition to auto-complete for element names, Sense:X can generate an entire XML subtree based for a given element. As you type, Stylus Studio displays a drop-down list with valid choices based on the current context.
The first item for a given element (authors
, for example) represents the element tag; the second item for the same element represents the entire subtree for that element. You use this option to choose whether
- To display the generated XML in the drop-down. If generated XML is displayed, you can add it to you XML document by simply selecting it from the list and pressing Enter. As suggested by the previous illustration, including generated XML in the drop-down list can create dense lists. Omitting their display can make it easier to edit your XML.
- To omit the generated XML from the drop-down. You can still add generated XML to your document when this option is selected by pressing the Ctrl key when selecting the element from the drop-down list.
Maximum XML Depth
The depth of an XML element's subtrees you want to include when using automatic XML generation.
Repeating Elements
The number of repeating elements you want to include when using automatic XML generation.
- Preferred - This value is used if it is between the
minOccurs
and maxOccurs
values defined in the associated XML Schema. The default preferred recursion value is - Maximum - This value is used when Preferred is less than
minOccurs
or greater than maxOccurs
andMaximum is less than maxOccurs
.
Number of Repeating Elements
You use the Number of Repeating Elements fields to control the number of repeating elements Stylus Studio generates in an XML document based on an XML Schema.
Preferred - The number of repeating elements you would like Stylus Studio to generate. This number is used when its value falls between the minOccurs
and maxOccurs
values defined for the element in the XML Schema. If this number is less than the minOccurs
value, the minOccurs
number of elements is generated, ensuring that the resulting document is valid. If this number is greater than the maxcOccurs
value, the maxOccurs
number of elements.
Maximum - This value is used when the Preferred value is out of the range of the minOccurs
and maxOccurs
values (less than minOccurs
or greater than maxOccurs
), and Maximum is less than maxOccurs
.
Optional Elements and Attributes
Whether or not you want to generate optional elements and attributes specified in the XML Schema, and whether or not you want to generate comments.
Choices and Substitution Groups
By default, Stylus Studio generates all choices and substitutions specified in the XML Schema, commenting (//
) all but the first one to ensure that the generated XML document is valid. If you prefer, you can generate
- All choices and substitutions, without comments. This will result in an invalid XML document
- Only the first choice and substitution specified in a group
For More Information
Using the Text Editor
Updating an XML Document - Getting Started
Creating XML Documents
Specifying Stylus Studio Options