add tests for empty inner nodes.
fix whitespace predicates.