Concatenating empty spreads

I run several XPath queries on a RSS feed. I obtain several spreads for example 20 titles, and another spread containing the matching 20 links.

However, some feeds don’t include all item fields. I end up with a spread of 20 titles, and an empty spread for the pubDate.

My question: How can I create a “fake” spread so at least they have the same number of elements?

I tried to create a dummy spread with the correct number of elements, and use a + with the output of the XPath. But as soon as one of the parameter is an empty spread, the result is empty as well and does not simply output the dummy spread.

There is a module called ReplaceEmpty (value).v4p that will set an empty value to a ‘replace value’ if it is empty.

I rebuild it for strings (works the same). You should just give the replace string the same spreadcount as the other (correct) strings you have. I hope it is what you need.

edit: and if someone can tell me why the value 0.2700 is used in the > node… cozz I would have used 0.0000.

ReplaceEmptyString.v4p (7.7 kB)

yes; ReplaceEmpty is a handy node for Count, > and Switch Node.

And in any case 0 would be the favourable value for the >.