/** * Evaluate this variable * * @param c the XPath dynamic context * @return the value of the variable * @throws net.sf.saxon.trans.XPathException if any error occurs */ @Override public Sequence<?> evaluateVariable(XPathContext c) throws XPathException { if (bindingSlot >= 0) { if (c.getCurrentComponent() == null) { throw new AssertionError("No current component"); } Component target = c.getTargetComponent(bindingSlot); if (target.isHiddenAbstractComponent()) { XPathException err = new XPathException("Cannot evaluate an abstract variable (" + getVariableName().getDisplayName() + ") with no overriding declaration", "XTDE3052"); err.setLocation(getLocation()); throw err; } GlobalVariable p = (GlobalVariable) target.getActor(); return p.evaluateVariable(c, target); } else { // code for references to final/private variables, also used in XQuery GlobalVariable b = (GlobalVariable) binding; return b.evaluateVariable(c, b.getDeclaringComponent()); } }
/** * Evaluate this variable * * @param c the XPath dynamic context * @return the value of the variable * @throws net.sf.saxon.trans.XPathException if any error occurs */ @Override public Sequence<?> evaluateVariable(XPathContext c) throws XPathException { if (bindingSlot >= 0) { if (c.getCurrentComponent() == null) { throw new AssertionError("No current component"); } Component target = c.getTargetComponent(bindingSlot); if (target.isHiddenAbstractComponent()) { XPathException err = new XPathException("Cannot evaluate an abstract variable (" + getVariableName().getDisplayName() + ") with no overriding declaration", "XTDE3052"); err.setLocation(getLocation()); throw err; } GlobalVariable p = (GlobalVariable) target.getActor(); return p.evaluateVariable(c, target); } else { // code for references to final/private variables, also used in XQuery GlobalVariable b = (GlobalVariable) binding; return b.evaluateVariable(c, b.getDeclaringComponent()); } }
throw new XPathException("Internal Saxon error: No binding available for call-template instruction", SaxonErrorCode.SXPK0001, this.getLocation()); if (targetComponent.isHiddenAbstractComponent()) { throw new XPathException("Cannot call an abstract template (" + calledTemplateName.getDisplayName() +
throw new XPathException("Internal Saxon error: No binding available for call-template instruction", SaxonErrorCode.SXPK0001, this.getLocation()); if (targetComponent.isHiddenAbstractComponent()) { throw new XPathException("Cannot call an abstract template (" + calledTemplateName.getDisplayName() +
} else { target = context.getTargetComponent(bindingSlot); if (target.isHiddenAbstractComponent()) { XPathException err = new XPathException("Cannot expand an abstract attribute set (" + targetName.getDisplayName()
} else { target = context.getTargetComponent(bindingSlot); if (target.isHiddenAbstractComponent()) { XPathException err = new XPathException("Cannot expand an abstract attribute set (" + targetName.getDisplayName()
if (target.isHiddenAbstractComponent()) { throw new XPathException("Cannot call an abstract function (" + name.getDisplayName() +
if (target.isHiddenAbstractComponent()) { throw new XPathException("Cannot call an abstract function (" + name.getDisplayName() +
if (bindingSlot >= 0) { target = context.getTargetComponent(bindingSlot); if (target.isHiddenAbstractComponent()) { XPathException err = new XPathException("Cannot call an abstract template (" + calledTemplateName.getDisplayName() +
if (bindingSlot >= 0) { target = context.getTargetComponent(bindingSlot); if (target.isHiddenAbstractComponent()) { XPathException err = new XPathException("Cannot call an abstract template (" + calledTemplateName.getDisplayName() +