When opening a document (and when more than one server model claims a file extension), Dreamweaver calls this function for each of the extension-associated server models to see whether any of the functions can identify whether the document is its file. If more than one server model claims the file extension, Dreamweaver gives priority to the server model that returns the highest integer.
All Dreamweaver-defined server models return a value of 1, so third-party server models can override the file-extension association.
The dom argument is the Adobe document object, which is returned by the dreamweaver.getDocumentDOM() function.
Dreamweaver expects an integer that indicates the priority that you give to the server model for the file extension. This function should return a value of -1 if the server model does not claim the file extension; otherwise, this function should return a value greater than zero.
Returns the document file extensions with which a server model can work. For example, the ASP server model supports .asp and .htm file extensions. This function returns an array of strings, and Dreamweaver uses these strings to populate the Default Page Extension list that is found in the App Server category in the Site Definition dialog box.
The Default Page Extension list exists only in Dreamweaver 4 and earlier. For Dreamweaver MX, and later, the Site Definition dialog box does not list file extension settings. Instead, Dreamweaver reads the Extensions.txt file and parses the element in the mmDocumentTypes.xml file. (For more information on these two files and the documenttype element, see Extensible document types in Dreamweaver.)
This function returns an object that describes the method and array signatures that the scripting language uses. The getLanguageSignatures() function helps map generic signature mapping to language-specific mapping for the following elements:
Drop code (return values)
Data type mappings for primitive data types
The getLanguageSignatures() function returns a map of these signature declarations. Extension developers can use this map to generate language-specific code blocks that Dreamweaver drops on the page (based on the appropriate server model for the page) when the user drags and drops a Web Services method, for example.
For examples of how to write this function, see the HTML implementation files for the JSP and the ASP.NET server models. Server model implementation files are located in the Configuration/ServerModels folder.
Dreamweaver expects an object that defines the scripting language signatures. This object should map the generic signatures to language-specific ones.
This function returns the default file extension of files that use the current server model. The serverModel object is set to the server model of the currently selected site if no user document is currently selected.
dom.serverModel.getServerName() dom.serverModel.getServerLanguage() dom.serverModel.getServerVersion()
This function returns the supported scripting languages of a server model with an array of strings. Dreamweaver uses these strings to populate the Default Scripting Language list that is found in the App Server category in the Site Definition dialog box.
The Default Scripting Language list exists only in Dreamweaver 4 and earlier. For Dreamweaver MX and later, the Site Definition dialog box does not list supported scripting languages, nor does Dreamweaver use the getServerLanguages() function. Dreamweaver does not use this function because each server model has only one server language in Dreamweaver.
If you want a file in the ServerFormats folder to apply only to a specific scripting language, add the following statement so it is the first line in the HTML file:
<!-- SCRIPTING-LANGUAGE=XXX -->
In this example, XXX represents the scripting language. This statement causes the server behavior to appear in the Plus (+) menu of the Server Behaviors panel only when the currently selected scripting language is XXX.
This function returns the server model implementation name that Dreamweaver should use when accessing the UltraDev 4 extension data files that reside in the Configurations/ExtensionData folder.
The startPattern property is a regular expression that matches the opening script delimiter (such as <%).
The endPattern property is a regular expression that matches the closing script delimiter (such as %>).
The participateInMerge property is a Boolean value that specifies whether the content enclosed in the listed delimiters should (true) or should not (false) participate in block merging.
The metaCharSetString argument is a string that holds the value of the document’s "charset=" attribute.
This function retrieves the mapping of server technologies to version numbers. This function is called by the dom.serverModel.getServerVersion() function.
Dreamweaver expects an array of version objects, each with a version name and version value, as listed in the following examples: