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); }
private StyleElement createElement(String contents) { StyleElement style = Document.get().createStyleElement(); style.setPropertyString("language", "text/css"); setContents(style, contents); return style; }
public void setContents(StyleElement style, String contents) { style.setInnerText(contents); }
private StyleElement createNewStyleSheet(String contents) { StyleElement style = createElement(); style.setCssText(contents); return style; }
/** Mark tail-recursive calls on templates and functions. */ public boolean markTailCalls() { StyleElement last = getLastChildInstruction(); return last != null && last.markTailCalls(); }
/** * Notify all references to this function of the data type. * * @throws XPathException */ public void fixupReferences() throws XPathException { for (UserFunctionCall reference : references) { (reference).setStaticType(resultType); } super.fixupReferences(); }