Specifying Profiles and Site Terms in the QueryBuilder HTC

Both the PROFILE and SITE-TERMS elements, which are part of the MetaXML for the ExpressionBuilder and QueryBuilder HTCs, can be configured to use alternative profiles and site terms, respectively. These alternative profiles and site terms are specified by providing the URL of an XML file, as the value of the SRC attribute of the PROFILE element and the URL attribute of the SITE-TERMS element, respectively.

The XML structure used to specify alternative profiles and site terms for the QueryBuilder HTC consists of a subset of the more general XML schema used for profiles within Commerce Server. The QueryBuilder HTC is not concerned with all of the elements and attributes of the more general schema, and will ignore those elements and attributes that are not of interest to it.

The XML structures used to specify profiles and site terms are similar enough that they are described here together. In terms of elements, they are the same except for the type of child element that must be present for the Property element.

In the case of profiles, the Property element typically contains one DataRef element, representing the data-member to which the property maps.

In the case of site terms, the Property element contains at least one, and typically several, Attribute elements, each representing one of the choices available for that site term.

In both profile and site term specification, the Group element can be used to organize properties and site terms into a hierarchy. This can be beneficial when there are a large number of properties or site-terms present.

The descriptions of each element and attribute specify whether they are relevant for only profiles, or only site terms.

XML Structure

<Profilename displayName description>
  <Propertyname displayName description propTypereferenceString isActive isMultiValue isSearchable>
    <DataRefidref/>
    . . .
    <DataRef />
    <Attributename displayName description />
    . . .
    <Attribute />
  </Property>
  . . .
  <Property> . . .</Property>
  <Groupname displayName description>
    <Property/>
    <Group/>
  </Group>
  . . .
  <Group> . . .</Group>
</Profile>

Profile

This required element represents a profile definition or the definition of a set of site terms.

Parent Elements

None (document root)

Required Child Elements

None.

Optional Child Elements

Property, Group
(At least one is required.)

Data

None.

Attributes

Attribute Description
name Provides a programmatic name for this profile or set of site terms, used when accessing it from code.

Required.

Legal values: Any string up to 30 characters in length.

Default value: None.

displayname Provides a friendly name for the profile or set of site terms, used when it is displayed in a user interface.

Required.

Legal values: Any string up to 30 characters in length.

Default value: Most tools default this value to be the same as name attribute.

The value of this attribute may be locale-specific.

description Stores additional information about the purpose of a set of site terms. If this attribute is present in a profile specification, it is ignored by the QueryBuilder HTC.

Optional.

Legal values: Any string up to 200 characters in length.

Default value: None (an empty string).

The value of this attribute may be locale-specific.

defaultTableName, isNew, isModified, isDeleted These attributes, which may appear in the more general profile schema, are not relevant to site term specification for the QueryBuilder HTC.

Return to XML Structure

Property

This required element represents a single property in a profile definition, or a single site term within a set of site terms.

Parent Elements

Profile, Group

Required Child Elements

None.

Optional Child Elements

DataRef (profiles), Attribute (site terms)
(at least one of the relevant type is required.)

Data

None.

Attributes

Attribute Description
name Provides a programmatic name for this property or site term, used when accessing it from code.

Required.

Legal values: Any string up to 30 characters in length.

Default value: None.

displayname Provides a friendly name for the property or site term, used when it is displayed in a user interface.

Required.

Legal values: Any string up to 30 characters in length.

Default value: Most tools default this value to be the same as name attribute.

The value of this attribute may be locale-specific.

description Stores additional information about the purpose of a site term. If this attribute is present in a profile specification, it is ignored by the QueryBuilder HTC.

Optional.

Legal values: Any string up to 200 characters in length.

Default value: None (an empty string).

The value of this attribute may be locale-specific.

propType Stores the data type of a property. If this attribute is present in a set of site terms, it is ignored by the QueryBuilder HTC.

Required.

Legal values: STRING, SITETERM, PASSWORD, NUMBER, BOOL, DATE, TIME, DATETIME, PROFILE.

Default value: None.

The values SITETERM and PASSWORD are strings, but with specific semantics applied.

The values DATE, TIME, and DATETIME are all stored as a single date-time data type, but with different semantics applied.

referenceString Stores supplementary information about the data type of a property. If this attribute is present in a set of site terms, it is ignored by the QueryBuilder HTC.

Optional.

Legal values: The name of a profile.

Default value: None.

If the propType attribute specifies a profile, this attribute must specify the name of a profile.

isActive Indicates whether the value of this property is loaded by the Profile Service. If this attribute is present in a set of site terms, it is ignored by the QueryBuilder HTC.

Optional.

Legal values: "true" and "false". If the value is "true", the value of this property is loaded by the Profile Service. If the value is "false", the value of this property is not loaded by the Profile Service.

Default value: "true".

isMultiValue Indicates whether this property is multi-valued, that is, consists of a list of values. If this attribute is present in a set of site terms, it is ignored by the QueryBuilder HTC.

Optional.

Legal values: "true" and "false". If the value is "true", this property is multi-valued. If the value is "false", this property is multi-valued.

Default value: "false".

isSearchable Indicates whether fast searching can be performed on this property. If this attribute is present in a set of site terms, it is ignored by the QueryBuilder HTC.

Optional.

Legal values: "true" and "false". If the value is "true", fast searching can be performed on this property. If the value is "false", searching on this property can still be performed, but may be slower.

Default value: "false".

keyDef, defaultValue, isCached, isDefaultNull, isExported, isHidden, isPrivate, isReadOnly, isRequired, isUpdatable, isNew, isModified, isDeleted These attributes, which may appear in the more general profile schema, are not relevant to the QueryBuilder HTC. This is true with respect to both profile and site term specification.

Return to XML Structure

Attribute

With respect to the QueryBuilder HTC, this element is only relevant in the specification of sets of site terms. It represents one of the choices available for the site term. In general, there will be several Attribute elements specified, representing a corresponding set of choices.

In the more general profile schema, it may appear as a child element of Profile, Group, Property, and SourceInfo elements.

Parent Elements

Property (in site term specifications)

Required Child Elements

None.

Optional Child Elements

None.

Data

None.

Attributes

Attribute Description
name Provides a programmatic name for this site term choice, used when accessing it from code.

Required.

Legal values: Any string up to 30 characters in length.

Default value: None.

displayname Provides a friendly name for this site term choice, used when it is displayed in a user interface.

Required.

Legal values: Any string up to 30 characters in length.

Default value: Most tools default this value to be the same as name attribute.

The value of this attribute may be locale-specific.

description Stores additional information about the purpose of a site term choice.

Optional.

Legal values: Any string up to 200 characters in length.

Default value: None (an empty string).

The value of this attribute may be locale-specific.

value, isNew, isModified, isDeleted These attributes, which may appear in the more general profile schema, are not relevant to site term specification for the QueryBuilder HTC.

Return to XML Structure

DataRef

With respect to the QueryBuilder HTC, this element is only relevant in the specification of profiles. In the more general profile schema, it may appear as a child element of Profile, Group, Property, and SourceInfo elements.

This element contains the mapping information about its parent property. Each DataRef element contains a reference to a data member in a data object exposed by a data source. When a profile property is mapped to multiple data members (as when the property is an aggregated property), it will contain multiple DataRef child elements.

Parent Elements

Property (in profile specifications)

Required Child Elements

None.

Optional Child Elements

None.

Data

None.

Attributes

Attribute Description
idref Specifies the data-member to which the parent Property element maps.

Required.

Legal values: Strings of the form sourceName.objectName.memberName.

Default value: None.

isRDNAttribute, isModified These attributes, which may appear in the more general profile schema, are not relevant to site term specification for the QueryBuilder HTC.

Return to XML Structure

Group

This element represents a logical grouping of properties or site terms, and potentially subgroups, in a profile definition or set of site terms.

Parent Elements

Profile, Group

Required Child Elements

None.

Optional Child Elements

Group, Property
(at least one is required.)

Data

None.

Attributes

Attribute Description
name Provides a programmatic name for this group, used when accessing it from code.

Required.

Legal values: Any string up to 30 characters in length.

Default value: None.

displayname Provides a friendly name for this group, used when it is displayed in a user interface.

Required.

Legal values: Any string up to 30 characters in length.

Default value: Most tools default this value to be the same as name attribute.

The value of this attribute may be locale-specific.

description Stores additional information about the purpose of a group.

Optional.

Legal values: Any string up to 200 characters in length.

Default value: None (an empty string).

The value of this attribute may be locale-specific.

isNew, isModified, isDeleted These attributes, which may appear in the more general profile schema, are not relevant to the QueryBuilder HTC. This is true with respect to both profile and site term specification.

Return to XML Structure


All rights reserved.