Coding in XHTML
89
4
Under the Markup Languages pane, in the HTML/XHTML pane, select
Compatibility mode for older browsers (e.g., space before “/>”).
This ensures that your code displays properly in older browsers, for example by
inserting a space before minimized empty tags (
<br />
instead of
<br/>
).
5
Select Display DTD selection dialog when the XHTML namespace is specified if,
when you select
Options > Set Document as XHTML
, you want to be able to
choose between inserting the
DOCTYPE
declaration for the XHTML Strict,
Frameset, or Transitional
DTD
, or not inserting/replacing a
DOCTYPE
declaration.
The dialog box that appears has options to Always replace with this DTD or Don’t
ask me again, in case you do not want it to appear again.
If you clear this option, when you set a document as XHTML, no dialog box
appears and no
DOCTYPE
declaration is inserted or replaced.
6
Click Apply.
You can also set color coding for XHTML, validate against the XHTML 1.0 Strict
specification, and specify the priority of XHTML in the Tag Definitions Library. For
details, see
“Using Color Coding Schemes” on page 95
,
“Validating Code” on page
102
, and
“Working with Tag Definitions” on page 106
.
Enabling XHTML support in a document
This section describes how to enable
XHTML
support for a document. Once the
program recognizes a document as XHTML, it displays XHTML Tag Editors, and the
attribute
table and completion options in Tag Inspector and Tag Insight are
appropriate for XHTML.
To validate against the XHTML 1.0 specification, see
“Validating Code” on page 102
.
To automatically enable XHTML support, do one of the following:
•
Create a document with one of the templates available in the
File > New >
XHTML
dialog box (Strict, Transitional, or Frameset)
•
Open or create a document containing a Strict, Transitional, or Frameset
DOCTYPE
declaration
To manually enable XHTML support:
1
Select
Options > Set Document as XHTML
for the current document.
This will have no effect if the current document is read-only.
2
If
Options > Settings > Markup Languages > XHTML/HTML > Display DTD
selection dialog when the XHTML namespace is specified
is selected, a dialog
box appears. Select the
DOCTYPE
declaration for the
DTD
that you will use (there
are three versions of the XHTML 1.0 specification).
Select No replacement if you do not want to change or add a
DOCTYPE
declaration,
for example if you are writing XHTML code to include in another page that
already has its own
DOCTYPE
declaration.
Содержание 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...