/* ... */
/**
* Processes the search results. Filters out unnecessary nodes
*
* @return the final search results object
*/
function processResults(nodes, maxResults)
{
var results = [],
added = 0,
parts,
item,
i, j;
for (i = 0, j = nodes.length; i < j && added < maxResults; i++)
{
/**
* For each node we extract the site/container qname path and then
* let the per-container helper function decide what to do.
*/
parts = splitQNamePath(nodes[i]);
if (parts !== null)
{
item = getItem(parts[0], parts[1], parts[2], nodes[i]);
if (item !== null)
{
if( nodes[i]["fragments"] ){ item.fragments = nodes[i]["fragments"]; }
results.push(item);
added++;
/* ... */