/** * Recursive walk through the stylesheet to validate all nodes */ public void validateSubtree() throws XPathException { if (isTopLevel() && forwardsCompatibleModeIsEnabled()) { // do nothing } else { super.validateSubtree(); } }
/** * Recursive walk through the stylesheet to validate all nodes * * @param decl * @param excludeStylesheet */ public void validateSubtree(ComponentDeclaration decl, boolean excludeStylesheet) throws XPathException { if (reportingCircumstances == IGNORED_INSTRUCTION || (isTopLevel() && forwardsCompatibleModeIsEnabled())) { // do nothing } else { super.validateSubtree(decl, excludeStylesheet); } }
/** * Recursive walk through the stylesheet to validate all nodes */ public void validateSubtree() throws XPathException { if (isTopLevel() && forwardsCompatibleModeIsEnabled()) { // do nothing } else { super.validateSubtree(); } }
/** * Recursive walk through the stylesheet to validate all nodes * * @param decl * @param excludeStylesheet */ public void validateSubtree(ComponentDeclaration decl, boolean excludeStylesheet) throws XPathException { if (reportingCircumstances == IGNORED_INSTRUCTION || (isTopLevel() && forwardsCompatibleModeIsEnabled())) { // do nothing } else { super.validateSubtree(decl, excludeStylesheet); } }
@Override public void validateSubtree(ComponentDeclaration decl, boolean excludeStylesheet) throws XPathException { if (!isDeferredCompilation(getCompilation())) { super.validateSubtree(decl, excludeStylesheet); } else { try { validate(decl); } catch (XPathException err) { compileError(err); } } }
@Override public void validateSubtree(ComponentDeclaration decl, boolean excludeStylesheet) throws XPathException { if (!isDeferredCompilation(getCompilation())) { super.validateSubtree(decl, excludeStylesheet); } else { try { validate(decl); } catch (XPathException err) { compileError(err); } } }
Object node = topLevel.get(i); if (node instanceof StyleElement) { ((StyleElement) node).validateSubtree();
Object node = topLevel.get(i); if (node instanceof StyleElement) { ((StyleElement) node).validateSubtree();
Object node = topLevel.get(i); if (node instanceof StyleElement) { ((StyleElement) node).validateSubtree();
/** * Validate the children of this node, recursively. Overridden for top-level * data elements. */ protected void validateChildren() throws XPathException { boolean containsInstructions = mayContainSequenceConstructor(); AxisIterator kids = iterateAxis(Axis.CHILD); StyleElement lastChild = null; while (true) { NodeInfo child = (NodeInfo)kids.next(); if (child == null) { break; } if (child instanceof StyleElement) { if (containsInstructions && !((StyleElement)child).isInstruction() && !isPermittedChild((StyleElement)child)) { ((StyleElement)child).compileError("An " + getDisplayName() + " element must not contain an " + child.getDisplayName() + " element", "XTSE0010"); } ((StyleElement)child).validateSubtree(); lastChild = (StyleElement)child; } } if (lastChild instanceof XSLVariable && !(this instanceof XSLStylesheet)) { lastChild.compileWarning("A variable with no following sibling instructions has no effect", SaxonErrorCode.SXWN9001); } }
/** * Validate the children of this node, recursively. Overridden for top-level * data elements. */ protected void validateChildren() throws XPathException { boolean containsInstructions = mayContainSequenceConstructor(); AxisIterator kids = iterateAxis(Axis.CHILD); StyleElement lastChild = null; while (true) { NodeInfo child = (NodeInfo)kids.next(); if (child == null) { break; } if (child instanceof StyleElement) { if (containsInstructions && !((StyleElement)child).isInstruction() && !isPermittedChild((StyleElement)child)) { ((StyleElement)child).compileError("An " + getDisplayName() + " element must not contain an " + child.getDisplayName() + " element", "XTSE0010"); } ((StyleElement)child).validateSubtree(); lastChild = (StyleElement)child; } } if (lastChild instanceof XSLVariable && !(this instanceof XSLStylesheet)) { lastChild.compileWarning("A variable with no following sibling instructions has no effect", SaxonErrorCode.SXWN9001); } }
child.getDisplayName() + " element", "XTSE0010"); ((StyleElement) child).validateSubtree(decl, excludeStylesheet); lastChild = (StyleElement) child;
child.getDisplayName() + " element", "XTSE0010"); ((StyleElement) child).validateSubtree(decl, excludeStylesheet); lastChild = (StyleElement) child;
top.validate(null); for (ComponentDeclaration d : topLevel) { d.getSourceElement().validateSubtree(d, false);
top.validate(null); for (ComponentDeclaration d : topLevel) { d.getSourceElement().validateSubtree(d, false);