3. Add any new tags or attributes that you know are supported by the browser, using the syntax shown in"About browser-profile formatting" on page 30 If you don't want to receive error messages about a particular unsupported tag, add it to the list of supported tags. If you do this, save the profile in a separate file with a new filename(such as Browsername xx limited ). Giving this alternate profile a new name preserves the original profile with only the tags that are truly supported. 4. Delete any tags or attributes that are not supported by the browser This step is probably unnecessary if you are creating a profile for a new version of netscape Navigator or Internet Explorer because browsers rarely drop support for tags 5. Add any custom error messages according to the syntax shown in"About browser-profile The profiles that come with Dreamweaver list all supported tags for the specified browsers. To add a custom error message to a tag, type ! -"message"after ! Error. The following example shows information that appears in the Netscape Navigator 3.0 profile(along with other attributes not shown here) <IELEMENT HR name="Horizontal rule"> ATTLIST HR COLOR ! Errol To add a custom error message enter !msg= followed by your error message in quotation marks(") <!ELEMENT HR name="Hori zontal rule"> COLOR !Error !msg="Internet Explorer 3.0 supports the color tag in horizontal rules, but Netscape Navigator 3.0 does not 6.You can use Error for all error situations, or you can use Warning or! Info to indicate that a tag will be ignored but will not actually cause an error. Working with browser profiles 33
Working with browser profiles 33 3. Add any new tags or attributes that you know are supported by the browser, using the syntax shown in “About browser-profile formatting” on page 30. If you don’t want to receive error messages about a particular unsupported tag, add it to the list of supported tags. If you do this, save the profile in a separate file with a new filename (such as Browsername x.x limited). Giving this alternate profile a new name preserves the original profile with only the tags that are truly supported. 4. Delete any tags or attributes that are not supported by the browser. This step is probably unnecessary if you are creating a profile for a new version of Netscape Navigator or Internet Explorer because browsers rarely drop support for tags. 5. Add any custom error messages according to the syntax shown in “About browser-profile formatting” on page 30. The profiles that come with Dreamweaver list all supported tags for the specified browsers. To add a custom error message to a tag, type !msg = "message" after !Error. The following example shows information that appears in the Netscape Navigator 3.0 profile (along with other attributes not shown here): <!ELEMENT HR name="Horizontal Rule"> <!ATTLIST HR COLOR !Error > To add a custom error message enter !msg= followed by your error message in quotation marks ("): <!ELEMENT HR name="Horizontal Rule"> <!ATTLIST HR COLOR !Error !msg="Internet Explorer 3.0 supports the COLOR tag in horizontal rules,but Netscape Navigator 3.0 does not." > 6. You can use !Error for all error situations, or you can use !Warning or !Info to indicate that a tag will be ignored but will not actually cause an error
Changing FTP mappings The FTPExtension Map txt file(Windows)and the FTPExtension MapMac. txt file (Macintosh) map filename extensions to FTP transfer modes(ASCIl or BINAR Each line in each of the two files includes a filename extension(such as GiF)and either the word ASCii or the word BINARY to indicate which of the two FtP transfer modes should be used when transferring a file with that extension On the Macintosh, each line also includes a creator code(such as Dm Wr)and a file type(such as TEXT). When you download a file with the given filename extension on the Macintosh, Dreamweaver assigns the specified creator and file type to the file. If a file that you are transferring doesnt have a filename extension, Dreamweaver uses the BINARY transfer mode 3 TDreamweaver cannot transfer files in Macbinary mode. If you need to transfer files in Macbinary mode, you must use another FTP client. The following example shows a line( from the Macintosh file)that indicates that files with the extension html should be transferred in ascii mode HTML Dmwr TEXT ASCiI In both the FTPExtensionMap. txt file and FTPExtension Map Mac. txt file(macintosh), all elements on a given line are separated by tabs. The extension and the transfer mode are in To change a default setting, edit the file in a text editor To add information about a new filename extension 1. Edit the extension-map file in a text editor 2. On a blank line, enter the filename extension(in uppercase letters) and press Tab 3. On the Macintosh, add the creator code, a tab, the file type, and another tab 4. Enter ascii or binary to set an ftp transfer mode 5. Save the file 34 Customizing Dreamweaver
34 Customizing Dreamweaver Changing FTP mappings The FTPExtensionMap.txt file (Windows) and the FTPExtensionMapMac.txt file (Macintosh) map filename extensions to FTP transfer modes (ASCII or BINARY). Each line in each of the two files includes a filename extension (such as GIF) and either the word ASCII or the word BINARY, to indicate which of the two FTP transfer modes should be used when transferring a file with that extension. On the Macintosh, each line also includes a creator code (such as DmWr) and a file type (such as TEXT). When you download a file with the given filename extension on the Macintosh, Dreamweaver assigns the specified creator and file type to the file. If a file that you are transferring doesn’t have a filename extension, Dreamweaver uses the BINARY transfer mode. The following example shows a line (from the Macintosh file) that indicates that files with the extension .html should be transferred in ASCII mode: HTML DmWr TEXT ASCII In both the FTPExtensionMap.txt file and FTPExtensionMapMac.txt file (Macintosh), all elements on a given line are separated by tabs. The extension and the transfer mode are in uppercase letters. To change a default setting, edit the file in a text editor. To add information about a new filename extension: 1. Edit the extension-map file in a text editor. 2. On a blank line, enter the filename extension (in uppercase letters) and press Tab. 3. On the Macintosh, add the creator code, a tab, the file type, and another tab. 4. Enter ASCII or BINARY to set an FTP transfer mode. 5. Save the file. NOTE TDreamweaver cannot transfer files in Macbinary mode. If you need to transfer files in Macbinary mode, you must use another FTP client
Extensible document types in Dreamweaver KML provides a rich system for defining complex documents and data structures. Dreamweaver uses several XMl schemas to organize information about server behaviors, tags and tag libraries, components, document types, and reference information. When you create and work with extensions in Dreamweaver, there are many instances which you create or modify existing XML files to manage the data that your extension uses. In many cases, you can copy an existing file from the appropriate subfolder within the Configuration folder to use as a template Document type definition file The central component of extensible document types is the document type definition file There might be several definition files, all of which are located in the Configuration/ Document Types folder. Each definition file contains information about at least one document type. For each document type, essential information such as server model, color coding style, descriptions, and so forth, is described o Do not confuse Dreamweaver document type definition files with the XML document Hlltype definition (DTD). Document type definition files in Dreamweaver contain a set of attributes that are associated with a document type. When Dreamweaver starts, it parses the document type definition files and creates an in-memory database of information regarding all defined document types Dreamweaver provides an initial document type definition file. This file, named MMDocument Types xml, contains the document type definitions provided by Macromedia: acumen type Server Internal type File Previous server model extensions model ASP NETO世 ASP. NET- ASPNET VB ASP. NET-VB amic aspx, ascx Dynamic ASP VBScript ASP-VB Dynan ColdFusion ColdFusion cfm. cfml ColdFusion Extensible document types in Dreamweaver
Extensible document types in Dreamweaver 35 Extensible document types in Dreamweaver XML provides a rich system for defining complex documents and data structures. Dreamweaver uses several XML schemas to organize information about server behaviors, tags and tag libraries, components, document types, and reference information. When you create and work with extensions in Dreamweaver, there are many instances in which you create or modify existing XML files to manage the data that your extension uses. In many cases, you can copy an existing file from the appropriate subfolder within the Configuration folder to use as a template. Document type definition file The central component of extensible document types is the document type definition file. There might be several definition files, all of which are located in the Configuration/ DocumentTypes folder. Each definition file contains information about at least one document type. For each document type, essential information such as server model, color coding style, descriptions, and so forth, is described. Dreamweaver provides an initial document type definition file. This file, named MMDocumentTypes.xml, contains the document type definitions provided by Macromedia: NOTE Do not confuse Dreamweaver document type definition files with the XML document type definition (DTD). Document type definition files in Dreamweaver contain a set of documenttype elements, each of which defines a predefined collection of tags and attributes that are associated with a document type. When Dreamweaver starts, it parses the document type definition files and creates an in-memory database of information regarding all defined document types. Document type Server model Internal type File extensions Previous server model ASP.NET C# ASP.NETCsharp Dynamic aspx, ascx ASP.NET VB ASP.NET-VB Dynamic aspx, ascx ASP JavaScript ASP-JS Dynamic asp ASP VBScript ASP-VB Dynamic asp ColdFusion ColdFusion Dynamic cfm, cfml UltraDev 4 ColdFusion
Document type Server Internal type File Previous server extensions mo fuSio Dynamic JSP Dynamic PHP PHP Dynamic php, php3 DWExtension ASP. NET C# DWTemplate acs dwt ASP. NET VB axvb dwt Template ASP VBScript DWTemplate ColdFusion Template cfm.dwt HTML Template DWTemplate JSP Template isp dwt PHP Template DWTemplate ph HTML HTML htm. html Java JavaScript VBScript Text EDML XML edml TLD XML WML XML XML 36 Customizing Dreamweaver
36 Customizing Dreamweaver ColdFusion Component Dynamic cfc JSP JSP Dynamic jsp PHP PHP Dynamic php, php3 Library Item DWExtension lbi ASP.NET C# Template DWTemplate axcs.dwt ASP.NET VB Template DWTemplate axvb.dwt ASP JavaScript Template DWTemplate aspjs.dwt ASP VBScript Template DWTemplate aspvb.dwt ColdFusion Template DWTemplate cfm.dwt HTML Template DWTemplate dwt JSP Template DWTemplate jsp.dwt PHP Template DWTemplate php.dwt HTML HTML htm, html ActionScript Text as CSharp Text cs CSS Text css Java Text java JavaScript Text js VB Text vb VBScript Text vbs Text Text txt EDML XML edml TLD XML tld VTML XML vtm, vtml WML XML wml XML XML xml Document type Server model Internal type File extensions Previous server model
If you need to create a new document type, you can either add your entry to the document definition file that Macromedia provides(MMDocument Types xml)or add a custom definition file to the Configuration/ Document Types folder 3The NewDocuments subfolder resides in the Configuration/Document ypes folder. This subfolder contains default pages(templates) for each document type. Structure of document type definition files The following example shows what a typical document type definition file might look like <documenttypes xmins:MmstRing="http://www.macromedia.com/schemes/data/string/"> servermode]="ASP-JS winfileextension="asp. htm. html previewfile="default_aspjs_preview. htm file="default_aspjs htm priorversionservermode1="UD4-ASP-JS"> <title <loadString id="mmdocumenttypes_Title"/> </title> <description> <loadString id="mmdocumenttypes_Descr"/> </description> </documenttype> </documenttypes> Color coding for document types is specified in the XML files that reside in the COnfiguration/Code Coloring folder In the previous example, the loadstring element identifies the localized strings that Dreamweaver should use for the title and description for ASP-JS type documents. For more information about localized strings, see"Localized strings"on page 44 Extensible document types in Dreamweaver
Extensible document types in Dreamweaver 37 If you need to create a new document type, you can either add your entry to the document definition file that Macromedia provides (MMDocumentTypes.xml) or add a custom definition file to the Configuration/DocumentTypes folder. Structure of document type definition files The following example shows what a typical document type definition file might look like: <?xml version="1.0" encoding="utf-8"?> <documenttypes xmlns:MMString="http://www.macromedia.com/schemes/data/string/"> <documenttype id="dt-ASP-JS" servermodel="ASP-JS" internaltype="Dynamic" winfileextension="asp,htm, html" macfileextension=asp, html" previewfile="default_aspjs_preview.htm" file="default_aspjs.htm" priorversionservermodel="UD4-ASP-JS" > <title> <loadString id="mmdocumenttypes_0title" /> </title> <description> <loadString id="mmdocumenttypes_0descr" /> </description> </documenttype> ... </documenttypes> In the previous example, the loadstring element identifies the localized strings that Dreamweaver should use for the title and description for ASP-JS type documents. For more information about localized strings, see “Localized strings” on page 44. NOTE The NewDocuments subfolder resides in the Configuration/DocumentTypes folder. This subfolder contains default pages (templates) for each document type. NOTE Color coding for document types is specified in the XML files that reside in the Configuration/CodeColoring folder