xpresso for dreamweaver user guide · a tour of xpresso for dreamweaver this chapter will take you...

98
xPresso for Dreamweaver 2.5.1 xPresso for Dreamweaver User Guide

Upload: others

Post on 11-Jun-2020

25 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

xPresso for Dreamweaver 2.5.1xPresso for Dreamweaver User Guide

Page 2: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

© 2005-2007 by Document Sciences Corporation. All rights reserved. The copyright protection claimed includes all formats of copyrightable material and information governed by current or future statutory or judicial law. This includes, without limitations, any material generated by the software programs that display icons or other screen interfaces. You may not copy or transmit any part of this document in electronic or printed format without the express written permission of Document Sciences Corporation. xPression, CompuSet, and all other Document Sciences Corporation products mentioned in this publication are trademarks of Document Sciences Corporation. For complete copyright information, please see the file Licenses.txt located on your eBook Library CD.Document Sciences Corporation, 5958 Priestly Drive, Carlsbad, CA 92008www.docscience.com

Document Sciences Corporation

2

Page 3: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Document Scie

3

Chapter ................ 7Who Should ..........................8Learning Ho ......................... 8Learning M ......................... 8Where Doe ......................... 9Icons and R ........................10Solution Su ....................... 10

Chapter ................ 11Your xPress ........................12

Dre ....................... 13Wh ....................... 14Wo ....................... 16The ....................... 16The ....................... 18The ....................... 19The ....................... 22

The Click T ....................... 25Viewing the ....................... 25Updating Yo ....................... 26xPresso Ta ....................... 26

Table

nces Corporation

1. Introduction ........................................................................ Read This Book? .......................................................................................................w to Use xPresso for Dreamweaver............................................................................

ore About Dreamweaver ...............................................................................................s xPresso for Dreamweaver Fit? ..................................................................................evision Bars ................................................................................................................pport .............................................................................................................................

2. A Tour of xPresso for Dreamweaver .................................o for Dreamweaver Workspace ..................................................................................amweaver Workspace Views .......................................................................................at You’ll See in Code View............................................................................................rking With Dreamweaver Panels .................................................................................. xPresso Insert Bar ...................................................................................................... xPresso Data Schema Panel...................................................................................... xPresso Design Schematic Panel............................................................................... xPresso Variable Definition Panel...............................................................................hat Refreshes: Deleting xPresso Items ........................................................................ xPresso Log File..........................................................................................................ur License....................................................................................................................

g Validation....................................................................................................................

of Contents

Page 4: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Table4

Ch ............... 28Your ........................29

....................... 29

....................... 29Asso ........................30

....................... 30Crea ....................... 33

....................... 33

....................... 36Add ....................... 38

....................... 39

....................... 41

....................... 43

....................... 45Build ....................... 46

....................... 46Pac ....................... 51

Ch .............. 53A Li ........................54Wor ....................... 54

....................... 55

....................... 56

....................... 59

....................... 59

....................... 61

ment Sciences Corporation

of Contents

apter 3. Creating an xPresso Document ........................................ Document Content .................................................................................................................

What is Dynamic Content?.................................................................................................What is Static Content?......................................................................................................

ciating Data With Your Document ..........................................................................................Loading Your Schema........................................................................................................

ting Your Content.....................................................................................................................Creating a Content Group ..................................................................................................Creating a Content Instance ..............................................................................................

ing Criteria to Dynamic Content................................................................................................Defining On/Off Criteria ......................................................................................................Defining Switch Criteria......................................................................................................Defining If-Else Criteria ......................................................................................................Editing Existing Criteria ......................................................................................................

ing Dynamic Tables .................................................................................................................Creating a Content Loop ....................................................................................................

kaging Your Document..............................................................................................................

apter 4. Using Variables ..................................................................ttle Bit About Variables .............................................................................................................king With Variables ...................................................................................................................

Creating Variables..............................................................................................................Defining Variable Attributes................................................................................................Placing Text Variables in Your Document...........................................................................Placing Image Variables in Your Document .......................................................................Defining a Variable as a Document Property .....................................................................

Page 5: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Table5

Wor ....................... 63....................... 63

Arra ....................... 65....................... 66....................... 66....................... 67....................... 69

Crea ....................... 70....................... 72....................... 73....................... 73

View ....................... 74....................... 76

Prev ....................... 77

Ap .............. 78Gen ........................79Grou ....................... 80Con ....................... 81Text ....................... 82Loop ....................... 82VarD ....................... 83Tabl ....................... 84

ment Sciences Corporation

of Contents

king With Variable Hyperlinks ...................................................................................................Placing Variable Hyperlinks in Your Document ..................................................................

ys..............................................................................................................................................Creating Arrays ..................................................................................................................Defining Your Array Attributes ............................................................................................Defining Your Array Item Attributes ....................................................................................Placing Table Variables in Your Document.........................................................................

ting Variable Expressions ........................................................................................................Schema Fields ...................................................................................................................Functions............................................................................................................................Verifying Your Expression ..................................................................................................

ing Variable Data in Your Document........................................................................................Using the Send E-Mail Utility..............................................................................................

iewing Your Work .....................................................................................................................

pendix A. xPresso Tag Specifications .............................................eral xPresso Tag Attributes .....................................................................................................p Tag Attributes .......................................................................................................................

tent Tag Attributes..................................................................................................................... Tag Attributes........................................................................................................................... Tag Attributes .........................................................................................................................ef Tag Attributes ......................................................................................................................

eDef Tag Attributes ...................................................................................................................

Page 6: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Table6

Ap .............. 86Num ........................87

....................... 87

....................... 87

....................... 88

....................... 88

....................... 88Logi ....................... 89Grou ....................... 89

....................... 89

....................... 90

....................... 90

....................... 91Strin ....................... 91

....................... 91

....................... 92

....................... 92

....................... 93

....................... 93

....................... 93

....................... 94

....................... 94

....................... 95Date ....................... 95

....................... 95

....................... 96

....................... 96

....................... 97

ment Sciences Corporation

of Contents

pendix B. Expression Functions ......................................................eric Functions .........................................................................................................................

abs .....................................................................................................................................floor ....................................................................................................................................ceil ......................................................................................................................................round ..................................................................................................................................stringToInteger ...................................................................................................................

c Functions ...............................................................................................................................p Functions..............................................................................................................................

groupCount ........................................................................................................................groupSum...........................................................................................................................groupMax ...........................................................................................................................groupMin ............................................................................................................................

g Functions ..............................................................................................................................length .................................................................................................................................contains..............................................................................................................................toLowerCase ......................................................................................................................toUpperCase ......................................................................................................................trim .....................................................................................................................................substring.............................................................................................................................position...............................................................................................................................replace ...............................................................................................................................numericToString .................................................................................................................

time, Date, and Time Functions...............................................................................................addYear ..............................................................................................................................addMonth ...........................................................................................................................addDay...............................................................................................................................now.....................................................................................................................................

Page 7: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

7

ChaIn

n product suite, pages or e-mail t contains the recipient to a

ment Sciences Corporation

pter 1troduction

Welcome to xPresso for Dreamweaver! xPresso for Dreamweaver is part of the xPressioand is designed to help you create graphical, customized, and personalized HTML Webmessages that contain a variety of content. Content can range from correspondence thagraphical marketing content and brand images, to account alerts or statements that drivepersonalized Web site also created in xPresso for Dreamweaver.

This chapter includes these topics:

• Who Should Read This Book?

• Learning How to Use xPresso for Dreamweaver

• Learning More About Dreamweaver

• Where Does xPresso for Dreamweaver Fit?

• Icons and Revision Bars

• Solution Support

Page 8: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap8

Whed Dreamweaver nowledge of ou create with

is something doesn’t instruct pliant data, and

Lea will step you cument by

e Help, which you

Learecommends

ith g a simple but

ment Sciences Corporation

ter 1 - Introduction

o Should Read This Book?The xPresso for Dreamweaver User Guide contains the information that an experiencuser needs to use xPresso for Dreamweaver. It is expected that you have a working kDreamweaver, and are familiar with the XML data that you will use in the documents yxPresso for Dreamweaver.

This book doesn’t instruct you how to use basic Dreamweaver features, unless there specific about the way you use the feature with xPresso for Dreamweaver. This book you on how to create your data, but does includes guidelines for creating xPresso-comincludes information on how to use your data.

rning How to Use xPresso for DreamweaverAlong with this user guide, there is also an xPresso for Dreamweaver tutorial that youthrough the tasks associated with creating a document. You can access the tutorial doclicking Tutorial on the xPresso menu. xPresso for Dreamweaver also includes onlincan access by clicking Help on the xPresso menu.

rning More About DreamweaverIf you’re new to Dreamweaver, or just need a refresher, Document Sciences strongly these learning resources:

• If you have Dreamweaver installed, from the Help menu select Getting Started wDreamweaver. The tutorials in this guide lead you through the process of creatinfunctional Web site.

• The Dreamweaver Documentation Resource Center is available online at: http://www.adobe.com/support/documentation/en/dreamweaver/.

Page 9: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap9

Whenables you to

ment Sciences Corporation

ter 1 - Introduction

ere Does xPresso for Dreamweaver Fit?xPresso for Dreamweaver is a design component of the xPression product suite that create dynamic Dreamweaver documents that can be published on the xPRS Server.

Figure 1. xPresso for Dreamweaver falls in the Document Design area of the xPression product suite.

Page 10: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap10

Icopecial information.

data may occur if

also describe an

If you have not ntact your

e main text.

rs in the right

Sotion Support in

ment Sciences Corporation

ter 1 - Introduction

ns and Revision BarsWhen one of the following icons appears in the left margin of a page, it alerts you to s

Caution: The warning cautions you that a fatal error, unsatisfactory output, or loss of you do not follow directions carefully.

Tip: A tip offers suggestions to simplify a task or describes a useful shortcut. They mayalternate way to use the techniques described in the text.

Lock: The lock icon identifies features that Document Sciences licenses individually. obtained a license, you cannot access the identified feature. For more information, coDocument Sciences’ sales representative.

Note: A note offers information that emphasizes or supplements important points of th

Other icons appear to identify a process or button described in the text.

Revision bars help you locate new or changed information. Look for these revision bamargin of each affected page.

lution SupportFor more information or to solve a problem, you can contact Document Sciences Soluone of the following ways:

Telephone (760) 602-1500

Fax (760) 602-1515

World Wide Web http://support.docscience.com

E-mail [email protected]

Page 11: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

11

ChaA

e. xPresso for xPresso

ta Schema panel,

ment Sciences Corporation

pter 2Tour of xPresso for Dreamweaver

