public Expression staticCheck(ModuleContext context, int flags) { super.staticCheck(context, flags); for (int e = 0, E = attributes.size(); e < E; e++) { Expression attr = context.staticCheck(getAttribute(e), 0); attributes.set(e, attr); if (attr instanceof PathExpr) ((PathExpr) attr).tryToTrim(); } for (int c = 0; c < contents.length; c++) if (contents[c] instanceof PathExpr) ((PathExpr) contents[c]).tryToTrim(); type = XQType.ELEMENT; return this; }