Editing Edml Files; Regular Expressions - MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Manual

Extending dreamweaver
Hide thumbs Also See for DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER:
Table of Contents

Advertisement

Arguments
sbObj
The
argument is the server behavior object instance that you want to remove from the
sbObj
user's document.
Returns
Dreamweaver expects nothing.
Example
The following example deletes all the participants of the
participants that are protected by the EDML file's
function deleteServerBehavior(sbObj) {
dwscripts.deleteSB(sbObj);
}

Editing EDML files

You must maintain Dreamweaver coding conventions when you edit a file. Pay attention to the
dependency of one element upon another. For example, if you update the tags that are being
inserted, you might also need to update the search patterns.
Note: EDML files were new in Dreamweaver MX. If you are working with legacy server behaviors, see
the earlier versions of the Extending Dreamweaver manuals.

Regular expressions

You must understand regular expressions as they are implemented in JavaScript 1.5. You must also
know when it is appropriate to use them in the server behavior EDML files. For example, regular
expressions cannot be used in
searchPattern
Regular expressions describe text strings by using characters that are assigned with special
meanings (metacharacters) to represent the text, break it up, and process it according to
predefined rules. Regular expressions are powerful parsing and processing tools because they
provide a generalized way to represent a pattern.
Good reference books on JavaScript 1.5 have a regular expression section or chapter. This section
examines how Dreamweaver server behavior EDML files use regular expressions in order to find
parameters in your runtime code and extract their values. Each time a user edits a server behavior,
prior parameter values need to be extracted from the instances of the runtime code. You use
regular expressions for the extraction process.
You should understand a few metacharacters and metasequences (special character groupings)
that are useful in server behavior EDML files, as described in the following table:
Regular Expression
\
/ ... /i
260
Chapter 15: Server Behaviors
quickSearch
tag to find and extract data.
Description
Escapes special characters. For example: \. reverts the metacharacter
back to a literal period; \/ reverts the forward slash to its literal meaning;
and, \) reverts the parens to its literal meaning.
Ignore case when searching for the metasequence
server behavior, except the
sbObj
tag.
delete
values, but they are used in the content of the

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Dreamweaver mx 2004

Table of Contents