when.addElement(new TextElement(sb.toString()));
chooseElement.addElement(when);
when = new XmlElement("when"); //$NON-NLS-1$
when.addAttribute(new Attribute("test", "criterion.listValue")); //$NON-NLS-1$ //$NON-NLS-2$
when.addElement(new TextElement("and ${criterion.condition}")); //$NON-NLS-1$
XmlElement innerForEach = new XmlElement("foreach"); //$NON-NLS-1$
innerForEach.addAttribute(new Attribute("collection", "criterion.value")); //$NON-NLS-1$ //$NON-NLS-2$
innerForEach.addAttribute(new Attribute("item", "listItem")); //$NON-NLS-1$ //$NON-NLS-2$
innerForEach.addAttribute(new Attribute("open", "(")); //$NON-NLS-1$ //$NON-NLS-2$
innerForEach.addAttribute(new Attribute("close", ")")); //$NON-NLS-1$ //$NON-NLS-2$