this is what the q.domain variable is meant for. rather than checking q.style.raw, it would be clearer to check q.domain. HOWEVER, it appears that the convention in the xforms has changed and the javascript doesn't set q.domain right.