    @Test
    public void testRowsFunction() throws Exception {

        try {
            parse("form:table:@rows(");
            fail();
        } catch (IllegalArgumentException e) {
            // ignore
        }

        try {
            parse("form:table:@rows(12");
            fail();
        } catch (IllegalArgumentException e) {
            // ignore
        }

        assertArrayEquals(new Node[] { new Node("form"), new Node("table"), new Node("", "rows"), new Node("@row") },
            parse("form:table:@rows():@row"));
        assertArrayEquals(new Node[] { new Node("form"), new Node("table"), new Node("12", "rows") },
            parse("form:table:@rows(12)"));
        assertArrayEquals(new Node[] { new Node("form"), new Node("table"), new Node("", "rows"), new Node("subtable") },
            parse("form:table:@rows():subtable"));

        assertArrayEquals(new Node[] { new Node("form"), new Node("table"), new Node("12", "rows"), new Node("subtable"),
                new Node("a", "rows"), new Node("cell") }, parse("form:table:@rows(12):subtable:@rows(a):cell"));
    }