Adobe 38040334 - Dreamweaver CS3 User Manual page 236

Api reference
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Description
Parses the HTML into a DOM tree, inserts missing items that are required for XHTML, cleans up the tree, and then
writes the tree as clean XHTML. The missing directives, declarations, elements, and attributes that the
function adds to the DOM tree, as necessary, include the following items:
ToXHTML()
• An XML directive
• A
declaration
doctype
• The
attribute in the
xmlns
• A
section
head
• A
element
title
• A
section
body
During the conversion, the
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
conversion.
Arguments
None.
Returns
An array of six integers that quantify the following items:
• XHTML errors that Dreamweaver fixed
• The
elements that do not have an
map
• The
elements that do not have a
script
• The
elements that do not have a
style
• The
elements that do not have an
img
• The
elements that do not have an
area
Example
In normal use, an extension first calls the
functions to get a reference to the document. The extension then calls the
to determine whether the document is already in XHTML form. If it is not, the extension calls the
function to convert the document into XHTML. Then the extension calls the
ToXHTML()
function to save the converted file with a new filename.
ument()
dom.getIsXHTMLDocument()
Availability
Dreamweaver MX.
Description
Checks a document (specifically, the
element
html
dom.convertToXHTML()
dom.convertToXHTML()
attribute and cannot be fixed
id
attribute and cannot be fixed
type
attribute and cannot be fixed
type
attribute and cannot be fixed
alt
attribute and cannot be fixed
alt
dreamweaver.openDocument()
declaration) to see whether it is XHTML.
<!DOCTYPE>
function converts pure HTML tags and attributes to lowercase,
function alerts the user but does not perform the
or
dreamweaver.getDocumentDOM()
dom.getIsXHTMLDocument()
DREAMWEAVER CS3
API Reference
convert-
function
dom.convert-
dreamweaver.saveDoc-
231

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents