User Guide
290 Chapter 15: Server Behaviors
Search pattern resolution
Dreamweaver supports the following actions by using the participant
searchPatterns functionality:
• File transfer dependency
• Updating the file paths for any file reference (such as those for include files)
When Dreamweaver creates server models, it builds lists of patterns by scanning all the
participants for special
paramNames attributes. To find URLs to check file dependency and to fix
the pathname, Dreamweaver uses each
searchPattern tag in which one of the paramNames
attribute ends with
_url. Multiple URLs can be specified in a single searchPattern tag.
For each translator
searchPattern tag that has a paramNames attribute value that ends with
_includeUrl, Dreamweaver uses that searchPattern tag to translate include file statements on
the page. Dreamweaver uses a different suffix string to identify include file URLs because not all
URL references are translated. Also, only a single URL can be translated as an include file.
In resolving a
searchPatterns tag, Dreamweaver uses the following algorithm:
1 Look for the whereToSearch attribute within the searchPatterns tag.
2 If the attribute value starts with tag+, the remaining string is assumed to be the tag name (no
spaces are allowed in the tag name).
3 Look for the limitSearch attribute within the searchPattern tag.
4 If the attribute value starts with attribute+, the remaining string is assumed to be the attribute
name (no spaces are allowed in the attribute name).
If these four steps are successful, Dreamweaver assumes a tag/attribute combination. Otherwise,
Dreamweaver starts looking for
searchPattern tags with a paramName attribute that has a _url
suffix and a regular expression that is defined. (For information about regular expressions, see the
“Regular expressions” on page 260.)
The following example of a
searchPatterns tag has no search pattern because it combines a tag
(
cfinclude) with an attribute (template) to isolate the URL for dependency file checking, path
fixing, and so forth:
<searchPatterns whereToSearch="tag+cfinclude">
<searchPattern paramNames="include_url" limitSearch="attribute+template" />
</searchPatterns>
The tag/attribute combination (see the previous example) does not apply to translation because
Dreamweaver always translates to straight text in the JavaScript layer. File dependency checking,
path fixing, and so on occurs in the C layer. In the C layer, Dreamweaver internally splits the
document into directives (straight text) and tags (parsed into an efficient tree structure).
Updating server behaviors
Replacement update By default, participant EDML files do not have an <updatePatterns>
tag, and instances of the participant are updated in the document by replacing them entirely.
When a user edits an existing server behavior and clicks OK, any participant that contains a
parameter whose value has changed is removed and reinserted with the new value in the
same location.