choose.setLocation(is.getURL(), is.getUserPath(), line, 0);
parent.appendChild(choose);
while (true) {
lexExpect(ch, '(');
CharBuffer test = CharBuffer.allocate();
lexToRparen(test);
QElement elt = (QElement) xsl.createElementNS(XSLNS, "xsl:when");
choose.appendChild(elt);
elt.setLocation(is.getURL(), is.getUserPath(), line, 0);
elt.setAttribute("test", test.close());
ch = parseStatement(elt, skipWhitespace(read()));
ch = skipWhitespace(ch);
if (ch != '$')