public class Parameters
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
Parameters.Formatter |
| Constructor and Description |
|---|
Parameters(Library lib,
net.sf.saxon.om.Sequence[] params,
int min,
Param[] formals)
Check the number of parameters in params, and throw an error if not OK.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
asBinary(int pos,
boolean optional)
Return the pos-th parameter, checking it is a base64 binary.
|
java.lang.Boolean |
asBoolean(int pos,
boolean optional)
Return the pos-th parameter, checking it is a boolean.
|
org.expath.tools.model.Element |
asElement(int pos,
boolean optional,
net.sf.saxon.expr.XPathContext ctxt)
Return the pos-th parameter, checking it is an element node.
|
org.expath.tools.model.Element |
asElement(int pos,
boolean optional,
net.sf.saxon.expr.XPathContext ctxt,
java.lang.String name)
Return the pos-th parameter, checking it is an element node, as well as its name.
|
java.lang.Long |
asLong(int pos,
boolean optional)
Return the pos-th parameter, checking it is a string.
|
org.expath.tools.model.Sequence |
asSequence(int pos,
boolean optional,
net.sf.saxon.expr.XPathContext ctxt)
Return the pos-th parameter, as a sequence.
|
java.lang.String |
asString(int pos,
boolean optional)
Return the pos-th parameter, checking it is a string.
|
java.util.List<java.lang.String> |
asStringList(int pos,
boolean optional)
Return the pos-th parameter, checking it is a list of strings.
|
Parameters.Formatter |
format(java.lang.String name) |
int |
number()
Return the number of parameters.
|
public Parameters(Library lib, net.sf.saxon.om.Sequence[] params, int min, Param[] formals) throws net.sf.saxon.trans.XPathException
lib - The extension library.params - The parameter list.min - The minimal number of parameters.formals - The formal parameters.net.sf.saxon.trans.XPathException - If there is not exactly num parameters.public int number()
public java.lang.String asString(int pos,
boolean optional)
throws net.sf.saxon.trans.XPathException
XPathException is thrown. As well as if there is more than
one item.pos - The position of the parameter to analyze, 0-based.optional - Can the parameter be the empty sequence?net.sf.saxon.trans.XPathException - If there is not such parameter or if it is not a string.public java.lang.Boolean asBoolean(int pos,
boolean optional)
throws net.sf.saxon.trans.XPathException
XPathException is thrown. As well as if there is more than
one item.pos - The position of the parameter to analyze, 0-based.optional - Can the parameter be the empty sequence?net.sf.saxon.trans.XPathException - If there is not such parameter or if it is not a boolean.public java.lang.Long asLong(int pos,
boolean optional)
throws net.sf.saxon.trans.XPathException
XPathException is thrown. As well as if there is more than
one item.pos - The position of the parameter to analyze, 0-based.optional - Can the parameter be the empty sequence?net.sf.saxon.trans.XPathException - If there is not such parameter or if it is not a long.public java.util.List<java.lang.String> asStringList(int pos,
boolean optional)
throws net.sf.saxon.trans.XPathException
XPathException is thrown.pos - The position of the parameter to analyze, 0-based.optional - Can the parameter be the empty sequence?net.sf.saxon.trans.XPathException - If there is not such parameter or if it is not a
string sequence.public byte[] asBinary(int pos,
boolean optional)
throws net.sf.saxon.trans.XPathException
XPathException is thrown. As well as if there is more than
one item.pos - The position of the parameter to analyze, 0-based.optional - Can the parameter be the empty sequence?net.sf.saxon.trans.XPathException - If there is not such parameter or if it is not a binary.public org.expath.tools.model.Element asElement(int pos,
boolean optional,
net.sf.saxon.expr.XPathContext ctxt)
throws net.sf.saxon.trans.XPathException
XPathException is thrown. As well as if there is more than
one item, or if the param is not an element node.pos - The position of the parameter to analyze, 0-based.optional - Can the parameter be the empty sequence?ctxt - The context in which this extension call occurs.net.sf.saxon.trans.XPathException - If there is not such parameter or if it is not an element.public org.expath.tools.model.Element asElement(int pos,
boolean optional,
net.sf.saxon.expr.XPathContext ctxt,
java.lang.String name)
throws net.sf.saxon.trans.XPathException
XPathException is thrown. As well as if there is more than
one item, or if the param is not an element node, or if the element
name is not equal to name (in the webapp namespace).pos - The position of the parameter to analyze, 0-based.optional - Can the parameter be the empty sequence?ctxt - The context in which this extension call occurs.name - The required local name of the element.net.sf.saxon.trans.XPathException - If there is not such parameter or if it is not an element.public org.expath.tools.model.Sequence asSequence(int pos,
boolean optional,
net.sf.saxon.expr.XPathContext ctxt)
throws net.sf.saxon.trans.XPathException
XPathException is thrown.pos - The position of the parameter to analyze, 0-based.optional - Can the parameter be the empty sequence?ctxt - The context in which this extension call occurs.net.sf.saxon.trans.XPathException - If there is not such parameter or if it is not an element.public Parameters.Formatter format(java.lang.String name)
Copyright © 2015-2020 EXPath. All Rights Reserved