Contents: Planning, installing, and configuring Mashup Center : Mashup Center 2.0
The way that an element node from the input entry is mapped to a string value in the For Each operator has changed in Mashup Center 2.0.
The value that is passed to the URL variable of the second feed is a string value that represents the concatenation of all of the XML element's descendant text nodes
from the first feed.
This new behavior means that if you have a data mashup that uses a For Each operator, and if that For Each operator passes an element node to the URL variable of the second feed, the results might change after you upgrade to version 2.0.
For example, assume that the first feed in the For Each operator has the following data in one of its entries:
Assume that the second feed (the feed whose URL will receive values from the first feed) has a Source operator with the following URL:
If you select the q
variable from the URL in the second feed, and then select /mhub:entry/mydata/value
as the value from the first feed, the URL will be the following:
This result is different from version 1.x behavior, where the URL would have been equivalent to the following:
If instead of selecting /mhub:entry/mydata/value
, you select /mhub:entry/mydata/value/text()
, the behavior will be the same in version 2.0 as it was in version 1.x.
You can obtain the pre-upgrade behavior by modifying the expression in the first feed so that instead of returning the element node, it invokes the ToString function (new to version 2.0) and passes the target element node as an argument to that function. The ToString function creates a serialized XML string that is consistent with the way that an element node from the input entry is mapped to a string value in version 1.x.
Parent topic: Understanding changes in the data mashup builder operators : Mashup Center 2.0