This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interfacDreamweaver “sits” atop Macromedia Dreamweaver 8, and works seamlessly with it. Aninstallation adds the xPresso Insert bar to Dreamweaver, and also adds the xPresso DaxPresso Design Schematic panel, and the xPresso Variable Definition panel.

This chapter includes these topics:

• Your xPresso for Dreamweaver Workspace

• The Click That Refreshes: Deleting xPresso Items

• Viewing the xPresso Log File

• Updating Your License

• xPresso Tag Validation

Page 12: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap12

You Macromedia these items do in

ment Sciences Corporation

ter 2 - A Tour of xPresso for Dreamweaver

r xPresso for Dreamweaver WorkspaceHere’s what you’ll typically see when you open xPresso for Dreamweaver: a standardDreamweaver desktop, with a few added xPresso items. You’ll learn more about whatthe following sections.

Figure 2. After installation, you’ll see that these xPresso components have been added to your Dreamweaver workspace.

Page 13: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap13

ode view, or Split kspace, so you

View Buttons

Sample xPresso Tag

Code View

Design View

ment Sciences Corporation

ter 2 - A Tour of xPresso for Dreamweaver

Dreamweaver Workspace ViewsDreamweaver has three different ways you can view your workspace: Design view, Cview. When working in xPresso for Dreamweaver, it is best to work in a Split view worcan see both the Design view and the Code view.

Figure 3. This graphic shows a sample document in Split view mode.

Page 14: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap14

cument content, s that you must

the three views

ted functions in a list of the tags

"" "

EK"' ></xPresso>

esc"

</xPresso>

ression="/root/

/

ment Sciences Corporation

ter 2 - A Tour of xPresso for Dreamweaver

Code view in xPresso for Dreamweaver shows not only the HTML for your general dobut also HTML generated for xPresso actions. There are some xPresso-related actiondo in Code view, where others can be done in Design view. You can change betweenusing the buttons at the top of the workspace, shown in Figure 3 on page 13.

What You’ll See in Code ViewxPresso for Dreamweaver places tags in the HTML code as you perform xPresso-relayour document, such as creating content groups, or placing variables. The following isyou’ll see as you work in xPresso for Dreamweaver, along with an example of each:

• Group tag<xPresso type="group" id="16" name="banner" selecttype="ifelse" logic=onoff=""name"==" test""><xPresso type="instance" id="17" name="generallogic='"name"=="test"'></xPresso></xPresso>

• Content tag<xPresso type="instance" id="19" name="general" logic='"international"=="P

• Text tag<xPresso type="text" id="9" name="destination" type="text" variable="dvid="4">{desc}</xPresso>

• Loop tag<xPresso type="loop" id="10" name="triptable" variable="trip" vid="7">

• VarDef tag<VarDef name="international" id="1" type="string" expType="schema" expcampaign/city/international" position="2"></VarDef>

• TableDef tag<TableDef><TableDef name="region" id="6" expType="schema" expression="/root/campaignrecommendations/region" position="6"></TableDef>

Page 15: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap15

ecommendations/

t/campaign/

Code view, not in graph and font

aver enables you eaver identify

ment Sciences Corporation

ter 2 - A Tour of xPresso for Dreamweaver

<TableDef name="trip" id="7" expType="schema" expression="/root/campaign/rregion/trip" position="8">

<VarDef name="date" id="8" type="string" expType="schema" expression="/roorecommendations/region/trip/date" position="9"></VarDef></TableDef></TableDefs>

For more information, see xPresso Tag Specifications.

Selecting Text in Code View

When you create content groups using existing content, you must select the content inDesign view. When you select the Code view content, ensure that you select the parabegin and end tags as well as the content itself.

Highlighting xPresso Elements

As you’ll learn in subsequent sections and chapters in this book, xPresso for Dreamweto add dynamic content elements to your Dreamweaver documents. To have Dreamwthese xPresso elements:

1. From the Edit menu select Preferences.

2. Select Highlighting from the Category list.

Figure 4. Selecting content to be made into a content group.

Page 16: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap16

e way you work, eamweaver hoose the panel

ary. You can also ve buttons that ds an xPresso

ow menu and ar and select

ment Sciences Corporation

ter 2 - A Tour of xPresso for Dreamweaver

3. Click the Show check box next to Third-Party Tags, then click OK.

Working With Dreamweaver PanelsDreamweaver enables you to group its panels in logical combinations according to thand the xPresso panels are no exception. To group one or more of the xPresso for Drpanels, click the panel menu button and select Group [xPresso Panel Name] with. Cwith which you want to group the selected panel.

The xPresso Insert BarYou can hide or show, and collapse or expand the Dreamweaver Insert bar as necessdisplay the different categories of the Insert bar. Some categories of the Insert bar hacontain menus with common commands. The xPresso for Dreamweaver extension aditem to the insert bar list. If you don’t see the Insert bar, click the Dreamweaver Windselect Insert. Click the arrow beside the category name on the left end of the Insert bxPresso from the pop-up menu.

Figure 5. To change the highlight color, click the color box, then use the color picker to select a new color, or enter a hexadecimal value.

Page 17: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap17

ns.

the

y.

e.

esso

ment Sciences Corporation

ter 2 - A Tour of xPresso for Dreamweaver

The xPresso insert bar contains shortcut buttons to xPresso for Dreamweaver functio

The table below shows and describes each button.

Figure 6. When you roll the pointer over a button, a tooltip appears with the name of the button.

Click This Button

To Click This Button

To

Load a data schema file. Insert an image variable.

Create a content group. Insert a hyperlink variable.

Add a content instance to a content group.

Delete selected items from xPresso panels.

Add a content loop to create a dynamic table. Create a document propert

Create a table from an array in the variable definition panel. Create a document packag

Insert a text variable from the variable definition panel.

Refresh the views in the xPrpanels.

Page 18: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap18

ta schema. Don’t chema menu

o the panel, e. You can only

L data file.

the bottom of the

ment Sciences Corporation

ter 2 - A Tour of xPresso for Dreamweaver

The xPresso Data Schema PanelThe xPresso Data Schema panel displays your variable data, as contained in your dasee it in your workspace? From the xPresso menu, select Data Schema. The Data Senables you to load a schema into your document. When you load a data schema intxPresso for Dreamweaver shows the structure of your schema in a hierarchical outlinload an XSD file. If you don’t have schema file, you’ll need to create one from your XM

When you select a field in the Data Schema panel, the data type of the field appears atpanel. This information is read-only.

The xPresso Data Schema Menu

The Data Schema menu enables you to load a schema into your document.

Figure 7. The xPresso Data Schema panel shows the content of your schema. The schema root

Data fields

Click the arrow to access the Data Schema menu.

Page 19: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap19

of the dynamic the xPresso iability of your final output, as

u

ment Sciences Corporation

ter 2 - A Tour of xPresso for Dreamweaver

The xPresso Design Schematic PanelThe xPresso Design Schematic panel shows the structure, logic and content variationpieces of the document, in an outline structure. Don’t see it in your workspace? Frommenu, select Design Schematic Browser. Think of it as the structural plan of the vardocument, showing you all the variable bits and pieces that can be used to create thewell as the criteria governing their inclusion.

Figure 8. The xPresso Design Schematic consists of an outline that displays your variable content structure, and the xPresso Schematic Attribute area that displays the attributes of the selected Schematic item.

The attribute area

The Schematic outline

The Schematic men

Page 20: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap20

s to be used in

r page. When you nt is selected on hts the

ment Sciences Corporation

ter 2 - A Tour of xPresso for Dreamweaver

Through the xPresso Schematic, you can create content groups, and content instanceyour document. You can also define the criteria for inclusion of specific content.

The items listed in the Schematic correspond to variable content on the Dreamweaveselect a content group or content instance in the Schematic, the corresponding contethe document page. When you select content on the document page, xPresso highligcorresponding content group in the Schematic.

Figure 9. The content instance “China”, in the “specialdeal” content group, is highlighted in the schematic and the corresponding frame is selected on the document page.

Page 21: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap21

This enables you anges.

tic panel and s to any editable tances, or hematic Attribute at appears in the

hematic and the

ment Sciences Corporation

ter 2 - A Tour of xPresso for Dreamweaver

You can select a content instance in the Schematic to view it on the document page. to switch between content instances to see how they look on the page, or to make ch

The xPresso Schematic Attribute Area

The xPresso Schematic Attribute area appears at the bottom of the xPresso Schemadisplays information about the selected item in the Schematic. You can make changeattribute displayed in the area. You can rename any of the content groups, content insvariables contained in the Schematic by editing the name displayed in the xPresso Scarea. You can't rename the Schematic or the Global Variable folder. The information thpanel depends on the type of item you select.

The xPresso Schematic Menu

The xPresso Schematic menu enables you to remove selected items from both the scdesign view.

Figure 10. The content instance “Paris”, in the “specialdeal” content group, is highlighted in the schematic and the corresponding frame is selected on the document page.

Page 22: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap22

s you to easily orkspace? From s, arrays, child efinition panel is

ine is the variable tes in the variable

tes an ed to

iner Folder

ment Sciences Corporation

ter 2 - A Tour of xPresso for Dreamweaver

The xPresso Variable Definition PanelThe Variable Definition panel works together with the Data Schema panel and enablecreate and define variables and arrays for use in your document. Don’t see it in your wthe xPresso menu, select Variable Definition. The panel enables you to add variableelements to arrays, and modify the properties of items. The main part of the Variable Dthe variable outline, where your defined variables and arrays are listed. Below the outlattributes area. When you select an item in the outline you can define or edit its attribuattributes area.

Figure 11. The Variable Definition panel enables you to create and define variables for use in your xPresso document.

This structure indicaarray that can be uspopulate tables.

Individual variables

Variable Item Conta

The attributes area

Page 23: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap23

n “n of m” label e through the

w many records Click Load to lt Web browser.

ment Sciences Corporation

ter 2 - A Tour of xPresso for Dreamweaver

When you apply variable data to your document, xPresso for Dreamweaver displays aand a set of arrows at the top of the Variable Definition panel to enable you to navigatrecords in your data file.

The n of m label shows the number of the record that you are currently on (n), and hoexist in the file (of m). Click the arrows to move through the records in the document. apply the data in a particular record to your work. The results will appear in your defau

The Variable Definition Menu

Click the arrow in the right corner of the Variable Definition panel to access the menu.

Figure 12. The navigation arrows and record count as they appear on the top of the panel.

Figure 13. The menu selections will vary depending on the item you select in the panel.

Page 24: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap24

iables and their

information,

information,

elected field in ore selecting

selected ta Schema rrays.

le appears in variable from

iable data. ent using the

oving variable ata.

esso Log File.

ment Sciences Corporation

ter 2 - A Tour of xPresso for Dreamweaver

The Variable Definition menu contains the commands you need to work with your vardata. The menu selections will vary depending on the item you select in the panel.

Select this option To

Define Variable Add a text or image variable to the Variable Definition panel. For more see Creating Variables.

Define Array Add an array or table variable to the Variable Definition panel. For moresee Creating Arrays.

Define Variable From Schema

Add a text or image variable to the Variable Definition panel using the sthe Data Schema panel. Select the field on the Data Schema panel befthis option. For more information, see Creating Variables.

Define Array From Schema

Add an array or table variable to the Variable Definition panel using theparent field in the Data Schema panel. Select the parent field on the Dapanel before selecting this option. For more information, see Creating A

Delete Item Delete the selected item from the Variable Definition panel. If the variabyour document, you can’t delete it from the panel; you must delete the the document page first.

Apply Variable Data

Open a dialog box where you can select an XML file to use for your varWhen you select a file, xPresso for Dreamweaver updates your documdata from the selected XML file.

Reset Variable Data

Reset all the variables in your document back to their original state, remdata. All variables display the variable name instead of actual variable d

Preview View your work with data applied in your default Web browser.

View Log To view the xPresso.log file. For more information, see Viewing the xPr

Page 25: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap25

The Definition panel,

e menu selection. wever, when you ely, and a deleted ick the Refresh

Vieinformation about mulative, and

re information

.log file will open

ment Sciences Corporation

ter 2 - A Tour of xPresso for Dreamweaver

Click That Refreshes: Deleting xPresso ItemsxPresso for Dreamweaver enables you to remove variables from the xPresso Variableand content groups and instances from the xPresso Design Schematic, with the DeletYou can also remove these items from the Dreamweaver Design and Code views. Hodelete items from these views the xPresso panels may not always “catch up” immediatitem may still appear in a panel. To make sure everything is properly synchronized, clbutton on the xPresso Insert bar.

wing the xPresso Log FileThe xPRS.log file (located in [Dreamweaver Installation Directory]\xPresso) contains some of the functions that xPresso for Dreamweaver has performed. The log file is cuyou'll need to scroll to the very bottom of the file to find the most recent entries.

You should view your log file when you receive error messages and you want see moabout them. Look for words such as "ERROR" or "WARN" to locate problems.

To view the log file, click the Variable Definition menu and select View Log. The xPRSin Notepad. Scroll to the bottom of the file for the most recent entries.

Page 26: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap26

Uptomer Care, you gister dialog box

xProur document. To , select Reports. .

ment Sciences Corporation

ter 2 - A Tour of xPresso for Dreamweaver

dating Your LicenseIf you receive a new xPresso for Dreamweaver license from Document Sciences Cuscan activate the new license by clicking Register on the xPresso menu. When the Reappears, replace the current license key with the new one, and click OK.

esso Tag ValidationxPresso uses the Dreamweaver Site Reports function to validate the tags it adds to ycheck your xPresso document after you apply your variable data, from the Site menuOr, click the Reports button on the Site Reports tab. The Reports dialog box appears

Figure 14. The Register dialog box shows all the registration and license information associated with this xPresso for Dreamweaver installation.

Figure 15. This shows the Site Reports tab in the Results panel group, with the Reports button highlighted.

Page 27: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap27

rs in the Site

document, the

ment Sciences Corporation

ter 2 - A Tour of xPresso for Dreamweaver

Select xPresso Validation and click Run to generate a report. A list of results appeaReports panel.

Note: Run the xPresso validation after you apply data. If you run it on your “template”utility will flag all xPresso tags as critical issues.

Figure 16. The xPresso Validation option is located in the xPresso folder.

Page 28: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

28

ChaCr

need to know to our document,

ment Sciences Corporation

pter 3 eating an xPresso Document

There are several steps to creating an xPresso document. This chapter covers what youuse xPresso for Dreamweaver to create a document, such as associating your data to ycreating content, specifying criteria to control content inclusion, and adding variables.

This chapter includes these topics:

• Your Document Content

• Creating Your Content

• Adding Criteria to Dynamic Content

• Building Dynamic Tables

• Packaging Your Document

Page 29: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap29

Youoth of which can

ria and variable each variation

r example, you t target audience. t group, and then

then determines h content groups ear in the final

not controlled by ny's name and our document as

ways included in

ment Sciences Corporation

ter 3 - Creating an xPresso Document

r Document ContentThere are two basic types of content that make up a document: dynamic and static, bplay an important part in the final look of your document.

What is Dynamic Content?Dynamic content can change for each version of a document and is controlled by critedata. xPresso for Dreamweaver dynamic content is contained in content groups, withappearing in its own content instance.

Generally only one content instance in a content group appears in the final output. Fomight have two different opening paragraphs to a document, each aimed at a differenYou would include each paragraph as its own content instance within the same contenuse criteria to determine when each paragraph appears in the output.

Criteria enable you to control when dynamic content appears in the output. Your datathe content by satisfying the criteria you define. You can define criteria to control whicare active in your document, and which content instances in those content groups appoutput. For more information, see Adding Criteria to Dynamic Content.

What is Static Content?Static content appears in every iteration of the document, and because its inclusion iscriteria, it does not need to be contained in a content group. For example, your compaaddress would probably be static content in your document. You add static content to yyou would add any content to a Dreamweaver document.

Static text can contain variables; although the inclusion of the text itself is static (it's althe output), you can use variables to make parts of the content dynamic.

Page 30: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap30

Aset up correctly cument into

cific for the weaver client

xPresso for r a group of ts. Using a

, because of

in using them to publishing can’t

ma panel, which

ment Sciences Corporation

ter 3 - Creating an xPresso Document

sociating Data With Your DocumentYour data drives the final appearance of your document. It's critical that this data be sbefore you create your document to avoid potential problems when you move your doproduction.

You should have a data schema file and an XML file that contains the information spedocument you are creating. These files should be accessible to the xPresso for Dreamcomputer. xPresso doesn’t currently support multiple schema files. Schemas used in Dreamweaver should be specific for the e-mail or HTML page you are designing, or fosimilar e-mails or pages. We suggest that your schema have no more than 50 elemenschema with more than 50 elements may result in performance issues at design timelimitations in the Dreamweaver software.

Ensure that your schema and XML files adhere to xPresso standards before you begcreate your document. XML data files that will be deployed on the server and used in have the following characters in their names:

Loading Your SchemaYour schema is loaded into xPresso for Dreamweaver through the xPresso Data Scheenables you to work with your data schema file while creating your document.

& ^ = # @ $ % ‘ * , / ? \ “ + | { } < > ; :

Page 31: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap31

ing, on the

ema menu. The

ment Sciences Corporation

ter 3 - Creating an xPresso Document

To load a data schema:

1. Locate the xPresso Data Schema panel in your workspace. If the panel isn't showDreamweaver xPresso menu, click Data Schema.

2. Click Load Schema on the xPresso Insert bar, or Load Schema on the Data SchLoad Schema dialog box appears.

3. Locate and select the XSD file that contains your schema. Click OK.

Figure 17. The xPresso Data Schema panel lists the elements contained in the selected schema.

Page 32: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap32

t you want to use

l order, not in the eaver.

of the viewer

ment Sciences Corporation

ter 3 - Creating an xPresso Document

4. If your schema contains more than one root element, xPresso asks which elemenas the root. Select the repeating element and click Apply.

The data schema appears in the palette in a hierarchal structure.

Note: The elements in the Select Root Element drop-down list are listed in alphabeticaorder that the elements appear in the schema. This is a limitation imposed by Dreamw

5. Click the Dreamweaver Split or Show Code View button and scroll to the bottomwindow.

Figure 18. The repeating record root should be the highest level element that represents the data’s repeating record.

Figure 19. You’ll see that xPresso for Dreamweaver has inserted the elements from the schema you loaded. This schema structure is stored here temporarily; it will not appear in the final generated HTML.

Page 33: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap33

g your document. ds as variables in

create content

Creresso elements to hich areas are to

text. Any

ntained in a t instance or they no variance, but ave a content

t existing content

ment Sciences Corporation

ter 3 - Creating an xPresso Document

Now that you have your schema loaded, you are ready to use your data while creatinYou can access the schema fields for use in defining criteria, and you can use the fielyour document.

If you are ready to start creating variables, please see Using Variables. If you’d rathergroups and instances, please read on.

ating Your ContentAfter you’ve “connected” your data to your document, you’re ready to add dynamic xPyour static documents. If you planned your document beforehand, you should know wbe dynamic, and which areas will appear statically in all document output.

Note: Content groups and content instances can’t have HTML comments within their comments found within the text will be processed as straight text. For example:

My text <!--My Comment-->

Will appear in the document as:

My text My Comment

Creating a Content GroupA content group is a container for dynamic content. Each variation of the content is cocontent instance within the content group. Content groups can contain a single contencan contain many instances. Single instance content groups contain content that has that can be dynamically included or excluded from the document output. You should hgroup for each dynamic section of your document.

You can create an “empty” content group, and then add your content, or you can selecto create a content group.

Page 34: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap34

ent group to start.

r then:

adds a content the selected

in design view.

p. It is nt and paragraph

ment Sciences Corporation

ter 3 - Creating an xPresso Document

To create an empty content group:

1. Place your cursor on the document page in design view where you want the cont

2. Click Create Content Group on the xPresso Insert bar. xPresso for Dreamweave

– Adds a new item to the Schematic with the default name Content Group, andinstance named Content Instance under the new content group representing content.

– Adds one group and one instance xPresso tag to the HTML.

– Adds Group Begin and Group End markers to the page.

3. Type your content between the {Group Begin} and {Group End} tags that appear

To create a content group using existing content:

1. Select the content that you want to include in the first instance of the content grourecommended that you select the content in code view, and that you include the fotags as well.

2. Click Create Content Group on the xPresso Insert bar.

Figure 20. Ensure that your content appears between the two tags, as shown here.

Figure 21. Selecting content to be made into a content group.

Page 35: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap35

adds a content the selected

these default tributes area at the chematic panel.

ment Sciences Corporation

ter 3 - Creating an xPresso Document

3. xPresso for Dreamweaver then:

– Adds a new item to the Schematic with the default name Content Group, andinstance named Content Instance under the new content group representing content.

– Adds one group and one instance xPresso tag to the HTML.

– Adds Group Begin and Group End markers to the page.

Figure 22. A new content group and instance in the Schematic.

Figure 23. You’ll need to have Code View enabled to see these tags.

Figure 24. Sample showing Begin and End markers.

You can changenames in the atbottom of the S

Page 36: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap36

e content group content group the content group e determines a to Dynamic

ontent group. You ions of the text.

der the content

ment Sciences Corporation

ter 3 - Creating an xPresso Document

Your content is now a specified content instance, contained within a content group. Thshould contain all the different versions of the content. Only one content instance in ashould appear in a final document. Criteria placed on the content group determines if should be included in the document, and then criteria placed on each content instancwhich instance appears in the output. You’ll learn more about criteria in Adding CriteriContent.

Creating a Content InstancexPresso for Dreamweaver automatically adds a content instance when you create a ccan create more content instances within the content group to contain alternative vers

To create a content instance:

1. Select the content group in the Schematic to which you want to add the instance.

2. Click Add Content Instance on the xPresso Insert bar.

3. xPresso for Dreamweaver then:

– Adds a new item to the Schematic with the default name Content Instance ungroup.

Figure 25. The new content instance.

Page 37: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap37

the first content

ment Sciences Corporation

ter 3 - Creating an xPresso Document

– Adds a new instance tag inside the group tag to the HTML.

– Adds new Group Begin and Group End markers to the page. The text from instance no longer appears.

4. In Code View, place you cursor as shown here, then add your new content.

Figure 26. Note how the first content instance is now commented.

Figure 27. A new, “empty”, instance in design view.

Figure 28. Place the cursor as shown in the highlighted area here.

Page 38: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap38

e instance from a

Adntrol its inclusion

fore you can

ontent group is Switch criteria to

ment Sciences Corporation

ter 3 - Creating an xPresso Document

5. When you’re done, you’ll have something that looks like this.

Add as many content instances as you need to any content group. Remember, only oncontent group should appear in the final output.

ding Criteria to Dynamic ContentOnce you’ve started creating your dynamic content, you’ll need to add the criteria to coin the document output.

Note: You’ll need to have your data schema loaded into xPresso for Dreamweaver bedefine criteria. For more information, see Your Document Content.

For each content group, you can specify On/Off criteria that determines whether the cconsidered for inclusion in the document output. In addition, you can define If-Else ordetermine which content item in the content group appears in the output.

Figure 29. This example shows the newly added instance in the code view, design view, and in the Schematic.

Page 39: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap39

single data field the geographical by selecting the instance, such as content group

es you to build an expression, you pression for each up level, but the

on.

or off for specific nts in the state of considered for

ment Sciences Corporation

ter 3 - Creating an xPresso Document

Switch criteria can be used when you have content items that should appear when a contains a specific value. For example, say you have content that differs depending onregion that the recipient lives in. You can define Switch criteria for that content group field, such as Region, and then specifying the values that should trigger each content southwest, northeast, south, and so on. Switch criteria is selected and defined at the level.

For more complicated criteria requirements, you can use If-Else criteria. If-Else enablexpression that is used to determine when a content instance should appear. In your can use Boolean logic, and compare variables to fields or values. You can define an excontent instance within the content group. If-Else criteria is selected at the content grocriteria is defined at the content instance level.

Note: If you delete the criteria logic associated with an item, you can’t undo the deleti

Defining On/Off CriteriaIf you have a content group that may not be used in every document, you can turn it onoutput with On/Off criteria. For example, if you have content that is only valid for recipieCalifornia, you would specify On/Off criteria to turn the content group off so it won’t beinclusion, if the state value in the data is not equal to California.

Page 40: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap40

rs in the attributes

ppears.

ct Variable dialog

ment Sciences Corporation

ter 3 - Creating an xPresso Document

To define On/Off criteria:

1. Select the content group in the Schematic. The content group's information appeaarea, at the bottom of the Schematic panel.

2. Click the browse button next to the ON/OFF field. The On/Off Criteria dialog box a

3. Click Add Row, then create your criteria expression.

– To add a variable: Click the browse button next to Variable to open the Selebox. Select the variable you want to add from the list and click OK.

– To add an operator: Select an operator from the Is drop-down list.

Figure 30. For content group properties, you can change the name or selection type of the content group, or define selection logic or On/Off criteria.

Figure 31. The On/Off Criteria dialog box enables you to build an expression that defines the criteria for inclusion of an item.

Page 41: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap41

ct Variable dialog

xpression.

r All to clear the

the Variable

of content, you alue matches and uded. You can utput if all of the ntent group level.

reamweaver

ment Sciences Corporation

ter 3 - Creating an xPresso Document

– To add a value: Click Value and type the value in the text box.

– To add a field: Click Field, and then click the browse button to open the Selebox. Select the variable you want to add from the list and click OK.

– Click the (, ), AND, and OR buttons to add the appropriate operators to your e

Note: If you are comparing date values, the value must be in YYYY-MM-DD format.

4. Click Insert to add the criteria expression to the list.

5. (Optional) Click Clear Row to clear the contents of the selected row, or click Cleacontents of all the rows in the dialog box.

6. Click OK when you are done defining your criteria expression and you’ll return to Definition panel.

7. Click Save on the Variable Definition panel to add the expression.

Defining Switch CriteriaIf you have a single field in your data that contains values used to control the inclusioncan specify a Switch criteria. A Switch criteria is a simple true or false test, either the vthe content instance is included, or the value doesn’t match and the instance isn’t incldefine one of the content instances as the default instance, which will appear in the oother instances fail to satisfy the criteria. Switch criteria are completely setup at the co

Only string fields can contain null values for Switch criteria. Here is how xPresso for Dresolves string Switch criteria:

• If the field value is null:– Show the first instance with an empty field value.– If no field value is empty, show the instance specified as the default.– If there is no default instance, turn off the content group.

Page 42: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap42

ta field value. For

rs in the xPresso

ppears.

ment Sciences Corporation

ter 3 - Creating an xPresso Document

• If the field value is not null:

– Show the first instance whose field value matches the data’s field value.

– If no instance matches, show the instance specified as the default.

– If there is no default instance, turn off the content group.

For non-string fields, the content instance field value must be the same type as the danon-string fields, xPresso for Dreamweaver resolves switch criteria in this way:

• Show the first instance whose field value matches the data’s field value.

• If no instance matches, show the instance specified as the default.

• If there is no default instance, turn off the content group.

To define Switch criteria:

1. Select the content group in the Schematic. The content group’s information appeaSchematic Attribute area, at the bottom of the Schematic panel.

2. Select Simple Switch from the Selection Type drop-down list.

3. Click the browse button next to the Logic field. The Switch Condition dialog box a

Figure 32. The Switch Condition dialog box enables you to select a field variable and then define the values for inclusion for each content item.

Page 43: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap43

ck OK.

ld in order for that

instance as the

riteria and define to a value or a

rs in the xPresso

ment Sciences Corporation

ter 3 - Creating an xPresso Document

4. Click the browse button next to Variable. The Select Variable dialog box appears.

5. Select the field that you want to use to control the inclusion of this content and cli

6. Type the value next to each content instance that should appear in the selected fiecontent instance to be included in the output.

7. (Optional) Select the check box to the right of the value box to define that contentdefault instance. You can only define one instance as the default.

8. Click Insert. Repeat Steps 4-8 for each instance.

9. Click OK.

Defining If-Else CriteriaIf your criteria needs to be more than a simple true or false switch test, use an If-Else ca condition expression. In the If-Else expression, you can select variables to comparefield, and use Boolean operators to combine criteria statements.

To define your criteria:

1. Select the content group in the Schematic. The content group's information appeaSchematic Attribute area, at the bottom of the Schematic panel.

2. Select Multiple If-Else from the Selection Type drop-down list.

Figure 33. For content group properties, you can change the name or selection type of the content group, or define selection logic or On/Off criteria.

Page 44: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap44

teria. The content ttom of the

appears.

t Variable dialog

, Greater than or an (>).

ment Sciences Corporation

ter 3 - Creating an xPresso Document

3. Select a content instance within the content group for which you want to define criinstance’s information appears in the xPresso Schematic Attribute area, at the boSchematic panel.

4. Click the browse button next to the Logic field. The If-Else Expression dialog box

5. Click Add Row, then create your criteria expression.

– To add a variable: Click the browse button under Variable to open the Selecbox. Select the variable you want to add from the list and click OK.

– To add an operator: Select an operator from the Is drop-down list: Equal (=)Equal (>=), Less than or Equal (<=), Not Equal (<>), Less than (<), Greater th

Figure 34. For content instance properties, you can change the name of the instance, or you can define selection logic.

Figure 35. The If-Else Expression dialog box enables you to build an expression that defines the criteria for inclusion of an item.

Page 45: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap45

ct Variable dialog

xpression.

r All to clear the

the Variable

it.

On/Off field for box appears.

ment Sciences Corporation

ter 3 - Creating an xPresso Document

– To add a value: Click Value and type the value in the text box.

– To add a field: Click Field, and then click the browse button to open the Selebox. Select the variable you want to add from the list and click OK.

– Click the (, ), AND, and OR buttons to add the appropriate operators to your e

Note: If you are comparing date values, the value must be in YYYY-MM-DD format.

6. Click Insert to add the criteria expression to the list.

7. (Optional) Click Clear Row to clear the contents of the selected row, or click Cleacontents of all the rows in the dialog box.

8. Click OK when you are done defining your criteria expression and you’ll return to Definition panel.

9. Click Save on the Variable Definition panel to add the expression.

10. Repeat for each content instance in the content group.

Editing Existing CriteriaIf you need to make changes to existing criteria, you can edit the criteria.

To edit existing criteria:

1. Select the item in the xPresso Schematic that contains the criteria you want to ed

2. Click the browse button next to the Logic field for If-Else or Switch criteria, or theOn/Off criteria. The On/Off Criteria, Switch Condition, or If-Else Expression dialog

3. Make your changes to the criteria expression.

4. Click OK.

Page 46: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap46

Bueasy-to-read ed, and have a dynamic table in

able variables are t in your table.

the values in your the same parent

te the table gives to which columns be in the same sense it enables cture for

about creating a

your document, o select rows of a

ment Sciences Corporation

ter 3 - Creating an xPresso Document

ilding Dynamic TablesDynamic tables are a great visual way to include information in your document, in an format. Dynamic tables grow and shrink according to the amount of data to be displaydifferent number of rows for each record in your data. There are two ways to include ayour document:

• Use an array to create a table variable.

• Create a static table in Dreamweaver and applying content loops to the rows.

Using a table variable is a simple and effective way to add a table to your document. Tgood to use when your data structure matches closely the rows and columns you wanYou can select and re-order columns to make them appear as you want them too. All variable data show up in the table. All the data in your table variable must come from data field.

Creating a table in Dreamweaver, and then assigning content loops to rows to populayou more control over the format and content flow. You can choose which fields go inor rows (since you can loop on multiple rows). You can also include data that may notparent data field in the same table, since you can create multiple loops in a table. In ayou to map fields that may be in a different order and in different rows into a table strupublishing.

For more information about creating table variables, see Arrays. For more informationdynamic table using a Dreamweaver table and content loops, read on.

Creating a Content LoopIf you have information in your data that you want to loop through to create content inyou can add a content loop in xPresso for Dreamweaver. A content loop enables you ttable and create a content loop to populate those rows.

Page 47: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap47

o your document n on the

able cells with have multiple

aver Table menu.

need to have mweaver will add er rows.

ment Sciences Corporation

ter 3 - Creating an xPresso Document

The first step in using table content loops to create a dynamic table is to add a table tusing Dreamweaver table functionality. Once your table is placed in the correct locatiodocument page, you can start adding the variables to the table that will populate the tdata. Then you can select a row, or multiple rows, and assign a content loop. You canrows in one content loop, and you can have multiple content loops in your table.

To create a content loop dynamic table:

1. Place a table in your document using the Insert Table command on the DreamweThe Insert Table dialog box appears.

2. Select the number of body rows you need to create your loop, or loops. You don’tenough rows in your table to accommodate the generated data, xPresso for Drearows as need for all the data. Select the number of columns, and header and foot

Figure 36. The basis for your dynamic table is a Dreamweaver table.

Figure 37. This is an example of a basic table in Design view.

Page 48: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap48

table.

have the headers eate the table

ment Sciences Corporation

ter 3 - Creating an xPresso Document

3. Place the cursor in the first cell of the third row and click Insert Text Variable.

4. Place variables from the Variable Definition panel into the appropriate cells in the

5. Add your column headers, and any footers that you need to your table. Once you and variable content laid out in your table to your satisfaction, you are ready to crcontent loop, or loops.

Figure 38. Select the variable that you want to loop from the array.

Figure 39. Here we have added variables to our static table.

Figure 40. Here we’ve added column headers to our table.

Page 49: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap49

ith the loop.

L table tag.

ment Sciences Corporation

ter 3 - Creating an xPresso Document

6. Select the row, or multiple rows, that you want included in the loop.

7. Click Add Content Loop and select the variable array that you want associated w

8. Switch to Code View and note how xPresso has added a loop tag inside the HTM

Figure 41. This shows the selection of a row that we want to loop.

Figure 42. Select the variable array that contains the data that will populate your selected table rows.

Figure 43. An xPresso loop tag in place.

Page 50: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap50

lect Apply

ome of the

ment Sciences Corporation

ter 3 - Creating an xPresso Document

9. Test your table by applying some data. Click the Variable Definition menu and seVariable Data. Select a data file and click Load.

10. Your table should be expanded and populated with data from your data file.

Contrast this table to the type of table created from an array, and you’ll begin to see sflexibility an xPresso content loop can offer.

Figure 44. Click Load to resolve you document. The page will appear in a new tab in Dreamweaver.

Figure 45. This is the sample table populated with variable data.

Page 51: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap51

Pace xPresso for ver. After the hanges to the ange in xPresso For more

lishing engine to thumbnail of the

og box appears.

uld be accessible that is accessible

characters:

ment Sciences Corporation

ter 3 - Creating an xPresso Document

kaging Your DocumentBefore a document can be published through xDashboard, it must be packaged on thDreamweaver client computer, and saved to a location accessible from the xPRS Serdocument resides on the server, you can publish the document. You can’t make any cdocument on the server. If you have to change your document, you must make the chfor Dreamweaver, repackage it, and then deploy the updated version in xDashboard. information on document deployment, see the xDashboard User Guide.

An xPRS document package contains all the information necessary for the xPRS pubpublish the document, including the HTML document, assembly logic, the schema, a document, and a few other files required by the publishing engine.

To package a document:

1. Open the document in xPresso for Dreamweaver.

2. On the xPresso insert bar, click Create Package. The Create xPRS package dial

3. Navigate to the directory where you want to store your package. This directory shofrom the xPRS Server. If it isn’t, you'll need to move the package file to a directorybefore you can deploy it on the server and publish it.

4. Type a file name for your package. Package file names can’t contain the following

& ^ = # @ $ % ‘ * , / ? \ “ + | { } < > ; :

Page 52: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap52

ployment on the

ate a package. If esso Tag

ment Sciences Corporation

ter 3 - Creating an xPresso Document

5. Click OK. Once the packaging process completes, your document is ready for dexPRS Server, where it can be published through xDashboard.

6. xPresso for Dreamweaver automatically runs its tag validation utility when you creit encounters an error, you’ll receive this message. For more information, see xPrValidation.

Figure 46. You’ll get this message if your package was created successfully.

Figure 47. Follow the troubleshooting information in this message to correct the error.

Page 53: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

53

ChaUs

nt, tables, and rsonalize each ation pertinent

ment Sciences Corporation

pter 4ing Variables

Adding variables and variable arrays to your document enables you to control the conteimages that are included in the output you create. This kind of flexibility allows you to pedocument for the intended recipient. You can streamline your message to include informonly to the specific individual receiving the document.

This chapter includes these topics:

• A Little Bit About Variables

• Working With Variables

• Placing Image Variables in Your Document

• Working With Variable Hyperlinks

• Arrays

• Creating Variable Expressions

• Viewing Variable Data in Your Document

Page 54: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap54

A Lon panel works mage variables, s, content loops,

ld as your lculations in your

on the document

Wo based. Text ipient’s name and

ment Sciences Corporation

ter 4 - Using Variables

ittle Bit About VariablesVariables are created and stored in the Variable Definition panel. The Variable Definititogether with the Data Schema panel and enables you to create and define text and iand arrays for use in your document. Arrays can be used when creating table variableand page loops.

You can create a variable from scratch, or if you simply want to use a schema data fievariable, you can easily create a variable by selecting the field. You can also include cavariables by using functions and building expressions.

To use a variable in your document, you must first create it, define it, and then place itpage.

rking With VariablesVariables are created in the Variable Definition panel, and can be either text or imagevariables are used to insert personal information into your document, such as the recaddress.

Figure 48. This figures shows text variables as they appear in the Schematic, and on the document page.

Page 55: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap55

me, or String.

pply data to your ver generates an

. Image variables on the data. Your ath defined in the

ld from your

field in the Data m Schema. If th information for me of the data

a of the panel to ew field. Ensure variable in the

ment Sciences Corporation

ter 4 - Using Variables

Text variables can be Numeric (Float, Double, Boolean, Decimal), Data, Time, DateTiDate, Time, and DateTime fields must appear in your data in a certain format:

• Date: yyyy-mm-dd (for example: 2003-05-19)

• Time: hh:mm:ss (for example: 11:22:50)

• DateTime: yyyy-mm-ddThh:mm:ss (for example: 2002-01-05T03:15:30)

Note: If the data type for your variable is numeric, its value can’t be null. If you try to adocument that contains a null value for a numeric type variable, xPresso for Dreamweaerror.

Images used in graphic-rich e-mails are typically stored in a location on a Web serverenable you to include an external image in your document, which can differ dependingdata contains the image name and path, the image variable pulls the image from the pdata, and places it on the document page.

Creating VariablesYou can create text and image variables in either of two ways. You can use a data fieschema as your variable starting point, or your can create a variable from scratch:

• If you want to use a data field in your schema as a starting point, simply select theSchema panel, click the Variable Definition menu and select Define Variable froyou are creating an image variable, ensure that the field you select contains the pathe image. The variable appears in the Variable Definition panel with the same nafield.

Note: If you select a data field in the Data Schema panel, and then select a blank are“clear” your selection, the panel will still consider the field selected until you select a nthat you have the correct field in the Data Schema panel selected before you create aVariable Definition panel.

Page 56: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap56

nd select Define “New Variable”.

e the variable

ears in the

ariable’s name.

ment Sciences Corporation

ter 4 - Using Variables

• If you want to create a variable from scratch, click the Variable Definition menu aVariable. A variable appears at the bottom of the Variable Definition panel namedYou will define the content of the variable in the next step.

Defining Variable AttributesAfter you create the text or image variable in the Variable Definition panel, you can usproperties area at the bottom of the panel to define the variable’s attributes.

To define your variable:

1. Select the variable in the Variable Definition panel. The variable’s information appvariable properties area.

2. Type a name for the variable in the Name field, if necessary.

Note: Once you use a variable in your document, or in criteria, you can’t change the v

3. Select the value type for this variable from the drop-down list.

4. Select the mapping type for this variable: Schema Field, or Expression.

Figure 49. Choose a value type from the list.

Page 57: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap57

in Step 4, the o use to populate

ment Sciences Corporation

ter 4 - Using Variables

5. Click the browse button next to the Mapping field. If you selected Schema Field Select Schema Field dialog box appears. Select the data schema that you want tthis variable, and click OK. Skip to Step 7.

Figure 50. The Select Schema field dialog box lists all the fields in your schema.

Page 58: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap58

.

our expression,

in the list to see a lick a function in

expression.

Creating Variable

ment Sciences Corporation

ter 4 - Using Variables

If you selected Expression in Step 4, the Variable Expression dialog box appears

6. Type your expression in the box at the top of the dialog box. To help you create yyou can:

– Select a function type to see the functions that are available. Click a function description of the function in the box at the bottom of the dialog box. Double-cthe list to have it appear in the expression box where you can edit it.

– Click Select Schema Field to select a field from your schema to use in your – Click Verify to verify that the expression is valid.

7. Click OK when you are done creating your expression. For more information, see Expressions.

Figure 51. The Variable Expression dialog box contains tools and options to help you construct an expression for your variable.

Page 59: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap59

ng the Insert Text tion of the cursor,

ble to appear.

e document page

using the Insert

ble to appear.

ment Sciences Corporation

ter 4 - Using Variables

Placing Text Variables in Your DocumentTo get a text variable from the Variable Definition panel to your document you’ll be usiVariable button on the xPresso insert bar. The variable appears on the page at the locaand also appears in the Schematic.

To place a text variable:

1. Place your cursor on the document page in the location where you want the varia

2. Click Insert Text Variable.

3. Select the appropriate variable from the Variable Definition panel and click OK.

4. The variable appears in the Schematic under the Global Variable Folder, and on that the location of the cursor.

Placing Image Variables in Your DocumentTo get an image variable from the Variable Definition panel to your document you’ll beImage Variable button on the xPresso insert bar.

To place an image variable:

1. Place your cursor on the document page in the location where you want the varia

2. Click Insert Image Variable.

Figure 52. The Insert Image Variable dialog box enables you select the image variable that you want to place in the document.

Page 60: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap60

ge variable.

here is placed in

ment Sciences Corporation

ter 4 - Using Variables

3. Click the browse button, then select the variable you want associated with the ima

4. Click OK. The variable appears in the Link field.

5. Click OK.

6. An image placeholder icon appears on the page, and code similar to what’s shownthe HTML.

Figure 53. Ensure that you select the variable that contains the path to the image.

Figure 54. An example of a selected image variable.

Figure 55. An example of image variable code.

Page 61: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap61

which you can you associate ata file. If a value licate file names, e characters: \, /,

log box appears.

n doing the se the property in ormation, see the

ment Sciences Corporation

ter 4 - Using Variables

Defining a Variable as a Document PropertyYou can associate an existing variable to a document property within your document,then define later as an output variable on the xPRS Server. Ensure that any variableswith a document property resolve to values that will be unique for each record in the dis not unique, and you use it in an output file naming convention, you risk creating dupwhich will generate an error. Also make sure that the value doesn’t include any of thes:, *, ?, “, <, >, |.

To define a variable as a document property:

1. On the xPresso Insert bar, click Document Property. The Document Property dia

2. In the Name field, type the name of the document property you are defining.

Tip: You’ll need to remember this name for publishing, or communicate it to the persopublishing. There is no list in xDashboard to choose the document property from. To uthe xDashboard file naming template, you must type {$PropertyName}. For more infxPRS xDashboard User Guide.

Figure 56. If you need to remove an existing property, select it and click Remove.

Page 62: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap62

log box.

lick OK.

ver.

ment Sciences Corporation

ter 4 - Using Variables

3. Click the browse button next to Value to open the xPresso Variable Definition dia

4. Select the variable that you want to associate with your document property and c

5. The variable appears in the Document Property Value box. Click Insert.

6. Click Save. The document property will now be available to you on the xPRS Ser

Figure 57. This dialog box displays the variables contained in the document.

Figure 58. Once you click Insert, the new document property appears in the list.

Page 63: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap63

Wou can add es.

riable button on

rlink to appear.

lso add variables omized web site. riable you want

by the UniqueID

ment Sciences Corporation

ter 4 - Using Variables

rking With Variable HyperlinksxPresso for Dreamweaver enables you to create hyperlinks that contain variables. Yovariables to create links to such things as dynamically generated Web sites or PDF fil

Placing Variable Hyperlinks in Your DocumentTo place a variable hyperlink in your document you’ll be using the Insert Hyperlink Vathe xPresso insert bar.

To place a variable hyperlink:

1. Place your cursor on the document page in the location where you want the hype

2. Click Insert Hyperlink Variable.

3. Type the link text for the hyperlink. This could be the URL to a web site. You can ain the link text, such as a customer number that would complete the link to a custTo add a variable, click the browse button next to the Link field, then select the vaadded to the link. For example, this link opens a customized web page identified variable in the data:

http://www.docscience.com/demo/xpresso/images/custompage{UniqueID}.html

Figure 59. The Insert HyperLink Variable dialog box enables you to define the link for the variable, and the text that you want to appear on the document page for the link.

Page 64: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap64

ent.

e HTML.

ment Sciences Corporation

ter 4 - Using Variables

4. In the Title field, type the text that you want to appear as a hyperlink in the docum

5. Click OK. The text you typed in the Title field appears on the page like this, , and code similar to what’s shown here is placed in th

Figure 60. This shows a completed hyperlink variable definition.

Figure 61. An example of a hyperlink variable in code view.

Page 65: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap65

Arrreate an array nd include fields

to create an array variables, and to

ble in the

g Dreamweaver’s

ment Sciences Corporation

ter 4 - Using Variables

aysAn array is a parent data field that contains child fields (called array items). You can cdirectly from a parent field in your data schema, or you can create one from scratch, athat appear any where in the schema to be array items of the array. This enables you using fields that appear in different areas of the schema. Arrays can be used as tabledrive content loops.

When you place an array on the page, xPresso for Dreamweaver always creates a tadocument with the information contained in the array’s child fields.

Once you place a table variable, you can format the table for better visual appeal usintable formatting options.

Figure 62. Here is a table variable as it appears in the Schematic, and on the document page.

Page 66: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap66

r schema as your

e field in the Data Schema. The t data field.

ma panel, and menu, and select ame name as the

d select Define w Variable”.

n panel, click the der the array

erties area at the

riable properties

g box appears. k OK.

ment Sciences Corporation

ter 4 - Using Variables

Creating ArraysYou can create an array in either of two ways. You can use a parent data field from youvariable starting point, or your can create the array from scratch:

• If you want to use a parent data field in your schema as an array, simply select thSchema panel, click the Variable Definition menu and select Define Array fromvariable appears in the Variable Definition panel with the same name as the paren

If you want to add a child field to your array, select the child field in the Data Schethen select the array in the Variable Definition panel. Click the Variable DefinitionDefine Array Item from Schema. A new item appears under the array with the sselected child field.

• If you want to create an array from scratch, click the Variable Definition menu anArray. An array appears at the bottom of the Variable Definition panel named “Ne

If you want to add a child field to your array, select the array in the Variable DefinitioVariable Definition menu, and select Define Array Item. A new item appears unnamed “New Item”.

Defining Your Array AttributesAfter you create an array in the Variable Definition panel, you can use the variable propbottom of the panel to define the attributes of the array.

To define your array:

1. Select the array in the Variable Definition panel. The information appears in the vaarea.

2. Type a name for the array in the Name field, if necessary.

3. Click the browse button next to the Mapping field. The Select Schema Field dialoSelect the parent data field that you want to use to populate this variable, and clic

Page 67: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap67

le properties area

he variable

ment Sciences Corporation

ter 4 - Using Variables

Defining Your Array Item AttributesAfter you create an array item in the Variable Definition panel, you can use the variabat the bottom of the panel to define the attributes of the item.

To define your array item:

1. Select the array item in the Variable Definition panel. The information appears in tproperties area.

2. Type a name for the array item in the Name field, if necessary.

3. Select the value type for this variable from the drop-down list.

4. Select the mapping type for this array item: Schema Field, or Expression.

Figure 63. Choose a value type from the list.

Figure 64. Choose Schema Field or Expression.

Page 68: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap68

dialog box

og box appears.

ment Sciences Corporation

ter 4 - Using Variables

5. Click the browse button next to the Mapping field.

– If you selected Schema Field in the previous step, the xPresso Schema Fieldappears.

– If you selected Expression in the previous step, the Variable Expression dial

Figure 65. Select the data schema that you want to use to populate this array item, and click OK.

Figure 66. The Variable Expression dialog box contains tools and options to help you construct an expression for your array item.

Page 69: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap69

our expression,

in the list to see a

expression.

Creating Variable

nd create a table

ge at the location

ment Sciences Corporation

ter 4 - Using Variables

6. Type your expression in the box at the top of the dialog box. To help you create yyou can:

– Select a function type to see the functions that are available. Click a function description of the function in the box at the bottom of the dialog box.

– Click Select Schema Field to select a field from your schema to use in your

– Click Verify to verify that the expression is valid.

Click OK when you are done creating your expression. For more information, see Expressions.

Placing Table Variables in Your DocumentNow that you have created and defined an array, you can place it in your document avariable.

To place an array as a table variable:

1. Place your cursor on the page in the location where you want the table to appear.

2. Click Add Content Table.

3. Select an array from the Variable Definition panel and click OK.

4. The variable appears in the Schematic, and the table appears on the document paof the cursor.

Figure 67. A table variable as it appears on the document page.

Page 70: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap70

e table to meet

L table tag.

Creting data field, or sion means you data fields, you cument output.

on page 71), and then clicking

