Advanced Customization > Info*Engine User’s Guide > Task Webject Reference > Group Webjects > XOR-Groups
  
XOR-Groups
DESCRIPTION
Identifies the symmetric difference or the 'exclusive or' of two groups. For example, group A contains the elements u, v, and x, and group B contains the elements x, y, and z. The XOR-Groups webject identifies the unique elements of groups A and B and uses the results to form group C. All elements that appear in either group A or group B, but not in both groups, are returned. Group C, in this example, would contain the elements u, v, y, and z.
SYNTAX
<ie:webject name="XOR-Group" type="GRP">
  <ie:param name="CASE_IGNORE" data="[TRUE | FALSE]"/>
  <ie:param name="CLASS" data="class"/>
  <ie:param name="COMPARISON" data="[ALPHA | NUMERIC]"/>
  <ie:param name="GROUP_IN" data="input_groups"/>
  <ie:param name="GROUP_OUT" data="output_group_name"/>
  <ie:param name="SORTBY" data="attribute"/>
  <ie:param name="SORTED" data="[ASC | DESC]"/>
  <ie:param name="XORBY" data="attribute"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
GROUP_IN
CASE_IGNORE
GROUP_OUT
CLASS
XORBY
COMPARISON
SORTBY
SORTED
CASE_IGNORE
Acts as a flag for case. If TRUE is specified, case is ignored. If FALSE is specified, then case is significant. The default for this parameter is FALSE. This parameter is optional.
CLASS
Specifies the type of the objects contained in the output group named by the GROUP_OUT parameter. For example if a webject specifies CLASS=MyClassName and GROUP_OUT=data_1, then the XML representation of the output group contains the following tags:
<MyClassName NAME="data_1" TYPE="Object" STATUS="0">
</MyClassName>
The default for this parameter is “Unknown-Class-Name.” This parameter is optional.
COMPARISON
Describes how to compare the two groups: either ALPHA for an alpha-numeric comparison or NUMERIC for a strictly numeric comparison. The default for this parameter is ALPHA. This parameter is optional.
GROUP_IN
Specifies the names of the two groups to be used in computing the symmetric difference.
To specify two group names, you can include two lines with different values for the GROUP_IN parameter. For example:
<ie:param name="GROUP_IN" data="group1"/>
<ie:param name="GROUP_IN" data="group2"/>
This parameter is required.
GROUP_OUT
Specifies the name of the results of computing the symmetric difference. This parameter is required.
SORTBY
Specifies the name of the attribute on which the sorting is done. If you do not include this parameter, the results are not sorted. This parameter is optional.
SORTED
Determines how values in the resulting group are sorted. The attribute named in the SORTBY parameter determines which values are sorted. Specify ASC to sort in ascending order or specify DESC to sort in descending order. The default for this parameter is ASC. This parameter is optional.
XORBY
Identifies the attribute name to be used for comparison. If the groups being compared contain elements with attributes of the same name, then one XORBY value can be specified. Otherwise, you must specify two XORBY parameters to provide the names of the attributes from each respective group that are compared.
The attribute name placed in the output group is the attribute name of the first XORBY parameter used.
This parameter is required.
EXAMPLE
The following example finds the exclusive or of the two specified input groups, and places the resulting data in an output group named “results”.
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core"
                                               prefix="ie"%>

<!-- Form a new group from the "exclusive or" of
                                              two groups -->

<ie:task uri="examples/CreateGroup.xml"/>
<ie:task uri="examples/CreateGroupA.xml"/>

<ie:webject name="XOR-Groups" type="GRP">
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="GROUP_IN" data="createdgroupa"/>
  <ie:param name="XORBY" data="NAME"/>
  <ie:param name="GROUP_OUT" data="results"/>
  <ie:param name="CLASS" data="partial"/>
</ie:webject>