Class Procedure
java.lang.Object
net.sf.saxon.instruct.Procedure
- All Implemented Interfaces:
Serializable, SourceLocator, LocationProvider, Container
- Direct Known Subclasses:
AttributeSet, KeyDefinition, Template, UserFunction
This object represents the compiled form of a user-written function, template, attribute-set, etc
(the source can be either an XSLT stylesheet function or an XQuery function).
It is assumed that type-checking, of both the arguments and the results, has been handled at compile time. That is, the expression supplied as the body of the function must be wrapped in code to check or convert the result to the required type, and calls on the function must be wrapped at compile time to check or convert the supplied arguments.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ExpressiongetBody()intfinal ExecutableGet the Executable (representing a complete stylesheet or query) of which this Container forms partintGet the host language (XSLT, XQuery, XPath) used to implement the code in this containerintintgetLineNumber(int locationId) Get the line number within the document or module containing a particular locationGet the LocationProvider allowing location identifiers to be resolved.getSystemId(int locationId) Get the URI of the document or module containing a particular locationbooleanreplaceSubExpression(Expression original, Expression replacement) Replace one subexpression by a replacement subexpressionvoidsetBody(Expression body) voidsetExecutable(Executable executable) voidsetHostLanguage(int language) voidsetLineNumber(int lineNumber) voidvoidsetSystemId(String systemId)
-
Field Details
-
body
-
-
Constructor Details
-
Procedure
public Procedure()
-
-
Method Details
-
setBody
-
setHostLanguage
public void setHostLanguage(int language) -
getHostLanguage
public int getHostLanguage()Description copied from interface:ContainerGet the host language (XSLT, XQuery, XPath) used to implement the code in this container- Specified by:
getHostLanguagein interfaceContainer- Returns:
- typically
Configuration.XSLTorConfiguration.XQUERY
-
getBody
-
replaceSubExpression
Replace one subexpression by a replacement subexpression- Specified by:
replaceSubExpressionin interfaceContainer- Parameters:
original- the original subexpressionreplacement- the replacement subexpression- Returns:
- true if the original subexpression is found
-
setStackFrameMap
-
getStackFrameMap
-
getExecutable
Description copied from interface:ContainerGet the Executable (representing a complete stylesheet or query) of which this Container forms part- Specified by:
getExecutablein interfaceContainer
-
setExecutable
-
getLocationProvider
Get the LocationProvider allowing location identifiers to be resolved.- Specified by:
getLocationProviderin interfaceContainer
-
setLineNumber
public void setLineNumber(int lineNumber) -
setSystemId
-
getLineNumber
public int getLineNumber()- Specified by:
getLineNumberin interfaceSourceLocator
-
getSystemId
- Specified by:
getSystemIdin interfaceSourceLocator
-
getColumnNumber
public int getColumnNumber()- Specified by:
getColumnNumberin interfaceSourceLocator
-
getPublicId
- Specified by:
getPublicIdin interfaceSourceLocator
-
getSystemId
Description copied from interface:LocationProviderGet the URI of the document or module containing a particular location- Specified by:
getSystemIdin interfaceLocationProvider- Parameters:
locationId- identifier of the location in question (as passed down the Receiver pipeline)- Returns:
- the URI of the document or module.
-
getLineNumber
public int getLineNumber(int locationId) Description copied from interface:LocationProviderGet the line number within the document or module containing a particular location- Specified by:
getLineNumberin interfaceLocationProvider- Parameters:
locationId- identifier of the location in question (as passed down the Receiver pipeline)- Returns:
- the line number within the document or module.
-