File manipulation functions
253
•
A
title
element
•
A
body
section
During the conversion, the
dom.convertToXHTML()
function converts pure HTML tags and
attributes to lowercase, writes HTML tags and attributes with correct XHTML syntax, and adds
missing HTML attributes where it can. This function treats third-party tags and attributes
according to the settings in the Preferences dialog box.
If the document is a template, the
dom.convertToXHTML()
function alerts the user but does not
perform the conversion.
Arguments
None.
Returns
An array of six integers that quantify the following items:
•
XHTML errors that Dreamweaver fixed
•
The
map
elements that do not have an
id
attribute and cannot be fixed
•
The
script
elements that do not have a
type
attribute and cannot be fixed
•
The
style
elements that do not have a
type
attribute and cannot be fixed
•
The
img
elements that do not have an
alt
attribute and cannot be fixed
•
The
area
elements that do not have an
alt
attribute and cannot be fixed
Example
In normal use, an extension first calls the
dreamweaver.openDocument()
or
dreamweaver.getDocumentDOM()
functions to get a reference to the document. The extension
then calls the
dom.getIsXHTMLDocument()
function to determine whether the document is
already in XHTML form. If it is not, the extension calls the
dom.convertToXHTML()
function to
convert the document into XHTML. Then the extension calls the
dreamweaver.saveDocument()
function to save the converted file with a new filename.
dom.getIsXHTMLDocument()
Availability
Dreamweaver MX.
Description
Checks a document (specifically, the
<!DOCTYPE>
declaration) to see whether it is XHTML.
Arguments
None.
Returns
A
true
value if the document is XHTML;
false
otherwise.
000_DW_API_Print.book Page 253 Wednesday, August 20, 2003 9:14 AM
Содержание DREAMWEAVER MX 2004-DREAMWEAVER API
Страница 1: ...Dreamweaver API Reference...
Страница 24: ...24 Contents...
Страница 32: ......
Страница 70: ...70 Chapter 5 Fireworks Integration...
Страница 76: ...76 Chapter 6 Flash Integration...
Страница 116: ...116 Chapter 9 The JavaBeans API...
Страница 140: ......
Страница 152: ...152 Chapter 11 Application...
Страница 218: ...218 Chapter 12 Workspace...
Страница 248: ...248 Chapter 13 Site...
Страница 292: ...292 Chapter 14 Document...
Страница 378: ...378 Chapter 17 Design...
Страница 430: ...430 Chapter 18 Code...
Страница 486: ...486 Index...