ment Sciences Corporation

ter 4 - Using Variables

5. You can use Dreamweaver’s full array of HTML table formatting tools to modify thyour requirements.

6. Switch to Code View and note how xPresso has added a loop tag inside the HTM

ating Variable ExpressionsWhen you create a variable or an array item, you have the option of selecting an exisdefining an expression to be associated with it. Having the option to define an exprescan have your variable represent much more than just a data field. You can compare can do calculations, and you can use functions and have the result appear in your doThis gives you a lot of flexibility.

All expressions are created in the Variable Expression dialog box (shown in Figure 69which you can access by selecting Expression for the Mapping Type of the variable,the browse button next to Mapping in the variable attributes area.

Figure 68. An xPresso loop tag in place.

Page 71: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap71

lds and functions than), >= (greater be defined in one

ment Sciences Corporation

ter 4 - Using Variables

The box at the top is where you construct your expression. You can include schema fiein your expression, and use the following Boolean operators: > (greater than), < (less than or equal to), <= (less than or equal to), and != (not equal to). Expressions should of the following formats:

if((3-2)!=(5-8)) return true; else return false;

if(Xpath("/root/campaign/fullname")=="abc") return false; else return true;

Or, you can input true or false as a Boolean value.

The following example is not valid:

(3-2)!=(5-8)

Figure 69. The Variable Expression dialog box contains tools and options to help you construct an expression for your variable.

Page 72: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap72

sion box, the e expression that

or example:

he field from the t:

talAmountDue”,

ment Sciences Corporation

ter 4 - Using Variables

Note: If your expression is longer than what fits on the first line of the variable expresexpression will not break to the next line, and you will only be able to see the part of thfits on the first line. The entire expression will be processed.

You can also perform the following calculations in your expression:

integer + integer, float, or doubleinteger - integer, float, or doubleinteger * integer, float or doubleinteger / float or doubleinteger % float or doublefloat + float or doublefloat - float or doublefloat * float or doublefloat / float or doublefloat % float or doubledouble + doubledouble - doubledouble * doubledouble % doublestring + string

Note: You must type an “f” along with any float value you are using in a calculation. F

Xpath(“/Power/Pay/Price”)*0.15f-(1.0f/3.0f)*1600

Schema FieldsTo include a schema field in your expression, click Select Schema Field and select tSelect Schema Field dialog box. The selected field appears in the box with this forma

Xpath("/DataPath/FieldName")

You can then add an operator if you wish. For example, to create a variable called “Towe might specify:

Xpath("/Power/Pay/BalanceForward")+Xpath("/Power/Pay/AmtDue")

Page 73: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap73

hat are available: time Functions. of the dialog box. edit it. For

For example, to

d that it is a valid box under the

ment Sciences Corporation

ter 4 - Using Variables

FunctionsTo include a function in your expression, first click a radio button to see the functions tNumber Functions, Logic Functions, Group Functions, String Functions, or DateYou can click on a function in the list to see a description of the function at the bottom Double-click a function in the list and it appears in the expression box where you can example:

addDay( datetime_or_date_value , numeric_value )

Select each argument and replace it by selecting a schema field or by typing a value.create a variable called “DatePastDue”, we might specify:

addDay(Xpath("/Power/GenlInfo/DateDue"), 7)

For more information on the individual functions available, see Expression Functions.

Verifying Your ExpressionOnce you complete your expression, you should verify it to ensure that it will work, anexpression. To verify your expression, click Verify. A message appears on the dialog expression box to let you know the verification results.

Page 74: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap74

Viet works and looks tisfy criteria that nd variable parts Definition panel.

ment Sciences Corporation

ter 4 - Using Variables

wing Variable Data in Your DocumentYou can apply variable data to your document so that you can see how your documenusing real data. The variable data will not only populate your variables, but will also sacontrols the inclusion of your dynamic content. This enables you to test the dynamic aof your document. Applying data to your entire document is done through the Variable

To load a variable data file:

1. Click the Variable Definition menu and select Apply Variable Data.

2. Browse and select the variable data file and click Open.

Figure 70. Use the scrolling arrows to move through the records in the data file.

Page 75: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap75

in the image

t and displays it in

esso panels.

ment Sciences Corporation

ter 4 - Using Variables

3. Use the scrolling arrows to choose a record and click Load. The variables shownbelow will be replaced as shown in Figure 72.

4. xPresso for Dreamweaver applies the selected variable data file to your documena new tab in your work space.

Note: When applying variable data to a document, Dreamweaver closes all of the xPrWhen you’re finished, you’ll need to reopen them from the xPresso menu.

Figure 71. The highlighted variables will be replaced with customer data.

Figure 72. The same document after data application. Note how the “Flight Recommendation” table has expanded.

Page 76: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap76

e your e-mail

il message.

in the “From

mn of most

ment Sciences Corporation

ter 4 - Using Variables

Using the Send E-Mail UtilityxPresso for Dreamweaver enables you to further test your prototype documents to ussystem to send test messages.

The Send Email dialog box contains these settings.

Figure 73. The Send Email configuration dialog box.

Field Definition

From Address Your e-mail address, or the e-mail address of the entity sending the e-ma

To Address The e-mail address of your intended recipient.

Reply to If you want the recipient to reply to a different address than the one givenAddress” field, enter it here.

Subject The title of the e-mail message. This text will appear in the “Subject” colue-mail programs.

Page 77: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Chap77

Prerd in the data file

s. When you’re ment that

eview.

f placing the

ment Sciences Corporation

ter 4 - Using Variables

viewing Your WorkThe Preview function enables you to view your document, with data from the first recoapplied, in your default Web browser.

To see a preview of your work:

1. Click the Variable Definition menu and select Preview.

2. Browse and select the variable data file and click Open.

3. Your design will appear in your Web browser.

Note: (1) When Dreamweaver generates a preview, it closes all of the xPresso panelfinished, you’ll need to reopen them from the xPresso menu. (2) If you preview a docucontains images that are referenced by static links, the images won’t appear in the pr

SMTP Server IP Address

Contact your system administrator for this setting.

Send as Attachment

Select this option to attach the document to the e-mail message, instead odocument inside of the e-mail message.

Field Definition

Page 78: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

78

AppxP

require. This

ment Sciences Corporation

endix A resso Tag Specifications

xPresso for Dreamweaver allows you to hand-code portions of your documents, as you appendix describes the common attributes of the xPresso tag.

This chapter includes these topics:

• General xPresso Tag Attributes

• Group Tag Attributes

• Content Tag Attributes

• Text Tag Attributes

• Loop Tag Attributes

• VarDef Tag Attributes

• TableDef Tag Attributes

Page 79: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Appe79

Ge

Syn

ut not including

ment Sciences Corporation

ndix A - xPresso Tag Specifications

neral xPresso Tag AttributesAll xPresso tags have these attributes. All values are wrapped with quotation marks.

tax xPresso type="value" id="integer" name="value"

type

The type of xPresso tag. Possible values are:

• group

• instance

• text

• loop

id

This must have an integer value. This value must be unique from other xPresso tag, bvariable tag.

name

This must be an alphanumeric value.

Page 80: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Appe80

Grot instance tags.

Syn alue"

includes variable uch as "name" == should be valid r, it need to be ction logic

ment Sciences Corporation

ndix A - xPresso Tag Specifications

up Tag AttributesContent group tags, group, must include child tags, and the child tags must be contenContent group tags have these additional attributes.

tax <xPresso type="group" id="integer" name="value" selecttype="value" logic="vonoff=value>

selecttype

Required values are:

• ifelse

• switch

logic

This can be left blank.

• If selectype=switch, this value can only be the name of a variable.

• If selecttype=ifelse, this value must be left blank.

onoff

This can be left blank. Value should be a valid expression. A valid expression means itname and operator and a value, also it can include "and" or "or" for multi conditions, s"Victor" and age > 30 or "address" == "{name}". In which name and address and age variable name from VarDefs tags. If the variable name appear at right side of operatowrapped with "{}". For custom tag validation function, it also needs to check from selevalidation function.

Page 81: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Appe81

tional" sso></xPresso>

off=""name"==" "'></xPresso></

Co

Syn

valid value for the logic is blank, this

EK"' ></xPresso>

ment Sciences Corporation

ndix A - xPresso Tag Specifications

Examples

<xPresso type="group" id="14" name="CSS" selecttype="switch" logic="internaonoff=""><xPresso type="instance" id="15" name="general" logic="PEK"></xPre

<xPresso type="group" id="16" name="banner" selecttype="ifelse" logic="" ontest""><xPresso type="instance" id="17" name="general" logic='"name"=="testxPresso>

ntent Tag AttributesThe instance tag must have parent tag and must be content group.

tax <xPresso type="instance" id="integer" name="value" logic="value"></xPresso>

logic

Value depends on its parent group’s selecttype.

• If selecttype=switch, and if the group's logic is not blank, this value need to be a variable type, only for string type variable, this value could be blank. If the group's value must be blank.

• If the selecttype=ifelse, this value could be blank, or a valid expression.

Examples

• <xPresso type="instance" id="15" name="general" logic="PEK"></xPresso>

• <xPresso type="instance" id="19" name="general" logic='"international"=="P

Page 82: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Appe82

Text have any child .

Syn ger"></xPresso>

id="4">{desc}</

Loo have any child

Syn id="integer"></

ment Sciences Corporation

ndix A - xPresso Tag Specifications

t Tag AttributesFor text tag, its parent tag could be content instance or loop or outer group and it can'tag. And the inner HTML of text variable should have "{}" to wrap the variable's name

tax <xPresso type="text" id="integer" name="name" variable="tag_name" vid="inte

variable

The VarDef tag name.

vid

The ID number of the VarDef tag.

Example

<xPresso type="text" id="9" name="destination" type="text" variable="desc" vxPresso>

p Tag AttributesFor loop tag, its parent tag could be content instance or loop or outer group and it cantag.

tax <xPresso type="loop" id="integer" name="name" variable="TableDef Tag Name" vxPresso>

variable

This value must be the TableDef tag name.

vid

This value must be the ID number of the TableDef tag.

Page 83: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Appe83

esso>

Varust be wrapped

Syn alue"

ment Sciences Corporation

ndix A - xPresso Tag Specifications

Example

<xPresso type="loop" id="10" name="triptable" variable="trip" vid="7"></xPr

Def Tag AttributesFor VarDef tag, its parent tag must be VarDefs and it has some attributes. All values mquotation marks.

tax <VarDef name="name" id="integer" type="value" expType="value" expression="vposition="integer"></VarDef>

name

Must be a unique name.

id

This must have an integer value, and the value must unique from other VarDef tags.

type

Required values are:

• string

• integer

• double

• float

• date

• time

• dateTime

Page 84: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Appe84

on="/root/

Tabs and it has some

Syn tion="integer">

bleDef tags.

ment Sciences Corporation

ndix A - xPresso Tag Specifications

expType

Required values are:

• schema

• expression

expression

Required value must be an Xpath value of schema or an expression.

position

Required integer value is the sort number of the VarDef tag.

Example

<VarDef name="international" id="1" type="string" expType="schema" expressicampaign/city/international" position="2"></VarDef>

leDef Tag AttributesFor TableDef tag, its parent tag must be TableDefs and it can include some VarDef tagattributes. All values must be wrapped quotation marks.

tax <TableDef name="name" id="integer" expType="schema" expression="value" posi</TableDef>

name

This must have a value, and it need to be unique from other TableDef tags.

id

This must have an integer value, and the value must unique from other VarDef and Ta

Page 85: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Appe85

commendations/

/campaign/

ment Sciences Corporation

ndix A - xPresso Tag Specifications

expType="schema"

The required value is "schema".

expression

This must have a value, which must be an xpath value of schema.

position

This must have an integer value, which is the sort number of variable tags.

Example

<TableDef><TableDef name="region" id="6" expType="schema" expression="/root/campaign/recommendations/region" position="6"></TableDef>

<TableDef name="trip" id="7" expType="schema" expression="/root/campaign/reregion/trip" position="8">

<VarDef name="date" id="8" type="string" expType="schema" expression="/rootrecommendations/region/trip/date" position="9"></VarDef></TableDef></TableDefs>

Page 86: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

86

AppEx

iable definitions. herwise noted,

ment Sciences Corporation

endix B pression Functions

When creating variables in xPresso for Dreamweaver, you can use functions in your varThis chapter describes the functions available for use in variable expressions. Unless otfunctions can use a literal or a schema field as an argument.

This chapter includes these topics:

• Numeric Functions

• Logic Functions

• Group Functions

• String Functions

• Datetime, Date, and Time Functions

Page 87: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Appe87

Numeric functions

a double value.

Syn

s a double value.

Synhan

ment Sciences Corporation

ndix B - Expression Functions

meric FunctionsThe following numeric functions can be used when creating a variable expression. Nucan’t use schema fields or xPaths in their arguments; they only accept numeric input.

absThe abs function accepts a double value for the numeric_value argument, and returns

tax abs(numeric_value)

Returns the absolute value of numeric_value.

Example: abs(-2)Returns: 2

floorThe floor function accepts a double value for the numeric_value argument, and return

tax floor(numeric_value)

Returns the largest (closest to positive infinity) floating-point value that is not greater tnumeric_value and is equal to a mathematical integer.

Example: floor(2.3)Returns: 2

Page 88: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Appe88

a double value.

Synan numeric_value

ns a double value.

Syn

d returns an

Syn

ment Sciences Corporation

ndix B - Expression Functions

ceilThe ceil function accepts a double value for the numeric_value argument, and returns

tax ceil (numeric_value)

Returns the smallest (closest to negative infinity) floating-point value that is not less thand is equal to a mathematical integer.

Example: ceil(2.3)Returns: 3

roundThe round function accepts a double value for the numeric_value argument, and retur

tax round(numeric_value)

Returns an integer number.

Example: round(1.678)Returns: 2

stringToIntegerThe stringToInterger function accepts a string value for the string_value argument, aninteger value.

tax stringToInteger(string_value)

Converts the integer value of string_value.

Example: stringToInteger(“124”)Returns: 124

Page 89: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Appe89

Log

GroThe following

eturns an integer

Syn

schema field with ent/

ment Sciences Corporation

ndix B - Expression Functions

ic FunctionsThe following logic functions can be used when creating a variable expression.

false

Logical constant.

true

Logical constant.

up FunctionsGroup functions can’t use literals in their arguments; they only accept schema fields. group functions can be used when creating a variable expression.

groupCountThe groupCount function accepts an XML field for the schema_scope argument and rvalue.

tax groupCount(schema_scope)

Returns the total number of records in schema_scope.

In the following example, Xpath(“/portfolioStatement/QuarterPeriod/InvestmentA”) is aa value type of integer, and values of 1,000, 2,000, and 4,000. Xpath(“/portfolioStatemQuarterPeriod”) is the scope.

Example: groupCount(Xpath("/portfolioStatement/QuarterPeriod/InvestmentA"))Returns: 3

Page 90: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Appe90

cope arguments,

Syn

schema field with ent/

h(“/

cope arguments,

Syn

schema field with ent/

h(“/

ment Sciences Corporation

ndix B - Expression Functions

groupSumThe groupSum function accepts an XML field for both the schema_field and schema_sand returns a value of the same type as schema_field.

tax groupSum(schema_field, schema_scope)

Returns summation of schema_field in schema_scope.

In the following example, Xpath(“/portfolioStatement/QuarterPeriod/InvestmentA”) is aa value type of integer, and values of 1,000, 2,000, and 4,000. Xpath(“/portfolioStatemQuarterPeriod”) is the scope.

Example: groupSum(Xpath(“/portfolioStatement/QuarterPeriod/InvestmentA”),XpatportfolioStatement/QuarterPeriod”))Returns: 7,000

groupMaxThe groupMax function accepts an XML field for both the schema_field and schema_sand returns a value of the same type as schema_field.

tax groupMax(schema_field, schema_scope)

Returns the maximum value of schema_field in schema_scope.

In the following example, Xpath(“/portfolioStatement/QuarterPeriod/InvestmentA”) is aa value type of integer, and values of 1,000, 2,000, and 4,000. Xpath(“/portfolioStatemQuarterPeriod”) is the scope.

Example: groupMax(Xpath(“/portfolioStatement/QuarterPeriod/InvestmentA”),XpatportfolioStatement/QuarterPeriod”))Returns: 4,000

Page 91: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Appe91

cope arguments,

Syn

schema field with ent/

h(“/

Str

a string value.

Syn

alue of

ment Sciences Corporation

ndix B - Expression Functions

groupMinThe groupMin function accepts an XML field for both the schema_field and schema_sand returns a value of the same type as schema_field.

tax groupMin(schema_field, schema_scope)

Returns the minimal value of schema_field in schema_scope.

In the following example, Xpath(“/portfolioStatement/QuarterPeriod/InvestmentA”) is aa value type of integer, and values of 1,000, 2,000, and 4,000. Xpath(“/portfolioStatemQuarterPeriod”) is the scope.

Example: groupMin(Xpath(“/portfolioStatement/QuarterPeriod/InvestmentA”),XpatportfolioStatement/QuarterPeriod”))Returns: 1,000

ing FunctionsThe following string functions can be used when creating a variable expression.

lengthThe length function accepts a string value for the string_value argument, and returns

tax length(string_value)

Returns the number of characters of string_value.

In the following example, Xpath(“/Power/GenlInfo/AccNum”) is a schema field with a v“123456789”.

Example: length(Xpath(“/Power/GenlInfo/AccNum”))Returns: 9

Page 92: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Appe92

d arguments, and

Syn

alue of

eturns a string

Syn

value of “Smith”.

ment Sciences Corporation

ndix B - Expression Functions

containsThe contains function accepts a string value for both the string_value and string_to_finreturns a boolean value.

tax contains(string_value, string_to_find)

Returns true if string_value contains string_to_find, return false otherwise.

In the following example, Xpath(“/Power/GenlInfo/AccNum”) is a schema field with a v“123456789”.

Example: contains(Xpath(“/Power/GenlInfo/AccNum”),”456”) Returns: true

toLowerCaseThe toLowerCase function accepts a string value for the string_value argument, and rvalue.

tax toLowerCase(string_value)

Converts all characters in string_value to lowercase.

In the following example, Xpath(“/Power/GenlInfo/LastName”) is a schema field with a

Example: toLowerCase(Xpath(“/Power/GenlInfo/LastName”))Returns: smith

Page 93: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Appe93

eturns a string

Syn

value of “Smith”.

tring value.

Syn.

r for both the start

Synng at index end of

ment Sciences Corporation

ndix B - Expression Functions

toUpperCaseThe toUpperCase function accepts a string value for the string_value argument, and rvalue.

tax toUpperCase(string_value)

Converts all characters in string_value to uppercase.

In the following example, Xpath(“/Power/GenlInfo/LastName”) is a schema field with a

Example: toUpperCase(Xpath(“/Power/GenlInfo/LastName”))Returns: SMITH

trimThe trim function accepts a string value for the string_value argument, and returns a s

tax trim(string_value)

Removes leading and trailing spaces, tabs and new line characters from string_value

Example: trim (“ Agent ”)Returns: “Agent”

substringThe substring function accepts a string value for the string_value argument, an integeand end arguments, and returns a string value.

tax substring(string_value, start, end)

Returns a substring consisting of end–start characters, starting at index start and endistring_value.

Page 94: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Appe94

alue of

_find arguments,

Syn

alue of

placement_string

Synent_string.

alue of

ment Sciences Corporation

ndix B - Expression Functions

In the following example, Xpath(“/Power/GenlInfo/AccNum”) is a schema field with a v“123456789”.

Example: substring(Xpath(“/Power/GenlInfo/AccNum”),4,6)Returns: “56”

positionThe position function accepts a string value for both the string_to_search and string_toand returns an integer.

tax position(string_to_search, string_to_find)

Returns the position of substring string_to_find in string_to_search, or-1 if not found.

In the following example, Xpath(“/Power/GenlInfo/AccNum”) is a schema field with a v“123456789”.

Example: position(Xpath(“/Power/GenlInfo/AccNum”),56)Returns: 5

replaceThe replace function accepts a string value for the string_value, string_to_find, and rearguments, and returns a string value.

tax replace(string_value, string_to_find, replacement_string)

Looks for string_to_find in string_value, and replaces every occurrence with replacem

In the following example, Xpath(“/Power/GenlInfo/AccNum”) is a schema field with a v“123456789”.

Example: replace(Xpath(“/Power/GenlInfo/AccNum”),12,99)Returns: “993456789”

Page 95: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Appe95

_value argument,

Syn

Dae expression.

_or_date_value value depending

Syn.

ment Sciences Corporation

ndix B - Expression Functions

numericToStringThe numericToString function accepts a double, float, or integer value for the numericand returns a string value.

tax numericToString(numeric_value)

Converts a number to a string.

Example: numericToString( 23.5)Returns: “23.5”

tetime, Date, and Time FunctionsThe following datetime, date, and time functions can be used when creating a variablDate, Time, and DateTime fields must appear in your data in a certain format:

• Date: yyyy-mm-dd (for example: 2003-05-19)

• Time: hh:mm:ss (for example: 11:22:50)

• DateTime: yyyy-mm-ddThh:mm:ss (for example: 2002-01-05T03:15:30)

addYearThe addYear function accepts a schema field of datetime or date type for the datetimeargument, an integer for the numeric_value argument, and returns a datetime or dateon the input value.

tax addYear(datetime_or_date_value, numeric_value)

Returns a datetime or date of adding numeric_value years to datetime_or_date_value

Page 96: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Appe96

value of

e_or_date_value value depending

Synue.

value of

_or_date_value value depending

Syn.

ment Sciences Corporation

ndix B - Expression Functions

In the following example, Xpath(“/Power/GenlInfo/DateDue”) is a schema field with a “2006-03-21”.

Example: addYear(Xpath(“/Power/GenlInfo/DateDue”),20)Returns: 2026-03-21

addMonthThe addMonth function accepts a schema field of datetime or date type for the datetimargument, an integer for the numeric_value argument, and returns a datetime or dateon the input value.

tax addMonth(datetime_or_date_value, numeric_value)

Returns a datetime or date of adding numeric_value months to datetime_or_date_val

In the following example, Xpath(“/Power/GenlInfo/DateDue”) is a schema field with a “2006-03-21”.

Example: addMonth(Xpath(“/Power/GenlInfo/DateDue”),2)Returns: 2006-05-21

addDayThe addDay function accepts a schema field of datetime or date type for the datetimeargument, an integer for the numeric_value argument, and returns a datetime or dateon the input value.

tax addDay(datetime_or_date_value, numeric_value)

Returns a datetime or date of adding numeric_value days to datetime_or_date_value

Page 97: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

Docu

Appe97

value of

Syn

ment Sciences Corporation

ndix B - Expression Functions

In the following example, Xpath(“/Power/GenlInfo/DateDue”) is a schema field with a “2006-03-21”.

Example: addDay(Xpath(“/Power/GenlInfo/DateDue”),2)Returns: 2006-03-23

nowThe now function returns a datetime value.

tax now()

Returns the current date and time.

Page 98: xPresso for Dreamweaver User Guide · A Tour of xPresso for Dreamweaver This chapter will take you on a short “tour” of the xPresso for Dreamweaver user interface. xPresso for

© 2011 - 2013 EMC Corporation. All Rights Reserved. EMC believes the information in this publication is accurate as of its publication date. The information is subject to change

without

notice.

THE INFORMATION IN THIS PUBLICATION IS PROVIDED “AS IS.” EMC CORPORATION MAKES NO

REPRESENTATIONS OR

WARRANTIES OF ANY KIND WITH RESPECT TO THE INFORMATION IN THIS PUBLICATION, AND

SPECIFICALLY

DISCLAIMS IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Use, copying, and distribution of any EMC software described in this publication requires an applicable software license.

EMC2, EMC, and the EMC logo are registered trademarks or trademarks of EMC Corporation in the United State and other

countries.

All other trademarks used herein are the property of their respective owners.