select = typeCheck("select", select);
if (groupBy != null) {
groupBy = typeCheck("group-by", groupBy);
try {
RoleLocator role =
new RoleLocator(RoleLocator.INSTRUCTION, "xsl:for-each-group/group-by", 0);
groupBy = TypeChecker.staticTypeCheck(groupBy,
SequenceType.ATOMIC_SEQUENCE,
false, role, getStaticContext());
} catch (XPathException err) {
compileError(err);
}
} else if (groupAdjacent != null) {
groupAdjacent = typeCheck("group-adjacent", groupAdjacent);
try {
RoleLocator role =
new RoleLocator(RoleLocator.INSTRUCTION, "xsl:for-each-group/group-adjacent", 0);
groupAdjacent = TypeChecker.staticTypeCheck(groupAdjacent,
SequenceType.SINGLE_ATOMIC,
false, role, getStaticContext());
} catch (XPathException err) {
compileError(err);
}
}
starting = typeCheck("starting", starting);
ending = typeCheck("ending", ending);
if (starting != null || ending != null) {
try {
RoleLocator role =
new RoleLocator(RoleLocator.INSTRUCTION, "xsl:for-each-group/select", 0);
select = TypeChecker.staticTypeCheck(select,
SequenceType.NODE_SEQUENCE,
false, role, getStaticContext());
} catch (XPathException err) {
compileError(err);