/** * Use local parameter. This is called when a local xsl:param element is processed. * If a parameter of the relevant name was supplied, it is bound to the xsl:param element. * Otherwise the method returns false, so the xsl:param default will be evaluated * @param qName The fingerprint of the parameter name * @param binding The XSLParam element to bind its value to * @param isTunnel True if a tunnel parameter is required, else false * @return true if a parameter of this name was supplied, false if not */ public boolean useLocalParameter(StructuredQName qName, LocalParam binding, boolean isTunnel) throws XPathException { ParameterSet params = (isTunnel ? getTunnelParameters() : localParameters); if (params==null) return false; ValueRepresentation val = params.get(binding.getParameterId()); stackFrame.slots[binding.getSlotNumber()] = val; return (val != null); }
/** * Use local parameter. This is called when a local xsl:param element is processed. * If a parameter of the relevant name was supplied, it is bound to the xsl:param element. * Otherwise the method returns false, so the xsl:param default will be evaluated * @param qName The fingerprint of the parameter name * @param binding The XSLParam element to bind its value to * @param isTunnel True if a tunnel parameter is required, else false * @return true if a parameter of this name was supplied, false if not */ public boolean useLocalParameter(StructuredQName qName, LocalParam binding, boolean isTunnel) throws XPathException { ParameterSet params = (isTunnel ? getTunnelParameters() : localParameters); if (params==null) return false; ValueRepresentation val = params.get(binding.getParameterId()); stackFrame.slots[binding.getSlotNumber()] = val; return (val != null); }
/** * Use local parameter. This is called when a local xsl:param element is processed. * If a parameter of the relevant name was supplied, it is bound to the xsl:param element. * Otherwise the method returns false, so the xsl:param default will be evaluated * @param qName The fingerprint of the parameter name * @param binding The XSLParam element to bind its value to * @param isTunnel True if a tunnel parameter is required, else false * @return true if a parameter of this name was supplied, false if not */ public boolean useLocalParameter(StructuredQName qName, LocalParam binding, boolean isTunnel) throws XPathException { ParameterSet params = (isTunnel ? getTunnelParameters() : localParameters); if (params==null) return false; ValueRepresentation val = params.get(binding.getParameterId()); stackFrame.slots[binding.getSlotNumber()] = val; return (val != null); }
/** * Use local parameter. This is called when a local xsl:param element is processed. * If a parameter of the relevant name was supplied, it is bound to the xsl:param element. * Otherwise the method returns false, so the xsl:param default will be evaluated * * @param paramName the name of the parameter * @param slotNumber the slot number of the parameter on the callee's stack frame * @param isTunnel True if a tunnel parameter is required, else false * @return ParameterSet.NOT_SUPPLIED, ParameterSet.SUPPLIED, or ParameterSet.SUPPLIED_AND_CHECKED */ public int useLocalParameter( StructuredQName paramName, int slotNumber, boolean isTunnel) throws XPathException { ParameterSet params = isTunnel ? getTunnelParameters() : localParameters; if (params == null) { return ParameterSet.NOT_SUPPLIED; } int index = params.getIndex(paramName); if (index < 0) { return ParameterSet.NOT_SUPPLIED; } Sequence<?> val = params.getValue(index); stackFrame.slots[slotNumber] = val; boolean checked = params.isTypeChecked(index); return checked ? ParameterSet.SUPPLIED_AND_CHECKED : ParameterSet.SUPPLIED; }
/** * Use local parameter. This is called when a local xsl:param element is processed. * If a parameter of the relevant name was supplied, it is bound to the xsl:param element. * Otherwise the method returns false, so the xsl:param default will be evaluated * * @param paramName the name of the parameter * @param slotNumber the slot number of the parameter on the callee's stack frame * @param isTunnel True if a tunnel parameter is required, else false * @return ParameterSet.NOT_SUPPLIED, ParameterSet.SUPPLIED, or ParameterSet.SUPPLIED_AND_CHECKED */ public int useLocalParameter( StructuredQName paramName, int slotNumber, boolean isTunnel) throws XPathException { ParameterSet params = isTunnel ? getTunnelParameters() : localParameters; if (params == null) { return ParameterSet.NOT_SUPPLIED; } int index = params.getIndex(paramName); if (index < 0) { return ParameterSet.NOT_SUPPLIED; } Sequence<?> val = params.getValue(index); stackFrame.slots[slotNumber] = val; boolean checked = params.isTypeChecked(index); return checked ? ParameterSet.SUPPLIED_AND_CHECKED : ParameterSet.SUPPLIED; }