Creating Your First Simple Smart

Smart tags are based on actions and recognizers. Recognizers check whether the term entered by the user belongs to the list of stored terms. When the user has entered a term that has been recognized, the action associated with the term is executed. Each term can have one or more actions associated with it. Actions are also called verbs. Your first tag will recognize certain state abbreviations as smart-tag actionable. For example, when you enter "ny," "ca," or another state abbreviation included in your list of terms in a spreadsheet cell, you will be presented with smart tag actions as depicted in Figure C-1. We will call this smart tag State Explorer. By default, smart tags are case-sensitive, therefore entering "NY," "CA," or other abbreviations included in your list of terms in uppercase will not be recognized as a smart tag.

Now let's proceed to write some XML code to define the list of terms and the actions for our State Explorer smart tag.

1. Open Notepad.

2. Type in the following XML document in Notepad. When you are done, save the file as State.xml anywhere on your hard drive. Later on, you will copy this file to the appropriate location to put your smart tags to work.

Figure C-2: Configuring smart tags

Was this article helpful?

0 0

Post a comment