<join>
This statement defines how the data from disparate variables should be joined. Variable data should have repetitive structures that are related based on some criteria in those structures - the foreign keys that define the relation. Optionally, you can also select specific nodes from the result and modify them to build the resulting document structure.
The <join> statement is comparable to inner joins for databases. Only nodes that have values that match the criteria for all variables are included.
You can obtain outer joins in mashups using XQuery. See
Using XQuery for Outer Joins for an example. You can also do self-joins in mashups. See
Self-Joins with a Single Dataset for an example.
Note: | The full <join> syntax from previous releases is no longer supported. This syntax used <joincond> children to define join conditions. |
You must define at least one join condition, as shown in
Defining Join Conditions. You can also, optionally, select which nodes to include in the joined items, as shown in
Selecting Nodes for Joined Items with <select>. See also
Valid Join Operators and
Defining Multiple Conditions. See also
Working Samples for information on sample mashups that use this statement.
Can Contain | ( select? ) |
Allowed In | mashup | catch | else | elseif | for | foreach | if | macro | operation | sequence | try | while |
Attributes
Name | Required | Description |
outputvariable | yes | The required variable to accept the output of this statement. |
joincondition | yes | An XPath 2.0 expression defining the variables to join and one or more conditions to apply to determine how variables are joined. |