Software developer Interwoven (NASDAQ:IWOV) will buy competitor iManage (NASDAQ:IMAN) for $171 million in stock and cash. The merger, which values iManage at $6.23 per share, a 24% premium to yesterday's $5.03 close, will give Interwoven shareholders two-thirds ownership of the combined company and iManage holders the rest.

The two companies -- both small fish in the pool we explore each month in Tom Gardner's Motley Fool's Hidden Gems -- compete in the cutthroat market for corporate content management software. Both are struggling to gain ground on industry leader Documentum (NASDAQ:DCTM).

Interwoven is losing ground fast. Revenues have declined from 20% to 40% year over year in each of the last four quarters. iManage, meanwhile, actually managed to grow revenues 22% last quarter after several single-digit declines. The companies' combined revenues last quarter were over half of Documentum's, and the new company will need iManage's momentum just to maintain that.

Interwoven hopes the combined company will offer "the most comprehensive, integrated, next-generation ECM solution available." It better. Documentum is profitable and free cash flow positive; neither Interwoven nor iManage is profitable. As for cash flow, Interwoven hasn't produced cash from operations since Q3 of 2001, while iManage was free cash flow positive in Q1 this year (its Q2 cash flow statement isn't out yet).

This may explain the disparate valuations. Despite $1.71 in net cash per share at the end of the June quarter, Interwoven closed yesterday at a paltry $2.50. The market rewards iManage with a price of $5.03 on net cash of just $1.41 a share.

Despite the dilution, Interwoven shareholders should be pleased to pay a 24% premium for a growing business whose product it sells already -- for an "entry price of $75K," according to the prepared statement. Given Interwoven's falling revenues and stubborn cash burn, iManage might have held out for more.

Get financial roadside assistance with TMF Money Advisor !