You can use the following types and attributes in a <valueof> tag:

target

Represents a property of the repository item object (for example, an HTML page in the repository) that is a potential member of the result set of a targeting operation.

Example: <valueof target="author"> could refer to the author property of a document in the repository. This tag might be used to test whether the author of a repository item is the same person as the visitor in a rule like this:

<rule op=eq>
  <valueof bean="Profile.name">
  <valueof target="author">
</rule>
constant

Represents a constant value, which does not require evaluation (for example, “42”, “true”, “snowboarding”, “4/10/98 5:59 PM” or “[1, 2, 3]”, which is how an array with constant elements is represented). The string portion of the tag is parsed sequentially to determine its data type, in the following priority.

Example: <valueof constant="18">. This tag might be used to compare an age property in a user’s profile to an Integer constant in a rule like this:

<rule op=lt>
  <valueof bean="Profile.age">
  <valueof constant="18">
</rule>

This rule is satisfied if the age property of the source profile is less than the integer constant, 18.

Example: <valueof constant="[Maine, New Hampshire, Vermont, Massachusetts, Connecticut, Rhode Island]">. This tag might be used to determine whether the state property in a user’s profile is one of the New England states included in a constant array, in a rule like this:

<rule op=includes>
  <valueof constant="[Maine, New Hampshire, Vermont, \
                      Massachusetts, Connecticut, Rhode Island]">
  <valueof bean="Profile.state">
</rule>

Note the use of the backslash (\) character as a line continuation character in the <valueof constant="..."> tag.

bean

Represents a Nucleus component or a property value of a Nucleus component. The syntax of the string portion of the tag is: {component}.{property}. The string can include more than one property, separated by dots.

You typically use this type to represent a property of the user profile object you are targeting a rule set against.

Example: <valueof bean="/atg/userprofiling/Profile.gender"> could refer to the gender property of a profile bean. This tag might be used to test whether a visitor is female in a rule like this:

<rule op=eq>
  <valueof bean="/atg/userprofiling/Profile.gender">
  <valueof constant="female">
</rule>

This rule is satisfied if the value of the gender property of the source profile is the string constant female.

The default configuration of the TargetingSourceMap service maps the Nucleus path of /atg/userprofiling/Profile to the source name “Profile.” This lets you simplify tags like the previous example to <valueof bean="Profile.gender">. See the Setting Up Targeting Services chapter for more information.


Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices