How Data Formatting Works - Adobe 38040334 - Dreamweaver CS3 User Manual

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

Advertisement

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

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents