ExpressionBuilder Configuration

The XML data-island identified by the XMLCfgID container attribute contains the configuration information used by the ExpressionBuilder HTML component (HTC).

For more information about the ways in which an XML document can be included on a page (creating an XML data-island), see XML Data-Islands.

The ExpressionBuilder HTC includes an embedded QueryBuilder HTC. Because of this, a number of the configuration elements passed to the ExpressionBuilder HTC are actually used by the embedded QueryBuilder HTC. Each of the elements discussed in this topic will be identified as being used to configure the ExpressionBuilder HTC, the embedded QueryBuilder HTC, or both.

The structure of this data-island is shown below, with links to more detailed explanations of each element. Element attributes are shown in italic and without the values that are normally associated with them. Required elements and attributes are shown in bold; optional elements and attributes are not in bold.

Ee796348.note(en-US,CS.20).gif Note

  • The XML elements and attributes in the MetaXML data-island for the ExpressionBuilder HTC must be expressed in uppercase letters.

XML Structure

<EBCONFIG>
  <EXPR-ASP>relative URL of exprarch folder</EXPR-ASP>
  <PROFILE-LIST>
    <PROFILE>profile name</PROFILE>
    <PROFILESRC />
  </PROFILE-LIST>
  <SITE-TERMSURL NOLOAD />
  <EEE-INTRINSICS />
  <DEBUG />
  <RENAME>no</RENAME>
  <HIDEBUTTONS />
  <TYPESOPS>path to xml file</TYPEOPS>
  <MESSAGE>alternate message</MESSAGE>
  <FILTER-CATEGORIES>
    <CATEGORY>category name</CATEGORY>
  </FILTER-CATEGORIES>
  <SAVE-CATEGORY>save category name</SAVE-CATEGORY>
  <EDIT-NESTED>always, warn, or never</EDIT-NESTED>
  <DATE-FORMAT>date format</DATE-FORMAT>
  <DATE-FIRSTDAY>first day of week</DATE-FIRSTDAY>
  <NUMBER-FORMAT>number format</NUMBER-FORMAT>
  <CURRENCY-FORMAT>currency format</CURRENCY-FORMAT>
  <HELPTOPIC>help topic URL</HELPTOPIC>
  <ADVANCED />
  <FILTER-PROPERTIES>XSL expression</FILTER-PROPERTIES>
</EBCONFIG>

EBCONFIG

This required element contains the configuration information for an instance of the ExpressionBuilder HTC.

  • Parent Element
    None (document root)
  • Required Child Elements
    EXPR-ASP, PROFILE-LIST
  • Optional Child Elements
    ADVANCED, CURRENCY-FORMAT, DATE-FIRSTDAY, DATE-FORMAT, DEBUG, EDIT-NESTED, EEE-INTRINSICS, FILTER-CATEGORIES, FILTER-PROPERTIES, HELPTOPIC, HIDEBUTTONS, MESSAGE, NUMBER-FORMAT, RENAME, SAVE-CATEGORY, SITE-TERMS, TYPESOPS
  • Data
    None.
  • Attributes
    None.

Remarks

The EBCONFIG element is used by both the ExpressionBuilder HTC and the embedded QueryBuilder HTC.

Return to XML Structure

EXPR-ASP

This required element specifies the relative URL of the Exprarch folder, which is required for the proper functioning of the ExpressionBuilder HTC.

  • Parent Element
    EBCONFIG
  • Required Child Elements
    None.
  • Optional Child Elements
    None.
  • Data
    The relative URL of the Exprarch folder.
  • Attributes
    None.

Remarks

The EBCONFIG element is used by both the ExpressionBuilder HTC and the embedded QueryBuilder HTC.

Return to XML Structure

PROFILE-LIST

This required element contains the specifications of the various profiles used by this instance of the ExpressionBuilder HTC.

  • Parent Element
    EBCONFIG
  • Required Child Elements
    PROFILE (at least one is required)
  • Optional Child Elements
    None.
  • Data
    None.
  • Attributes
    None.

Remarks

The PROFILE-LIST element is only used by the embedded QueryBuilder HTC.

Return to XML Structure

PROFILE

This required element specifies a profile in one of two ways. For Profile Definitions defined within Commerce Server, the name of the profile is specified as data associated with the element. For profiles not defined within Commerce Server, the URL of a valid XML document containing one or more profiles is specified as the value of the SRC attribute.

  • Parent Element
    PROFILE-LIST
  • Required Child Elements
    None.
  • Optional Child Elements
    None.
  • Data
    When the SRC attribute is not present, the name of the profile is specified as data within the PROFILE element. Otherwise, no data is present.

Attributes

Attribute Description
SRC Provides the URL of a valid XML document that contains one or more profiles not defined within Commerce Server.

Optional.

Legal values: A valid URL.

Default value: None.

When this attribute is specified, the PROFILE element should not contain any data.

REMARKS

When the name of a Profile Definition defined within Commerce Server is specified as data for this element, the name must be of the form "CatalogName.ProfileName". For example, "UserProfiles.UserObject".

When a profile not defined within Commerce Server is specified using the SRC attribute, it must conform to a defined XML structure for profile specification. For more information about this structure, see Specifying Profiles and Site Terms in the QueryBuilder HTC.

The PROFILE element is only used by the embedded QueryBuilder HTC.

Return to XML Structure

SITE-TERMS

This optional element specifies alternate information about whether the ExpressionBuilder HTC should load site-terms, and, if so, from where.

  • Parent Element
    EBCONFIG
  • Required Child Elements
    None.
  • Optional Child Elements
    None.
  • Data
    None.

Attributes

Attribute Description
NOLOAD Suppresses the loading of site-terms for this instance of the ExpressionBuilder HTC (when set to "1").

Optional.

Legal values: "1".

Default value: None.

If site-term loading is suppressed and expression bodies containing site-terms are passed to the ExpressionBuilder HTC, errors will result.

This attribute should not be specified in combination with the URL attribute.

URL Provides the URL of a valid XML document that contains alternate site-terms for use in this instance of the ExpressionBuilder HTC.

Optional.

Legal values: A valid URL.

Default value: None.

This attribute should not be specified in combination with the NOLOAD attribute.

REMARKS

When the SITE-TERMS element is present, either the NOLOAD attribute or the URL attribute (but not both) must be specified.

When the SITE-TERMS element is not present, site terms are loaded from the same folder specified by the required EXPR-ASP element.

When an alternate set of site terms is specified using the URL attribute, it must conform to the defined XML structure for site term specification. For more information about this structure, see Specifying Profiles and Site Terms in the QueryBuilder HTC.

The SITE-TERMS element is used only by the embedded QueryBuilder HTC.

Return to XML Structure

EEE-INTRINSICS

This optional element, when present, causes the ExpressionBuilder HTC to expose the intrinsic properties of the Expression Evaluator as a profile in its drop-down menus.

  • Parent Element
    EBCONFIG
  • Required Child Elements
    None.
  • Optional Child Elements
    None.
  • Data
    None.
  • Attributes
    None.

Remarks

The EEE-INTRINSICS element is only used by the embedded QueryBuilder HTC.

Return to XML Structure

DEBUG

This optional element, when present, causes the ExpressionBuilder HTC to display debugging information.

  • Parent Element
    EBCONFIG
  • Required Child Elements
    None.
  • Optional Child Elements
    None.
  • Data
    None.
  • Attributes
    None.

Remarks

The DEBUG element is used by both the ExpressionBuilder HTC and the embedded QueryBuilder HTC.

Return to XML Structure

RENAME

This optional element controls whether the ExpressionBuilder HTC will allow the renaming of expressions during editing.

  • Parent Element
    EBCONFIG
  • Required Child Elements
    None.
  • Optional Child Elements
    None.
  • Data
    Typically, the string "no".
  • Attributes
    None.

Remarks

If the string "no" appears as data associated with this element, renaming of expressions is not allowed. Given any other data string, or the absence of the RENAME element, renaming is allowed.

If the ExpressionBuilder HTC is activated in either the create or the createfrom mode, the RENAME element is ignored and renaming is always allowed.

The RENAME element is only used by the ExpressionBuilder HTC.

Return to XML Structure

HIDEBUTTONS

This optional element, when present, causes the ExpressionBuilder HTC to hide the Save, Cancel, and Help buttons.

  • Parent Element
    EBCONFIG
  • Required Child Elements
    None.
  • Optional Child Elements
    None.
  • Data
    None.
  • Attributes
    None.

Remarks

  • The HIDEBUTTONS element is only used by the ExpressionBuilder HTC.

Return to XML Structure

TYPESOPS

This optional element, when present, specifies a types and operators XML file for the ExpressionBuilder HTC to use.

  • Parent Element
    EBCONFIG
  • Required Child Elements
    None.
  • Optional Child Elements
    None.
  • Data
    The relative path to the XML types and operators file.
  • Attributes
    None.

Remarks

If this element is not specified, the default types and operators file is /Widgets/ExprbldrHTC/TypesOpsA.xml.

The TYPESOPS element is only used by the embedded QueryBuilder HTC.

Return to XML Structure

MESSAGE

This optional element, when present, specifies an alternate message to be displayed above the expression-selector area.

  • Parent Element
    EBCONFIG
  • Required Child Elements
    None.
  • Optional Child Elements
    None.
  • Data
    The alternate message.
  • Attributes
    None.

Remarks

When the MESSAGE element is not present, the default message is "Target according to the following conditions".

The MESSAGE element is only used by the embedded QueryBuilder HTC.

Return to XML Structure

FILTER-CATEGORIES

This optional element, when present, contains a list of expression categories. When the ExpressionBuilder HTC builds a list of expressions that can be used to create new expressions, and the FILTER-CATEGORIES element has been specified, only expressions belonging to a specified category are included in the expression list. If the FILTER-CATEGORIES element is not present, all expressions are included in the expression list.

  • Parent Element
    EBCONFIG
  • Required Child Elements
    None.
  • Optional Child Elements
    category (typically at least one is present)
  • Data
    None.
  • Attributes
    None.

Remarks

If there are no CATEGORY elements contained in the FILTER-CATEGORIES element, it is treated as though the latter element is not present.

The FILTER-CATEGORIES element is only used by the ExpressionBuilder HTC.

Return to XML Structure

CATEGORY

This optional element is used to specify a category of expressions to be included in the expression list presented by the ExpressionBuilder HTC. Multiple CATEGORY elements can be used to specify that multiple expression categories be presented.

  • Parent Element
    FILTER-CATEGORY
  • Required Child Elements
    None.
  • Optional Child Elements
    None.
  • Data
    The expression category name.
  • Attributes
    None.

Remarks

In general, at least one CATEGORY element will be present when the FILTER-CATEGORIES element is present. When all categories are to be included, the FILTER-CATEGORIES element may or may not be present.

The CATEGORY element is only used by the ExpressionBuilder HTC.

Return to XML Structure

SAVE-CATEGORY

This optional element, when present, specifies the category in which this expression will be saved.

  • Parent Element
    EBCONFIG
  • Required Child Elements
    None.
  • Optional Child Elements
    None.
  • Data
    The name of expression category with which the current expression will be associated when it is saved.
  • Attributes
    None.

Remarks

When the SAVE-CATEGORY element is specified, the value specified as data for this element takes precedence over any previous category associated with the expression.

If the SAVE-CATEGORY element is not specified, the expression will not be associated with any category, regardless of any previous association.

The SAVE-CATEGORY element is only used by the ExpressionBuilder HTC.

Return to XML Structure

EDIT-NESTED

This optional element, when present, specifies whether editing of nested expressions is allowed or prevented, or allowed only if the user explicitly allows it in response to a warning dialog box.

  • Parent Element
    EBCONFIG
  • Required Child Elements
    None.
  • Optional Child Elements
    None.
  • Data
    One of the three values "always", "warn", or "never". See Remarks for more details.
  • Attributes
    None.

Remarks

Specifying "always" results in the nested expression being opened in edit mode. In general, this is not recommended.

Specifying "warn" results in a warning dialog box that offers the choice between opening the nested expression in edit mode or view mode.

Specifying "never" results in the nested expression being opened in view mode.

The default behavior, in the event that the EDIT-NESTED element is not present or contains an illegal data value, is to not allow the editing of nested expressions.

The EDIT-NESTED is only relevant when an expression is being created or edited.

The EDIT-NESTED element is only used by the embedded QueryBuilder HTC.

Return to XML Structure

DATE-FORMAT

This optional element, when present, specifies the display format for dates.

  • Parent Element
    EBCONFIG
  • Required Child Elements
    None.
  • Optional Child Elements
    None.
  • Data
    The display format for dates.
  • Attributes
    None.

Remarks

Valid formats for dates are "m/d/yyyy", "d/m/yyyy", and "yyyy/m/d". The default is "m/d/yyyy". The separator can be specified as any of the following three characters: forward slash ("/"), hyphen ("-"), and period ("."). The default separator is forward slash ("/"). Any number of the characters "m", "d", and "y" may be specified without affecting displayed dates; months and days will always be displayed without a leading zero, and years will always be displayed using 4 digits.

The DATE-FORMAT element is only used by the embedded QueryBuilder HTC.

Return to XML Structure

DATE-FIRSTDAY

This optional element, when present, specifies the day of the week that will be considered the first day of the week.

  • Parent Element
    EBCONFIG
  • Required Child Elements
    None.
  • Optional Child Elements
    None.
  • Data
    A number in the range 0 (Sunday) to 6 (Saturday).
  • Attributes
    None.

Remarks

Days of the week are represented by numbers between 0 and 6, as follows: 0 = Sunday; 1 = Monday; 2 = Tuesday, 3 = Wednesday; 4 = Thursday; 5 = Friday, and 6 = Saturday.

If this element is not present, the default first day of the week is Sunday.

The DATE-FIRSTDAY element is only used by the embedded QueryBuilder HTC.

Return to XML Structure

NUMBER-FORMAT

This optional element, when present, specifies the display format for numbers.

  • Parent Element
    EBCONFIG
  • Required Child Elements
    None.
  • Optional Child Elements
    None.
  • Data
    The display format for numbers.
  • Attributes
    None.

Remarks

Valid formats for numbers are specified using a string that indicates the manner in which negative values will be indicated (or not), relative to the placement of digits. The negative value indicator can be a leading or trailing hyphen ("-"), space-separated from the number or not, or it can be parentheses around the number.

If this element is not present, the default format is "–1.1".

Examples:

1.1 -1.1 1.1- (1.1)

The NUMBER-FORMAT element is only used by the embedded QueryBuilder HTC.

Return to XML Structure

CURRENCY-FORMAT

This optional element, when present, specifies the display format for currency.

  • Parent Element
    EBCONFIG
  • Required Child Elements
    None.
  • Optional Child Elements
    None.
  • Data
    The display format for currency.
  • Attributes
    None.

Remarks

Valid formats for currency are specified using a string that indicates the manner in which negative values will be indicated (or not), relative to the placement of digits. The negative value indicator can be a leading or trailing hyphen ("-"), space-separated from the number or not, or it can be parentheses around the number.

If this element is not present, the default format is "–1.1".

No currency symbol should be specified as part of this format.

Examples:

1.1 -1.1 1.1- (1.1)

The CURRENCY-FORMAT element is only used by the embedded QueryBuilder HTC.

Return to XML Structure

HELPTOPIC

This optional element, when present, specifies a help topic for this instance of the QueryBuilder HTC.

  • Parent Element
    EBCONFIG
  • Required Child Elements
    None.
  • Optional Child Elements
    None.
  • Data
    The absolute URL of the corresponding help topic.
  • Attributes
    None.

Remarks

If this element is present, the QueryBuilder HTC will display a help button, which when clicked will display the specified help topic.

Use the server-side utility routine sRelURL2AbsURL to generate the absolute URL required by this element. For example:

<HELPTOPIC><%=sRelURL2AbsURL("../docs/htm/yourhelpfile.htm")%></HELPTOPIC>

The HELPTOPIC element is only used by the embedded QueryBuilder HTC.

Return to XML Structure

ADVANCED

This optional element, when present, specifies that advanced editing will be allowed. Advanced editing allows the use of the OR operator in expressions.

  • Parent Element
    EBCONFIG
  • Required Child Elements
    None.
  • Optional Child Elements
    None.
  • Data
    None.
  • Attributes
    None.

Remarks

If this element is not present, advanced editing is not allowed.

The ADVANCED element is only used by the embedded QueryBuilder HTC.

Return to XML Structure

FILTER-PROPERTIES

This optional element, when present, specifies an Extensible Stylesheet Language (XSL) pattern fragment used for filtering properties from the profile. If this element is present, the provided XSL pattern will be applied to the properties in each profile that is loaded. Any properties that do not conform to the XSL pattern will not be shown when creating or editing expressions.

  • Parent Element
    EBCONFIG
  • Required Child Elements
    None.
  • Optional Child Elements
    None.
  • Data
    The XSL pattern fragment.
  • Attributes
    None.

Remarks

The default XSL pattern fragment is: not(@isActive) || @isActive != '0'

The data values supplied for this element are actually XSL pattern fragments because they are surrounded by the strings "Property[" and "]" to achieve the actual XSL pattern. For example, the actual default XSL pattern, shown with the added strings in bold, is as follows:

[not(@isActive) || @isActive != '0']

Element attributes return "0" when they are not defined. Therefore, it is recommended the XSL pattern fragments specified as data for this element check for the presence of an attribute as well as for the attribute value being set to zero. The default XSL pattern is an example of both of these conditions being checked.

The FILTER-PROPERTIES element is only used by the embedded QueryBuilder HTC.

Return to XML Structure

Copyright © 2005 Microsoft Corporation.
All rights reserved.