Adobe 38040334 - Dreamweaver CS3 User Manual page 28

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

In these examples,
myJSPDocType/Description
localized string. The localized string is defined in the next step.
4
In the Configuration/Strings folder, create a new XML file (or edit an existing file) that defines the localized string.
For example, the following code, when placed in the Configuration/Strings/strings.xml file, defines the
string:
DocType/Description
<strings>
...
<string id="myJSPDocType/Description"
value=
"<![CDATA[JavaServer&nbsp;Page with <em>special</em> features]]>"
/>
...
</strings>
Note: String identifiers, such as
application. Dreamweaver, when it starts, parses all XML files within the Configuration/Strings folder and loads these
unique strings.
Rules for document type definition files
Dreamweaver lets document types that are associated with a server model share file extensions. For example, ASP-
JS and ASP-VB can claim .asp as their file extension. (For information on which server model gets preference, see
"canRecognizeDocument()" on page
Dreamweaver does not let document types that are not associated with a server model share file extensions.
If a file extension is claimed by two document types where one type is associated with a server model and the other
is not, the latter document type gets preference. Suppose you have a document type called SAM, which is not
associated with a server model, that has a file extension of .sam, and you add this file extension to the ASP-JS
document type. When a Dreamweaver user opens a file that has a .sam extension, Dreamweaver assigns the SAM
document type to it, not ASP-JS.
Opening a document in Dreamweaver
When a user opens a document file, Dreamweaver follows a series of steps to identify the document type based on
the file's extension.
If Dreamweaver successfully finds a unique document type, Dreamweaver uses that type and loads the associated
server model (if any) for the document that the user is opening. If the user has selected to use Dreamweaver
UltraDev 4 server behaviors, Dreamweaver loads the appropriate UltraDev 4 server model.
If the file extension maps to more than one document type, Dreamweaver performs the following actions:
• If a static document type is among the list of document types, it gets preference.
• If all the document types are dynamic, Dreamweaver creates an alphabetical list of the server models that are
associated with these document types and then calls the
model (see
"canRecognizeDocument()" on page
which server model returned the highest valued positive integer. The document type whose server model returns
the highest integer is the document type that Dreamweaver assigns to the document being opened. If, however,
more than one server model returns the same integer, Dreamweaver goes through the alphabetical list of those
server models, picks the first in the list, and uses that document type. For example, if both ASP-JS and ASP-VB
is a unique string identifier that acts as a placeholder for the
myJSPDocType/Description
320.)
320). Dreamweaver collects the return values and determines
in the previous example, must be unique within the
canRecognizeDocument()
DREAMWEAVER CS3
Extending Dreamweaver
myJSP-
function in each server
22

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents