Validating Code
103
5
If you need to validate something beyond the scope of the specifications selected
in the
Options > Settings Validation
pane, use the other tabs in this dialog box.
Following is a description of what you can do on each tab:
•
Tags
Require a tag, specify if a tag is case-sensitive, indicate if a tag has a
closing tag and if it is optional or required, add or remove a tag, add or remove
an allowed attribute for a tag, select a valid value for an attribute from a list of
available values, require an attribute, allow a required attribute to be absent,
and add or remove a
context
for a tag (a tag in which the tag can be nested).
•
Values
Add values, specific values or regular expressions, to the list of valid
values that you can specify for an attribute. The checkboxes on this tab allow
you to filter the list of values.
For information about regular expressions, see
“Using Regular Expressions”
on page 90
.
•
Versions
Create a new family of languages, for example the
XML
language
MathML, and add versions to language families. A version inherits everything
from the parent language.
You can add tags to a new family on the Tags tab, or you can back up the
validator (.vtv) files in the \Extensions and \Extensions\TagDefs directories
and then modify them in the editor.
Caution
The changes you make on these tabs take effect immediately and cannot be
undone, even if you click Cancel. Be especially careful with the Remove buttons.
6
Click OK.
7
Back in the Settings dialog box, click Apply.
To require an attribute for a tag:
1
Open
Options > Settings > Validation
and click the Validator Settings button.
2
In the Validator Configuration dialog box, click the Tags tab.
3
Expand a set of tags, for example HTML 4.0.
4
Expand a tag in the list.
5
Select the tag’s Required folder and click Add.
6
In the Required Attribute dialog box, type the name of an existing attribute and
click OK.
If the attribute is not in the Attribute folder, add it to the Attribute folder and then
add it to the Required Attributes folder.
7
To remove a required attribute, select the attribute in the Required folder and
click Remove.
8
If you are done setting validator options, click OK.
9
Back in the Settings dialog box, click Apply.
Содержание ColdFusion Server 5
Страница 18: ...xviii About This Book...
Страница 26: ...8 Chapter 1 Setting Up the Product...
Страница 42: ...24 Chapter 2 Configuring Browsers and Servers...
Страница 60: ...42 Chapter 3 Exploring the Workspace...
Страница 100: ...82 Chapter 6 Editing Pages...
Страница 126: ...108 Chapter 7 Using Web Development Languages...
Страница 212: ...194 Chapter 13 Customizing the Development Environment...
Страница 320: ...302 Glossary...