How data formatting works
All format files reside in the Configuration/ServerFormats/currentServerModel folder. Each
subfolder contains one XML file and multiple HTML files.
The Formats.xml file describes all the choices in the Format menu. Dreamweaver automatically
adds the Edit Format List and None options.
The folder also contains one HTML file for each currently installed format type, which includes
,
AlphaCase
Currency
The Formats.xml file
The Formats.xml file contains one
tag contains the following mandatory attributes:
•
The
file=fileName
•
The
title=string
"Currency - default"
•
The
expression=regexp
objects that use this format. The expression determines what format is currently applied to a
dynamic data object. For example, the expression for the
"<%\s*=\s*FormatCurrency\(.*, -1, -2, -2, -2\)\s*%>|<%\s*=\s*DoCurrency\(.*,
-1, -2, -2, -2\)\s*%>"
tags in the file; it must be specific enough to guarantee that only instances of this
format
format match the expression.
•
The
visibility=[hidden | visible]
Format menu. If the value of the
in the Format menu.
The
tag can contain additional, arbitrarily named attributes.
format
Some data formatting functions require an argument,
object is the node that corresponds to the
JavaScript property for each attribute of the corresponding
The following example shows the
<format file="Currency" title="Currency - default" ¬
expression="<%\s*=\s*FormatCurrency\(.*, -1, -2, -2, -2\)\s*%>|¬
<%\s*=\s*DoCurrency\(.*, -1, -2, -2, -2\)\s*%>"
NumDigitsAfterDecimal=-1 IncludeLeadingDigit=-2 ¬
UseParensForNegativeNumbers=-2 GroupDigits=-2/>
The format type for this format is
Format menu. The expression
-2\)\s*%>|<%\s*=\s*DoCurrency\(.*, -1, -2, -2, -2\)\s*%>
format in the user's document.
The
NumDigitsAfterDecimal
parameters are for the
GroupDigits
parameters appear in the Parameters dialog box for the
dialog box appears when a user selects the
Edit Format List dialog box. The values that are specified for these parameters define the
new format.
308
Chapter 17: Server Formats
,
,
,
DateTime
Math
Number
tag for each item in the Format menu. Each
format
attribute is the HTML file for this format type, such as
attribute is the string that appears in the Format menu, such as
.
attribute is a regular expression that matches the dynamic data
. The value of the expression attribute must be unique among all
visibility
format
tag for the
format
Currency
<%\s*=\s*FormatCurrency\(.*, -1, -2, -2,¬
,
IncludeLeadingDigit
Currency
Currency
,
,
Percent
Simple
"Currency - default"
attribute indicates whether the value appears in the
attribute is
hidden
, which is a JavaScript object. This
format
tag in the Formats.xml file. The object has a
format
"Currency - default"
. The
"Currency - default"
,
UseParensForNegativeNumbers
format type and are not required. These
format type. The Parameters
Currency
format type from the Plus (+) menu of the
, and
.
Trim
format
"Currency"
format is
, the format does not appear
tag.
string:
string appears on the
finds occurrences of this
.
, and
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