DelegatingLayoutContext keyContext = new DelegatingLayoutContext(context);
TextFlow keyFlow = new TextFlow(keyContext);
ArrayList<IDomNode> children = Lists.newArrayList(n.getChildren());
for(Iterator<IDomNode> subitor = children.iterator(); subitor.hasNext();) {
IDomNode x = subitor.next();
NodeType t = x.getNodeType();
if(t == NodeType.ACTION || t == NodeType.WHITESPACE) {
subitor.remove();
continue;
}
break; // first non whitespace or action