public void validate(Declaration decl) throws XPathException { // 2.0 spec has reverted to the 1.0 rule that xsl:text may not have child elements AxisIterator kids = iterateAxis(Axis.CHILD); value = StringValue.EMPTY_STRING; while (true) { Item child = kids.next(); if (child == null) { break; } else if (child instanceof StyleElement) { ((StyleElement) child).compileError("xsl:text must not contain child elements", "XTSE0010"); return; } else { value = StringValue.makeStringValue(child.getStringValueCS()); // continue; } } super.validate(decl); }